-
Notifications
You must be signed in to change notification settings - Fork 11
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 DSR Concepts to Fideslang [#94] #95
Conversation
This also included a few extra helper functions from fides. It's possible that those shouldn't live in `fideslang`. I'll look into that in the future. The main purpose of this commit is to get everything moved over.
…re defined before they are being used. - Remove validation on data categories in last commit. This restricts valid data categories to just those in the default taxonomy. Defer to caller to validate this how they wish.\ - Allow both fidesops_meta and fides_meta to be specified on Dataset/Collection/DatasetField for backwards-compatibility but have validator move fidesops_meta to fides_meta. - Move validating data type code to fideslang/validation - Update FidesKey validation to allow angle brackets. There are several fides use cases where angle brackets might be in an initial dataset and then replaced with other text. - Override FidesValidationError to be a subclass of ValueError not Exception so Pydantic can pick up and raise as a ValidationError. - Add unit tests for core fidesops-concepts brought over to fideslang.
- Remove "allow" extra on Taxonomy config. We can restore later if there's a valid use case. - Add more tests for FidesCollectionKey and edge cases on "return_all_elements" and data categories being enforced at object level.
…alidation occurs on the DatasetField.
…meta field be a defined field at all.
… avoid potential error "got multiple values for keyword argument".
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.
Added a couple of comments but installed and tested this in fides for validation purposes. The only thing that might be nice to do is see if there is a way to reduce or remove the use of Any
if possible but not something that should hold this back
Also great job on the backwards compatibility addition!! 🔥 🔥
thanks so much for your comments @SteveDMurphy 🏆 |
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.
This is awesome! Thanks for taking over this work. Everything worked for me. I was unsure of exactly how the ops specific validations would split up between fideslang and fides. I like how everything worked out. I love the thorough tests for the fidesops_meta
mixin 🚀
these steps to confirm are 🔥 thank you for being so thorough @pattisdr |
Thanks so much for your comments @TheAndrewJackson and @ThomasLaPiana. I'll address today! |
- Revert disallow_any_explicit change to True - Make the descriptions of dsr additions to fideslang more generic - Update fides_meta fields to use Field(description=...) syntax so it is picked up by automatically generated docs - Update object fields validation to call out the name of the field in the error for easier debugging - Make DATA_TYPE_NAMES all caps
So I think we can go ahead and merge this! For fides to be able to use this, there are some slight tweaks needed but we are handling as part of the unified fides resources. Fides is pinned to a specific fideslang version so I think this should be fine. |
Closes https://github.com/ethyca/fideslang/issues/94
Code Changes
FidesDatasetReference
,FidesMeta
,FidesCollectionKey
, andCollectionMeta
, andEdgeDirection
concepts from Fides -> Fideslang.resource_id
field and a newafter
field that allows you to specify the Datasets which should precede the current Dataset when running a DSRDatasetCollection.fides_meta
which currently only holds anafter
field, allowing you to specify which collections should run before the current collection in a DSRfides_meta
fields to DatasetField which is aFidesMeta
resource. This has several attributes, including which fields the current field references or is referenced by, if the current field can be queried directly using identity data supplied for a DSR, whether the field is a primary key, a fides-supported datatype and other less common attributes.object
type, related to what data a DSR may returnfidesops_meta
to be specified on Datasets/Collections/Fields, and this is turned into afides_meta
attribute on instantiationSteps to Confirm
I think the best way to validate is to pull this fides branch down and QA it, which is specifically using this fideslang branch ethyca/fides#2009
datasetconfig.datasets
usesfidesops_meta
. Run a privacy requestctl_datasets
tabledatasetconfig.datasets
usesfides_meta
. nowctl_datasets
tablePre-Merge Checklist
CHANGELOG.md
Description Of Changes
Fidesops expanded Fideslang Dataset/Collection/Field concepts in its own repo primarily to add concepts to carry out DSR's. The most important of these are the
DatasetField.fidesops_meta
information which summarizes things like how collections are related to each other or if a collection is an entrypoint (what identity data we should start with to query the collection).Move several DSR concepts from Fides back to Fideslang.