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

fides evaluate command fails when privacy_declaration does not have a data_qualifier: "Found missing key () referenced in taxonomy" #4280

Open
NevilleS opened this issue Oct 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@NevilleS
Copy link
Contributor

NevilleS commented Oct 13, 2023

Bug Description

It's possible to edit a System resource in a valid way which causes fides evaluate to fail with a mysterious error:

(venv) ~/sandbox/fides-2-21-0-test% fides evaluate
> Loaded config from: .fides/fides.toml
Loading resource manifests from: .fides/
Taxonomy successfully created.
----------
Processing policy resource(s)...
PUSHED 1 policy resource(s).
----------
Processing dataset resource(s)...
PUSHED 2 dataset resource(s).
----------
Processing data_subject resource(s)...
PUSHED 15 data_subject resource(s).
----------
Processing data_category resource(s)...
PUSHED 85 data_category resource(s).
----------
Processing system resource(s)...
PUSHED 4 system resource(s).
----------
Processing data_qualifier resource(s)...
PUSHED 5 data_qualifier resource(s).
----------
Processing organization resource(s)...
PUSHED 1 organization resource(s).
----------
Processing data_use resource(s)...
PUSHED 52 data_use resource(s).
----------
Loading resource manifests from: .fides/
Taxonomy successfully created.
Evaluating the following policies:
- sample_policy
----------
Checking for missing resources...
Executing Policy evaluation(s)...
Found missing key () referenced in taxonomy

Steps to Reproduce

  1. Use fides deploy up to get an instance up and running
  2. Run fides user login and fides status to ensure your CLI is connected
  3. Use fides pull --all-resources .fides/resources.yml to download the YAML resources locally
  4. Run fides evaluate and confirm everything works (at first!)
  5. Edit the resources.yml file locally and:
    1. Find the system with fides_key: cookie_house
    2. Find the first privacy_declaration where data_use: functional.service.improve
    3. Change it to data_qualifier: null
  6. Run fides push to confirm that this is a valid System
  7. Run fides evaluate and get the error: Found missing key () referenced in taxonomy

Expected behavior

The evaluate command should handle a missing data_qualifier; we implicitly handle this for datasets/collections/fields by falling back to a default value for data_qualifier, but we don't really want to do that in fideslang as it's pretty ugly. The policy evaluate should be able to safely infer that.

Environment

  • Version: 2.21.0
@NevilleS NevilleS added the bug Something isn't working label Oct 13, 2023
@ThomasLaPiana
Copy link
Contributor

I'm curious if this still happens if you remove the data_qualifier as opposed to setting it to null? I have a feeling that breaks how Pydantic handles the default value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants