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

Anonymization filter on table #171

Open
pounard opened this issue Jun 3, 2024 · 0 comments
Open

Anonymization filter on table #171

pounard opened this issue Jun 3, 2024 · 0 comments

Comments

@pounard
Copy link
Member

pounard commented Jun 3, 2024

This is an issue for this comment: #138 (comment)

The idea is to allow anonymized table (or entity) to be filtered using user given conditions.

If I understood correctly @maxhelias use case, which is anonymizing some user table, but skipping some accounts anonymization (for example, your maintenance very special account, or people that will tests the QA version accounts).

This is a legit use case, we intend to find some elegant solution for this, although there are a few constraints:

  • First I mentioned in the former issue that we could provide an event dispatcher and a few events that allows the API user to alter the update query. That's something we could implement, but it's not ideal because it's not configuration-driven.
  • Secondly, in our internal roadmap, we plan to allow our users to dump the anonymization configuration into a single YAML file containing everything, thus allowing this tool to run via a standalone CLI (unconnected to Symfony) in order to run the anonymization process outside of the framework context.

So, here are a few ideas:

  • Create a new attribute AnonymizeFilter(string column$, string|array $conditions, bool $negate = false) for entities, which can be directly translated into a YAML data structure for YAML configuration.
  • Provide a few supported default conditions (basic comparisons really, such as <, <=, =, >=, >, like, etc...
  • Provide a raw option which allows the user to directly write one or more SQL condition strings.
@pounard pounard mentioned this issue Jun 3, 2024
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

No branches or pull requests

1 participant