-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add masking strategy override to FidesMeta #23
Conversation
src/fideslang/models.py
Outdated
"""Overrides field-level masking strategies.""" | ||
|
||
strategy: str | ||
configuration: Dict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'd make this optional so that configuration-less overrides can be done with just the strategy name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since setting is as an Optional will make mypy implicitly interpret it as Dict[Any, Any] which is incompatible with our strategy configuration definition in fides that is Dict[str, Any] (it also wont accept Optional[]). i had to explicitly set it as Optional[Dict[str, Any]] and since pydantic BaseModel doesnt like Any types i had to type ignore. also setting is as Optional[] forces me to type ignore inside fides too because the strategy class states that configuration is not an optional field.
i guess this poses the question, Is it worth to do so?
Closes #
Description Of Changes
Add new field called masking_strategy_override to FidesMeta
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.md