From ff270c20343d711baa79051833d909f21f6bf70b Mon Sep 17 00:00:00 2001 From: Dawn Pattison Date: Thu, 2 Nov 2023 15:10:04 -0500 Subject: [PATCH 1/2] Add optional system_level_cookies to Fideslang System model. --- src/fideslang/models.py | 3 +++ tests/fideslang/test_models.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/fideslang/models.py b/src/fideslang/models.py index 9e7218d..9cb95cc 100644 --- a/src/fideslang/models.py +++ b/src/fideslang/models.py @@ -1245,6 +1245,9 @@ class System(FidesModel): legitimate_interest_disclosure_url: Optional[AnyUrl] = Field( description="A URL that points to the system's publicly accessible legitimate interest disclosure." ) + system_level_cookies: Optional[List[Cookies]] = Field( + description="System-level cookies unassociated with a data use to deliver services and functionality", + ) _sort_privacy_declarations: classmethod = validator( "privacy_declarations", allow_reuse=True diff --git a/tests/fideslang/test_models.py b/tests/fideslang/test_models.py index 6016c76..60c096d 100644 --- a/tests/fideslang/test_models.py +++ b/tests/fideslang/test_models.py @@ -421,6 +421,13 @@ def test_expanded_system(self): uses_non_cookie_access=True, legitimate_interest_disclosure_url="http://www.example.com/legitimate_interest_disclosure", flexible_legal_basis_for_processing=True, + system_level_cookies=[ + { + "name": "COOKIE_ID_EXAMPLE", + "path": "/", + "domain": "example.com/cookie", + } + ], ) @mark.parametrize( From f32c295f72666ab5ee035353c57ea3752e4240e4 Mon Sep 17 00:00:00 2001 From: Dawn Pattison Date: Fri, 3 Nov 2023 11:28:51 -0500 Subject: [PATCH 2/2] Rename system_level_cookies to cookies. --- src/fideslang/models.py | 2 +- tests/fideslang/test_models.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fideslang/models.py b/src/fideslang/models.py index 9cb95cc..89bc7cf 100644 --- a/src/fideslang/models.py +++ b/src/fideslang/models.py @@ -1245,7 +1245,7 @@ class System(FidesModel): legitimate_interest_disclosure_url: Optional[AnyUrl] = Field( description="A URL that points to the system's publicly accessible legitimate interest disclosure." ) - system_level_cookies: Optional[List[Cookies]] = Field( + cookies: Optional[List[Cookies]] = Field( description="System-level cookies unassociated with a data use to deliver services and functionality", ) diff --git a/tests/fideslang/test_models.py b/tests/fideslang/test_models.py index 60c096d..05fa592 100644 --- a/tests/fideslang/test_models.py +++ b/tests/fideslang/test_models.py @@ -414,14 +414,13 @@ def test_expanded_system(self): responsibility=[DataResponsibilityTitle.CONTROLLER], dpo="privacyofficertest@vdx.tv", 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", flexible_legal_basis_for_processing=True, - system_level_cookies=[ + cookies=[ { "name": "COOKIE_ID_EXAMPLE", "path": "/",