Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: partition mask #382

Closed
adrienaury opened this issue Jan 15, 2025 · 0 comments · Fixed by #383
Closed

feat: partition mask #382

adrienaury opened this issue Jan 15, 2025 · 0 comments · Fixed by #383
Assignees

Comments

@adrienaury
Copy link
Member

📝 Description

Add a new mask called partition to the masking.yml configuration file. This mask will allow handling fields containing different types of values by applying distinct transformations based on predefined conditions. A default option will handle unrecognized cases.

🎯 Problem to Solve

Currently, PIMO does not support processing fields with heterogeneous data types (e.g., technical identifiers and email addresses) conditionally. This limitation complicates the precise masking of sensitive data when a field contains mixed-value types.

🔍 Solution Details

The partition mask will rely on conditions to identify specific cases and apply a defined list of masks for each case. Example configuration:

- selector:
    jsonpath: "ID"
  mask:
    partition:
      idrh:
        when: '{{ regexMatch "P[A-Z]{3}[0-9]{3}" .ID }}'
        then:
          # List of masks for the idrh case
      gag:
        when: '{{ regexMatch "GAG[0-9]{11}" .ID }}'
        then:
          # List of masks for the gag case
      default:
        then:
          # List of masks for unrecognized cases
@adrienaury adrienaury self-assigned this Jan 15, 2025
@adrienaury adrienaury linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant