fides icon indicating copy to clipboard operation
fides copied to clipboard

Removing identities from cache

Open galvana opened this issue 1 year ago • 3 comments

Closes PROD-1605

Description Of Changes

Removing provided identities, custom privacy request fields, and encryption keys from the cache. This was done to prevent required values from expiring from the cache if a request was not immediately approved. The new guidance is to store any values provided with the original privacy request creation to the database. Values generated during the request such as masking secrets and derived identities are still kept in the cache only (not to the database).

Code Changes

  • [ ] Added encryption_key to the privacyrequest table as an encrypted string value
  • [ ] Replaced calls to get_persisted_custom_privacy_request_fields with get_custom_privacy_request_field_map to better reflect the return type (we are returning a map instead of a list of fields)
  • [ ] Replaced calls to get_cached_identity_data with get_identity_map
  • [ ] Removed the cache_data function and moved create_masking_secrets to the Policy model
  • [ ] Replaced calls to cache_identity with persist_identity

Steps to Confirm

  • [ ] Modify the .env file in the root directory of fides repo and add FIDES__REDIS__DEFAULT_TTL_SECONDS=30
  • [ ] Run nox -s "fides_env(test)" and wait for the test environment to start up
  • [ ] Open the Privacy Center and submit an access request for [email protected]
  • [ ] Open the Admin UI within 30 seconds and approve the request, and confirm that the access request succeeds
  • [ ] Open the Privacy Center and submit a second access request for [email protected]
  • [ ] Wait 60 seconds!
  • [ ] Open the Admin UI and approve the second request, and confirm that the access request processes successfully

Pre-Merge Checklist

galvana avatar Feb 26 '24 22:02 galvana