-
Notifications
You must be signed in to change notification settings - Fork 78
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
1974 add default storage used by all dsr policies by default #2438
1974 add default storage used by all dsr policies by default #2438
Conversation
still no support for values being provided by config properties
Derive active default storage config based on what is set in the settings endpoint. The settings endpoint can only be used to update the storage property, for now.
Codecov ReportBase: 88.44% // Head: 88.63% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2438 +/- ##
==========================================
+ Coverage 88.44% 88.63% +0.19%
==========================================
Files 328 331 +3
Lines 15954 16131 +177
Branches 4431 4485 +54
==========================================
+ Hits 14110 14298 +188
+ Misses 1689 1676 -13
- Partials 155 157 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
please don't merge yet - making some adjustments based on realizations since i'd last been working on this:
|
this also allows us to leverage a proper pydantic schema for validation
src/fides/api/ctl/migrations/versions/5d62bab40b71_add_application_config_table.py
Outdated
Show resolved
Hide resolved
code cov is saying 97.36% of the diff is hit but i don't see any codecov comments remaining so unsure what else i can adjust? |
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.
Discussed coverage with @adamsachs. We found that the lines that are showing as uncovered are artifacts of previously uncovered lines. All his changes are covered.
created https://github.com/ethyca/fidesdocs/issues/56 to track docs updates |
Closes #1974
Closes #2453
Code Changes
new
/storage/default
endpoints to set default storage configs per storage typePUT /storage/default
to upsert default storage configs for a given type ( thetype
is specified in body)PUT /storage/default/{storage_type}/secret
to upsert secrets for default storage config of a given typeGET /storage/default
to get all default storage configs (i.e. of all types)GET /storage/active/default
to get the currently active default storage config (see below config property related to this)update
/config
endpoint to allow setting global application config properties via APIPATCH /config
takes a JSON settings/properties body and hasPATCH
semantics, i.e. only fields provided are updatedGET /config
endpoint: query paramapi_set
(which defaults tofalse
). Ifapi_set=true
, then the API returns a JSON settings/properties body with the global application config properties that have been set via APIPATCH
API are stored as app state an encrypted JSON blob in a single-row db tablestorage.active_default_storage_type
that's used to drive which default storage config type should be used in DSR executionstorage.active_default_storage_type
has been set via API, then a placeholder local storage default will be used as the storage config for DSR execution. local storage requires no user input at this point, so it can be safely generated as a placeholder by the system.new scope added for update permission for the above endpoint:
SETTINGS_READ = "settings:read"
CONFIG_UPDATE = "config:update"
updated
seed.py
andload_examples.py
to respect this new framework with keeping similar semantics as previously. specifically:seed.py
no longer creates a local storage configuration, and the default access rule that it creates is no longer explicitly linked to any storage configuration/destination. instead, the default access rule will rely on the default storage logic: if no specific user actions are taken, that will be a placeholder local storage config; if the user goes through necessary steps (in the API or UI) to configure a active default s3 storage location, then that will be usedload_examples.py
will create a default s3 storage destination if AWS secrets are present in the ENV file, and it will set s3 as the active default storage type.migration behavior:
is_default
attribute set toFalse
storage.active_default_storage_type
property set on migration, i.e. that app config property will stay unset until explicitly set by a userSteps to Confirm
nox -s dev -- ui
and submit access privacy requests, ensure they still write to local storage as expectednox -s test_env
and submit access privacy requests, ensure they still write to local storage as expected.env
file configured for s3 writing and that should still work as expectedfides deploy up
and submit access privacy requests, ensure they still write to local storage as expectedPUT /storage/default
with a body that specifies an s3 storage destination and a bucket of choicePUT /storage/default/secrets
with a body that specifies s3 storage secrets as needed (if applicable)PATCH /application/settings
with a body like this to uses3
as the active default storage location:{ "fides.storage.active_default_storage_type" : "s3" }
Pre-Merge Checklist
CHANGELOG.md
Description Of Changes
Write some things here about the changes and any potential caveats