ethyca-fides 2.57.1b3__py2.py3-none-any.whl → 2.57.1b4__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.1b3.dist-info → ethyca_fides-2.57.1b4.dist-info}/METADATA +1 -1
- {ethyca_fides-2.57.1b3.dist-info → ethyca_fides-2.57.1b4.dist-info}/RECORD +86 -84
- fides/_version.py +3 -3
- fides/api/models/privacy_request/__init__.py +38 -0
- fides/api/models/privacy_request/consent.py +157 -0
- fides/api/models/{privacy_request.py → privacy_request/privacy_request.py} +9 -150
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-ef2643f4e3bede71.js → _app-b8d38dabe3db0ee0.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/test-datasets-73ef0438c85014bb.js +1 -0
- fides/ui-build/static/admin/_next/static/{PCFD-5xFm2ITkbTnvuYrG → sDpAo7vHYkuZ5moMST2L3}/_buildManifest.js +1 -1
- 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/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/pages/systems/configure/[id]/test-datasets-21f26c0dc4d09e9f.js +0 -1
- {ethyca_fides-2.57.1b3.dist-info → ethyca_fides-2.57.1b4.dist-info}/LICENSE +0 -0
- {ethyca_fides-2.57.1b3.dist-info → ethyca_fides-2.57.1b4.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.57.1b3.dist-info → ethyca_fides-2.57.1b4.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.57.1b3.dist-info → ethyca_fides-2.57.1b4.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{PCFD-5xFm2ITkbTnvuYrG → sDpAo7vHYkuZ5moMST2L3}/_ssgManifest.js +0 -0
@@ -5,20 +5,12 @@ from __future__ import annotations
|
|
5
5
|
import json
|
6
6
|
from datetime import datetime, timedelta
|
7
7
|
from enum import Enum as EnumType
|
8
|
-
from typing import Any, Dict, List, Optional, Set, Tuple, Union
|
8
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, Union
|
9
9
|
|
10
10
|
from celery.result import AsyncResult
|
11
11
|
from loguru import logger
|
12
12
|
from pydantic import BaseModel, ConfigDict
|
13
|
-
from sqlalchemy import
|
14
|
-
Boolean,
|
15
|
-
Column,
|
16
|
-
DateTime,
|
17
|
-
ForeignKey,
|
18
|
-
Integer,
|
19
|
-
String,
|
20
|
-
UniqueConstraint,
|
21
|
-
)
|
13
|
+
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, String
|
22
14
|
from sqlalchemy.dialects.postgresql import JSONB
|
23
15
|
from sqlalchemy.ext.declarative import declared_attr
|
24
16
|
from sqlalchemy.ext.mutable import MutableDict, MutableList
|
@@ -84,12 +76,7 @@ from fides.api.schemas.privacy_request import (
|
|
84
76
|
from fides.api.schemas.redis_cache import (
|
85
77
|
CustomPrivacyRequestField as CustomPrivacyRequestFieldSchema,
|
86
78
|
)
|
87
|
-
from fides.api.schemas.redis_cache import
|
88
|
-
Identity,
|
89
|
-
IdentityBase,
|
90
|
-
LabeledIdentity,
|
91
|
-
MultiValue,
|
92
|
-
)
|
79
|
+
from fides.api.schemas.redis_cache import Identity, LabeledIdentity, MultiValue
|
93
80
|
from fides.api.tasks import celery_app
|
94
81
|
from fides.api.util.cache import (
|
95
82
|
FidesopsRedis,
|
@@ -116,6 +103,12 @@ from fides.common.api.scope_registry import (
|
|
116
103
|
)
|
117
104
|
from fides.config import CONFIG
|
118
105
|
|
106
|
+
if TYPE_CHECKING:
|
107
|
+
from fides.api.models.privacy_request.consent import ( # type: ignore[attr-defined]
|
108
|
+
Consent,
|
109
|
+
ConsentRequest,
|
110
|
+
)
|
111
|
+
|
119
112
|
# Locations from which privacy request execution can be resumed, in order.
|
120
113
|
EXECUTION_CHECKPOINTS = [
|
121
114
|
CurrentStep.pre_webhooks,
|
@@ -130,11 +123,6 @@ EXECUTION_CHECKPOINTS = [
|
|
130
123
|
]
|
131
124
|
|
132
125
|
|
133
|
-
EmailRequestFulfillmentBodyParams = Dict[
|
134
|
-
CollectionAddress, Optional[CheckpointActionRequired]
|
135
|
-
]
|
136
|
-
|
137
|
-
|
138
126
|
class CallbackType(EnumType):
|
139
127
|
"""We currently have three types of Webhooks: pre-approval, pre (-execution), post (-execution)"""
|
140
128
|
|
@@ -1601,135 +1589,6 @@ class CustomPrivacyRequestField(HashMigrationMixin, Base):
|
|
1601
1589
|
self.is_hash_migrated = True
|
1602
1590
|
|
1603
1591
|
|
1604
|
-
class Consent(Base):
|
1605
|
-
"""The DB ORM model for Consent."""
|
1606
|
-
|
1607
|
-
provided_identity_id = Column(
|
1608
|
-
String,
|
1609
|
-
ForeignKey(ProvidedIdentity.id),
|
1610
|
-
nullable=False,
|
1611
|
-
)
|
1612
|
-
data_use = Column(String, nullable=False)
|
1613
|
-
data_use_description = Column(String)
|
1614
|
-
opt_in = Column(Boolean, nullable=False)
|
1615
|
-
has_gpc_flag = Column(
|
1616
|
-
Boolean,
|
1617
|
-
server_default="f",
|
1618
|
-
default=False,
|
1619
|
-
nullable=False,
|
1620
|
-
)
|
1621
|
-
conflicts_with_gpc = Column(
|
1622
|
-
Boolean,
|
1623
|
-
server_default="f",
|
1624
|
-
default=False,
|
1625
|
-
nullable=False,
|
1626
|
-
)
|
1627
|
-
|
1628
|
-
provided_identity = relationship(ProvidedIdentity, back_populates="consent")
|
1629
|
-
|
1630
|
-
UniqueConstraint(provided_identity_id, data_use, name="uix_identity_data_use")
|
1631
|
-
|
1632
|
-
identity: Optional[IdentityBase] = None
|
1633
|
-
|
1634
|
-
|
1635
|
-
class ConsentRequest(IdentityVerificationMixin, Base):
|
1636
|
-
"""Tracks consent requests."""
|
1637
|
-
|
1638
|
-
property_id = Column(
|
1639
|
-
String,
|
1640
|
-
nullable=True,
|
1641
|
-
)
|
1642
|
-
provided_identity_id = Column(
|
1643
|
-
String, ForeignKey(ProvidedIdentity.id), nullable=False
|
1644
|
-
)
|
1645
|
-
provided_identity = relationship(
|
1646
|
-
ProvidedIdentity,
|
1647
|
-
back_populates="consent_request",
|
1648
|
-
)
|
1649
|
-
|
1650
|
-
custom_fields = relationship(
|
1651
|
-
CustomPrivacyRequestField, back_populates="consent_request"
|
1652
|
-
)
|
1653
|
-
|
1654
|
-
preferences = Column(
|
1655
|
-
MutableList.as_mutable(JSONB),
|
1656
|
-
nullable=True,
|
1657
|
-
)
|
1658
|
-
|
1659
|
-
identity_verified_at = Column(
|
1660
|
-
DateTime(timezone=True),
|
1661
|
-
nullable=True,
|
1662
|
-
)
|
1663
|
-
|
1664
|
-
source = Column(EnumColumn(PrivacyRequestSource), nullable=True)
|
1665
|
-
|
1666
|
-
privacy_request_id = Column(String, ForeignKey(PrivacyRequest.id), nullable=True)
|
1667
|
-
privacy_request = relationship(PrivacyRequest)
|
1668
|
-
|
1669
|
-
def get_cached_identity_data(self) -> Dict[str, Any]:
|
1670
|
-
"""Retrieves any identity data pertaining to this request from the cache."""
|
1671
|
-
prefix = f"id-{self.id}-identity-*"
|
1672
|
-
cache: FidesopsRedis = get_cache()
|
1673
|
-
keys = cache.keys(prefix)
|
1674
|
-
return {key.split("-")[-1]: cache.get(key) for key in keys}
|
1675
|
-
|
1676
|
-
def verify_identity(
|
1677
|
-
self,
|
1678
|
-
db: Session,
|
1679
|
-
provided_code: Optional[str] = None,
|
1680
|
-
) -> None:
|
1681
|
-
"""
|
1682
|
-
A method to call the internal identity verification method provided by the
|
1683
|
-
`IdentityVerificationMixin`.
|
1684
|
-
"""
|
1685
|
-
self._verify_identity(provided_code=provided_code)
|
1686
|
-
self.identity_verified_at = datetime.utcnow()
|
1687
|
-
self.save(db)
|
1688
|
-
|
1689
|
-
def persist_custom_privacy_request_fields(
|
1690
|
-
self,
|
1691
|
-
db: Session,
|
1692
|
-
custom_privacy_request_fields: Optional[
|
1693
|
-
Dict[str, CustomPrivacyRequestFieldSchema]
|
1694
|
-
],
|
1695
|
-
) -> None:
|
1696
|
-
if not custom_privacy_request_fields:
|
1697
|
-
return
|
1698
|
-
|
1699
|
-
if CONFIG.execution.allow_custom_privacy_request_field_collection:
|
1700
|
-
for key, item in custom_privacy_request_fields.items():
|
1701
|
-
if item.value:
|
1702
|
-
hashed_value = CustomPrivacyRequestField.hash_value(item.value)
|
1703
|
-
CustomPrivacyRequestField.create(
|
1704
|
-
db=db,
|
1705
|
-
data={
|
1706
|
-
"consent_request_id": self.id,
|
1707
|
-
"field_name": key,
|
1708
|
-
"field_label": item.label,
|
1709
|
-
"encrypted_value": {"value": item.value},
|
1710
|
-
"hashed_value": hashed_value,
|
1711
|
-
},
|
1712
|
-
)
|
1713
|
-
else:
|
1714
|
-
logger.info(
|
1715
|
-
"Custom fields provided in consent request {}, but config setting 'CONFIG.execution.allow_custom_privacy_request_field_collection' prevents their storage.",
|
1716
|
-
self.id,
|
1717
|
-
)
|
1718
|
-
|
1719
|
-
def get_persisted_custom_privacy_request_fields(self) -> Dict[str, Any]:
|
1720
|
-
return {
|
1721
|
-
field.field_name: {
|
1722
|
-
"label": field.field_label,
|
1723
|
-
"value": field.encrypted_value["value"],
|
1724
|
-
}
|
1725
|
-
for field in self.custom_fields # type: ignore[attr-defined]
|
1726
|
-
}
|
1727
|
-
|
1728
|
-
|
1729
|
-
# Unique text to separate a step from a collection address, so we can store two values in one.
|
1730
|
-
PAUSED_SEPARATOR = "__fidesops_paused_sep__"
|
1731
|
-
|
1732
|
-
|
1733
1592
|
def cache_action_required(
|
1734
1593
|
cache_key: str,
|
1735
1594
|
step: Optional[CurrentStep] = None,
|
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/957d0e4fea846ff0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/957d0e4fea846ff0.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-4df2ba5ee2d40f0a.js" defer=""></script><script src="/_next/static/chunks/framework-c92fc3344e6fd165.js" defer=""></script><script src="/_next/static/chunks/main-ce7f38a12ea8c223.js" defer=""></script><script src="/_next/static/chunks/pages/_app-
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link data-next-font="" rel="preconnect" href="/" crossorigin="anonymous"/><link rel="preload" href="/_next/static/css/957d0e4fea846ff0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/957d0e4fea846ff0.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-4df2ba5ee2d40f0a.js" defer=""></script><script src="/_next/static/chunks/framework-c92fc3344e6fd165.js" defer=""></script><script src="/_next/static/chunks/main-ce7f38a12ea8c223.js" defer=""></script><script src="/_next/static/chunks/pages/_app-b8d38dabe3db0ee0.js" defer=""></script><script src="/_next/static/chunks/pages/404-1087258931760074.js" defer=""></script><script src="/_next/static/sDpAo7vHYkuZ5moMST2L3/_buildManifest.js" defer=""></script><script src="/_next/static/sDpAo7vHYkuZ5moMST2L3/_ssgManifest.js" defer=""></script><style>.data-ant-cssinjs-cache-path{content:"";}</style></head><body><div id="__next"><div style="height:100%;display:flex"></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"sDpAo7vHYkuZ5moMST2L3","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|