Skip to content

Commit

Permalink
TCF Legal Basis Dimension for Saving Preferences (#4201)
Browse files Browse the repository at this point in the history
- Backend overhaul against which fields we're saving preferences for TCF related to legal basis
- New sections for TCF Experience
- FE integrated related to legal basis
- Privacy Preferences can be saved via TC string
- Updated response to saving privacy preferences

Co-authored-by: Allison King <[email protected]>
  • Loading branch information
pattisdr and allisonking authored Oct 6, 2023
1 parent ac5ea2d commit 3c767c4
Show file tree
Hide file tree
Showing 116 changed files with 6,558 additions and 2,581 deletions.
523 changes: 293 additions & 230 deletions .fides/db_dataset.yml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ The types of changes are:
### Added
- Added an option to link to vendor tab from an experience config description [#4191](https://github.com/ethyca/fides/pull/4191)
- Added two toggles for vendors in the TCF overlay, one for Consent, and one for Legitimate Interest [#4189](https://github.com/ethyca/fides/pull/4189)
- Added two toggles for purposes in the TCF overlay, one for Consent, and one for Legitimate Interest [#4234](https://github.com/ethyca/fides/pull/4234)


### Changed
- Removed `TCF_ENABLED` environment variable from the privacy center in favor of dynamically figuring out which `fides-js` bundle to send [#4131](https://github.com/ethyca/fides/pull/4131)
- Updated copy of info boxes on each TCF tab [#4191](https://github.com/ethyca/fides/pull/4191)
- Refactor legal basis dimension regarding how TCF preferences are saved and how the experience is built [#4201](https://github.com/ethyca/fides/pull/4201/)
- Add saving privacy preferences via a TC string [#4221](https://github.com/ethyca/fides/pull/4221)
- Updated fides server to use an environment variable for turning TCF on and off [#4220](https://github.com/ethyca/fides/pull/4220)
- Update frontend to use new legal basis dimension on vendors [#4216](https://github.com/ethyca/fides/pull/4216)
- Updated privacy center patch preferences call to handle updated API response [#4235](https://github.com/ethyca/fides/pull/4235)
- Added our CMP ID [#4233](https://github.com/ethyca/fides/pull/4233)

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const PRIVACY_NOTICE_REGION_RECORD: Record<PrivacyNoticeRegion, string> =
[PrivacyNoticeRegion.CA_NT]: "Northwest Territories (Canada)",
[PrivacyNoticeRegion.CA_NU]: "Nunavut (Canada)",
[PrivacyNoticeRegion.CA_YT]: "Yukon (Canada)",
[PrivacyNoticeRegion.EEA]: "European Economic Area",
};

export const PRIVACY_NOTICE_REGION_MAP = new Map(
Expand Down
16 changes: 10 additions & 6 deletions clients/admin-ui/src/types/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ export type { ConsentReport } from "./models/ConsentReport";
export type { ConsentReportingSchema } from "./models/ConsentReportingSchema";
export type { ConsentRequestMap } from "./models/ConsentRequestMap";
export type { ConsentRequestResponse } from "./models/ConsentRequestResponse";
export type { ConsentSettingsRequestSchema } from "./models/ConsentSettingsRequestSchema";
export type { ConsentSettingsResponseSchema } from "./models/ConsentSettingsResponseSchema";
export type { ConsentWithExecutableStatus } from "./models/ConsentWithExecutableStatus";
export type { ContactDetails } from "./models/ContactDetails";
export type { Cookies } from "./models/Cookies";
Expand Down Expand Up @@ -124,7 +122,6 @@ export type { DynamoDBDocsSchema } from "./models/DynamoDBDocsSchema";
export { EdgeDirection } from "./models/EdgeDirection";
export type { EmailDocsSchema } from "./models/EmailDocsSchema";
export type { EmbeddedLineItem } from "./models/EmbeddedLineItem";
export type { EmbeddedPurpose } from "./models/EmbeddedPurpose";
export type { EmbeddedVendor } from "./models/EmbeddedVendor";
export type { Endpoint } from "./models/Endpoint";
export { EnforcementLevel } from "./models/EnforcementLevel";
Expand All @@ -137,6 +134,7 @@ export type { ExperienceConfigCreate } from "./models/ExperienceConfigCreate";
export type { ExperienceConfigCreateOrUpdateResponse } from "./models/ExperienceConfigCreateOrUpdateResponse";
export type { ExperienceConfigResponse } from "./models/ExperienceConfigResponse";
export type { ExperienceConfigUpdate } from "./models/ExperienceConfigUpdate";
export type { ExperienceMeta } from "./models/ExperienceMeta";
export type { ExtendedIdentityTypes } from "./models/ExtendedIdentityTypes";
export type { ExternalDatasetReference } from "./models/ExternalDatasetReference";
export type { fides__api__schemas__connection_configuration__connection_secrets_bigquery__KeyfileCreds } from "./models/fides__api__schemas__connection_configuration__connection_secrets_bigquery__KeyfileCreds";
Expand Down Expand Up @@ -278,6 +276,7 @@ export type { SaasConnectionTemplateValues } from "./models/SaasConnectionTempla
export type { SaaSRequest } from "./models/SaaSRequest";
export type { SaaSRequestMap } from "./models/SaaSRequestMap";
export type { SaaSSchema } from "./models/SaaSSchema";
export type { SavePrivacyPreferencesResponse } from "./models/SavePrivacyPreferencesResponse";
export { ScopeRegistryEnum } from "./models/ScopeRegistryEnum";
export type { SecurityApplicationConfig } from "./models/SecurityApplicationConfig";
export { ServiceHealth } from "./models/ServiceHealth";
Expand Down Expand Up @@ -308,15 +307,20 @@ export type { SystemScannerStatus } from "./models/SystemScannerStatus";
export type { SystemScanResponse } from "./models/SystemScanResponse";
export type { SystemsDiff } from "./models/SystemsDiff";
export { SystemType } from "./models/SystemType";
export type { TCFDataCategoryRecord } from "./models/TCFDataCategoryRecord";
export type { TCFFeatureRecord } from "./models/TCFFeatureRecord";
export type { TCFFeatureSave } from "./models/TCFFeatureSave";
export type { TCFPurposeRecord } from "./models/TCFPurposeRecord";
export type { TCFPurposeConsentRecord } from "./models/TCFPurposeConsentRecord";
export type { TCFPurposeLegitimateInterestsRecord } from "./models/TCFPurposeLegitimateInterestsRecord";
export type { TCFPurposeSave } from "./models/TCFPurposeSave";
export type { TCFSpecialFeatureRecord } from "./models/TCFSpecialFeatureRecord";
export type { TCFSpecialFeatureSave } from "./models/TCFSpecialFeatureSave";
export type { TCFSpecialPurposeRecord } from "./models/TCFSpecialPurposeRecord";
export type { TCFSpecialPurposeSave } from "./models/TCFSpecialPurposeSave";
export type { TCFVendorRecord } from "./models/TCFVendorRecord";
export type { TCFVendorConsentRecord } from "./models/TCFVendorConsentRecord";
export type { TCFVendorLegitimateInterestsRecord } from "./models/TCFVendorLegitimateInterestsRecord";
export type { TCFVendorRelationships } from "./models/TCFVendorRelationships";
export type { TCFVendorSave } from "./models/TCFVendorSave";
export { TCMobileData } from "./models/TCMobileData";
export type { TestMessagingStatusMessage } from "./models/TestMessagingStatusMessage";
export { TestStatus } from "./models/TestStatus";
export type { TestStatusMessage } from "./models/TestStatusMessage";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ import type { UserConsentPreference } from "./UserConsentPreference";
* Schema for consent reporting - largely a join of PrivacyPreferenceHistory and PrivacyRequest
*/
export type ConsentReportingSchema = {
purpose?: number;
purpose_consent?: number;
purpose_legitimate_interests?: number;
special_purpose?: number;
vendor?: string;
vendor_consent?: string;
vendor_legitimate_interests?: string;
feature?: number;
special_feature?: number;
system?: string;
system_consent?: string;
system_legitimate_interests?: string;
id: string;
privacy_request_id?: string;
email?: string;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ import type { UserConsentPreference } from "./UserConsentPreference";
* contents of the notice the user consented to at the time.
*/
export type CurrentPrivacyPreferenceReportingSchema = {
purpose?: number;
purpose_consent?: number;
purpose_legitimate_interests?: number;
special_purpose?: number;
vendor?: string;
vendor_consent?: string;
vendor_legitimate_interests?: string;
feature?: number;
special_feature?: number;
system?: string;
system_consent?: string;
system_legitimate_interests?: string;
id: string;
preference: UserConsentPreference;
privacy_notice_history_id?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ import type { UserConsentPreference } from "./UserConsentPreference";
* contents of the notice the user consented to at the time.
*/
export type CurrentPrivacyPreferenceSchema = {
purpose?: number;
purpose_consent?: number;
purpose_legitimate_interests?: number;
special_purpose?: number;
vendor?: string;
vendor_consent?: string;
vendor_legitimate_interests?: string;
feature?: number;
special_feature?: number;
system?: string;
system_consent?: string;
system_legitimate_interests?: string;
id: string;
preference: UserConsentPreference;
privacy_notice_history?: PrivacyNoticeHistorySchema;
Expand Down
12 changes: 0 additions & 12 deletions clients/admin-ui/src/types/api/models/EmbeddedPurpose.ts

This file was deleted.

25 changes: 25 additions & 0 deletions clients/admin-ui/src/types/api/models/ExperienceMeta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { TCMobileData } from "./TCMobileData";

/**
* Supplements experience with developer-friendly meta information
*/
export type ExperienceMeta = {
/**
* A hashed value that can be compared to previously-fetched hash values to determine if the Experience has meaningfully changed
*/
version_hash?: string;
/**
* The TC string corresponding to a user opting in to all available options
*/
accept_all_tc_string?: string;
accept_all_tc_mobile_data?: TCMobileData;
/**
* The TC string corresponding to a user opting out of all available options
*/
reject_all_tc_string?: string;
reject_all_tc_mobile_data?: TCMobileData;
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ import type { PrivacyNoticeHistorySchema } from "./PrivacyNoticeHistorySchema";
* Schema that surfaces the the last time a consent item that was shown to a user
*/
export type LastServedConsentSchema = {
purpose?: number;
purpose_consent?: number;
purpose_legitimate_interests?: number;
special_purpose?: number;
vendor?: string;
vendor_consent?: string;
vendor_legitimate_interests?: string;
feature?: number;
special_feature?: number;
system?: string;
system_consent?: string;
system_legitimate_interests?: string;
id: string;
updated_at: string;
served_notice_history_id: string;
Expand Down
46 changes: 20 additions & 26 deletions clients/admin-ui/src/types/api/models/PrivacyExperienceResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@

import type { ComponentType } from "./ComponentType";
import type { ExperienceConfigResponse } from "./ExperienceConfigResponse";
import type { ExperienceMeta } from "./ExperienceMeta";
import type { PrivacyNoticeRegion } from "./PrivacyNoticeRegion";
import type { PrivacyNoticeResponseWithUserPreferences } from "./PrivacyNoticeResponseWithUserPreferences";
import type { TCFFeatureRecord } from "./TCFFeatureRecord";
import type { TCFPurposeRecord } from "./TCFPurposeRecord";
import type { TCFVendorRecord } from "./TCFVendorRecord";
import type { TCFPurposeConsentRecord } from "./TCFPurposeConsentRecord";
import type { TCFPurposeLegitimateInterestsRecord } from "./TCFPurposeLegitimateInterestsRecord";
import type { TCFSpecialFeatureRecord } from "./TCFSpecialFeatureRecord";
import type { TCFSpecialPurposeRecord } from "./TCFSpecialPurposeRecord";
import type { TCFVendorConsentRecord } from "./TCFVendorConsentRecord";
import type { TCFVendorLegitimateInterestsRecord } from "./TCFVendorLegitimateInterestsRecord";
import type { TCFVendorRelationships } from "./TCFVendorRelationships";

/**
* An API representation of a PrivacyExperience used for response payloads
Expand All @@ -21,6 +27,17 @@ export type PrivacyExperienceResponse = {
*/
experience_config?: ExperienceConfigResponse;
id: string;
tcf_purpose_consents?: Array<TCFPurposeConsentRecord>;
tcf_purpose_legitimate_interests?: Array<TCFPurposeLegitimateInterestsRecord>;
tcf_special_purposes?: Array<TCFSpecialPurposeRecord>;
tcf_features?: Array<TCFFeatureRecord>;
tcf_special_features?: Array<TCFSpecialFeatureRecord>;
tcf_vendor_consents?: Array<TCFVendorConsentRecord>;
tcf_vendor_legitimate_interests?: Array<TCFVendorLegitimateInterestsRecord>;
tcf_vendor_relationships?: Array<TCFVendorRelationships>;
tcf_system_consents?: Array<TCFVendorConsentRecord>;
tcf_system_legitimate_interests?: Array<TCFVendorLegitimateInterestsRecord>;
tcf_system_relationships?: Array<TCFVendorRelationships>;
created_at: string;
updated_at: string;
/**
Expand All @@ -31,29 +48,6 @@ export type PrivacyExperienceResponse = {
* The Privacy Notices associated with this experience, if applicable
*/
privacy_notices?: Array<PrivacyNoticeResponseWithUserPreferences>;
/**
* For TCF Experiences, the TCF Purposes that appear on your Systems
*/
tcf_purposes?: Array<TCFPurposeRecord>;
/**
* For TCF Experiences, the TCF Special Purposes that appear on your Systems
*/
tcf_special_purposes?: Array<TCFPurposeRecord>;
/**
* For TCF Experiences, the TCF Vendors associated with your Systems
*/
tcf_vendors?: Array<TCFVendorRecord>;
/**
* For TCF Experiences, the TCF Features that appear on your Systems
*/
tcf_features?: Array<TCFFeatureRecord>;
/**
* For TCF Experiences, the TCF Special Features that appear on your Systems
*/
tcf_special_features?: Array<TCFFeatureRecord>;
/**
* For TCF Experiences, Systems with TCF components that do not have an official vendor id (identified by system id)
*/
tcf_systems?: Array<TCFVendorRecord>;
gvl?: any;
meta?: ExperienceMeta;
};
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export enum PrivacyNoticeRegion {
US_WV = "us_wv",
US_WI = "us_wi",
US_WY = "us_wy",
EEA = "eea",
BE = "be",
BG = "bg",
CZ = "cz",
Expand Down
13 changes: 10 additions & 3 deletions clients/admin-ui/src/types/api/models/PrivacyPreferencesRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ import type { TCFVendorSave } from "./TCFVendorSave";
export type PrivacyPreferencesRequest = {
browser_identity: Identity;
code?: string;
/**
* If supplied, *_preferences fields will be ignored in favor of this TC string. Saves preferencesagainst purposes, special features, and vendors.
*/
tc_string?: string;
preferences?: Array<ConsentOptionCreate>;
purpose_preferences?: Array<TCFPurposeSave>;
purpose_consent_preferences?: Array<TCFPurposeSave>;
purpose_legitimate_interests_preferences?: Array<TCFPurposeSave>;
special_purpose_preferences?: Array<TCFSpecialPurposeSave>;
vendor_preferences?: Array<TCFVendorSave>;
vendor_consent_preferences?: Array<TCFVendorSave>;
vendor_legitimate_interests_preferences?: Array<TCFVendorSave>;
feature_preferences?: Array<TCFFeatureSave>;
special_feature_preferences?: Array<TCFSpecialFeatureSave>;
system_preferences?: Array<TCFVendorSave>;
system_consent_preferences?: Array<TCFVendorSave>;
system_legitimate_interests_preferences?: Array<TCFVendorSave>;
policy_key?: string;
privacy_experience_id?: string;
user_geography?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ export type RecordConsentServedRequest = {
browser_identity: Identity;
code?: string;
privacy_notice_history_ids?: Array<string>;
tcf_purposes?: Array<number>;
tcf_purpose_consents?: Array<number>;
tcf_purpose_legitimate_interests?: Array<number>;
tcf_special_purposes?: Array<number>;
tcf_vendors?: Array<string>;
tcf_vendor_consents?: Array<string>;
tcf_vendor_legitimate_interests?: Array<string>;
tcf_features?: Array<number>;
tcf_special_features?: Array<number>;
tcf_systems?: Array<string>;
tcf_system_consents?: Array<string>;
tcf_system_legitimate_interests?: Array<string>;
privacy_experience_id?: string;
user_geography?: string;
acknowledge_mode?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { CurrentPrivacyPreferenceSchema } from "./CurrentPrivacyPreferenceSchema";

/**
* Response schema when saving privacy preferences
*/
export type SavePrivacyPreferencesResponse = {
preferences?: Array<CurrentPrivacyPreferenceSchema>;
purpose_consent_preferences?: Array<CurrentPrivacyPreferenceSchema>;
purpose_legitimate_interests_preferences?: Array<CurrentPrivacyPreferenceSchema>;
special_purpose_preferences?: Array<CurrentPrivacyPreferenceSchema>;
vendor_consent_preferences?: Array<CurrentPrivacyPreferenceSchema>;
vendor_legitimate_interests_preferences?: Array<CurrentPrivacyPreferenceSchema>;
feature_preferences?: Array<CurrentPrivacyPreferenceSchema>;
special_feature_preferences?: Array<CurrentPrivacyPreferenceSchema>;
system_consent_preferences?: Array<CurrentPrivacyPreferenceSchema>;
system_legitimate_interests_preferences?: Array<CurrentPrivacyPreferenceSchema>;
};
14 changes: 0 additions & 14 deletions clients/admin-ui/src/types/api/models/TCFDataCategoryRecord.ts

This file was deleted.

Loading

0 comments on commit 3c767c4

Please sign in to comment.