Skip to content

feat: implement payroll PII masking, data privacy, and GDPR/CCPA consent engine (closes #1870) - #1889

Merged
Dev1822 merged 1 commit into
Dev1822:mainfrom
Aakif-Kohari:feat/issue-1870-pii-masking-gdpr-consent
Aug 28, 2026
Merged

feat: implement payroll PII masking, data privacy, and GDPR/CCPA consent engine (closes #1870)#1889
Dev1822 merged 1 commit into
Dev1822:mainfrom
Aakif-Kohari:feat/issue-1870-pii-masking-gdpr-consent

Conversation

@Aakif-Kohari

Copy link
Copy Markdown

Description

This PR implements a Payroll PII Masking, Data Privacy & GDPR/CCPA Consent Engine. It introduces schemas for privacy consents, field-level masking rules, data erasure requests, and immutable PII access audit logs. The engine dynamically masks outgoing payroll data (e.g., SSNs, bank accounts) based on the requesting user's RBAC permissions. A "Data Erasure Guardrail" safely anonymizes a terminated employee's PII across historical ledgers while preserving the immutable financial/tax aggregation data required by the IRS 7-year retention mandate. The frontend allows Compliance Admins to configure masking rules, process GDPR erasure requests, and audit PII access.

Fixes#1870

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Changes Made

  • backend/src/models/dataPrivacy.model.js (New): Schemas for PrivacyConsent, PIIMaskingRule, DataErasureRequest, and DataAuditLog.
  • backend/src/utils/piiMaskingEngine.utils.js (New): Engine for dynamic RBAC masking and safe GDPR erasure logic.
  • backend/src/controllers/dataPrivacy.controller.js (New): Endpoints for masking rules, consent tracking, and erasure processing.
  • backend/src/routes/dataPrivacy.routes.js (New): Route definitions.
  • frontend/src/pages/DataPrivacyDashboard.jsx (New): UI to manage masking rules, process erasure requests, and view audit logs.

How Has This Been Tested?

  • Tested locally on frontend
  • Tested locally on backend

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@vercel

vercelBot commented Aug 28, 2026

Copy link
Copy Markdown

@Aakif-Kohari is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Aakif-KohariAakif-Kohari changed the title feat: implement payroll PII masking, data privacy, and GDPR/CCPA cons…feat: implement payroll PII masking, data privacy, and GDPR/CCPA consent engine (closes #1870)Aug 28, 2026
@Dev1822Dev1822 added enhancement New feature or request ECSoC26 good-pr labels Aug 28, 2026
@Dev1822
Dev1822 merged commit 549a908 into Dev1822:mainAug 28, 2026
9 of 24 checks passed
@Aakif-Kohari
Aakif-Kohari deleted the feat/issue-1870-pii-masking-gdpr-consent branch August 29, 2026 02:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] implement payroll PII masking, data privacy, and GDPR/CCPA consent engine

2 participants

@Aakif-Kohari@Dev1822