Skip to content

Commit

Permalink
add new tcf fields to system model (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsachs committed Oct 5, 2023
1 parent a6fe4c6 commit 2f364dc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/fideslang/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,10 +1138,10 @@ class System(FidesModel):
description="Deprecated. The responsibility or role over the system that processes personal data",
)
egress: Optional[List[DataFlow]] = Field(
description="The resources to which the System sends data."
description="The resources to which the system sends data."
)
ingress: Optional[List[DataFlow]] = Field(
description="The resources from which the System receives data."
description="The resources from which the system receives data."
)
privacy_declarations: List[PrivacyDeclaration] = Field(
description=PrivacyDeclaration.__doc__,
Expand Down Expand Up @@ -1204,7 +1204,7 @@ class System(FidesModel):
description="The optional status of a Data Protection Impact Assessment"
)
privacy_policy: Optional[AnyUrl] = Field(
description="A URL that points to the System's publicly accessible privacy policy."
description="A URL that points to the system's publicly accessible privacy policy."
)
legal_name: Optional[str] = Field(
description="The legal name for the business represented by the system."
Expand All @@ -1225,6 +1225,23 @@ class System(FidesModel):
data_security_practices: Optional[str] = Field(
description="The data security practices employed by this system."
)
cookie_max_age_seconds: Optional[int] = Field(
description="The maximum storage duration, in seconds, for cookies used by this system."
)
uses_cookies: bool = Field(
default=False, description="Whether this system uses cookie storage."
)
cookie_refresh: bool = Field(
default=False,
description="Whether the system's cookies are refreshed after being initially set.",
)
uses_non_cookie_access: bool = Field(
default=False,
description="Whether the system uses non-cookie methods of storage or accessing information stored on a user's device.",
)
legitimate_interest_disclosure_url: Optional[AnyUrl] = Field(
description="A URL that points to the system's publicly accessible legitimate interest disclosure."
)

_sort_privacy_declarations: classmethod = validator(
"privacy_declarations", allow_reuse=True
Expand Down
5 changes: 5 additions & 0 deletions tests/fideslang/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@ def test_expanded_system(self):
dpo="[email protected]",
data_security_practices=None,
cookies=[{"name": "test_cookie"}],
cookie_max_age_seconds="31536000",
uses_cookies=True,
cookie_refresh=True,
uses_non_cookie_access=True,
legitimate_interest_disclosure_url="http://www.example.com/legitimate_interest_disclosure"
)

@mark.parametrize(
Expand Down

0 comments on commit 2f364dc

Please sign in to comment.