Skip to content
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

add new tcf fields to system model #173

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decided to standardize capitalization of system across the descriptions in this model class while i was here

)
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."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Descriptions were informed by official spec's descriptions here

)
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
Loading