ethyca-fides 2.57.1rc0__py2.py3-none-any.whl → 2.58.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ethyca_fides-2.57.1rc0.dist-info → ethyca_fides-2.58.0.dist-info}/METADATA +1 -1
- {ethyca_fides-2.57.1rc0.dist-info → ethyca_fides-2.58.0.dist-info}/RECORD +245 -230
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/1d2f04ac19f2_add_page_column_to_asset_table.py +49 -0
- fides/api/alembic/migrations/versions/7c3fbee90c78_add_user_assigned_data_uses_and_system_.py +54 -0
- fides/api/alembic/migrations/versions/9a1eacd2666b_add_description_column_to_asset.py +25 -0
- fides/api/api/v1/endpoints/config_endpoints.py +4 -2
- fides/api/api/v1/endpoints/generic_overrides.py +48 -6
- fides/api/graph/traversal.py +8 -0
- fides/api/models/asset.py +37 -18
- fides/api/models/attachment.py +11 -13
- fides/api/models/comment.py +17 -17
- fides/api/models/connectionconfig.py +1 -1
- fides/api/models/detection_discovery.py +12 -0
- fides/api/models/location_regulation_selections.py +1 -0
- fides/api/models/privacy_request/__init__.py +44 -0
- fides/api/models/privacy_request/consent.py +155 -0
- fides/api/models/privacy_request/execution_log.py +108 -0
- fides/api/models/{privacy_request.py → privacy_request/privacy_request.py} +82 -691
- fides/api/models/privacy_request/provided_identity.py +149 -0
- fides/api/models/privacy_request/request_task.py +284 -0
- fides/api/models/privacy_request/webhook.py +94 -0
- fides/api/models/sql_models.py +28 -5
- fides/api/oauth/jwt.py +18 -0
- fides/api/oauth/utils.py +11 -11
- fides/api/schemas/connection_configuration/connection_secrets_datahub.py +2 -4
- fides/api/schemas/dataset.py +22 -2
- fides/api/schemas/saas/strategy_configuration.py +1 -0
- fides/api/service/pagination/pagination_strategy_cursor.py +15 -1
- fides/api/service/pagination/pagination_strategy_link.py +1 -1
- fides/api/service/storage/s3.py +193 -0
- fides/api/service/storage/util.py +10 -0
- fides/api/tasks/storage.py +12 -111
- fides/config/__init__.py +1 -1
- fides/data/language/languages.yml +2 -0
- fides/data/location/locations.yml +244 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/83Gi0kdCvIdkdE1Kf6DS1/_buildManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/83Gi0kdCvIdkdE1Kf6DS1/_ssgManifest.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/1100-053fc6b76c65a00f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{1150-73440d7b319558e8.js → 1150-035a721a04f4451e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1376-5cea5ef9362215e8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{2397-7177ecf4ebe68feb.js → 2397-ee53235fb21b5e97.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{255-bf1797f78249d090.js → 255-7db55b0e3a0f9dea.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/2fbcc6de-a6c61724c327e9fa.js +8 -0
- fides/ui-build/static/admin/_next/static/chunks/{3086-be6b52546c3efc90.js → 3086-b5054ec2c75700b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/3412-7ec8751b8182e1bf.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/355-8a77c9a1cd027f2e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3615-5e2d062d684b8fa1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{3855-5c7b11871f59e0e0.js → 3855-b6b7865dedd7bc2a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{3872-f3d5054bdc584eaa.js → 3872-4e053c20d546f027.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/4060-8d165e1236ea521a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4450-36234280bee624ff.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4481-aab99ff80f707473.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4723-0a3c5e2ce143a7d0.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5258-3a650be9142cf914.js → 5258-0658dc2274df6832.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5277-e8a036319456127f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5480-f5bec5e881f72f8d.js → 5480-f49696df5e8ae500.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{5487-d96e1abc93f92631.js → 5487-3ad50d21cdbc9209.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/570-c99f07161bd339cd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5826-16e497af363a0cbc.js → 5826-e5dcb4e68cfe6289.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-52aee296edc44f7e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/6060-cb1ab5be7067bf7b.js +4 -0
- fides/ui-build/static/admin/_next/static/chunks/{6315-dee79f6861c94d2d.js → 6315-fa1519cdf080f42d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{6372-f1b54f3cb4888660.js → 6372-ca9c12ac8902365b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/6527-0eed08abe252a918.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/678d4732-50255cc09048e643.js +2 -0
- fides/ui-build/static/admin/_next/static/chunks/{6853-cacea421af3bfc26.js → 6853-8941824350c3c1a8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/6954-3b887fb444f9228c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{7088.0e7c92a7cbb57562.js → 7088.eb76fca286e5f2e6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7453-39761c38da31257e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{7751-25e0c1307988ffd7.js → 7751-a8f31c062d4cb09d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{79-ba88d0cf4c65aaa2.js → 79-f9b948ebb186900f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7980-4bd08957448dea32.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7c79804f.7a7112aece470725.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{8433-969280d321d1c3a2.js → 8433-b3008ecaf9834e7f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{8499-07507004e8275df2.js → 8499-43606100edf42fdf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/8702-d1c8296f9f6afc10.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5908-532dfbc9d930f635.js → 9014-eeae6f581158e645.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9046-80f1ea44f89fe32c.js → 9046-04bd7becea207cb1.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/905-8ab919e7b274ed50.js +8 -0
- fides/ui-build/static/admin/_next/static/chunks/9187-851756440f79cd75.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9282-2bfbdca45e84e810.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9327-2cba327d10586683.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9392.97b2e3327dceb7c9.js → 9392.da35a8e778812d91.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/9676.f297a1347ac09c56.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9767-1a23925d2cb27b51.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9999-f2e40d5b13343220.js → 9999-637e0e5341f15f4a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/e3251fe7-5777b5d778e6fffa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/main-24f422f93845a596.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{main-app-2650f704701c6a7b.js → main-app-94a0711202e08b15.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{404-1087258931760074.js → 404-b202c0d8f6fc75c3.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/_app-fc89ce7bed454c84.js +923 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-d7f60624cbc12217.js → manual-9acaab973dfe86e2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-18b0b521255289a3.js → multiple-ba975134a85588f8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-d258f0c25fa020bf.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{ant-poc-b3b4d0a98450ffd1.js → ant-poc-b9932971a479f3a7.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-64f83e9a2b777bf3.js → add-vendors-b34e5324461d0c87.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-723cc3d4f5740ea6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-443e6dd191ce5588.js → [id]-fb75fa0aea77678d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{new-36162d5bea29dcc2.js → new-a9d9402c219d13e5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-35e9df60b21e21a6.js → privacy-experience-c946b33b0322b8ad.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-2d651499c07d12d9.js → [id]-72251b48e2e03a1e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-36e57d2f2446be82.js → new-9611dd42856d6062.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-notices-da37afbe5ec81339.js → privacy-notices-ea57f9d6ad17e957.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-c57b209feef7c2da.js → properties-e5748812ba055a56.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-788cf0e34829af46.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{consent-24bef021ee71e36c.js → consent-39d65f13cc8f1cf8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-6cbd79481199812d.js → [resourceUrn]-ac033a16f043e6f9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-46b9790da2fec05a.js → [projectUrn]-a29850536c85d4b8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-1f965b9c496071d1.js → projects-c44ce244122e96d5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-e7833c1c606081a9.js → [resourceUrn]-71e26d262afcaea5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-bed368d048ea6883.js → resources-305555b74c357bf2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-900004e402c31797.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-b66831fdafcdf67c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-5f9ef1f99818117c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-d001337d1bb73bd1.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{activity-1d7936f05d23097f.js → activity-11b3ce9f61d9bfe9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-68122dbf449a11b4.js → [resourceUrn]-054ca46a782e99a5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-0ceaf3c555e84714.js → detection-b75dd3e4306ac18e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-22c27fe0f898ad2a.js → [resourceUrn]-1da20aeb6fc995e4.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-8f2b102e19b0b8f2.js → discovery-cad50b0cc6d1050c.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-9cd0c40bef77b120.js → datamap-8cb714cdd44ac40e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-d79551d4c64c398c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-7e5df4a0de7540bb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-e14c1c07658f8a10.js → [datasetId]-6ba18f92ba561114.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-803c1b577ab17ae3.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-fa743ddc7f89d76b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-0616437e1a82d3ed.js → [id]-bbe1ca2793798e6b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-f8218440494e8532.js → new-abc17fef69cd951b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-a78a73b65929853a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/fides-js-docs-80b241bf6cddb72e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{index-94e6d589c4edf360.js → index-bfaacdb55a5a6c9f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-d4329043219fed9b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-ef8000d7388dc915.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-6b032de0a6c2c400.js → [id]-ad02e019b2467958.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-c0d6ae68ff7979c6.js → add-template-f9693cb6a0b7ded8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-1e60754abec1ee6b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-bbe5854b7d19b7e9.js → [id]-fe765154315782cf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-f5f7a8069909ef24.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-9f7eaad05e5b9292.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-4bad69cd42c9722c.js → configure-2987edc77388e85a.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-d85c0d16ba09ba35.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-b4c808a8a0287d11.js → [id]-94e2faa73dd6a3e6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-5a701477b006a63b.js → add-property-630a6a3dd6502ba6.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{properties-9a1899dfe052023e.js → properties-20ca2f963906674b.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-afedc48ef4e7f858.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{about-d073be113e9ca7b0.js → about-a49d0f84cf0cf05e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-89524101b7279f6e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-744e7bbc200557e7.js → custom-fields-52d030b1db2ca1b9.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-c5cd5fb578de9515.js → domain-records-fa42d8f18df44927.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-24cba38685dc872c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-39c7ae3602ac69b2.js → email-templates-6fd6071e2009b8f2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-45e33ba111f8f8b0.js → locations-66c757325cb58467.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-a08693d0d1e10bc8.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-94975aeab348528e.js → regulations-c6c239996cfa6ae8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-151571cff4e85894.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-82d9af34546adaa2.js → [id]-4f5a28226575c976.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{systems-c320df35d51dc537.js → systems-abd68fc5ddde5482.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{taxonomy-181ea5b0ac975239.js → taxonomy-16b4d75c49276add.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-622e16a17a11c096.js → [id]-78eaf933f755bfe8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-aa872b21bb835d34.js → user-management-6c9ad62479a7d03e.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{webpack-4df2ba5ee2d40f0a.js → webpack-2c7ccac5843c4d8e.js} +1 -1
- fides/ui-build/static/admin/_next/static/css/113d823fe71f6af0.css +1 -0
- fides/ui-build/static/admin/_next/static/css/ab65b8cc3144bfc8.css +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/ant-poc.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/lib/fides-ext-gpp.js +1 -1
- fides/ui-build/static/admin/lib/fides-headless.js +1 -1
- fides/ui-build/static/admin/lib/fides-tcf.js +3 -3
- fides/ui-build/static/admin/lib/fides.js +2 -2
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/messaging.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/1995-0e4fc4f7b44ed72b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2780-8328de94968d05e4.js +0 -4
- fides/ui-build/static/admin/_next/static/chunks/3005-373de16453ed7eea.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3320-87c75df57a47487e.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3627-fb83adac32c128e6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3662-420d9807c30008ab.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3949-9888699e2ac564c4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3967-845c902667e47c4f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3e38ba78-4487e45fd4ed2479.js +0 -2
- fides/ui-build/static/admin/_next/static/chunks/4481-ca8d2c75d634b6bc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4723-81d28e5be5c7b6d7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4833-a85bd5d25ebc40c4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5246-9fc6af1a6499e0a4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5574-a4047e826a8cd4c3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5834-bd9ed01c4ab2ef5c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5960-8895f51b30c35798.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5973-67c7562997f7d5cb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6277-515c922445b8edc5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6954-6eb480eb132239c3.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7044-9dc90893067f38ae.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7980-2597c279c30fbcda.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7c79804f.26834f883d5ad770.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8837-cf26e5ca1ae5aaf5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9282-1a5a2f6f4d9ed586.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9676.f4d5977a5f148797.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9767-4c591bd478c72650.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/main-ce7f38a12ea8c223.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/_app-9ceff88561dc1250.js +0 -909
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-136bcbd20ac59bf5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure-e11ace4f273ebb47.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-97fea4ac45093cbd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog-942d68a88b321067.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-00526324583139ab.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-f0ab51d0d5f995de.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center-2220c30c3863b5a5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/[...subfieldNames]-ab9bc1a3640547db.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]-17ec8385bb1fa6d4.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-740824dfa6823e26.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-5541ecd2f62711a5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection-b8eaa9b9d3832b30.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-a6448ce6ba7f0cf5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-1a6965d78bfb26b0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/messaging-f263e6bacf0f2d19.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/messaging-b96ee3fea3920fcf.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-1b0f9469cb65abfc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-eebd2f4ead19cfd6.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-a3fa3ad77730a03b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent-4769f55b138073f7.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/domains-775f55b3f80cd452.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/organization-14def4ca3cc9cda5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-21f26c0dc4d09e9f.js +0 -1
- fides/ui-build/static/admin/_next/static/css/957d0e4fea846ff0.css +0 -1
- fides/ui-build/static/admin/_next/static/rOPehh5NMs1hjog7nTw1q/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/rOPehh5NMs1hjog7nTw1q/_ssgManifest.js +0 -1
- {ethyca_fides-2.57.1rc0.dist-info → ethyca_fides-2.58.0.dist-info}/LICENSE +0 -0
- {ethyca_fides-2.57.1rc0.dist-info → ethyca_fides-2.58.0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.57.1rc0.dist-info → ethyca_fides-2.58.0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.57.1rc0.dist-info → ethyca_fides-2.58.0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-d6717378b42982d5.js → new-be690621a944bfe2.js} +0 -0
@@ -0,0 +1,149 @@
|
|
1
|
+
# pylint: disable=R0401, C0302
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from enum import Enum as EnumType
|
6
|
+
from typing import TYPE_CHECKING
|
7
|
+
|
8
|
+
from sqlalchemy import Column, ForeignKey, String
|
9
|
+
from sqlalchemy.ext.mutable import MutableDict
|
10
|
+
from sqlalchemy.orm import relationship
|
11
|
+
from sqlalchemy_utils.types.encrypted.encrypted_type import (
|
12
|
+
AesGcmEngine,
|
13
|
+
StringEncryptedType,
|
14
|
+
)
|
15
|
+
|
16
|
+
from fides.api.cryptography.cryptographic_util import (
|
17
|
+
hash_credential_with_salt,
|
18
|
+
hash_value_with_salt,
|
19
|
+
)
|
20
|
+
from fides.api.cryptography.identity_salt import get_identity_salt
|
21
|
+
from fides.api.db.base_class import Base # type: ignore[attr-defined]
|
22
|
+
from fides.api.db.base_class import JSONTypeOverride
|
23
|
+
from fides.api.migrations.hash_migration_mixin import HashMigrationMixin
|
24
|
+
from fides.api.schemas.redis_cache import Identity, LabeledIdentity, MultiValue
|
25
|
+
from fides.config import CONFIG
|
26
|
+
|
27
|
+
if TYPE_CHECKING:
|
28
|
+
from fides.api.models.privacy_request.consent import Consent, ConsentRequest
|
29
|
+
from fides.api.models.privacy_request.privacy_request import PrivacyRequest
|
30
|
+
|
31
|
+
|
32
|
+
class ProvidedIdentityType(EnumType):
|
33
|
+
"""Enum for privacy request identity types"""
|
34
|
+
|
35
|
+
email = "email"
|
36
|
+
phone_number = "phone_number"
|
37
|
+
ga_client_id = "ga_client_id"
|
38
|
+
ljt_readerID = "ljt_readerID"
|
39
|
+
fides_user_device_id = "fides_user_device_id"
|
40
|
+
external_id = "external_id"
|
41
|
+
|
42
|
+
|
43
|
+
class ProvidedIdentity(HashMigrationMixin, Base): # pylint: disable=R0904
|
44
|
+
"""
|
45
|
+
A table for storing identity fields and values provided at privacy request
|
46
|
+
creation time.
|
47
|
+
"""
|
48
|
+
|
49
|
+
privacy_request_id = Column(
|
50
|
+
String,
|
51
|
+
ForeignKey("privacyrequest.id", ondelete="CASCADE", onupdate="CASCADE"),
|
52
|
+
)
|
53
|
+
privacy_request = relationship(
|
54
|
+
"PrivacyRequest",
|
55
|
+
backref="provided_identities",
|
56
|
+
) # Which privacy request this identity belongs to
|
57
|
+
|
58
|
+
field_name = Column(
|
59
|
+
String,
|
60
|
+
index=False,
|
61
|
+
nullable=False,
|
62
|
+
)
|
63
|
+
field_label = Column(
|
64
|
+
String,
|
65
|
+
index=False,
|
66
|
+
nullable=True,
|
67
|
+
)
|
68
|
+
hashed_value = Column(
|
69
|
+
String,
|
70
|
+
index=True,
|
71
|
+
unique=False,
|
72
|
+
nullable=True,
|
73
|
+
) # This field is used as a blind index for exact match searches
|
74
|
+
encrypted_value = Column(
|
75
|
+
MutableDict.as_mutable(
|
76
|
+
StringEncryptedType(
|
77
|
+
JSONTypeOverride,
|
78
|
+
CONFIG.security.app_encryption_key,
|
79
|
+
AesGcmEngine,
|
80
|
+
"pkcs5",
|
81
|
+
)
|
82
|
+
),
|
83
|
+
nullable=True,
|
84
|
+
) # Type bytea in the db
|
85
|
+
consent = relationship(
|
86
|
+
"Consent", back_populates="provided_identity", cascade="delete, delete-orphan"
|
87
|
+
)
|
88
|
+
consent_request = relationship(
|
89
|
+
"ConsentRequest",
|
90
|
+
back_populates="provided_identity",
|
91
|
+
cascade="delete, delete-orphan",
|
92
|
+
)
|
93
|
+
|
94
|
+
@classmethod
|
95
|
+
def bcrypt_hash_value(
|
96
|
+
cls,
|
97
|
+
value: MultiValue,
|
98
|
+
encoding: str = "UTF-8",
|
99
|
+
) -> str:
|
100
|
+
"""
|
101
|
+
Temporary function used to hash values to the previously used bcrypt hashes.
|
102
|
+
This can be removed once the bcrypt to SHA-256 migration is complete.
|
103
|
+
"""
|
104
|
+
|
105
|
+
SALT = "$2b$12$UErimNtlsE6qgYf2BrI1Du"
|
106
|
+
value_str = str(value)
|
107
|
+
hashed_value = hash_credential_with_salt(
|
108
|
+
value_str.encode(encoding),
|
109
|
+
SALT.encode(encoding),
|
110
|
+
)
|
111
|
+
return hashed_value
|
112
|
+
|
113
|
+
@classmethod
|
114
|
+
def hash_value(
|
115
|
+
cls,
|
116
|
+
value: MultiValue,
|
117
|
+
encoding: str = "UTF-8",
|
118
|
+
) -> str:
|
119
|
+
"""Utility function to hash the value with a generated salt"""
|
120
|
+
SALT = get_identity_salt()
|
121
|
+
value_str = str(value)
|
122
|
+
hashed_value = hash_value_with_salt(
|
123
|
+
value_str.encode(encoding),
|
124
|
+
SALT.encode(encoding),
|
125
|
+
)
|
126
|
+
return hashed_value
|
127
|
+
|
128
|
+
def migrate_hashed_fields(self) -> None:
|
129
|
+
if value := self.encrypted_value.get("value"):
|
130
|
+
self.hashed_value = self.hash_value(value)
|
131
|
+
self.is_hash_migrated = True
|
132
|
+
|
133
|
+
def as_identity_schema(self) -> Identity:
|
134
|
+
"""Creates an Identity schema from a ProvidedIdentity record in the application DB."""
|
135
|
+
|
136
|
+
identity_dict = {}
|
137
|
+
if any(
|
138
|
+
[
|
139
|
+
not self.field_name,
|
140
|
+
not self.encrypted_value,
|
141
|
+
]
|
142
|
+
):
|
143
|
+
return Identity()
|
144
|
+
|
145
|
+
value = self.encrypted_value.get("value") # type:ignore
|
146
|
+
if self.field_label:
|
147
|
+
value = LabeledIdentity(label=self.field_label, value=value)
|
148
|
+
identity_dict[self.field_name] = value
|
149
|
+
return Identity(**identity_dict)
|
@@ -0,0 +1,284 @@
|
|
1
|
+
# pylint: disable=R0401, C0302
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
from typing import TYPE_CHECKING, List, Optional, Tuple
|
6
|
+
|
7
|
+
from loguru import logger
|
8
|
+
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
|
9
|
+
from sqlalchemy.dialects.postgresql import JSONB
|
10
|
+
from sqlalchemy.ext.mutable import MutableDict, MutableList
|
11
|
+
from sqlalchemy.orm import Query, Session, relationship
|
12
|
+
from sqlalchemy_utils.types.encrypted.encrypted_type import (
|
13
|
+
AesGcmEngine,
|
14
|
+
StringEncryptedType,
|
15
|
+
)
|
16
|
+
|
17
|
+
from fides.api.db.base_class import Base # type: ignore[attr-defined]
|
18
|
+
from fides.api.db.base_class import JSONTypeOverride
|
19
|
+
from fides.api.db.util import EnumColumn
|
20
|
+
from fides.api.graph.config import (
|
21
|
+
ROOT_COLLECTION_ADDRESS,
|
22
|
+
TERMINATOR_ADDRESS,
|
23
|
+
CollectionAddress,
|
24
|
+
)
|
25
|
+
from fides.api.models.privacy_request.execution_log import (
|
26
|
+
COMPLETED_EXECUTION_LOG_STATUSES,
|
27
|
+
)
|
28
|
+
from fides.api.schemas.base_class import FidesSchema
|
29
|
+
from fides.api.schemas.policy import ActionType
|
30
|
+
from fides.api.schemas.privacy_request import ExecutionLogStatus
|
31
|
+
from fides.api.util.cache import (
|
32
|
+
FidesopsRedis,
|
33
|
+
celery_tasks_in_flight,
|
34
|
+
get_async_task_tracking_cache_key,
|
35
|
+
get_cache,
|
36
|
+
)
|
37
|
+
from fides.api.util.collection_util import Row
|
38
|
+
from fides.config import CONFIG
|
39
|
+
|
40
|
+
if TYPE_CHECKING:
|
41
|
+
from fides.api.models.privacy_request.privacy_request import PrivacyRequest
|
42
|
+
|
43
|
+
|
44
|
+
class TraversalDetails(FidesSchema):
|
45
|
+
"""Schema to format saving pre-calculated traversal details on RequestTask.traversal_details"""
|
46
|
+
|
47
|
+
dataset_connection_key: str
|
48
|
+
incoming_edges: List[Tuple[str, str]]
|
49
|
+
outgoing_edges: List[Tuple[str, str]]
|
50
|
+
input_keys: List[str]
|
51
|
+
skipped_nodes: Optional[List[Tuple[str, str]]] = None
|
52
|
+
|
53
|
+
# TODO: remove this method once we support custom request fields in DSR graph.
|
54
|
+
@classmethod
|
55
|
+
def create_empty_traversal(cls, connection_key: str) -> TraversalDetails:
|
56
|
+
"""
|
57
|
+
Creates an "empty" TraversalDetails object that only has the dataset connection key set.
|
58
|
+
This is a bit of a hacky workaround needed to implement the Dynamic Erasure Emails feature,
|
59
|
+
but we should no longer need it once the custom_request_fields are included in our graph
|
60
|
+
traversal
|
61
|
+
"""
|
62
|
+
return cls(
|
63
|
+
dataset_connection_key=connection_key,
|
64
|
+
incoming_edges=[],
|
65
|
+
outgoing_edges=[],
|
66
|
+
input_keys=[],
|
67
|
+
skipped_nodes=[],
|
68
|
+
)
|
69
|
+
|
70
|
+
|
71
|
+
class RequestTask(Base):
|
72
|
+
"""
|
73
|
+
An individual Task for a Privacy Request.
|
74
|
+
|
75
|
+
When we execute a PrivacyRequest, we build a graph by combining the current datasets with the identity data
|
76
|
+
and we save the nodes (collections) in the graph as Request Tasks.
|
77
|
+
|
78
|
+
Currently, we build access, erasure, and consent Request Tasks.
|
79
|
+
"""
|
80
|
+
|
81
|
+
privacy_request_id = Column(
|
82
|
+
String,
|
83
|
+
ForeignKey("privacyrequest.id", ondelete="SET NULL"),
|
84
|
+
nullable=True,
|
85
|
+
index=True,
|
86
|
+
)
|
87
|
+
|
88
|
+
# Identifiers of this request task
|
89
|
+
collection_address = Column(
|
90
|
+
String, nullable=False, index=True
|
91
|
+
) # Of the format dataset_name:collection_name for convenience
|
92
|
+
dataset_name = Column(String, nullable=False, index=True)
|
93
|
+
collection_name = Column(String, nullable=False, index=True)
|
94
|
+
action_type = Column(EnumColumn(ActionType), nullable=False, index=True)
|
95
|
+
|
96
|
+
# Note that RequestTasks share statuses with ExecutionLogs. When a RequestTask changes state, an ExecutionLog
|
97
|
+
# is also created with that state. These are tied tightly together in GraphTask.
|
98
|
+
status = Column(
|
99
|
+
EnumColumn(
|
100
|
+
ExecutionLogStatus,
|
101
|
+
native_enum=False,
|
102
|
+
values_callable=lambda x: [
|
103
|
+
i.value for i in x
|
104
|
+
], # Using ExecutionLogStatus values in database, even though app is using the names.
|
105
|
+
), # character varying in database
|
106
|
+
index=True,
|
107
|
+
nullable=False,
|
108
|
+
)
|
109
|
+
|
110
|
+
upstream_tasks = Column(
|
111
|
+
MutableList.as_mutable(JSONB)
|
112
|
+
) # List of collection address strings
|
113
|
+
downstream_tasks = Column(
|
114
|
+
MutableList.as_mutable(JSONB)
|
115
|
+
) # List of collection address strings
|
116
|
+
all_descendant_tasks = Column(
|
117
|
+
MutableList.as_mutable(JSONB)
|
118
|
+
) # All tasks that can be reached by the current task. This is useful when this task fails,
|
119
|
+
# and we can mark every single one of these as failed.
|
120
|
+
|
121
|
+
# Raw data retrieved from an access request is stored here. This contains all of the
|
122
|
+
# intermediate data we retrieved, needed for downstream tasks, but hasn't been filtered
|
123
|
+
# by data category for the end user.
|
124
|
+
access_data = Column( # An encrypted JSON String - saved as a list of Rows
|
125
|
+
StringEncryptedType(
|
126
|
+
type_in=JSONTypeOverride,
|
127
|
+
key=CONFIG.security.app_encryption_key,
|
128
|
+
engine=AesGcmEngine,
|
129
|
+
padding="pkcs5",
|
130
|
+
),
|
131
|
+
)
|
132
|
+
|
133
|
+
# This is the raw access data saved in erasure format (with placeholders preserved) to perform a masking request.
|
134
|
+
# First saved on the access node, and then copied to the corresponding erasure node.
|
135
|
+
data_for_erasures = Column( # An encrypted JSON String - saved as a list of rows
|
136
|
+
StringEncryptedType(
|
137
|
+
type_in=JSONTypeOverride,
|
138
|
+
key=CONFIG.security.app_encryption_key,
|
139
|
+
engine=AesGcmEngine,
|
140
|
+
padding="pkcs5",
|
141
|
+
),
|
142
|
+
)
|
143
|
+
|
144
|
+
# Written after an erasure is completed
|
145
|
+
rows_masked = Column(Integer)
|
146
|
+
# Written after a consent request is completed - not all consent
|
147
|
+
# connectors will end up sending a request
|
148
|
+
consent_sent = Column(Boolean)
|
149
|
+
|
150
|
+
# For async tasks awaiting callback
|
151
|
+
callback_succeeded = Column(Boolean)
|
152
|
+
|
153
|
+
# Stores a serialized collection that can be transformed back into a Collection to help
|
154
|
+
# execute the current task
|
155
|
+
collection = Column(MutableDict.as_mutable(JSONB))
|
156
|
+
# Stores key details from traversal.traverse in the format of TraversalDetails
|
157
|
+
traversal_details = Column(MutableDict.as_mutable(JSONB))
|
158
|
+
|
159
|
+
privacy_request = relationship(
|
160
|
+
"PrivacyRequest",
|
161
|
+
back_populates="request_tasks",
|
162
|
+
uselist=False,
|
163
|
+
)
|
164
|
+
|
165
|
+
@property
|
166
|
+
def request_task_address(self) -> CollectionAddress:
|
167
|
+
"""Convert the collection_address into Collection Address format"""
|
168
|
+
return CollectionAddress.from_string(self.collection_address)
|
169
|
+
|
170
|
+
@property
|
171
|
+
def is_root_task(self) -> bool:
|
172
|
+
"""Convenience helper for asserting whether the task is a root task"""
|
173
|
+
return self.request_task_address == ROOT_COLLECTION_ADDRESS
|
174
|
+
|
175
|
+
@property
|
176
|
+
def is_terminator_task(self) -> bool:
|
177
|
+
"""Convenience helper for asserting whether the task is a terminator task"""
|
178
|
+
return self.request_task_address == TERMINATOR_ADDRESS
|
179
|
+
|
180
|
+
def get_cached_task_id(self) -> Optional[str]:
|
181
|
+
"""Gets the cached celery task ID for this request task."""
|
182
|
+
cache: FidesopsRedis = get_cache()
|
183
|
+
task_id = cache.get(get_async_task_tracking_cache_key(self.id))
|
184
|
+
return task_id
|
185
|
+
|
186
|
+
def get_access_data(self) -> List[Row]:
|
187
|
+
"""Helper to retrieve access data or default to empty list"""
|
188
|
+
return self.access_data or []
|
189
|
+
|
190
|
+
def get_data_for_erasures(self) -> List[Row]:
|
191
|
+
"""Helper to retrieve erasure data needed to build masking requests or default to empty list"""
|
192
|
+
return self.data_for_erasures or []
|
193
|
+
|
194
|
+
def update_status(self, db: Session, status: ExecutionLogStatus) -> None:
|
195
|
+
"""Helper method to update a task's status"""
|
196
|
+
self.status = status
|
197
|
+
self.save(db)
|
198
|
+
|
199
|
+
def get_tasks_with_same_action_type(
|
200
|
+
self, db: Session, collection_address_str: str
|
201
|
+
) -> Query:
|
202
|
+
"""Fetch task on the same privacy request and action type as current by collection address"""
|
203
|
+
return db.query(RequestTask).filter(
|
204
|
+
RequestTask.privacy_request_id == self.privacy_request_id,
|
205
|
+
RequestTask.action_type == self.action_type,
|
206
|
+
RequestTask.collection_address == collection_address_str,
|
207
|
+
)
|
208
|
+
|
209
|
+
def get_pending_downstream_tasks(self, db: Session) -> Query:
|
210
|
+
"""Returns the immediate downstream task objects that are still pending"""
|
211
|
+
return db.query(RequestTask).filter(
|
212
|
+
RequestTask.privacy_request_id == self.privacy_request_id,
|
213
|
+
RequestTask.action_type == self.action_type,
|
214
|
+
RequestTask.collection_address.in_(self.downstream_tasks or []),
|
215
|
+
RequestTask.status == ExecutionLogStatus.pending,
|
216
|
+
)
|
217
|
+
|
218
|
+
def can_queue_request_task(self, db: Session, should_log: bool = False) -> bool:
|
219
|
+
"""Returns True if upstream tasks are complete and the current Request Task
|
220
|
+
is not running in another celery task.
|
221
|
+
|
222
|
+
This check ignores its database status - that is checked elsewhere.
|
223
|
+
"""
|
224
|
+
return self.upstream_tasks_complete(
|
225
|
+
db, should_log
|
226
|
+
) and not self.request_task_running(should_log)
|
227
|
+
|
228
|
+
def upstream_tasks_complete(self, db: Session, should_log: bool = False) -> bool:
|
229
|
+
"""Determines if all of the upstream tasks of the current task are complete"""
|
230
|
+
upstream_tasks: Query = self.upstream_tasks_objects(db)
|
231
|
+
tasks_complete: bool = all(
|
232
|
+
upstream_task.status in COMPLETED_EXECUTION_LOG_STATUSES
|
233
|
+
for upstream_task in upstream_tasks
|
234
|
+
) and upstream_tasks.count() == len(self.upstream_tasks or [])
|
235
|
+
|
236
|
+
if not tasks_complete and should_log:
|
237
|
+
logger.debug(
|
238
|
+
"Upstream tasks incomplete for {} task {}.",
|
239
|
+
self.action_type.value,
|
240
|
+
self.collection_address,
|
241
|
+
)
|
242
|
+
|
243
|
+
return tasks_complete
|
244
|
+
|
245
|
+
def upstream_tasks_objects(self, db: Session) -> Query:
|
246
|
+
"""Returns Request Task objects that are upstream of the current Request Task"""
|
247
|
+
upstream_tasks: Query = db.query(RequestTask).filter(
|
248
|
+
RequestTask.privacy_request_id == self.privacy_request_id,
|
249
|
+
RequestTask.collection_address.in_(self.upstream_tasks or []),
|
250
|
+
RequestTask.action_type == self.action_type,
|
251
|
+
)
|
252
|
+
return upstream_tasks
|
253
|
+
|
254
|
+
def request_task_running(self, should_log: bool = False) -> bool:
|
255
|
+
"""Returns a rough measure if the Request Task is already running -
|
256
|
+
not 100% accurate.
|
257
|
+
|
258
|
+
This is further only applicable if you are running workers and
|
259
|
+
CONFIG.execution.task_always_eager=False. This is just an extra check to reduce possible
|
260
|
+
over-scheduling, but it is also okay if the same node runs multiple times.
|
261
|
+
"""
|
262
|
+
celery_task_id: Optional[str] = self.get_cached_task_id()
|
263
|
+
if not celery_task_id:
|
264
|
+
return False
|
265
|
+
|
266
|
+
if should_log:
|
267
|
+
logger.debug(
|
268
|
+
"Celery Task ID {} found for {} task {}.",
|
269
|
+
celery_task_id,
|
270
|
+
self.action_type.value,
|
271
|
+
self.collection_address,
|
272
|
+
)
|
273
|
+
|
274
|
+
task_in_flight: bool = celery_tasks_in_flight([celery_task_id])
|
275
|
+
|
276
|
+
if task_in_flight and should_log:
|
277
|
+
logger.debug(
|
278
|
+
"Celery Task {} already processing for {} task {}.",
|
279
|
+
celery_task_id,
|
280
|
+
self.action_type.value,
|
281
|
+
self.collection_address,
|
282
|
+
)
|
283
|
+
|
284
|
+
return task_in_flight
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# pylint: disable=R0401, C0302
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
|
5
|
+
import json
|
6
|
+
from datetime import datetime
|
7
|
+
from enum import Enum as EnumType
|
8
|
+
from typing import Optional
|
9
|
+
|
10
|
+
from pydantic import BaseModel, ConfigDict
|
11
|
+
|
12
|
+
from fides.api.models.policy import PolicyPreWebhook, WebhookDirection
|
13
|
+
from fides.api.models.pre_approval_webhook import PreApprovalWebhook
|
14
|
+
from fides.api.models.privacy_request.request_task import RequestTask
|
15
|
+
from fides.api.oauth.jwt import generate_jwe
|
16
|
+
from fides.api.schemas.external_https import RequestTaskJWE, WebhookJWE
|
17
|
+
from fides.api.schemas.policy import ActionType
|
18
|
+
from fides.api.schemas.privacy_request import PrivacyRequestStatus
|
19
|
+
from fides.api.schemas.redis_cache import Identity
|
20
|
+
from fides.common.api.scope_registry import (
|
21
|
+
PRIVACY_REQUEST_CALLBACK_RESUME,
|
22
|
+
PRIVACY_REQUEST_REVIEW,
|
23
|
+
)
|
24
|
+
from fides.config import CONFIG
|
25
|
+
|
26
|
+
|
27
|
+
class CallbackType(EnumType):
|
28
|
+
"""We currently have three types of Webhooks: pre-approval, pre (-execution), post (-execution)"""
|
29
|
+
|
30
|
+
pre_approval = "pre_approval"
|
31
|
+
pre = "pre" # pre-execution
|
32
|
+
post = "post" # post-execution
|
33
|
+
|
34
|
+
|
35
|
+
class SecondPartyRequestFormat(BaseModel):
|
36
|
+
"""
|
37
|
+
The request body we will use when calling a user's HTTP endpoint from fides.api
|
38
|
+
This class is defined here to avoid circular import issues between this file and
|
39
|
+
models.policy
|
40
|
+
"""
|
41
|
+
|
42
|
+
privacy_request_id: str
|
43
|
+
privacy_request_status: PrivacyRequestStatus
|
44
|
+
direction: WebhookDirection
|
45
|
+
callback_type: CallbackType
|
46
|
+
identity: Identity
|
47
|
+
policy_action: Optional[ActionType] = None
|
48
|
+
model_config = ConfigDict(use_enum_values=True)
|
49
|
+
|
50
|
+
|
51
|
+
def generate_request_callback_resume_jwe(webhook: PolicyPreWebhook) -> str:
|
52
|
+
"""
|
53
|
+
Generate a JWE to be used to resume privacy request execution.
|
54
|
+
"""
|
55
|
+
jwe = WebhookJWE(
|
56
|
+
webhook_id=webhook.id,
|
57
|
+
scopes=[PRIVACY_REQUEST_CALLBACK_RESUME],
|
58
|
+
iat=datetime.now().isoformat(),
|
59
|
+
)
|
60
|
+
return generate_jwe(
|
61
|
+
json.dumps(jwe.model_dump(mode="json")),
|
62
|
+
CONFIG.security.app_encryption_key,
|
63
|
+
)
|
64
|
+
|
65
|
+
|
66
|
+
def generate_request_callback_pre_approval_jwe(webhook: PreApprovalWebhook) -> str:
|
67
|
+
"""
|
68
|
+
Generate a JWE to be used to mark privacy requests as eligible / not-eligible for pre approval.
|
69
|
+
"""
|
70
|
+
jwe = WebhookJWE(
|
71
|
+
webhook_id=webhook.id,
|
72
|
+
scopes=[PRIVACY_REQUEST_REVIEW],
|
73
|
+
iat=datetime.now().isoformat(),
|
74
|
+
)
|
75
|
+
return generate_jwe(
|
76
|
+
json.dumps(jwe.model_dump(mode="json")),
|
77
|
+
CONFIG.security.app_encryption_key,
|
78
|
+
)
|
79
|
+
|
80
|
+
|
81
|
+
def generate_request_task_callback_jwe(request_task: RequestTask) -> str:
|
82
|
+
"""
|
83
|
+
Generate a JWE to be used to resume privacy request execution when a
|
84
|
+
callback endpoint is hit for a RequestTask
|
85
|
+
"""
|
86
|
+
jwe = RequestTaskJWE(
|
87
|
+
request_task_id=request_task.id,
|
88
|
+
scopes=[PRIVACY_REQUEST_CALLBACK_RESUME],
|
89
|
+
iat=datetime.now().isoformat(),
|
90
|
+
)
|
91
|
+
return generate_jwe(
|
92
|
+
json.dumps(jwe.model_dump(mode="json")),
|
93
|
+
CONFIG.security.app_encryption_key,
|
94
|
+
)
|
fides/api/models/sql_models.py
CHANGED
@@ -295,15 +295,38 @@ class Dataset(Base, FidesBase):
|
|
295
295
|
collections = Column(JSON)
|
296
296
|
fides_meta = Column(JSON)
|
297
297
|
|
298
|
+
@classmethod
|
299
|
+
def create(
|
300
|
+
cls: Type["Dataset"],
|
301
|
+
db: Session,
|
302
|
+
*,
|
303
|
+
data: dict[str, Any],
|
304
|
+
check_name: bool = False,
|
305
|
+
) -> "Dataset":
|
306
|
+
"""
|
307
|
+
Override create to check for existing datasets with the same fides_key.
|
308
|
+
Duplicate names are allowed.
|
309
|
+
"""
|
310
|
+
# Check if dataset with same fides_key already exists
|
311
|
+
if "fides_key" in data:
|
312
|
+
existing_by_key = (
|
313
|
+
db.query(cls).filter(cls.fides_key == data["fides_key"]).first()
|
314
|
+
)
|
315
|
+
if existing_by_key:
|
316
|
+
raise KeyOrNameAlreadyExists(
|
317
|
+
f'Dataset with fides_key "{data["fides_key"]}" already exists.'
|
318
|
+
)
|
319
|
+
|
320
|
+
# Create the dataset using the parent class's method
|
321
|
+
db_obj = cls(**data)
|
322
|
+
return cls.persist_obj(db, db_obj)
|
323
|
+
|
298
324
|
@classmethod
|
299
325
|
def create_from_dataset_dict(cls, db: Session, dataset: dict) -> "Dataset":
|
300
326
|
"""Add a method to create directly using a synchronous session"""
|
301
327
|
validated_dataset: FideslangDataset = FideslangDataset(**dataset)
|
302
|
-
|
303
|
-
|
304
|
-
db.commit()
|
305
|
-
db.refresh(ctl_dataset)
|
306
|
-
return ctl_dataset
|
328
|
+
data_dict = validated_dataset.model_dump(mode="json")
|
329
|
+
return cls.create(db=db, data=data_dict)
|
307
330
|
|
308
331
|
@property
|
309
332
|
def field_data_categories(self) -> Set[str]:
|
fides/api/oauth/jwt.py
CHANGED
@@ -14,3 +14,21 @@ def generate_jwe(payload: str, encryption_key: str, encoding: str = "UTF-8") ->
|
|
14
14
|
encryption_key,
|
15
15
|
encryption=_JWT_ENCRYPTION_ALGORITHM,
|
16
16
|
).decode(encoding)
|
17
|
+
|
18
|
+
|
19
|
+
def decrypt_jwe(token: str, encryption_key: str, encoding: str = "UTF-8") -> str:
|
20
|
+
"""Decrypts a JWE token and returns the payload as a string.
|
21
|
+
|
22
|
+
Args:
|
23
|
+
token: The JWE token to decrypt.
|
24
|
+
encryption_key: The key used to decrypt the token.
|
25
|
+
encoding: The encoding to use for the decrypted payload.
|
26
|
+
|
27
|
+
Returns:
|
28
|
+
The decrypted payload as a string.
|
29
|
+
"""
|
30
|
+
decrypted_payload = jwe.decrypt(
|
31
|
+
token,
|
32
|
+
encryption_key,
|
33
|
+
)
|
34
|
+
return decrypted_payload.decode(encoding)
|
fides/api/oauth/utils.py
CHANGED
@@ -339,7 +339,16 @@ def has_permissions(
|
|
339
339
|
has_role: bool = _has_scope_via_role(
|
340
340
|
token_data=token_data, client=client, endpoint_scopes=endpoint_scopes
|
341
341
|
)
|
342
|
-
|
342
|
+
|
343
|
+
has_required_permissions = has_direct_scope or has_role
|
344
|
+
if not has_required_permissions:
|
345
|
+
scopes_required = ",".join(endpoint_scopes.scopes)
|
346
|
+
logger.debug(
|
347
|
+
"Authorization failed. Missing required scopes: {}. Neither direct scopes nor role-derived scopes were sufficient.",
|
348
|
+
scopes_required,
|
349
|
+
)
|
350
|
+
|
351
|
+
return has_required_permissions
|
343
352
|
|
344
353
|
|
345
354
|
def _has_scope_via_role(
|
@@ -385,16 +394,7 @@ def _has_direct_scopes(
|
|
385
394
|
|
386
395
|
def has_scope_subset(user_scopes: List[str], endpoint_scopes: SecurityScopes) -> bool:
|
387
396
|
"""Are the required scopes a subset of the scopes belonging to the user?"""
|
388
|
-
|
389
|
-
scopes_required = ",".join(endpoint_scopes.scopes)
|
390
|
-
scopes_provided = ",".join(user_scopes)
|
391
|
-
logger.debug(
|
392
|
-
"Auth token missing required scopes: {}. Scopes provided: {}.",
|
393
|
-
scopes_required,
|
394
|
-
scopes_provided,
|
395
|
-
)
|
396
|
-
return False
|
397
|
-
return True
|
397
|
+
return set(endpoint_scopes.scopes).issubset(user_scopes)
|
398
398
|
|
399
399
|
|
400
400
|
def create_temporary_user_for_login_flow(config: FidesConfig) -> FidesUser:
|
@@ -30,13 +30,11 @@ class DatahubSchema(ConnectionConfigSecretsSchema):
|
|
30
30
|
)
|
31
31
|
frequency: PeriodicIntegrationFrequency = Field(
|
32
32
|
title="Frequency",
|
33
|
-
description="The frequency at which the integration should run.
|
34
|
-
default=PeriodicIntegrationFrequency.daily,
|
33
|
+
description="The frequency at which the integration should run. Available options are daily, weekly, and monthly.",
|
35
34
|
)
|
36
35
|
glossary_node: str = Field(
|
37
36
|
title="Glossary Node",
|
38
|
-
description="The glossary node name to use on Datahub for Fides Data Categories.
|
39
|
-
default="FidesDataCategories",
|
37
|
+
description="The glossary node name to use on Datahub for Fides Data Categories. (e.g. FidesDataCategories)",
|
40
38
|
)
|
41
39
|
|
42
40
|
_required_components: ClassVar[List[str]] = ["datahub_server_url", "datahub_token"]
|
fides/api/schemas/dataset.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
from typing import Any, Dict, List, Optional, Union
|
2
2
|
|
3
|
-
from fideslang.models import Dataset
|
3
|
+
from fideslang.models import Dataset, DatasetCollection
|
4
4
|
from fideslang.validation import FidesKey
|
5
|
-
from pydantic import ConfigDict
|
5
|
+
from pydantic import ConfigDict, Field
|
6
6
|
|
7
7
|
from fides.api.schemas.api import BulkResponse, BulkUpdateFailed
|
8
8
|
from fides.api.schemas.base_class import FidesSchema
|
@@ -72,3 +72,23 @@ class DatasetReachability(FidesSchema):
|
|
72
72
|
|
73
73
|
reachable: bool
|
74
74
|
details: Optional[Union[str, List[Dict[str, Any]]]]
|
75
|
+
|
76
|
+
|
77
|
+
class DatasetResponse(Dataset):
|
78
|
+
"""
|
79
|
+
Dataset response model for API endpoints.
|
80
|
+
|
81
|
+
Note: This class extends the Dataset model from fideslang rather than having a proper
|
82
|
+
dedicated API response model. We had to make the collections field
|
83
|
+
Optional and allow null values to support the minimal=true parameter in API responses,
|
84
|
+
even though collections is required in the base fideslang Dataset model.
|
85
|
+
"""
|
86
|
+
|
87
|
+
collections: Optional[List[DatasetCollection]] = Field( # type: ignore
|
88
|
+
description="An array of objects that describe the Dataset's collections.",
|
89
|
+
default=None,
|
90
|
+
)
|
91
|
+
|
92
|
+
model_config = ConfigDict(
|
93
|
+
extra="ignore", from_attributes=False, coerce_numbers_to_str=True
|
94
|
+
)
|