From 8d50baec385470ca5721a52808407bfa53344667 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 18 Feb 2025 10:22:58 +0200 Subject: [PATCH 1/2] wip --- .../model/privacy/gpp/DataActivity.groovy | 17 ++ .../model/privacy/gpp/MspaMode.groovy | 17 ++ .../model/privacy/gpp/Notice.groovy | 17 ++ .../model/privacy/gpp/OptOut.groovy | 17 ++ .../UsCaliforniaV1ChildSensitiveData.groovy | 29 +++ .../gpp/UsCaliforniaV1SensitiveData.groovy | 52 +++++ .../gpp/UsColoradoV1ChildSensitiveData.groovy | 25 ++ .../gpp/UsColoradoV1SensitiveData.groovy | 46 ++++ .../UsConnecticutV1ChildSensitiveData.groovy | 33 +++ .../gpp/UsConnecticutV1SensitiveData.groovy | 52 +++++ .../gpp/UsNationalV1ChildSensitiveData.groovy | 29 +++ .../gpp/UsNationalV1SensitiveData.groovy | 62 +++++ .../gpp/UsNationalV2ChildSensitiveData.groovy | 33 +++ .../gpp/UsNationalV2SensitiveData.groovy | 64 +++++ .../gpp/UsUtahV1ChildSensitiveData.groovy | 25 ++ .../privacy/gpp/UsUtahV1SensitiveData.groovy | 49 ++++ .../gpp/UsVirginiaV1ChildSensitiveData.groovy | 25 ++ .../gpp/UsVirginiaV1SensitiveData.groovy | 49 ++++ .../tests/privacy/ActivityTraceLogSpec.groovy | 2 +- .../tests/privacy/GppAmpSpec.groovy | 8 +- .../tests/privacy/GppAuctionSpec.groovy | 10 +- .../tests/privacy/GppCookieSyncSpec.groovy | 6 +- .../privacy/GppFetchBidActivitiesSpec.groovy | 221 ++++++++---------- .../tests/privacy/GppSetUidSpec.groovy | 6 +- .../privacy/GppSyncUserActivitiesSpec.groovy | 104 ++++----- .../GppTransmitEidsActivitiesSpec.groovy | 126 +++++----- ...GppTransmitPreciseGeoActivitiesSpec.groovy | 118 +++++----- .../GppTransmitUfpdActivitiesSpec.groovy | 185 ++++++++++----- .../tests/privacy/GppUsNatAuctionSpec.groovy | 12 + .../tests/privacy/PrivacyBaseSpec.groovy | 2 +- .../util/privacy/gpp/GppConsent.groovy | 3 +- .../util/privacy/gpp/UsUtV1Consent.groovy | 90 ------- .../util/privacy/gpp/UsVaV1Consent.groovy | 85 ------- .../gpp/data/UsCaliforniaSensitiveData.groovy | 52 ----- .../gpp/data/UsColoradoSensitiveData.groovy | 46 ---- .../data/UsConnecticutSensitiveData.groovy | 52 ----- .../gpp/data/UsNationalSensitiveData.groovy | 62 ----- .../gpp/data/UsUtahSensitiveData.groovy | 49 ---- .../gpp/data/UsVirginiaSensitiveData.groovy | 49 ---- .../privacy/gpp/{ => v1}/UsCaV1Consent.groovy | 55 ++--- .../privacy/gpp/{ => v1}/UsCoV1Consent.groovy | 54 ++--- .../privacy/gpp/{ => v1}/UsCtV1Consent.groovy | 54 ++--- .../gpp/{ => v1}/UsNatV1Consent.groovy | 73 +++--- .../util/privacy/gpp/v1/UsUtV1Consent.groovy | 90 +++++++ .../util/privacy/gpp/v1/UsVaV1Consent.groovy | 85 +++++++ .../UspV1Consent.groovy} | 11 +- .../gpp/{ => v2}/TcfEuV2Consent.groovy | 3 +- .../util/privacy/gpp/v2/UsNatV2Consent.groovy | 126 ++++++++++ 48 files changed, 1494 insertions(+), 986 deletions(-) create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/DataActivity.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/MspaMode.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/Notice.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/OptOut.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsCaliforniaV1ChildSensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsCaliforniaV1SensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsColoradoV1ChildSensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsColoradoV1SensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsConnecticutV1ChildSensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsConnecticutV1SensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV1ChildSensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV1SensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2ChildSensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2SensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsUtahV1ChildSensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsUtahV1SensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsVirginiaV1ChildSensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsVirginiaV1SensitiveData.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/tests/privacy/GppUsNatAuctionSpec.groovy delete mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsUtV1Consent.groovy delete mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsVaV1Consent.groovy delete mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsCaliforniaSensitiveData.groovy delete mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsColoradoSensitiveData.groovy delete mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsConnecticutSensitiveData.groovy delete mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsNationalSensitiveData.groovy delete mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsUtahSensitiveData.groovy delete mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsVirginiaSensitiveData.groovy rename src/test/groovy/org/prebid/server/functional/util/privacy/gpp/{ => v1}/UsCaV1Consent.groovy (56%) rename src/test/groovy/org/prebid/server/functional/util/privacy/gpp/{ => v1}/UsCoV1Consent.groovy (54%) rename src/test/groovy/org/prebid/server/functional/util/privacy/gpp/{ => v1}/UsCtV1Consent.groovy (53%) rename src/test/groovy/org/prebid/server/functional/util/privacy/gpp/{ => v1}/UsNatV1Consent.groovy (52%) create mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsUtV1Consent.groovy create mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsVaV1Consent.groovy rename src/test/groovy/org/prebid/server/functional/util/privacy/gpp/{UsV1Consent.groovy => v1/UspV1Consent.groovy} (70%) rename src/test/groovy/org/prebid/server/functional/util/privacy/gpp/{ => v2}/TcfEuV2Consent.groovy (92%) create mode 100644 src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/UsNatV2Consent.groovy diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/DataActivity.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/DataActivity.groovy new file mode 100644 index 00000000000..c0ff8164ad4 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/DataActivity.groovy @@ -0,0 +1,17 @@ +package org.prebid.server.functional.model.privacy.gpp + +import com.fasterxml.jackson.annotation.JsonValue + +enum DataActivity { + + NOT_APPLICABLE(0), + NO_CONSENT(1), + CONSENT(2) + + @JsonValue + final int value + + DataActivity(int value) { + this.value = value + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/MspaMode.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/MspaMode.groovy new file mode 100644 index 00000000000..7d2b5845453 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/MspaMode.groovy @@ -0,0 +1,17 @@ +package org.prebid.server.functional.model.privacy.gpp + +import com.fasterxml.jackson.annotation.JsonValue + +enum MspaMode { + + NOT_APPLICABLE(0), + YES(1), + NO(2) + + @JsonValue + final int value + + MspaMode(int value) { + this.value = value + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/Notice.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/Notice.groovy new file mode 100644 index 00000000000..a4880cebb58 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/Notice.groovy @@ -0,0 +1,17 @@ +package org.prebid.server.functional.model.privacy.gpp + +import com.fasterxml.jackson.annotation.JsonValue + +enum Notice { + + NOT_APPLICABLE(0), + YES(1), + NO(2) + + @JsonValue + final int value + + Notice(int value) { + this.value = value + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/OptOut.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/OptOut.groovy new file mode 100644 index 00000000000..eb82dd645e9 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/OptOut.groovy @@ -0,0 +1,17 @@ +package org.prebid.server.functional.model.privacy.gpp + +import com.fasterxml.jackson.annotation.JsonValue + +enum OptOut { + + NOT_APPLICABLE(0), + OPTED_OUT(1), + DID_NOT_OPT_OUT(2) + + @JsonValue + final int value + + OptOut(int value) { + this.value = value + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsCaliforniaV1ChildSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsCaliforniaV1ChildSensitiveData.groovy new file mode 100644 index 00000000000..800f61fe4fd --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsCaliforniaV1ChildSensitiveData.groovy @@ -0,0 +1,29 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsCaliforniaV1ChildSensitiveData { + + DataActivity childBlow13 + DataActivity childFrom13to16 + + static UsCaliforniaV1ChildSensitiveData getDefault(DataActivity childBlow13 = DataActivity.NOT_APPLICABLE, + DataActivity childFrom13to16 = DataActivity.NOT_APPLICABLE) { + + new UsCaliforniaV1ChildSensitiveData().tap { + it.childBlow13 = childBlow13 + it.childFrom13to16 = childFrom13to16 + } + } + + static UsCaliforniaV1ChildSensitiveData getRandom(List excludedActivities) { + new UsCaliforniaV1ChildSensitiveData().tap { + it.childBlow13 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + it.childFrom13to16 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + } + } + + List getContentList() { + [childFrom13to16, childBlow13]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsCaliforniaV1SensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsCaliforniaV1SensitiveData.groovy new file mode 100644 index 00000000000..031b810902a --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsCaliforniaV1SensitiveData.groovy @@ -0,0 +1,52 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsCaliforniaV1SensitiveData { + + DataActivity idNumbers + DataActivity accountInfo + DataActivity geolocation + DataActivity racialEthnicOrigin + DataActivity communicationContents + DataActivity geneticId + DataActivity biometricId + DataActivity healthInfo + DataActivity orientation + + static UsCaliforniaV1SensitiveData generateRandomSensitiveData() { + new UsCaliforniaV1SensitiveData().tap { + idNumbers = PBSUtils.getRandomEnum(DataActivity) + accountInfo = PBSUtils.getRandomEnum(DataActivity) + geolocation = PBSUtils.getRandomEnum(DataActivity) + racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity) + communicationContents = PBSUtils.getRandomEnum(DataActivity) + geneticId = PBSUtils.getRandomEnum(DataActivity) + biometricId = PBSUtils.getRandomEnum(DataActivity) + healthInfo = PBSUtils.getRandomEnum(DataActivity) + orientation = PBSUtils.getRandomEnum(DataActivity) + } + } + + static UsCaliforniaV1SensitiveData fromList(List sensitiveData) { + if (sensitiveData.size() != 9) { + throw new IllegalArgumentException("Invalid data size. Expected 9 values.") + } + new UsCaliforniaV1SensitiveData().tap { + idNumbers = sensitiveData[0] + accountInfo = sensitiveData[1] + geolocation = sensitiveData[2] + racialEthnicOrigin = sensitiveData[3] + communicationContents = sensitiveData[4] + geneticId = sensitiveData[5] + biometricId = sensitiveData[6] + healthInfo = sensitiveData[7] + orientation = sensitiveData[8] + } + } + + List getContentList() { + [idNumbers, accountInfo, geolocation, racialEthnicOrigin, + communicationContents, geneticId, biometricId, healthInfo, orientation]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsColoradoV1ChildSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsColoradoV1ChildSensitiveData.groovy new file mode 100644 index 00000000000..c5a5b5f4170 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsColoradoV1ChildSensitiveData.groovy @@ -0,0 +1,25 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsColoradoV1ChildSensitiveData { + + DataActivity childSensitive + + static UsColoradoV1ChildSensitiveData getDefault(DataActivity childSensitive = DataActivity.NOT_APPLICABLE) { + + new UsColoradoV1ChildSensitiveData().tap { + it.childSensitive = childSensitive + } + } + + static UsColoradoV1ChildSensitiveData getRandom(List excludedActivities) { + new UsColoradoV1ChildSensitiveData().tap { + it.childSensitive = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + } + } + + Integer getContentList() { + this.childSensitive.value + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsColoradoV1SensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsColoradoV1SensitiveData.groovy new file mode 100644 index 00000000000..dbc8d693f95 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsColoradoV1SensitiveData.groovy @@ -0,0 +1,46 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsColoradoV1SensitiveData { + + DataActivity racialEthnicOrigin + DataActivity religiousBeliefs + DataActivity healthInfo + DataActivity orientation + DataActivity citizenshipStatus + DataActivity geneticId + DataActivity biometricId + + static UsColoradoV1SensitiveData generateRandomSensitiveData() { + new UsColoradoV1SensitiveData().tap { + racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity) + religiousBeliefs = PBSUtils.getRandomEnum(DataActivity) + healthInfo = PBSUtils.getRandomEnum(DataActivity) + orientation = PBSUtils.getRandomEnum(DataActivity) + citizenshipStatus = PBSUtils.getRandomEnum(DataActivity) + geneticId = PBSUtils.getRandomEnum(DataActivity) + biometricId = PBSUtils.getRandomEnum(DataActivity) + } + } + + static UsColoradoV1SensitiveData fromList(List data) { + if (data.size() != 7) { + throw new IllegalArgumentException("Invalid data size. Expected 7 values.") + } + new UsColoradoV1SensitiveData().tap { + racialEthnicOrigin = data[0] + religiousBeliefs = data[1] + healthInfo = data[2] + orientation = data[3] + citizenshipStatus = data[4] + geneticId = data[5] + biometricId = data[6] + } + } + + List getContentList() { + [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, + citizenshipStatus, geneticId, biometricId]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsConnecticutV1ChildSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsConnecticutV1ChildSensitiveData.groovy new file mode 100644 index 00000000000..91a758c50b8 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsConnecticutV1ChildSensitiveData.groovy @@ -0,0 +1,33 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsConnecticutV1ChildSensitiveData { + + DataActivity childBlow13 + DataActivity childFrom13to16 + DataActivity childFrom16to18 + + static UsConnecticutV1ChildSensitiveData getDefault(DataActivity childBlow13 = DataActivity.NOT_APPLICABLE, + DataActivity childFrom13to16 = DataActivity.NOT_APPLICABLE, + DataActivity childFrom16to18 = DataActivity.NOT_APPLICABLE) { + + new UsConnecticutV1ChildSensitiveData().tap { + it.childBlow13 = childBlow13 + it.childFrom13to16 = childFrom13to16 + it.childFrom16to18 = childFrom16to18 + } + } + + static UsConnecticutV1ChildSensitiveData getRandom(List excludedActivities = []) { + new UsConnecticutV1ChildSensitiveData().tap { + it.childBlow13 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + it.childFrom13to16 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + it.childFrom16to18 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + } + } + + List getContentList() { + [childFrom13to16, childBlow13, childFrom16to18]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsConnecticutV1SensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsConnecticutV1SensitiveData.groovy new file mode 100644 index 00000000000..3bd33f1df69 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsConnecticutV1SensitiveData.groovy @@ -0,0 +1,52 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsConnecticutV1SensitiveData { + + DataActivity racialEthnicOrigin + DataActivity religiousBeliefs + DataActivity healthInfo + DataActivity orientation + DataActivity citizenshipStatus + DataActivity geneticId + DataActivity biometricId + DataActivity geolocation + DataActivity idNumbers + + static UsConnecticutV1SensitiveData generateRandomSensitiveData() { + new UsConnecticutV1SensitiveData().tap { + racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity) + religiousBeliefs = PBSUtils.getRandomEnum(DataActivity) + healthInfo = PBSUtils.getRandomEnum(DataActivity) + orientation = PBSUtils.getRandomEnum(DataActivity) + citizenshipStatus = PBSUtils.getRandomEnum(DataActivity) + geneticId = PBSUtils.getRandomEnum(DataActivity) + biometricId = PBSUtils.getRandomEnum(DataActivity) + geolocation = PBSUtils.getRandomEnum(DataActivity) + idNumbers = PBSUtils.getRandomEnum(DataActivity) + } + } + + static UsConnecticutV1SensitiveData fromList(List data) { + if (data.size() != 9) { + throw new IllegalArgumentException("Invalid data size. Expected 9 values.") + } + new UsConnecticutV1SensitiveData().tap { + racialEthnicOrigin = data[0] + religiousBeliefs = data[1] + healthInfo = data[2] + orientation = data[3] + citizenshipStatus = data[4] + geneticId = data[5] + biometricId = data[6] + geolocation = data[7] + idNumbers = data[8] + } + } + + List getContentList() { + [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, + citizenshipStatus, geneticId, biometricId, geolocation, idNumbers]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV1ChildSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV1ChildSensitiveData.groovy new file mode 100644 index 00000000000..6a726cac8ff --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV1ChildSensitiveData.groovy @@ -0,0 +1,29 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsNationalV1ChildSensitiveData { + + DataActivity childBlow13 + DataActivity childFrom13to16 + + static UsNationalV1ChildSensitiveData getDefault(DataActivity childBlow13 = DataActivity.NOT_APPLICABLE, + DataActivity childFrom13to16 = DataActivity.NOT_APPLICABLE) { + + new UsNationalV1ChildSensitiveData().tap { + it.childBlow13 = childBlow13 + it.childFrom13to16 = childFrom13to16 + } + } + + static UsNationalV1ChildSensitiveData getRandom(List excludedActivities) { + new UsNationalV1ChildSensitiveData().tap { + it.childBlow13 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + it.childFrom13to16 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + } + } + + List getContentList() { + [childFrom13to16, childBlow13]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV1SensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV1SensitiveData.groovy new file mode 100644 index 00000000000..4a22fd0b514 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV1SensitiveData.groovy @@ -0,0 +1,62 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsNationalV1SensitiveData { + + DataActivity racialEthnicOrigin + DataActivity religiousBeliefs + DataActivity healthInfo + DataActivity orientation + DataActivity citizenshipStatus + DataActivity geneticId + DataActivity biometricId + DataActivity geolocation + DataActivity idNumbers + DataActivity accountInfo + DataActivity unionMembership + DataActivity communicationContents + + static UsNationalV1SensitiveData generateRandomSensitiveData() { + new UsNationalV1SensitiveData().tap { + racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity) + religiousBeliefs = PBSUtils.getRandomEnum(DataActivity) + healthInfo = PBSUtils.getRandomEnum(DataActivity) + orientation = PBSUtils.getRandomEnum(DataActivity) + citizenshipStatus = PBSUtils.getRandomEnum(DataActivity) + geneticId = PBSUtils.getRandomEnum(DataActivity) + biometricId = PBSUtils.getRandomEnum(DataActivity) + geolocation = PBSUtils.getRandomEnum(DataActivity) + idNumbers = PBSUtils.getRandomEnum(DataActivity) + accountInfo = PBSUtils.getRandomEnum(DataActivity) + unionMembership = PBSUtils.getRandomEnum(DataActivity) + communicationContents = PBSUtils.getRandomEnum(DataActivity) + } + } + + static UsNationalV1SensitiveData fromList(List data) { + if (data.size() != 12) { + throw new IllegalArgumentException("Invalid data size. Expected 12 values.") + } + new UsNationalV1SensitiveData().tap { + racialEthnicOrigin = data[0] + religiousBeliefs = data[1] + healthInfo = data[2] + orientation = data[3] + citizenshipStatus = data[4] + geneticId = data[5] + biometricId = data[6] + geolocation = data[7] + idNumbers = data[8] + accountInfo = data[9] + unionMembership = data[10] + communicationContents = data[11] + } + } + + List getContentList() { + [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, + citizenshipStatus, geneticId, biometricId, geolocation, + idNumbers, accountInfo, unionMembership, communicationContents]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2ChildSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2ChildSensitiveData.groovy new file mode 100644 index 00000000000..c775d8575fd --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2ChildSensitiveData.groovy @@ -0,0 +1,33 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsNationalV2ChildSensitiveData { + + DataActivity childBlow13 + DataActivity childFrom13to16 + DataActivity childFrom16to17 + + static UsNationalV2ChildSensitiveData getDefault(DataActivity childBlow13 = DataActivity.NOT_APPLICABLE, + DataActivity childFrom13to16 = DataActivity.NOT_APPLICABLE, + DataActivity childFrom16to17 = DataActivity.NOT_APPLICABLE) { + + new UsNationalV2ChildSensitiveData().tap { + it.childBlow13 = childBlow13 + it.childFrom13to16 = childFrom13to16 + it.childFrom16to17 = childFrom16to17 + } + } + + static UsNationalV2ChildSensitiveData getRandom(List excludedActivities) { + new UsNationalV2ChildSensitiveData().tap { + it.childBlow13 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + it.childFrom13to16 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + it.childFrom16to17 = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + } + } + + List getContentList() { + [childFrom13to16, childBlow13, childFrom16to17]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2SensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2SensitiveData.groovy new file mode 100644 index 00000000000..c29982b7cb5 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2SensitiveData.groovy @@ -0,0 +1,64 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsNationalV2SensitiveData extends UsNationalV1SensitiveData { + + DataActivity consumerHealthData + DataActivity crimeVictim + DataActivity nationalOrigin + DataActivity transgenderStatus + + static UsNationalV1SensitiveData generateRandomSensitiveData() { + new UsNationalV1SensitiveData().tap { + racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity) + religiousBeliefs = PBSUtils.getRandomEnum(DataActivity) + healthInfo = PBSUtils.getRandomEnum(DataActivity) + orientation = PBSUtils.getRandomEnum(DataActivity) + citizenshipStatus = PBSUtils.getRandomEnum(DataActivity) + geneticId = PBSUtils.getRandomEnum(DataActivity) + biometricId = PBSUtils.getRandomEnum(DataActivity) + geolocation = PBSUtils.getRandomEnum(DataActivity) + idNumbers = PBSUtils.getRandomEnum(DataActivity) + accountInfo = PBSUtils.getRandomEnum(DataActivity) + unionMembership = PBSUtils.getRandomEnum(DataActivity) + communicationContents = PBSUtils.getRandomEnum(DataActivity) + consumerHealthData = PBSUtils.getRandomEnum(DataActivity) + crimeVictim = PBSUtils.getRandomEnum(DataActivity) + nationalOrigin = PBSUtils.getRandomEnum(DataActivity) + transgenderStatus = PBSUtils.getRandomEnum(DataActivity) + } + } + + static UsNationalV1SensitiveData fromList(List data) { + if (data.size() != 16) { + throw new IllegalArgumentException("Invalid data size. Expected 16 values.") + } + new UsNationalV1SensitiveData().tap { + racialEthnicOrigin = data[0] + religiousBeliefs = data[1] + healthInfo = data[2] + orientation = data[3] + citizenshipStatus = data[4] + geneticId = data[5] + biometricId = data[6] + geolocation = data[7] + idNumbers = data[8] + accountInfo = data[9] + unionMembership = data[10] + communicationContents = data[11] + consumerHealthData = data[12] + crimeVictim = data[13] + nationalOrigin = data[14] + transgenderStatus = data[15] + } + } + + @Override + List getContentList() { + [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, + citizenshipStatus, geneticId, biometricId, geolocation, + idNumbers, accountInfo, unionMembership, communicationContents, + consumerHealthData, crimeVictim, nationalOrigin, transgenderStatus]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsUtahV1ChildSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsUtahV1ChildSensitiveData.groovy new file mode 100644 index 00000000000..215d4484b18 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsUtahV1ChildSensitiveData.groovy @@ -0,0 +1,25 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsUtahV1ChildSensitiveData { + + DataActivity childSensitive + + static UsUtahV1ChildSensitiveData getDefault(DataActivity childSensitive = DataActivity.NOT_APPLICABLE) { + + new UsUtahV1ChildSensitiveData().tap { + it.childSensitive = childSensitive + } + } + + static UsUtahV1ChildSensitiveData getRandom(List excludedActivities) { + new UsUtahV1ChildSensitiveData().tap { + it.childSensitive = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + } + } + + Integer getContentList() { + childSensitive.value + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsUtahV1SensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsUtahV1SensitiveData.groovy new file mode 100644 index 00000000000..9d835b83eb5 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsUtahV1SensitiveData.groovy @@ -0,0 +1,49 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsUtahV1SensitiveData { + + DataActivity racialEthnicOrigin + DataActivity religiousBeliefs + DataActivity orientation + DataActivity citizenshipStatus + DataActivity healthInfo + DataActivity geneticId + DataActivity biometricId + DataActivity geolocation + + static UsUtahV1SensitiveData generateRandomSensitiveData() { + new UsUtahV1SensitiveData().tap { + racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity) + religiousBeliefs = PBSUtils.getRandomEnum(DataActivity) + orientation = PBSUtils.getRandomEnum(DataActivity) + citizenshipStatus = PBSUtils.getRandomEnum(DataActivity) + healthInfo = PBSUtils.getRandomEnum(DataActivity) + geneticId = PBSUtils.getRandomEnum(DataActivity) + biometricId = PBSUtils.getRandomEnum(DataActivity) + geolocation = PBSUtils.getRandomEnum(DataActivity) + } + } + + static UsUtahV1SensitiveData fromList(List data) { + if (data.size() != 8) { + throw new IllegalArgumentException("Invalid data size. Expected 8 values.") + } + new UsUtahV1SensitiveData().tap { + racialEthnicOrigin = data[0] + religiousBeliefs = data[1] + orientation = data[2] + citizenshipStatus = data[3] + healthInfo = data[4] + geneticId = data[5] + biometricId = data[6] + geolocation = data[7] + } + } + + List getContentList() { + [racialEthnicOrigin, religiousBeliefs, orientation, citizenshipStatus, + healthInfo, geneticId, biometricId, geolocation]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsVirginiaV1ChildSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsVirginiaV1ChildSensitiveData.groovy new file mode 100644 index 00000000000..512e220fac9 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsVirginiaV1ChildSensitiveData.groovy @@ -0,0 +1,25 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsVirginiaV1ChildSensitiveData { + + DataActivity childSensitive + + static UsVirginiaV1ChildSensitiveData getDefault(DataActivity childSensitive = DataActivity.NOT_APPLICABLE) { + + new UsVirginiaV1ChildSensitiveData().tap { + it.childSensitive = childSensitive + } + } + + static UsVirginiaV1ChildSensitiveData getRandom(List excludedActivities = []) { + new UsVirginiaV1ChildSensitiveData().tap { + it.childSensitive = PBSUtils.getRandomEnum(DataActivity, excludedActivities) + } + } + + Integer getContentList() { + childSensitive.value + } +} diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsVirginiaV1SensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsVirginiaV1SensitiveData.groovy new file mode 100644 index 00000000000..30f9d2e4c26 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsVirginiaV1SensitiveData.groovy @@ -0,0 +1,49 @@ +package org.prebid.server.functional.model.privacy.gpp + +import org.prebid.server.functional.util.PBSUtils + +class UsVirginiaV1SensitiveData { + + DataActivity racialEthnicOrigin + DataActivity religiousBeliefs + DataActivity healthInfo + DataActivity orientation + DataActivity citizenshipStatus + DataActivity geneticId + DataActivity biometricId + DataActivity geolocation + + static UsVirginiaV1SensitiveData generateRandomSensitiveData() { + new UsVirginiaV1SensitiveData().tap { + racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity) + religiousBeliefs = PBSUtils.getRandomEnum(DataActivity) + healthInfo = PBSUtils.getRandomEnum(DataActivity) + orientation = PBSUtils.getRandomEnum(DataActivity) + citizenshipStatus = PBSUtils.getRandomEnum(DataActivity) + geneticId = PBSUtils.getRandomEnum(DataActivity) + biometricId = PBSUtils.getRandomEnum(DataActivity) + geolocation = PBSUtils.getRandomEnum(DataActivity) + } + } + + static UsVirginiaV1SensitiveData fromList(List data) { + if (data.size() != 8) { + throw new IllegalArgumentException("Invalid data size. Expected 8 values.") + } + new UsVirginiaV1SensitiveData().tap { + racialEthnicOrigin = data[0] + religiousBeliefs = data[1] + healthInfo = data[2] + orientation = data[3] + citizenshipStatus = data[4] + geneticId = data[5] + biometricId = data[6] + geolocation = data[7] + } + } + + List getContentList() { + [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, + citizenshipStatus, geneticId, biometricId, geolocation]*.value.collect { it ?: 0 } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/ActivityTraceLogSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/ActivityTraceLogSpec.groovy index e42fa3fb594..c570820b60c 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/ActivityTraceLogSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/ActivityTraceLogSpec.groovy @@ -16,7 +16,7 @@ import org.prebid.server.functional.model.response.auction.And import org.prebid.server.functional.model.response.auction.GeoCode import org.prebid.server.functional.model.response.auction.RuleConfiguration import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsNatV1Consent import static org.prebid.server.functional.model.bidder.BidderName.GENERIC import static org.prebid.server.functional.model.pricefloors.Country.CAN diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppAmpSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppAmpSpec.groovy index 204f2eb7025..ab4d46117ab 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppAmpSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppAmpSpec.groovy @@ -7,8 +7,8 @@ import org.prebid.server.functional.model.request.auction.BidRequest import org.prebid.server.functional.model.request.auction.Regs import org.prebid.server.functional.model.request.auction.RegsExt import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.gpp.TcfEuV2Consent -import org.prebid.server.functional.util.privacy.gpp.UsV1Consent +import org.prebid.server.functional.util.privacy.gpp.v2.TcfEuV2Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UspV1Consent import static org.prebid.server.functional.model.request.GppSectionId.TCF_EU_V2 import static org.prebid.server.functional.model.request.GppSectionId.USP_V1 @@ -133,7 +133,7 @@ class GppAmpSpec extends PrivacyBaseSpec { where: gppConsent << [new TcfEuV2Consent.Builder().build(), - new UsV1Consent.Builder().build()] + new UspV1Consent.Builder().build()] } def "PBS should copy consent_string to user.consent and set gdpr=1 when consent_string is valid and gppSid contains 2"() { @@ -165,7 +165,7 @@ class GppAmpSpec extends PrivacyBaseSpec { def "PBS should copy consent_string to user.us_privacy when consent_string contains us_privacy and gppSid contains 6"() { given: "Default amp request with valid consent_string and gpp consent_type" - def gppConsent = new UsV1Consent.Builder().build() + def gppConsent = new UspV1Consent.Builder().build() def gppSidIds = USP_V1.value def ampRequest = getGppAmpRequest(gppConsent.consentString, gppSidIds) diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppAuctionSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppAuctionSpec.groovy index 4eb78ee2140..d0282d48ddd 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppAuctionSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppAuctionSpec.groovy @@ -8,8 +8,8 @@ import org.prebid.server.functional.model.response.auction.ErrorType import org.prebid.server.functional.util.PBSUtils import org.prebid.server.functional.util.privacy.CcpaConsent import org.prebid.server.functional.util.privacy.TcfConsent -import org.prebid.server.functional.util.privacy.gpp.TcfEuV2Consent -import org.prebid.server.functional.util.privacy.gpp.UsV1Consent +import org.prebid.server.functional.util.privacy.gpp.v2.TcfEuV2Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UspV1Consent import static org.prebid.server.functional.model.request.GppSectionId.TCF_EU_V2 import static org.prebid.server.functional.model.request.GppSectionId.USP_V1 @@ -174,7 +174,7 @@ class GppAuctionSpec extends PrivacyBaseSpec { def "PBS should copy regs.gpp to regs.usPrivacy when gppSid contains 6, gpp is USP_V1 and regs.us_privacy isn't specified"() { given: "Default bid request with gpp and gppSid, without us_privacy" - def gppConsent = new UsV1Consent.Builder().build() + def gppConsent = new UspV1Consent.Builder().build() def bidRequest = BidRequest.defaultBidRequest.tap { regs = new Regs(gpp: gppConsent, gppSid: [USP_V1.intValue], usPrivacy: null) } @@ -191,7 +191,7 @@ class GppAuctionSpec extends PrivacyBaseSpec { def "PBS shouldn't copy regs.gpp to regs.usPrivacy when gppSid doesn't contain 6, gpp is USP_V1 and regs.us_privacy isn't specified"() { given: "Default bid request with gpp and gppSid, without us_privacy" def gppSidIds = [PBSUtils.getRandomNumberWithExclusion(USP_V1.intValue)] - def gpp = new UsV1Consent.Builder().build() + def gpp = new UspV1Consent.Builder().build() def bidRequest = BidRequest.defaultBidRequest.tap { regs = new Regs(gppSid: gppSidIds, gpp: gpp, usPrivacy: null) } @@ -212,7 +212,7 @@ class GppAuctionSpec extends PrivacyBaseSpec { def "PBS should emit warning when gppSid contains 6, gpp is USP_V1 and regs.gpp and regs.usPrivacy are different"() { given: "Default bid request with gpp, gppSid and usPrivacy" def gppSidIds = [USP_V1.intValue] - def gpp = new UsV1Consent.Builder().build() + def gpp = new UspV1Consent.Builder().build() def ccpaConsent = new CcpaConsent(explicitNotice: ENFORCED, optOutSale: NOT_ENFORCED) def bidRequest = BidRequest.defaultBidRequest.tap { regs = new Regs(gppSid: gppSidIds, gpp: gpp, usPrivacy: ccpaConsent) diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppCookieSyncSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppCookieSyncSpec.groovy index a462e91a1ba..226464b505f 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppCookieSyncSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppCookieSyncSpec.groovy @@ -10,8 +10,8 @@ import org.prebid.server.functional.util.HttpUtil import org.prebid.server.functional.util.PBSUtils import org.prebid.server.functional.util.privacy.CcpaConsent import org.prebid.server.functional.util.privacy.TcfConsent -import org.prebid.server.functional.util.privacy.gpp.TcfEuV2Consent -import org.prebid.server.functional.util.privacy.gpp.UsV1Consent +import org.prebid.server.functional.util.privacy.gpp.v2.TcfEuV2Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UspV1Consent import static org.prebid.server.functional.model.bidder.BidderName.GENERIC import static org.prebid.server.functional.model.request.GppSectionId.TCF_EU_V2 @@ -190,7 +190,7 @@ class GppCookieSyncSpec extends BaseSpec { given: "Cookie sync request" def cookieSyncRequest = CookieSyncRequest.defaultCookieSyncRequest.tap { it.gppSid = USP_V1.value - it.gpp = new UsV1Consent.Builder().build() + it.gpp = new UspV1Consent.Builder().build() it.gdpr = null it.usPrivacy = new CcpaConsent(explicitNotice: ENFORCED, optOutSale: ENFORCED) } diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppFetchBidActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppFetchBidActivitiesSpec.groovy index db74b18ee48..d96be6f0af8 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppFetchBidActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppFetchBidActivitiesSpec.groovy @@ -8,6 +8,13 @@ import org.prebid.server.functional.model.config.InequalityValueRule import org.prebid.server.functional.model.config.LogicalRestrictedRule import org.prebid.server.functional.model.db.Account import org.prebid.server.functional.model.db.StoredRequest +import org.prebid.server.functional.model.privacy.gpp.DataActivity +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsColoradoV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsConnecticutV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsVirginiaV1ChildSensitiveData import org.prebid.server.functional.model.request.amp.AmpRequest import org.prebid.server.functional.model.request.auction.Activity import org.prebid.server.functional.model.request.auction.ActivityRule @@ -19,14 +26,14 @@ import org.prebid.server.functional.model.request.auction.Geo import org.prebid.server.functional.model.request.auction.RegsExt import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.gpp.UsCaV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCoV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsUtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsVaV1Consent -import org.prebid.server.functional.util.privacy.gpp.data.UsCaliforniaSensitiveData -import org.prebid.server.functional.util.privacy.gpp.data.UsUtahSensitiveData +import org.prebid.server.functional.util.privacy.gpp.v1.UsCaV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCoV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsNatV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsUtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsVaV1Consent +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData import java.time.Instant @@ -819,14 +826,14 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { assert bidder.getBidderRequests(bidRequest.id).size() == 0 where: - gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), - new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), - new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + gppConsent | valueRules + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } def "PBS auction call when custom privacy regulation empty and normalize is disabled should respond with an error and update metric"() { @@ -912,73 +919,57 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) - + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap {it.childFrom16to18 = DataActivity.NO_CONSENT}) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap {it.childFrom13to16 = DataActivity.NO_CONSENT}) } def "PBS amp call when bidder allowed in activities should process bid request and proper metrics and update processed metrics"() { @@ -1379,13 +1370,13 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { assert bidder.getBidderRequest(ampStoredRequest.id) where: - gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + gppConsent | gppSid + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS amp call when privacy regulation have duplicate should process request and update alerts metrics"() { @@ -1567,14 +1558,14 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { assert !bidder.getBidderRequests(ampStoredRequest.id).size() where: - gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), - new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), - new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + gppConsent | valueRules + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } def "PBS amp call when custom privacy regulation empty and normalize is disabled should respond with an error and update metric"() { @@ -1683,72 +1674,56 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) - + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap {it.childFrom16to18 = DataActivity.NO_CONSENT}) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap {it.childFrom13to16 = DataActivity.NO_CONSENT}) } } diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSetUidSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSetUidSpec.groovy index 47a04509805..d49565222d2 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSetUidSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSetUidSpec.groovy @@ -5,8 +5,8 @@ import org.prebid.server.functional.model.request.GppSectionId import org.prebid.server.functional.model.request.setuid.SetuidRequest import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.gpp.TcfEuV2Consent -import org.prebid.server.functional.util.privacy.gpp.UsV1Consent +import org.prebid.server.functional.util.privacy.gpp.v2.TcfEuV2Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UspV1Consent import static org.prebid.server.functional.model.bidder.BidderName.GENERIC import static org.prebid.server.functional.model.request.GppSectionId.US_NAT_V1 @@ -68,7 +68,7 @@ class GppSetUidSpec extends PrivacyBaseSpec { assert response.uidsCookie.tempUIDs[GENERIC] where: - gpp << [new UsV1Consent.Builder().build().encodeSection(), + gpp << [new UspV1Consent.Builder().build().encodeSection(), new TcfEuV2Consent.Builder().build().encodeSection()] } diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy index 8d358306721..d1b21648dbd 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy @@ -20,14 +20,14 @@ import org.prebid.server.functional.model.request.cookiesync.CookieSyncRequest import org.prebid.server.functional.model.request.setuid.SetuidRequest import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.gpp.UsCaV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCoV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsUtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsVaV1Consent -import org.prebid.server.functional.util.privacy.gpp.data.UsCaliforniaSensitiveData -import org.prebid.server.functional.util.privacy.gpp.data.UsUtahSensitiveData +import org.prebid.server.functional.util.privacy.gpp.v1.UsCaV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCoV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsNatV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsUtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsVaV1Consent +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData import java.time.Instant @@ -517,11 +517,11 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 } def "PBS cookie sync call when privacy modules contain allowing settings should include proper responded with bidders URLs"() { @@ -827,23 +827,23 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() .setKnownChildSensitiveDataConsents(0, 0) @@ -864,21 +864,21 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), @@ -1367,11 +1367,11 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 } def "PBS setuid request when privacy modules contain allowing settings should respond with valid bidders UIDs cookies"() { @@ -1707,23 +1707,23 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() .setKnownChildSensitiveDataConsents(0, 0) @@ -1744,21 +1744,21 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitEidsActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitEidsActivitiesSpec.groovy index 42ee2290663..85b4d064423 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitEidsActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitEidsActivitiesSpec.groovy @@ -17,15 +17,15 @@ import org.prebid.server.functional.model.request.auction.Geo import org.prebid.server.functional.model.request.auction.RegsExt import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.gpp.UsCaV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCoV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsUtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsVaV1Consent -import org.prebid.server.functional.util.privacy.gpp.data.UsCaliforniaSensitiveData -import org.prebid.server.functional.util.privacy.gpp.data.UsNationalSensitiveData -import org.prebid.server.functional.util.privacy.gpp.data.UsUtahSensitiveData +import org.prebid.server.functional.util.privacy.gpp.v1.UsCaV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCoV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsNatV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsUtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsVaV1Consent +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData import java.time.Instant @@ -748,7 +748,7 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { new UsNatV1Consent.Builder() .setPersonalDataConsents(2) .build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 1, religiousBeliefs: 1, healthInfo: 1, @@ -758,7 +758,7 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { )).build(), new UsNatV1Consent.Builder() .setSensitiveDataLimitUseNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 2, religiousBeliefs: 2, healthInfo: 2, @@ -773,7 +773,7 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { )).build(), new UsNatV1Consent.Builder() .setSensitiveDataProcessingOptOutNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 2, religiousBeliefs: 2, healthInfo: 2, @@ -786,14 +786,14 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { unionMembership: 2, communicationContents: 2 )).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( geneticId: 1, biometricId: 1, idNumbers: 1, accountInfo: 1, communicationContents: 1 )).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( geneticId: 2, biometricId: 2, idNumbers: 2, @@ -879,11 +879,11 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 } def "PBS auction call when privacy modules contain allowing settings should leave EIDS fields in request"() { @@ -1192,23 +1192,23 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() .setKnownChildSensitiveDataConsents(0, 0) @@ -1229,21 +1229,21 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), @@ -1729,7 +1729,7 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { new UsNatV1Consent.Builder() .setPersonalDataConsents(2) .build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 1, religiousBeliefs: 1, healthInfo: 1, @@ -1739,7 +1739,7 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { )).build(), new UsNatV1Consent.Builder() .setSensitiveDataLimitUseNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 2, religiousBeliefs: 2, healthInfo: 2, @@ -1754,7 +1754,7 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { )).build(), new UsNatV1Consent.Builder() .setSensitiveDataProcessingOptOutNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 2, religiousBeliefs: 2, healthInfo: 2, @@ -1767,14 +1767,14 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { unionMembership: 2, communicationContents: 2 )).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( geneticId: 1, biometricId: 1, idNumbers: 1, accountInfo: 1, communicationContents: 1 )).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( geneticId: 2, biometricId: 2, idNumbers: 2, @@ -1878,11 +1878,11 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 } def "PBS amp call when privacy modules contain allowing settings should leave EIDS fields in request"() { @@ -2266,23 +2266,23 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() .setKnownChildSensitiveDataConsents(0, 0) @@ -2303,21 +2303,21 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitPreciseGeoActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitPreciseGeoActivitiesSpec.groovy index e51a9b8f193..183e1013c2a 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitPreciseGeoActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitPreciseGeoActivitiesSpec.groovy @@ -16,15 +16,15 @@ import org.prebid.server.functional.model.request.auction.Geo import org.prebid.server.functional.model.request.auction.RegsExt import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.gpp.UsCaV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCoV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsUtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsVaV1Consent -import org.prebid.server.functional.util.privacy.gpp.data.UsCaliforniaSensitiveData -import org.prebid.server.functional.util.privacy.gpp.data.UsNationalSensitiveData -import org.prebid.server.functional.util.privacy.gpp.data.UsUtahSensitiveData +import org.prebid.server.functional.util.privacy.gpp.v1.UsCaV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCoV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsNatV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsUtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsVaV1Consent +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData import java.time.Instant @@ -1113,17 +1113,17 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { .build(), new UsNatV1Consent.Builder() .setSensitiveDataLimitUseNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( geolocation: 2 )).build(), new UsNatV1Consent.Builder() .setSensitiveDataProcessingOptOutNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( geolocation: 2 )).build(), new UsNatV1Consent.Builder() .setSensitiveDataProcessingOptOutNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( geolocation: 1 )).build() ] @@ -1187,11 +1187,11 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 } def "PBS auction call when privacy modules contain allowing settings should not round lat/lon data"() { @@ -1646,23 +1646,23 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() .setKnownChildSensitiveDataConsents(0, 0) @@ -1683,21 +1683,21 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), @@ -2340,17 +2340,17 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { .build(), new UsNatV1Consent.Builder() .setSensitiveDataLimitUseNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( geolocation: 2 )).build(), new UsNatV1Consent.Builder() .setSensitiveDataProcessingOptOutNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( geolocation: 2 )).build(), new UsNatV1Consent.Builder() .setSensitiveDataProcessingOptOutNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( geolocation: 1 )).build() ] @@ -2422,11 +2422,11 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 } def "PBS amp call when privacy modules contain allowing settings should not round lat/lon data"() { @@ -2947,23 +2947,23 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() .setKnownChildSensitiveDataConsents(0, 0) @@ -2984,21 +2984,21 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy index bbb019d515d..fcbedb79823 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy @@ -1,5 +1,6 @@ package org.prebid.server.functional.tests.privacy + import org.prebid.server.functional.model.config.AccountGdprConfig import org.prebid.server.functional.model.config.AccountGppConfig import org.prebid.server.functional.model.config.ActivityConfig @@ -27,15 +28,16 @@ import org.prebid.server.functional.model.request.auction.UserExt import org.prebid.server.functional.model.request.auction.UserExtData import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils -import org.prebid.server.functional.util.privacy.gpp.UsCaV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCoV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsCtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsUtV1Consent -import org.prebid.server.functional.util.privacy.gpp.UsVaV1Consent -import org.prebid.server.functional.util.privacy.gpp.data.UsCaliforniaSensitiveData -import org.prebid.server.functional.util.privacy.gpp.data.UsNationalSensitiveData -import org.prebid.server.functional.util.privacy.gpp.data.UsUtahSensitiveData +import org.prebid.server.functional.util.privacy.gpp.v1.UsCaV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCoV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsCtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsNatV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsUtV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsVaV1Consent +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData +import spock.lang.IgnoreRest import java.time.Instant @@ -1005,7 +1007,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { new UsNatV1Consent.Builder() .setPersonalDataConsents(2) .build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 1, religiousBeliefs: 1, healthInfo: 1, @@ -1015,7 +1017,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { )).build(), new UsNatV1Consent.Builder() .setSensitiveDataLimitUseNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 2, religiousBeliefs: 2, healthInfo: 2, @@ -1030,7 +1032,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { )).build(), new UsNatV1Consent.Builder() .setSensitiveDataProcessingOptOutNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 2, religiousBeliefs: 2, healthInfo: 2, @@ -1043,14 +1045,14 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { unionMembership: 2, communicationContents: 2 )).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( geneticId: 1, biometricId: 1, idNumbers: 1, accountInfo: 1, communicationContents: 1 )).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( geneticId: 2, biometricId: 2, idNumbers: 2, @@ -1116,6 +1118,63 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { ] } + @IgnoreRest + def "PBS auction call when privacy module contain some part of disallow logic which violates GPP 2 validation should remove UFPD fields in request"() { + given: "Default Generic BidRequests with UFPD fields and account id" + def accountId = PBSUtils.randomNumber as String + def bidRequest = getBidRequestWithPersonalData(accountId).tap { + regs.gppSid = [US_NAT_V1.intValue] + regs.gpp = disallowGppLogic + } + + and: "Activities set for transmitUfpd with rejecting privacy regulation" + def rule = new ActivityRule().tap { + it.privacyRegulation = [IAB_US_GENERAL] + } + + def activities = AllowActivities.getDefaultAllowActivities(TRANSMIT_UFPD, Activity.getDefaultActivity([rule])) + + and: "Account gpp configuration" + def accountGppConfig = new AccountGppConfig(code: IAB_US_GENERAL, enabled: true) + + and: "Existed account with privacy regulation setup" + def account = getAccountWithAllowActivitiesAndPrivacyModule(accountId, activities, [accountGppConfig]) + accountDao.save(account) + + when: "PBS processes auction requests" + activityPbsService.sendAuctionRequest(bidRequest) + + then: "Generic bidder request should have empty UFPD fields" + def bidderRequest = bidder.getBidderRequest(bidRequest.id) + verifyAll { + !bidderRequest.device.didsha1 + !bidderRequest.device.didmd5 + !bidderRequest.device.dpidsha1 + !bidderRequest.device.ifa + !bidderRequest.device.macsha1 + !bidderRequest.device.macmd5 + !bidderRequest.device.dpidmd5 + !bidderRequest.user.id + !bidderRequest.user.buyeruid + !bidderRequest.user.yob + !bidderRequest.user.gender + !bidderRequest.user.data + !bidderRequest.user.ext + } + + and: "Generic bidder request should have data in EIDS fields" + assert bidderRequest.user.eids == bidRequest.user.eids + + where: + disallowGppLogic << [ + 'DBABLA~BAAAAAAAEgA.QA', + 'DBABLA~CAAAAAAAABCA.QA', + 'DBABLA~CAAAAAAAAASA.QA', + 'DBABLA~CAAAAAAAAASA.QA' + ] + } + + def "PBS auction call when request have different gpp consent but match and rejecting should remove UFPD fields in request"() { given: "Default Generic BidRequests with UFPD fields and account id" def accountId = PBSUtils.randomNumber as String @@ -1166,11 +1225,11 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 } def "PBS auction call when privacy modules contain allowing settings should leave UFPD fields in request"() { @@ -1587,23 +1646,23 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() .setKnownChildSensitiveDataConsents(0, 0) @@ -1624,21 +1683,21 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), @@ -2271,7 +2330,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { new UsNatV1Consent.Builder() .setPersonalDataConsents(2) .build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 1, religiousBeliefs: 1, healthInfo: 1, @@ -2281,7 +2340,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { )).build(), new UsNatV1Consent.Builder() .setSensitiveDataLimitUseNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 2, religiousBeliefs: 2, healthInfo: 2, @@ -2296,7 +2355,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { )).build(), new UsNatV1Consent.Builder() .setSensitiveDataProcessingOptOutNotice(0) - .setSensitiveDataProcessing(new UsNationalSensitiveData( + .setSensitiveDataProcessing(new UsNationalV1SensitiveData( racialEthnicOrigin: 2, religiousBeliefs: 2, healthInfo: 2, @@ -2309,14 +2368,14 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { unionMembership: 2, communicationContents: 2 )).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( geneticId: 1, biometricId: 1, idNumbers: 1, accountInfo: 1, communicationContents: 1 )).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalSensitiveData( + new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( geneticId: 2, biometricId: 2, idNumbers: 2, @@ -2450,11 +2509,11 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 } def "PBS amp call when privacy modules contain allowing settings should leave UFPD fields in request"() { @@ -2943,23 +3002,23 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(idNumbers: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(accountInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(communicationContents: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() .setKnownChildSensitiveDataConsents(0, 0) @@ -2980,21 +3039,21 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(racialEthnicOrigin: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(religiousBeliefs: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(orientation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(citizenshipStatus: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(healthInfo: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geneticId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(biometricId: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahSensitiveData(geolocation: 2)) + .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppUsNatAuctionSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppUsNatAuctionSpec.groovy new file mode 100644 index 00000000000..ebe8cd2039e --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppUsNatAuctionSpec.groovy @@ -0,0 +1,12 @@ +package org.prebid.server.functional.tests.privacy + +class GppUsNatAuctionSpec extends PrivacyBaseSpec { + + def "s"() { + // DBABLA~CAAAAAAAAASA.QA KnownChildSensitiveDataConsents[3]=1 + // DBABLA~CAAAqqiqqgCA.QA SensitiveDataProcessing[1-7,9-16]=2 + // DBABLA~CAAAVUAERACA.QA SensitiveDataProcessing[1-5,11,13,15]=1 + // DBABLA~CAAAABRREQCA.QA SensitiveDataProcessing[6,7,9,10,12,14,16]=1 + // DBABLA~CAAAACiiIgCA.QA SensitiveDataProcessing[6,7,9,10,12,14,16]=2 + } +} diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/PrivacyBaseSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/PrivacyBaseSpec.groovy index ed633ec5316..5df2ebd1910 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/PrivacyBaseSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/PrivacyBaseSpec.groovy @@ -33,7 +33,7 @@ import org.prebid.server.functional.util.PBSUtils import org.prebid.server.functional.util.privacy.ConsentString import org.prebid.server.functional.util.privacy.TcfConsent import org.prebid.server.functional.util.privacy.gpp.GppConsent -import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent +import org.prebid.server.functional.util.privacy.gpp.v1.UsNatV1Consent import static org.prebid.server.functional.model.bidder.BidderName.GENERIC import static org.prebid.server.functional.model.bidder.BidderName.OPENX diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/GppConsent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/GppConsent.groovy index dd30e8c20ba..e0f40caf601 100644 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/GppConsent.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/GppConsent.groovy @@ -53,7 +53,7 @@ abstract class GppConsent implements ConsentString { this } - Builder setVersion(int version) { + private Builder setVersion(int version) { fieldValue("Version", version) } @@ -65,6 +65,7 @@ abstract class GppConsent implements ConsentString { TCF_EU_V2(TcfEuV2.NAME, TcfEuV2.VERSION), //2 USP_V1(UspV1.NAME, UspV1.VERSION), //6 US_NAT_V1(UsNatV1.NAME, UsNatV1.VERSION), //7 + US_NAT_V2(UsNatV1.NAME, 2), //7 US_CA_V1(UsCaV1.NAME, UsCaV1.VERSION), //8 US_VA_V1(UsVaV1.NAME, UsVaV1.VERSION), //9 US_CO_V1(UsCoV1.NAME, UsCoV1.VERSION), //10 diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsUtV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsUtV1Consent.groovy deleted file mode 100644 index fd37a095026..00000000000 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsUtV1Consent.groovy +++ /dev/null @@ -1,90 +0,0 @@ -package org.prebid.server.functional.util.privacy.gpp - -import com.iab.gpp.encoder.field.UsUtV1Field -import org.prebid.server.functional.util.privacy.gpp.data.UsUtahSensitiveData - -class UsUtV1Consent extends GppConsent { - - private static final Section SECTION = Section.US_UT_V1 - - protected UsUtV1Consent(Section section, Map fieldValues) { - super(section, fieldValues) - } - - @Override - protected String encodeSection() { - gppModel.encodeSection(SECTION.name) - } - - static class Builder extends GppConsent.Builder { - - Builder() { - super(SECTION) - } - - Builder setVersion(Integer version) { - fieldValue(UsUtV1Field.VERSION, version) - this - } - - Builder setSharingNotice(Integer sharingNotice) { - fieldValue(UsUtV1Field.SHARING_NOTICE, sharingNotice) - this - } - - Builder setSaleOptOutNotice(Integer saleOptOutNotice) { - fieldValue(UsUtV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice) - this - } - - Builder setTargetedAdvertisingOptOutNotice(Integer targetedAdvertisingOptOutNotice) { - fieldValue(UsUtV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice) - this - } - - Builder setSensitiveDataProcessingOptOutNotice(Integer sensitiveDataProcessingOptOutNotice) { - fieldValue(UsUtV1Field.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE, sensitiveDataProcessingOptOutNotice) - this - } - - Builder setSaleOptOut(Integer saleOptOut) { - fieldValue(UsUtV1Field.SALE_OPT_OUT, saleOptOut) - this - } - - Builder setTargetedAdvertisingOptOut(Integer targetedAdvertisingOptOut) { - fieldValue(UsUtV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut) - this - } - - Builder setSensitiveDataProcessing(UsUtahSensitiveData sensitiveDataProcessing) { - fieldValue(UsUtV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) - this - } - - Builder setKnownChildSensitiveDataConsents(Integer knownChildSensitiveDataConsents) { - fieldValue(UsUtV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, knownChildSensitiveDataConsents) - this - } - - Builder setMspaCoveredTransaction(Integer mspaCoveredTransaction) { - fieldValue(UsUtV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction) - this - } - - Builder setMspaOptOutOptionMode(Integer mspaOptOutOptionMode) { - fieldValue(UsUtV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode) - this - } - - Builder setMspaServiceProviderMode(Integer mspaServiceProviderMode) { - fieldValue(UsUtV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode) - this - } - - @Override - GppConsent build() { - return new UsUtV1Consent(section, fieldValues) - } - } -} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsVaV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsVaV1Consent.groovy deleted file mode 100644 index 97463c079fc..00000000000 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsVaV1Consent.groovy +++ /dev/null @@ -1,85 +0,0 @@ -package org.prebid.server.functional.util.privacy.gpp - -import com.iab.gpp.encoder.field.UsVaV1Field -import org.prebid.server.functional.util.privacy.gpp.data.UsVirginiaSensitiveData - -class UsVaV1Consent extends GppConsent { - - private static final Section SECTION = Section.US_VA_V1 - - protected UsVaV1Consent(Section section, Map fieldValues) { - super(section, fieldValues) - } - - @Override - protected String encodeSection() { - gppModel.encodeSection(SECTION.name) - } - - static class Builder extends GppConsent.Builder { - - Builder() { - super(SECTION) - } - - Builder setVersion(Integer version) { - fieldValue(UsVaV1Field.VERSION, version) - this - } - - Builder setSharingNotice(Integer sharingNotice) { - fieldValue(UsVaV1Field.SHARING_NOTICE, sharingNotice) - this - } - - Builder setSaleOptOutNotice(Integer saleOptOutNotice) { - fieldValue(UsVaV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice) - this - } - - Builder setTargetedAdvertisingOptOutNotice(Integer targetedAdvertisingOptOutNotice) { - fieldValue(UsVaV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice) - this - } - - Builder setSaleOptOut(Integer saleOptOut) { - fieldValue(UsVaV1Field.SALE_OPT_OUT, saleOptOut) - this - } - - Builder setTargetedAdvertisingOptOut(Integer targetedAdvertisingOptOut) { - fieldValue(UsVaV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut) - this - } - - Builder setSensitiveDataProcessing(UsVirginiaSensitiveData sensitiveDataProcessing) { - fieldValue(UsVaV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) - this - } - - Builder setKnownChildSensitiveDataConsents(Integer childSensitiveDataConsents) { - fieldValue(UsVaV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, childSensitiveDataConsents) - this - } - - Builder setMspaCoveredTransaction(Integer mspaCoveredTransaction) { - fieldValue(UsVaV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction) - this - } - - Builder setMspaOptOutOptionMode(Integer mspaOptOutOptionMode) { - fieldValue(UsVaV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode) - this - } - - Builder setMspaServiceProviderMode(Integer mspaServiceProviderMode) { - fieldValue(UsVaV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode) - this - } - - @Override - GppConsent build() { - return new UsVaV1Consent(section, fieldValues) - } - } -} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsCaliforniaSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsCaliforniaSensitiveData.groovy deleted file mode 100644 index d23e2cde1ac..00000000000 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsCaliforniaSensitiveData.groovy +++ /dev/null @@ -1,52 +0,0 @@ -package org.prebid.server.functional.util.privacy.gpp.data - -import org.prebid.server.functional.util.PBSUtils - -class UsCaliforniaSensitiveData { - - int idNumbers - int accountInfo - int geolocation - int racialEthnicOrigin - int communicationContents - int geneticId - int biometricId - int healthInfo - int orientation - - static UsCaliforniaSensitiveData generateRandomSensitiveData() { - new UsCaliforniaSensitiveData().tap { - idNumbers = PBSUtils.getRandomNumber(0, 2) - accountInfo = PBSUtils.getRandomNumber(0, 2) - geolocation = PBSUtils.getRandomNumber(0, 2) - racialEthnicOrigin = PBSUtils.getRandomNumber(0, 2) - communicationContents = PBSUtils.getRandomNumber(0, 2) - geneticId = PBSUtils.getRandomNumber(0, 2) - biometricId = PBSUtils.getRandomNumber(0, 2) - healthInfo = PBSUtils.getRandomNumber(0, 2) - orientation = PBSUtils.getRandomNumber(0, 2) - } - } - - static UsCaliforniaSensitiveData fromList(List sensitiveData) { - if (sensitiveData.size() != 9) { - throw new IllegalArgumentException("Invalid data size. Expected 9 values.") - } - new UsCaliforniaSensitiveData().tap { - idNumbers = sensitiveData[0] - accountInfo = sensitiveData[1] - geolocation = sensitiveData[2] - racialEthnicOrigin = sensitiveData[3] - communicationContents = sensitiveData[4] - geneticId = sensitiveData[5] - biometricId = sensitiveData[6] - healthInfo = sensitiveData[7] - orientation = sensitiveData[8] - } - } - - List getContentList() { - [idNumbers, accountInfo, geolocation, racialEthnicOrigin, - communicationContents, geneticId, biometricId, healthInfo, orientation] - } -} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsColoradoSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsColoradoSensitiveData.groovy deleted file mode 100644 index 00ca00d3d60..00000000000 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsColoradoSensitiveData.groovy +++ /dev/null @@ -1,46 +0,0 @@ -package org.prebid.server.functional.util.privacy.gpp.data - -import org.prebid.server.functional.util.PBSUtils - -class UsColoradoSensitiveData { - - int racialEthnicOrigin - int religiousBeliefs - int healthInfo - int orientation - int citizenshipStatus - int geneticId - int biometricId - - static UsColoradoSensitiveData generateRandomSensitiveData() { - new UsColoradoSensitiveData().tap { - racialEthnicOrigin = PBSUtils.getRandomNumber(0, 2) - religiousBeliefs = PBSUtils.getRandomNumber(0, 2) - healthInfo = PBSUtils.getRandomNumber(0, 2) - orientation = PBSUtils.getRandomNumber(0, 2) - citizenshipStatus = PBSUtils.getRandomNumber(0, 2) - geneticId = PBSUtils.getRandomNumber(0, 2) - biometricId = PBSUtils.getRandomNumber(0, 2) - } - } - - static UsColoradoSensitiveData fromList(List data) { - if (data.size() != 7) { - throw new IllegalArgumentException("Invalid data size. Expected 7 values.") - } - new UsColoradoSensitiveData().tap { - racialEthnicOrigin = data[0] - religiousBeliefs = data[1] - healthInfo = data[2] - orientation = data[3] - citizenshipStatus = data[4] - geneticId = data[5] - biometricId = data[6] - } - } - - List getContentList() { - [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, - citizenshipStatus, geneticId, biometricId] - } -} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsConnecticutSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsConnecticutSensitiveData.groovy deleted file mode 100644 index 8f0a6bfc18d..00000000000 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsConnecticutSensitiveData.groovy +++ /dev/null @@ -1,52 +0,0 @@ -package org.prebid.server.functional.util.privacy.gpp.data - -import org.prebid.server.functional.util.PBSUtils - -class UsConnecticutSensitiveData { - - int racialEthnicOrigin - int religiousBeliefs - int healthInfo - int orientation - int citizenshipStatus - int geneticId - int biometricId - int geolocation - int idNumbers - - static UsConnecticutSensitiveData generateRandomSensitiveData() { - new UsConnecticutSensitiveData().tap { - racialEthnicOrigin = PBSUtils.getRandomNumber(0, 2) - religiousBeliefs = PBSUtils.getRandomNumber(0, 2) - healthInfo = PBSUtils.getRandomNumber(0, 2) - orientation = PBSUtils.getRandomNumber(0, 2) - citizenshipStatus = PBSUtils.getRandomNumber(0, 2) - geneticId = PBSUtils.getRandomNumber(0, 2) - biometricId = PBSUtils.getRandomNumber(0, 2) - geolocation = PBSUtils.getRandomNumber(0, 2) - idNumbers = PBSUtils.getRandomNumber(0, 2) - } - } - - static UsConnecticutSensitiveData fromList(List data) { - if (data.size() != 9) { - throw new IllegalArgumentException("Invalid data size. Expected 9 values.") - } - new UsConnecticutSensitiveData().tap { - racialEthnicOrigin = data[0] - religiousBeliefs = data[1] - healthInfo = data[2] - orientation = data[3] - citizenshipStatus = data[4] - geneticId = data[5] - biometricId = data[6] - geolocation = data[7] - idNumbers = data[8] - } - } - - List getContentList() { - [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, - citizenshipStatus, geneticId, biometricId, geolocation, idNumbers] - } -} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsNationalSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsNationalSensitiveData.groovy deleted file mode 100644 index ff7fc963cf5..00000000000 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsNationalSensitiveData.groovy +++ /dev/null @@ -1,62 +0,0 @@ -package org.prebid.server.functional.util.privacy.gpp.data - -import org.prebid.server.functional.util.PBSUtils - -class UsNationalSensitiveData { - - int racialEthnicOrigin - int religiousBeliefs - int healthInfo - int orientation - int citizenshipStatus - int geneticId - int biometricId - int geolocation - int idNumbers - int accountInfo - int unionMembership - int communicationContents - - static UsNationalSensitiveData generateRandomSensitiveData() { - new UsNationalSensitiveData().tap { - racialEthnicOrigin = PBSUtils.getRandomNumber(0, 2) - religiousBeliefs = PBSUtils.getRandomNumber(0, 2) - healthInfo = PBSUtils.getRandomNumber(0, 2) - orientation = PBSUtils.getRandomNumber(0, 2) - citizenshipStatus = PBSUtils.getRandomNumber(0, 2) - geneticId = PBSUtils.getRandomNumber(0, 2) - biometricId = PBSUtils.getRandomNumber(0, 2) - geolocation = PBSUtils.getRandomNumber(0, 2) - idNumbers = PBSUtils.getRandomNumber(0, 2) - accountInfo = PBSUtils.getRandomNumber(0, 2) - unionMembership = PBSUtils.getRandomNumber(0, 2) - communicationContents = PBSUtils.getRandomNumber(0, 2) - } - } - - static UsNationalSensitiveData fromList(List data) { - if (data.size() != 12) { - throw new IllegalArgumentException("Invalid data size. Expected 12 values.") - } - new UsNationalSensitiveData().tap { - racialEthnicOrigin = data[0] - religiousBeliefs = data[1] - healthInfo = data[2] - orientation = data[3] - citizenshipStatus = data[4] - geneticId = data[5] - biometricId = data[6] - geolocation = data[7] - idNumbers = data[8] - accountInfo = data[9] - unionMembership = data[10] - communicationContents = data[11] - } - } - - List getContentList() { - [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, - citizenshipStatus, geneticId, biometricId, geolocation, - idNumbers, accountInfo, unionMembership, communicationContents] - } -} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsUtahSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsUtahSensitiveData.groovy deleted file mode 100644 index 8b92abaa3de..00000000000 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsUtahSensitiveData.groovy +++ /dev/null @@ -1,49 +0,0 @@ -package org.prebid.server.functional.util.privacy.gpp.data - -import org.prebid.server.functional.util.PBSUtils - -class UsUtahSensitiveData { - - int racialEthnicOrigin - int religiousBeliefs - int orientation - int citizenshipStatus - int healthInfo - int geneticId - int biometricId - int geolocation - - static UsUtahSensitiveData generateRandomSensitiveData() { - new UsUtahSensitiveData().tap { - racialEthnicOrigin = PBSUtils.getRandomNumber(0, 2) - religiousBeliefs = PBSUtils.getRandomNumber(0, 2) - orientation = PBSUtils.getRandomNumber(0, 2) - citizenshipStatus = PBSUtils.getRandomNumber(0, 2) - healthInfo = PBSUtils.getRandomNumber(0, 2) - geneticId = PBSUtils.getRandomNumber(0, 2) - biometricId = PBSUtils.getRandomNumber(0, 2) - geolocation = PBSUtils.getRandomNumber(0, 2) - } - } - - static UsUtahSensitiveData fromList(List data) { - if (data.size() != 8) { - throw new IllegalArgumentException("Invalid data size. Expected 8 values.") - } - new UsUtahSensitiveData().tap { - racialEthnicOrigin = data[0] - religiousBeliefs = data[1] - orientation = data[2] - citizenshipStatus = data[3] - healthInfo = data[4] - geneticId = data[5] - biometricId = data[6] - geolocation = data[7] - } - } - - List getContentList() { - [racialEthnicOrigin, religiousBeliefs, orientation, citizenshipStatus, - healthInfo, geneticId, biometricId, geolocation] - } -} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsVirginiaSensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsVirginiaSensitiveData.groovy deleted file mode 100644 index e3f49eaaed1..00000000000 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/data/UsVirginiaSensitiveData.groovy +++ /dev/null @@ -1,49 +0,0 @@ -package org.prebid.server.functional.util.privacy.gpp.data - -import org.prebid.server.functional.util.PBSUtils - -class UsVirginiaSensitiveData { - - int racialEthnicOrigin - int religiousBeliefs - int healthInfo - int orientation - int citizenshipStatus - int geneticId - int biometricId - int geolocation - - static UsVirginiaSensitiveData generateRandomSensitiveData() { - new UsVirginiaSensitiveData().tap { - racialEthnicOrigin = PBSUtils.getRandomNumber(0, 2) - religiousBeliefs = PBSUtils.getRandomNumber(0, 2) - healthInfo = PBSUtils.getRandomNumber(0, 2) - orientation = PBSUtils.getRandomNumber(0, 2) - citizenshipStatus = PBSUtils.getRandomNumber(0, 2) - geneticId = PBSUtils.getRandomNumber(0, 2) - biometricId = PBSUtils.getRandomNumber(0, 2) - geolocation = PBSUtils.getRandomNumber(0, 2) - } - } - - static UsVirginiaSensitiveData fromList(List data) { - if (data.size() != 8) { - throw new IllegalArgumentException("Invalid data size. Expected 8 values.") - } - new UsVirginiaSensitiveData().tap { - racialEthnicOrigin = data[0] - religiousBeliefs = data[1] - healthInfo = data[2] - orientation = data[3] - citizenshipStatus = data[4] - geneticId = data[5] - biometricId = data[6] - geolocation = data[7] - } - } - - List getContentList() { - [racialEthnicOrigin, religiousBeliefs, healthInfo, orientation, - citizenshipStatus, geneticId, biometricId, geolocation] - } -} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCaV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCaV1Consent.groovy similarity index 56% rename from src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCaV1Consent.groovy rename to src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCaV1Consent.groovy index dec740c4395..c75e76e23e3 100644 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCaV1Consent.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCaV1Consent.groovy @@ -1,7 +1,13 @@ -package org.prebid.server.functional.util.privacy.gpp +package org.prebid.server.functional.util.privacy.gpp.v1 import com.iab.gpp.encoder.field.UsCaV1Field -import org.prebid.server.functional.util.privacy.gpp.data.UsCaliforniaSensitiveData +import org.prebid.server.functional.model.privacy.gpp.DataActivity +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1ChildSensitiveData +import org.prebid.server.functional.util.privacy.gpp.GppConsent +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData class UsCaV1Consent extends GppConsent { @@ -22,63 +28,58 @@ class UsCaV1Consent extends GppConsent { super(SECTION) } - Builder setVersion(Integer version) { - fieldValue(UsCaV1Field.VERSION, version) + Builder setSaleOptOutNotice(Notice saleOptOutNotice) { + fieldValue(UsCaV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice.value) this } - Builder setSaleOptOutNotice(Integer saleOptOutNotice) { - fieldValue(UsCaV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice) + Builder setSharingOptOutNotice(Notice sharingOptOutNotice) { + fieldValue(UsCaV1Field.SHARING_OPT_OUT_NOTICE, sharingOptOutNotice.value) this } - Builder setSharingOptOutNotice(Integer sharingOptOutNotice) { - fieldValue(UsCaV1Field.SHARING_OPT_OUT_NOTICE, sharingOptOutNotice) + Builder setSensitiveDataLimitUseNotice(Notice sensitiveDataLimitUseNotice) { + fieldValue(UsCaV1Field.SENSITIVE_DATA_LIMIT_USE_NOTICE, sensitiveDataLimitUseNotice.value) this } - Builder setSensitiveDataLimitUseNotice(Integer sensitiveDataLimitUseNotice) { - fieldValue(UsCaV1Field.SENSITIVE_DATA_LIMIT_USE_NOTICE, sensitiveDataLimitUseNotice) + Builder setSaleOptOut(OptOut saleOptOut) { + fieldValue(UsCaV1Field.SALE_OPT_OUT, saleOptOut.value) this } - Builder setSaleOptOut(Integer saleOptOut) { - fieldValue(UsCaV1Field.SALE_OPT_OUT, saleOptOut) + Builder setSharingOptOut(OptOut sharingOptOut) { + fieldValue(UsCaV1Field.SHARING_OPT_OUT, sharingOptOut.value) this } - Builder setSharingOptOut(Integer sharingOptOut) { - fieldValue(UsCaV1Field.SHARING_OPT_OUT, sharingOptOut) - this - } - - Builder setSensitiveDataProcessing(UsCaliforniaSensitiveData sensitiveDataProcessing) { + Builder setSensitiveDataProcessing(UsCaliforniaV1SensitiveData sensitiveDataProcessing) { fieldValue(UsCaV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) this } - Builder setKnownChildSensitiveDataConsents(Integer childFrom13to16, Integer childBlow13) { - fieldValue(UsCaV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, [childFrom13to16, childBlow13]) + Builder setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData sensitiveData) { + fieldValue(UsCaV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, sensitiveData.contentList) this } - Builder setPersonalDataConsents(Integer personalDataConsents) { - fieldValue(UsCaV1Field.PERSONAL_DATA_CONSENTS, personalDataConsents) + Builder setPersonalDataConsents(DataActivity personalDataConsents) { + fieldValue(UsCaV1Field.PERSONAL_DATA_CONSENTS, personalDataConsents.value) this } - Builder setMspaCoveredTransaction(Integer mspaCoveredTransaction) { + Builder setMspaCoveredTransaction(Boolean mspaCoveredTransaction) { fieldValue(UsCaV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction) this } - Builder setMspaOptOutOptionMode(Integer mspaOptOutOptionMode) { - fieldValue(UsCaV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode) + Builder setMspaOptOutOptionMode(MspaMode mspaOptOutOptionMode) { + fieldValue(UsCaV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode.value) this } - Builder setMspaServiceProviderMode(Integer mspaServiceProviderMode) { - fieldValue(UsCaV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode) + Builder setMspaServiceProviderMode(MspaMode mspaServiceProviderMode) { + fieldValue(UsCaV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode.value) this } diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCoV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCoV1Consent.groovy similarity index 54% rename from src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCoV1Consent.groovy rename to src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCoV1Consent.groovy index 25bbc9dfb81..449d84685e2 100644 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCoV1Consent.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCoV1Consent.groovy @@ -1,7 +1,12 @@ -package org.prebid.server.functional.util.privacy.gpp +package org.prebid.server.functional.util.privacy.gpp.v1 import com.iab.gpp.encoder.field.UsCoV1Field -import org.prebid.server.functional.util.privacy.gpp.data.UsColoradoSensitiveData +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsColoradoV1ChildSensitiveData +import org.prebid.server.functional.util.privacy.gpp.GppConsent +import org.prebid.server.functional.model.privacy.gpp.UsColoradoV1SensitiveData class UsCoV1Consent extends GppConsent { @@ -22,58 +27,53 @@ class UsCoV1Consent extends GppConsent { super(SECTION) } - Builder setVersion(Integer version) { - fieldValue(UsCoV1Field.VERSION, version) + Builder setSharingNotice(Notice sharingNotice) { + fieldValue(UsCoV1Field.SHARING_NOTICE, sharingNotice.value) this } - Builder setSharingNotice(Integer sharingNotice) { - fieldValue(UsCoV1Field.SHARING_NOTICE, sharingNotice) + Builder setSaleOptOutNotice(Notice saleOptOutNotice) { + fieldValue(UsCoV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice.value) this } - Builder setSaleOptOutNotice(Integer saleOptOutNotice) { - fieldValue(UsCoV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice) + Builder setTargetedAdvertisingOptOutNotice(Notice targetedAdvertisingOptOutNotice) { + fieldValue(UsCoV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice.value) this } - Builder setTargetedAdvertisingOptOutNotice(Integer targetedAdvertisingOptOutNotice) { - fieldValue(UsCoV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice) + Builder setSaleOptOut(OptOut saleOptOut) { + fieldValue(UsCoV1Field.SALE_OPT_OUT, saleOptOut.value) this } - Builder setSaleOptOut(Integer saleOptOut) { - fieldValue(UsCoV1Field.SALE_OPT_OUT, saleOptOut) + Builder setTargetedAdvertisingOptOut(OptOut targetedAdvertisingOptOut) { + fieldValue(UsCoV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut.value) this } - Builder setTargetedAdvertisingOptOut(Integer targetedAdvertisingOptOut) { - fieldValue(UsCoV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut) - this - } - - Builder setSensitiveDataProcessing(UsColoradoSensitiveData sensitiveDataProcessing) { + Builder setSensitiveDataProcessing(UsColoradoV1SensitiveData sensitiveDataProcessing) { fieldValue(UsCoV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) this } - Builder setKnownChildSensitiveDataConsents(Integer knownChildSensitiveDataConsents) { - fieldValue(UsCoV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, knownChildSensitiveDataConsents) + Builder setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData sensitiveData) { + fieldValue(UsCoV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, sensitiveData.contentList) this } - Builder setMspaCoveredTransaction(Integer mspaCoveredTransaction) { - fieldValue(UsCoV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction) + Builder setMspaCoveredTransaction(MspaMode mspaCoveredTransaction) { + fieldValue(UsCoV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction.value) this } - Builder setMspaOptOutOptionMode(Integer mspaOptOutOptionMode) { - fieldValue(UsCoV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode) + Builder setMspaOptOutOptionMode(MspaMode mspaOptOutOptionMode) { + fieldValue(UsCoV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode.value) this } - Builder setMspaServiceProviderMode(Integer mspaServiceProviderMode) { - fieldValue(UsCoV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode) + Builder setMspaServiceProviderMode(MspaMode mspaServiceProviderMode) { + fieldValue(UsCoV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode.value) this } @@ -82,7 +82,7 @@ class UsCoV1Consent extends GppConsent { this } - Builder setGpcSegmentIncluded(Integer gpcSegmentIncluded) { + Builder setGpcSegmentIncluded(Boolean gpcSegmentIncluded) { fieldValue(UsCoV1Field.GPC_SEGMENT_INCLUDED, gpcSegmentIncluded) this } diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCtV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCtV1Consent.groovy similarity index 53% rename from src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCtV1Consent.groovy rename to src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCtV1Consent.groovy index 9c95345939a..ba247c9568e 100644 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsCtV1Consent.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsCtV1Consent.groovy @@ -1,7 +1,12 @@ -package org.prebid.server.functional.util.privacy.gpp +package org.prebid.server.functional.util.privacy.gpp.v1 import com.iab.gpp.encoder.field.UsCtV1Field -import org.prebid.server.functional.util.privacy.gpp.data.UsConnecticutSensitiveData +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsConnecticutV1ChildSensitiveData +import org.prebid.server.functional.util.privacy.gpp.GppConsent +import org.prebid.server.functional.model.privacy.gpp.UsConnecticutV1SensitiveData class UsCtV1Consent extends GppConsent { @@ -22,58 +27,53 @@ class UsCtV1Consent extends GppConsent { super(SECTION) } - Builder setVersion(Integer version) { - fieldValue(UsCtV1Field.VERSION, version) + Builder setSharingNotice(Notice sharingNotice) { + fieldValue(UsCtV1Field.SHARING_NOTICE, sharingNotice.value) this } - Builder setSharingNotice(Integer sharingNotice) { - fieldValue(UsCtV1Field.SHARING_NOTICE, sharingNotice) + Builder setSaleOptOutNotice(Notice saleOptOutNotice) { + fieldValue(UsCtV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice.value) this } - Builder setSaleOptOutNotice(Integer saleOptOutNotice) { - fieldValue(UsCtV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice) + Builder setTargetedAdvertisingOptOutNotice(Notice targetedAdvertisingOptOutNotice) { + fieldValue(UsCtV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice.value) this } - Builder setTargetedAdvertisingOptOutNotice(Integer targetedAdvertisingOptOutNotice) { - fieldValue(UsCtV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice) + Builder setSaleOptOut(OptOut saleOptOut) { + fieldValue(UsCtV1Field.SALE_OPT_OUT, saleOptOut.value) this } - Builder setSaleOptOut(Integer saleOptOut) { - fieldValue(UsCtV1Field.SALE_OPT_OUT, saleOptOut) + Builder setTargetedAdvertisingOptOut(OptOut targetedAdvertisingOptOut) { + fieldValue(UsCtV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut.value) this } - Builder setTargetedAdvertisingOptOut(Integer targetedAdvertisingOptOut) { - fieldValue(UsCtV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut) - this - } - - Builder setSensitiveDataProcessing(UsConnecticutSensitiveData sensitiveDataProcessing) { + Builder setSensitiveDataProcessing(UsConnecticutV1SensitiveData sensitiveDataProcessing) { fieldValue(UsCtV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) this } - Builder setKnownChildSensitiveDataConsents(Integer childFrom13to16, Integer childBlow13, Integer childFrom16to18) { - fieldValue(UsCtV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, [childFrom13to16, childBlow13, childFrom16to18]) + Builder setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData sensitiveData) { + fieldValue(UsCtV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, sensitiveData.contentList) this } - Builder setMspaCoveredTransaction(Integer mspaCoveredTransaction) { - fieldValue(UsCtV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction) + Builder setMspaCoveredTransaction(MspaMode mspaCoveredTransaction) { + fieldValue(UsCtV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction.value) this } - Builder setMspaOptOutOptionMode(Integer mspaOptOutOptionMode) { - fieldValue(UsCtV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode) + Builder setMspaOptOutOptionMode(MspaMode mspaOptOutOptionMode) { + fieldValue(UsCtV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode.value) this } - Builder setMspaServiceProviderMode(Integer mspaServiceProviderMode) { - fieldValue(UsCtV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode) + Builder setMspaServiceProviderMode(MspaMode mspaServiceProviderMode) { + fieldValue(UsCtV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode.value) this } @@ -82,7 +82,7 @@ class UsCtV1Consent extends GppConsent { this } - Builder setGpcSegmentIncluded(Integer gpcSegmentIncluded) { + Builder setGpcSegmentIncluded(Boolean gpcSegmentIncluded) { fieldValue(UsCtV1Field.GPC_SEGMENT_INCLUDED, gpcSegmentIncluded) this } diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsNatV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsNatV1Consent.groovy similarity index 52% rename from src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsNatV1Consent.groovy rename to src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsNatV1Consent.groovy index 1805cdcf9bd..76b6749d448 100644 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsNatV1Consent.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsNatV1Consent.groovy @@ -1,7 +1,13 @@ -package org.prebid.server.functional.util.privacy.gpp +package org.prebid.server.functional.util.privacy.gpp.v1 import com.iab.gpp.encoder.field.UsNatV1Field -import org.prebid.server.functional.util.privacy.gpp.data.UsNationalSensitiveData +import org.prebid.server.functional.model.privacy.gpp.DataActivity +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1ChildSensitiveData +import org.prebid.server.functional.util.privacy.gpp.GppConsent +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1SensitiveData class UsNatV1Consent extends GppConsent { @@ -22,83 +28,78 @@ class UsNatV1Consent extends GppConsent { super(SECTION) } - Builder setVersion(Integer version) { - fieldValue(UsNatV1Field.VERSION, version) + Builder setSharingNotice(Notice sharingNotice) { + fieldValue(UsNatV1Field.SHARING_NOTICE, sharingNotice.value) this } - Builder setSharingNotice(Integer sharingNotice) { - fieldValue(UsNatV1Field.SHARING_NOTICE, sharingNotice) + Builder setSaleOptOutNotice(Notice saleOptOutNotice) { + fieldValue(UsNatV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice.value) this } - Builder setSaleOptOutNotice(Integer saleOptOutNotice) { - fieldValue(UsNatV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice) + Builder setSharingOptOutNotice(Notice sharingOptOutNotice) { + fieldValue(UsNatV1Field.SHARING_OPT_OUT_NOTICE, sharingOptOutNotice.value) this } - Builder setSharingOptOutNotice(Integer sharingOptOutNotice) { - fieldValue(UsNatV1Field.SHARING_OPT_OUT_NOTICE, sharingOptOutNotice) + Builder setTargetedAdvertisingOptOutNotice(Notice targetedAdvertisingOptOutNotice) { + fieldValue(UsNatV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice.value) this } - Builder setTargetedAdvertisingOptOutNotice(Integer targetedAdvertisingOptOutNotice) { - fieldValue(UsNatV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice) + Builder setSensitiveDataProcessingOptOutNotice(Notice sensitiveDataProcessingOptOutNotice) { + fieldValue(UsNatV1Field.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE, sensitiveDataProcessingOptOutNotice.value) this } - Builder setSensitiveDataProcessingOptOutNotice(Integer sensitiveDataProcessingOptOutNotice) { - fieldValue(UsNatV1Field.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE, sensitiveDataProcessingOptOutNotice) + Builder setSensitiveDataLimitUseNotice(Notice sensitiveDataLimitUseNotice) { + fieldValue(UsNatV1Field.SENSITIVE_DATA_LIMIT_USE_NOTICE, sensitiveDataLimitUseNotice.value) this } - Builder setSensitiveDataLimitUseNotice(Integer sensitiveDataLimitUseNotice) { - fieldValue(UsNatV1Field.SENSITIVE_DATA_LIMIT_USE_NOTICE, sensitiveDataLimitUseNotice) + Builder setSaleOptOut(OptOut saleOptOut) { + fieldValue(UsNatV1Field.SALE_OPT_OUT, saleOptOut.value) this } - Builder setSaleOptOut(Integer saleOptOut) { - fieldValue(UsNatV1Field.SALE_OPT_OUT, saleOptOut) + Builder setSharingOptOut(OptOut sharingOptOut) { + fieldValue(UsNatV1Field.SHARING_OPT_OUT, sharingOptOut.value) this } - Builder setSharingOptOut(Integer sharingOptOut) { - fieldValue(UsNatV1Field.SHARING_OPT_OUT, sharingOptOut) + Builder setTargetedAdvertisingOptOut(OptOut targetedAdvertisingOptOut) { + fieldValue(UsNatV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut.value) this } - Builder setTargetedAdvertisingOptOut(Integer targetedAdvertisingOptOut) { - fieldValue(UsNatV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut) - this - } - - Builder setSensitiveDataProcessing(UsNationalSensitiveData sensitiveDataProcessing) { + Builder setSensitiveDataProcessing(UsNationalV1SensitiveData sensitiveDataProcessing) { fieldValue(UsNatV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) this } - Builder setPersonalDataConsents(Integer personalDataConsents) { - fieldValue(UsNatV1Field.PERSONAL_DATA_CONSENTS, personalDataConsents) + Builder setPersonalDataConsents(DataActivity personalDataConsents) { + fieldValue(UsNatV1Field.PERSONAL_DATA_CONSENTS, personalDataConsents.value) this } - Builder setKnownChildSensitiveDataConsents(Integer childFrom13to16, Integer childBlow13) { - fieldValue(UsNatV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, [childFrom13to16, childBlow13]) + Builder setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData sensitiveData) { + fieldValue(UsNatV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, sensitiveData.contentList) this } - Builder setMspaCoveredTransaction(Integer mspaCoveredTransaction) { - fieldValue(UsNatV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction) + Builder setMspaCoveredTransaction(MspaMode mspaCoveredTransaction) { + fieldValue(UsNatV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction.value) this } - Builder setMspaOptOutOptionMode(Integer mspaOptOutOptionMode) { - fieldValue(UsNatV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode) + Builder setMspaOptOutOptionMode(MspaMode mspaOptOutOptionMode) { + fieldValue(UsNatV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode.value) this } - Builder setMspaServiceProviderMode(Integer mspaServiceProviderMode) { - fieldValue(UsNatV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode) + Builder setMspaServiceProviderMode(MspaMode mspaServiceProviderMode) { + fieldValue(UsNatV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode.value) this } diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsUtV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsUtV1Consent.groovy new file mode 100644 index 00000000000..d6ae5b77253 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsUtV1Consent.groovy @@ -0,0 +1,90 @@ +package org.prebid.server.functional.util.privacy.gpp.v1 + +import com.iab.gpp.encoder.field.UsUtV1Field +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1ChildSensitiveData +import org.prebid.server.functional.util.privacy.gpp.GppConsent +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData + +class UsUtV1Consent extends GppConsent { + + private static final Section SECTION = Section.US_UT_V1 + + protected UsUtV1Consent(Section section, Map fieldValues) { + super(section, fieldValues) + } + + @Override + protected String encodeSection() { + gppModel.encodeSection(SECTION.name) + } + + static class Builder extends GppConsent.Builder { + + Builder() { + super(SECTION) + } + + Builder setSharingNotice(Notice sharingNotice) { + fieldValue(UsUtV1Field.SHARING_NOTICE, sharingNotice.value) + this + } + + Builder setSaleOptOutNotice(Notice saleOptOutNotice) { + fieldValue(UsUtV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice.value) + this + } + + Builder setTargetedAdvertisingOptOutNotice(Notice targetedAdvertisingOptOutNotice) { + fieldValue(UsUtV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice.value) + this + } + + Builder setSensitiveDataProcessingOptOutNotice(Notice sensitiveDataProcessingOptOutNotice) { + fieldValue(UsUtV1Field.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE, sensitiveDataProcessingOptOutNotice.value) + this + } + + Builder setSaleOptOut(OptOut saleOptOut) { + fieldValue(UsUtV1Field.SALE_OPT_OUT, saleOptOut.value) + this + } + + Builder setTargetedAdvertisingOptOut(OptOut targetedAdvertisingOptOut) { + fieldValue(UsUtV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut.value) + this + } + + Builder setSensitiveDataProcessing(UsUtahV1SensitiveData sensitiveDataProcessing) { + fieldValue(UsUtV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) + this + } + + Builder setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData knownChildSensitiveDataConsents) { + fieldValue(UsUtV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, knownChildSensitiveDataConsents.contentList) + this + } + + Builder setMspaCoveredTransaction(MspaMode mspaCoveredTransaction) { + fieldValue(UsUtV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction.value) + this + } + + Builder setMspaOptOutOptionMode(MspaMode mspaOptOutOptionMode) { + fieldValue(UsUtV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode.value) + this + } + + Builder setMspaServiceProviderMode(MspaMode mspaServiceProviderMode) { + fieldValue(UsUtV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode.value) + this + } + + @Override + GppConsent build() { + return new UsUtV1Consent(section, fieldValues) + } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsVaV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsVaV1Consent.groovy new file mode 100644 index 00000000000..e6ed8861cd0 --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UsVaV1Consent.groovy @@ -0,0 +1,85 @@ +package org.prebid.server.functional.util.privacy.gpp.v1 + +import com.iab.gpp.encoder.field.UsVaV1Field +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsVirginiaV1ChildSensitiveData +import org.prebid.server.functional.util.privacy.gpp.GppConsent +import org.prebid.server.functional.model.privacy.gpp.UsVirginiaV1SensitiveData + +class UsVaV1Consent extends GppConsent { + + private static final Section SECTION = Section.US_VA_V1 + + protected UsVaV1Consent(Section section, Map fieldValues) { + super(section, fieldValues) + } + + @Override + protected String encodeSection() { + gppModel.encodeSection(SECTION.name) + } + + static class Builder extends GppConsent.Builder { + + Builder() { + super(SECTION) + } + + Builder setSharingNotice(Notice sharingNotice) { + fieldValue(UsVaV1Field.SHARING_NOTICE, sharingNotice.value) + this + } + + Builder setSaleOptOutNotice(Notice saleOptOutNotice) { + fieldValue(UsVaV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice.value) + this + } + + Builder setTargetedAdvertisingOptOutNotice(Notice targetedAdvertisingOptOutNotice) { + fieldValue(UsVaV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice.value) + this + } + + Builder setSaleOptOut(OptOut saleOptOut) { + fieldValue(UsVaV1Field.SALE_OPT_OUT, saleOptOut.value) + this + } + + Builder setTargetedAdvertisingOptOut(OptOut targetedAdvertisingOptOut) { + fieldValue(UsVaV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut.value) + this + } + + Builder setSensitiveDataProcessing(UsVirginiaV1SensitiveData sensitiveDataProcessing) { + fieldValue(UsVaV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) + this + } + + Builder setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData childSensitiveDataConsents) { + fieldValue(UsVaV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, childSensitiveDataConsents.contentList) + this + } + + Builder setMspaCoveredTransaction(MspaMode mspaCoveredTransaction) { + fieldValue(UsVaV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction.value) + this + } + + Builder setMspaOptOutOptionMode(MspaMode mspaOptOutOptionMode) { + fieldValue(UsVaV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode.value) + this + } + + Builder setMspaServiceProviderMode(MspaMode mspaServiceProviderMode) { + fieldValue(UsVaV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode.value) + this + } + + @Override + GppConsent build() { + return new UsVaV1Consent(section, fieldValues) + } + } +} diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsV1Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UspV1Consent.groovy similarity index 70% rename from src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsV1Consent.groovy rename to src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UspV1Consent.groovy index e3a0682ca73..f76b95a4af4 100644 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/UsV1Consent.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v1/UspV1Consent.groovy @@ -1,10 +1,11 @@ -package org.prebid.server.functional.util.privacy.gpp +package org.prebid.server.functional.util.privacy.gpp.v1 import com.iab.gpp.encoder.field.UspV1Field +import org.prebid.server.functional.util.privacy.gpp.GppConsent -class UsV1Consent extends GppConsent { +class UspV1Consent extends GppConsent { - protected UsV1Consent(Section section, Map fieldValues) { + protected UspV1Consent(Section section, Map fieldValues) { super(section, fieldValues) } @@ -35,8 +36,8 @@ class UsV1Consent extends GppConsent { } @Override - UsV1Consent build() { - new UsV1Consent(section, fieldValues) + UspV1Consent build() { + new UspV1Consent(section, fieldValues) } } } diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/TcfEuV2Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/TcfEuV2Consent.groovy similarity index 92% rename from src/test/groovy/org/prebid/server/functional/util/privacy/gpp/TcfEuV2Consent.groovy rename to src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/TcfEuV2Consent.groovy index f37531563e0..fe72ec0d773 100644 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/TcfEuV2Consent.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/TcfEuV2Consent.groovy @@ -1,6 +1,7 @@ -package org.prebid.server.functional.util.privacy.gpp +package org.prebid.server.functional.util.privacy.gpp.v2 import com.iab.gpp.encoder.field.TcfEuV2Field +import org.prebid.server.functional.util.privacy.gpp.GppConsent class TcfEuV2Consent extends GppConsent { diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/UsNatV2Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/UsNatV2Consent.groovy new file mode 100644 index 00000000000..09dfcb586ad --- /dev/null +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/UsNatV2Consent.groovy @@ -0,0 +1,126 @@ +package org.prebid.server.functional.util.privacy.gpp.v2 + +import com.iab.gpp.encoder.field.UsNatV1Field +import org.prebid.server.functional.model.privacy.gpp.DataActivity +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsNationalV2ChildSensitiveData +import org.prebid.server.functional.util.privacy.gpp.GppConsent +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1SensitiveData + +class UsNatV2Consent extends GppConsent { + + private static final Section SECTION = Section.US_NAT_V2 + + protected UsNatV2Consent(Section section, Map fieldValues) { + super(section, fieldValues) + } + + @Override + protected String encodeSection() { + gppModel.encodeSection(SECTION.name) + } + + static class Builder extends GppConsent.Builder { + + Builder() { + super(SECTION) + } + + Builder setSharingNotice(Notice sharingNotice) { + fieldValue(UsNatV1Field.SHARING_NOTICE, sharingNotice.value) + this + } + + Builder setSaleOptOutNotice(Notice saleOptOutNotice) { + fieldValue(UsNatV1Field.SALE_OPT_OUT_NOTICE, saleOptOutNotice.value) + this + } + + Builder setSharingOptOutNotice(Notice sharingOptOutNotice) { + fieldValue(UsNatV1Field.SHARING_OPT_OUT_NOTICE, sharingOptOutNotice.value) + this + } + + Builder setTargetedAdvertisingOptOutNotice(Notice targetedAdvertisingOptOutNotice) { + fieldValue(UsNatV1Field.TARGETED_ADVERTISING_OPT_OUT_NOTICE, targetedAdvertisingOptOutNotice.value) + this + } + + Builder setSensitiveDataProcessingOptOutNotice(Notice sensitiveDataProcessingOptOutNotice) { + fieldValue(UsNatV1Field.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE, sensitiveDataProcessingOptOutNotice.value) + this + } + + Builder setSensitiveDataLimitUseNotice(Notice sensitiveDataLimitUseNotice) { + fieldValue(UsNatV1Field.SENSITIVE_DATA_LIMIT_USE_NOTICE, sensitiveDataLimitUseNotice.value) + this + } + + Builder setSaleOptOut(OptOut saleOptOut) { + fieldValue(UsNatV1Field.SALE_OPT_OUT, saleOptOut.value) + this + } + + Builder setSharingOptOut(OptOut sharingOptOut) { + fieldValue(UsNatV1Field.SHARING_OPT_OUT, sharingOptOut.value) + this + } + + Builder setTargetedAdvertisingOptOut(OptOut targetedAdvertisingOptOut) { + fieldValue(UsNatV1Field.TARGETED_ADVERTISING_OPT_OUT, targetedAdvertisingOptOut.value) + this + } + + Builder setSensitiveDataProcessing(UsNationalV1SensitiveData sensitiveDataProcessing) { + fieldValue(UsNatV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) + this + } + + Builder setPersonalDataConsents(DataActivity personalDataConsents) { + fieldValue(UsNatV1Field.PERSONAL_DATA_CONSENTS, personalDataConsents.value) + this + } + + Builder setKnownChildSensitiveDataConsents(UsNationalV2ChildSensitiveData childSensitiveData) { + fieldValue(UsNatV1Field.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS, childSensitiveData.contentList) + this + } + + Builder setMspaCoveredTransaction(MspaMode mspaCoveredTransaction) { + fieldValue(UsNatV1Field.MSPA_COVERED_TRANSACTION, mspaCoveredTransaction.value) + this + } + + Builder setMspaOptOutOptionMode(MspaMode mspaOptOutOptionMode) { + fieldValue(UsNatV1Field.MSPA_OPT_OUT_OPTION_MODE, mspaOptOutOptionMode.value) + this + } + + Builder setMspaServiceProviderMode(MspaMode mspaServiceProviderMode) { + fieldValue(UsNatV1Field.MSPA_SERVICE_PROVIDER_MODE, mspaServiceProviderMode.value) + this + } + + Builder setGpcSegmentType(Integer gpcSegmentType) { + fieldValue(UsNatV1Field.GPC_SEGMENT_TYPE, gpcSegmentType) + this + } + + Builder setGpcSegmentIncluded(Boolean gpcSegmentIncluded) { + fieldValue(UsNatV1Field.GPC_SEGMENT_INCLUDED, gpcSegmentIncluded) + this + } + + Builder setGpc(Boolean gpc) { + fieldValue(UsNatV1Field.GPC, gpc) + this + } + + @Override + GppConsent build() { + new UsNatV2Consent(section, fieldValues) + } + } +} From a1e5e0571ab7826fec190268c2dfcf6d4cf813c4 Mon Sep 17 00:00:00 2001 From: osulzhenko Date: Tue, 18 Feb 2025 23:25:55 +0200 Subject: [PATCH 2/2] Add functional tests for GPP USNat v2 --- .../gpp/UsNationalV2SensitiveData.groovy | 8 +- .../privacy/GppFetchBidActivitiesSpec.groovy | 154 +++- .../privacy/GppSyncUserActivitiesSpec.groovy | 356 +++++---- .../GppTransmitEidsActivitiesSpec.groovy | 528 ++++++------- ...GppTransmitPreciseGeoActivitiesSpec.groovy | 323 ++++---- .../GppTransmitUfpdActivitiesSpec.groovy | 707 +++++++++--------- .../util/privacy/gpp/v2/UsNatV2Consent.groovy | 4 +- 7 files changed, 1083 insertions(+), 997 deletions(-) diff --git a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2SensitiveData.groovy b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2SensitiveData.groovy index c29982b7cb5..34f9fe71195 100644 --- a/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2SensitiveData.groovy +++ b/src/test/groovy/org/prebid/server/functional/model/privacy/gpp/UsNationalV2SensitiveData.groovy @@ -9,8 +9,8 @@ class UsNationalV2SensitiveData extends UsNationalV1SensitiveData { DataActivity nationalOrigin DataActivity transgenderStatus - static UsNationalV1SensitiveData generateRandomSensitiveData() { - new UsNationalV1SensitiveData().tap { + static UsNationalV2SensitiveData generateRandomSensitiveData() { + new UsNationalV2SensitiveData().tap { racialEthnicOrigin = PBSUtils.getRandomEnum(DataActivity) religiousBeliefs = PBSUtils.getRandomEnum(DataActivity) healthInfo = PBSUtils.getRandomEnum(DataActivity) @@ -30,11 +30,11 @@ class UsNationalV2SensitiveData extends UsNationalV1SensitiveData { } } - static UsNationalV1SensitiveData fromList(List data) { + static UsNationalV2SensitiveData fromList(List data) { if (data.size() != 16) { throw new IllegalArgumentException("Invalid data size. Expected 16 values.") } - new UsNationalV1SensitiveData().tap { + new UsNationalV2SensitiveData().tap { racialEthnicOrigin = data[0] religiousBeliefs = data[1] healthInfo = data[2] diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppFetchBidActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppFetchBidActivitiesSpec.groovy index d96be6f0af8..53bc08bb752 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppFetchBidActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppFetchBidActivitiesSpec.groovy @@ -13,6 +13,8 @@ import org.prebid.server.functional.model.privacy.gpp.MspaMode import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1ChildSensitiveData import org.prebid.server.functional.model.privacy.gpp.UsColoradoV1ChildSensitiveData import org.prebid.server.functional.model.privacy.gpp.UsConnecticutV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV2ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV2SensitiveData import org.prebid.server.functional.model.privacy.gpp.UsUtahV1ChildSensitiveData import org.prebid.server.functional.model.privacy.gpp.UsVirginiaV1ChildSensitiveData import org.prebid.server.functional.model.request.amp.AmpRequest @@ -34,6 +36,7 @@ import org.prebid.server.functional.util.privacy.gpp.v1.UsUtV1Consent import org.prebid.server.functional.util.privacy.gpp.v1.UsVaV1Consent import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData +import org.prebid.server.functional.util.privacy.gpp.v2.UsNatV2Consent import java.time.Instant @@ -673,6 +676,91 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { new UsCtV1Consent.Builder().build() | US_CT_V1 } + def "PBS auction call when request have disallow logic US nat v2 validation should call bid adapter"() { + given: "Default Generic BidRequests with gppConsent and account id" + def accountId = PBSUtils.randomNumber as String + def bidRequest = BidRequest.defaultBidRequest.tap { + it.setAccountId(accountId) + regs.gppSid = [US_NAT_V1.intValue] + regs.gpp = gppConsent + } + + and: "Activities set for fetchBid with rejecting privacy regulation" + def rule = new ActivityRule().tap { + it.privacyRegulation = [IAB_US_GENERAL] + } + + def activities = AllowActivities.getDefaultAllowActivities(FETCH_BIDS, Activity.getDefaultActivity([rule])) + + and: "Account gpp configuration" + def accountGppConfig = new AccountGppConfig(code: IAB_US_GENERAL, enabled: true) + + and: "Existed account with privacy regulation setup" + def account = getAccountWithAllowActivitiesAndPrivacyModule(accountId, activities, [accountGppConfig]) + accountDao.save(account) + + when: "PBS processes auction requests" + activityPbsService.sendAuctionRequest(bidRequest) + + then: "Generic bidder should be called" + assert bidder.getBidderRequest(bidRequest.id) + + where: + gppConsent << [ + new UsNatV2Consent.Builder().setSensitiveDataProcessing( + new UsNationalV2SensitiveData( + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT, + consumerHealthData: DataActivity.CONSENT, + crimeVictim: DataActivity.CONSENT, + nationalOrigin: DataActivity.CONSENT, + transgenderStatus: DataActivity.CONSENT + )), + new UsNatV2Consent.Builder().setSensitiveDataProcessing( + new UsNationalV2SensitiveData( + racialEthnicOrigin: DataActivity.NO_CONSENT, + religiousBeliefs: DataActivity.NO_CONSENT, + healthInfo: DataActivity.NO_CONSENT, + orientation: DataActivity.NO_CONSENT, + citizenshipStatus: DataActivity.NO_CONSENT, + unionMembership: DataActivity.NO_CONSENT, + consumerHealthData: DataActivity.NO_CONSENT, + nationalOrigin: DataActivity.NO_CONSENT + )), + new UsNatV2Consent.Builder().setSensitiveDataProcessing( + new UsNationalV2SensitiveData( + geneticId: DataActivity.NO_CONSENT, + biometricId: DataActivity.NO_CONSENT, + idNumbers: DataActivity.NO_CONSENT, + accountInfo: DataActivity.NO_CONSENT, + communicationContents: DataActivity.NO_CONSENT, + crimeVictim: DataActivity.NO_CONSENT, + transgenderStatus: DataActivity.NO_CONSENT + )), + new UsNatV2Consent.Builder().setSensitiveDataProcessing( + new UsNationalV2SensitiveData( + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT, + crimeVictim: DataActivity.CONSENT, + transgenderStatus: DataActivity.CONSENT + )), + new UsNatV2Consent.Builder().setKnownChildSensitiveDataConsents( + new UsNationalV2ChildSensitiveData(childFrom16to17: DataActivity.NO_CONSENT)) + ] + } + def "PBS auction call when privacy regulation have duplicate should process request and update alerts metrics"() { given: "Default basic generic BidRequest" def accountId = PBSUtils.randomNumber as String @@ -918,28 +1006,20 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) + US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), @@ -962,14 +1042,15 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) + US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap {it.childFrom16to18 = DataActivity.NO_CONSENT}) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap {it.childFrom13to16 = DataActivity.NO_CONSENT}) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } def "PBS amp call when bidder allowed in activities should process bid request and proper metrics and update processed metrics"() { @@ -1673,28 +1754,20 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) + US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), @@ -1717,13 +1790,14 @@ class GppFetchBidActivitiesSpec extends PrivacyBaseSpec { new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) + US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap {it.childFrom16to18 = DataActivity.NO_CONSENT}) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap {it.childFrom13to16 = DataActivity.NO_CONSENT}) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } } diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy index d1b21648dbd..5934ac94038 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppSyncUserActivitiesSpec.groovy @@ -12,6 +12,17 @@ import org.prebid.server.functional.model.config.GppModuleConfig import org.prebid.server.functional.model.config.InequalityValueRule import org.prebid.server.functional.model.config.LogicalRestrictedRule import org.prebid.server.functional.model.db.Account +import org.prebid.server.functional.model.privacy.gpp.DataActivity +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsColoradoV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsConnecticutV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV2ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsVirginiaV1ChildSensitiveData import org.prebid.server.functional.model.request.auction.Activity import org.prebid.server.functional.model.request.auction.ActivityRule import org.prebid.server.functional.model.request.auction.AllowActivities @@ -28,6 +39,7 @@ import org.prebid.server.functional.util.privacy.gpp.v1.UsUtV1Consent import org.prebid.server.functional.util.privacy.gpp.v1.UsVaV1Consent import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData +import org.prebid.server.functional.util.privacy.gpp.v2.UsNatV2Consent import java.time.Instant @@ -407,42 +419,42 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: disallowGppLogic << [ SIMPLE_GPC_DISALLOW_LOGIC, - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build(), - new UsNatV1Consent.Builder().setSaleOptOut(1).setSaleOptOutNotice(1).setMspaServiceProviderMode(2).setMspaOptOutOptionMode(1).build(), - new UsNatV1Consent.Builder().setSaleOptOutNotice(2).setSaleOptOut(1).setMspaServiceProviderMode(2).setMspaOptOutOptionMode(1).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 1).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(1, 0).build(), - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build(), + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build(), + new UsNatV1Consent.Builder().setSaleOptOut(OptOut.OPTED_OUT).setSaleOptOutNotice(Notice.YES).setMspaServiceProviderMode(MspaMode.NO).setMspaOptOutOptionMode(MspaMode.YES).build(), + new UsNatV1Consent.Builder().setSaleOptOutNotice(Notice.NO).setSaleOptOut(OptOut.OPTED_OUT).setMspaServiceProviderMode(MspaMode.NO).setMspaOptOutOptionMode(MspaMode.YES).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NOT_APPLICABLE, DataActivity.NO_CONSENT)).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE)).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NO_CONSENT, DataActivity.NOT_APPLICABLE)).build(), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build(), new UsNatV1Consent.Builder() - .setSharingNotice(2) - .setSharingOptOutNotice(1) - .setSharingOptOut(1) - .setMspaServiceProviderMode(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingNotice(Notice.NO) + .setSharingOptOutNotice(Notice.YES) + .setSharingOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingOptOutNotice(2) - .setSharingOptOut(1) - .setSharingNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingOptOutNotice(Notice.NO) + .setSharingOptOut(OptOut.OPTED_OUT) + .setSharingNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOutNotice(2) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOut(1) - .setTargetedAdvertisingOptOutNotice(1) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOut(OptOut.OPTED_OUT) + .setTargetedAdvertisingOptOutNotice(Notice.YES) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build() ] } @@ -485,6 +497,36 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { ] } + def "PBS cookie sync call when privacy module contain some part of of disallow logic US nat v2 validation should exclude bidders URLs"() { + given: "Cookie sync request with link to account" + def accountId = PBSUtils.randomString + def cookieSyncRequest = CookieSyncRequest.defaultCookieSyncRequest.tap { + it.gppSid = US_NAT_V1.value + it.account = accountId + it.gpp = 'DBABLA~CAAAAAAAAASA.QA' // new UsNatV2Consent.Builder().setKnownChildSensitiveDataConsents(new UsNationalV2ChildSensitiveData(childFrom16to17: DataActivity.NO_CONSENT)) + } + + and: "Activities set for cookie sync with allowing privacy regulation" + def rule = new ActivityRule().tap { + it.privacyRegulation = [IAB_US_GENERAL] + } + + def activities = AllowActivities.getDefaultAllowActivities(SYNC_USER, Activity.getDefaultActivity([rule])) + + and: "Account gpp configuration" + def accountGppConfig = new AccountGppConfig(code: IAB_US_GENERAL, enabled: true) + + and: "Existed account with cookie sync and privacy regulation setup" + def account = getAccountWithAllowActivitiesAndPrivacyModule(accountId, activities, [accountGppConfig]) + accountDao.save(account) + + when: "PBS processes cookie sync request" + def response = activityPbsService.sendCookieSyncRequest(cookieSyncRequest) + + then: "Response should not contain any URLs for bidders" + assert !response.bidderStatus.userSync.url + } + def "PBS cookie sync call when request have different gpp consent but match and rejecting should exclude bidders URLs"() { given: "Cookie sync request with link to account" def accountId = PBSUtils.randomString @@ -516,12 +558,12 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS cookie sync call when privacy modules contain allowing settings should include proper responded with bidders URLs"() { @@ -735,12 +777,12 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } @@ -826,74 +868,51 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } def "PBS setuid request when bidder allowed in activities should respond with valid bidders UIDs cookies and update processed metrics"() { @@ -1247,42 +1266,42 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: disallowGppLogic << [ SIMPLE_GPC_DISALLOW_LOGIC, - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build(), - new UsNatV1Consent.Builder().setSaleOptOut(1).setSaleOptOutNotice(1).setMspaServiceProviderMode(2).setMspaOptOutOptionMode(1).build(), - new UsNatV1Consent.Builder().setSaleOptOutNotice(2).setSaleOptOut(1).setMspaServiceProviderMode(2).setMspaOptOutOptionMode(1).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 1).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(1, 0).build(), - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build(), + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build(), + new UsNatV1Consent.Builder().setSaleOptOut(OptOut.OPTED_OUT).setSaleOptOutNotice(Notice.YES).setMspaServiceProviderMode(MspaMode.NO).setMspaOptOutOptionMode(MspaMode.YES).build(), + new UsNatV1Consent.Builder().setSaleOptOutNotice(Notice.NO).setSaleOptOut(OptOut.OPTED_OUT).setMspaServiceProviderMode(MspaMode.NO).setMspaOptOutOptionMode(MspaMode.YES).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NOT_APPLICABLE, DataActivity.NO_CONSENT)).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE)).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NO_CONSENT, DataActivity.NOT_APPLICABLE)).build(), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build(), new UsNatV1Consent.Builder() - .setSharingNotice(2) - .setSharingOptOutNotice(1) - .setSharingOptOut(1) - .setMspaServiceProviderMode(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingNotice(Notice.NO) + .setSharingOptOutNotice(Notice.YES) + .setSharingOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingOptOutNotice(2) - .setSharingOptOut(1) - .setSharingNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingOptOutNotice(Notice.NO) + .setSharingOptOut(OptOut.OPTED_OUT) + .setSharingNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOutNotice(2) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOut(1) - .setTargetedAdvertisingOptOutNotice(1) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOut(OptOut.OPTED_OUT) + .setTargetedAdvertisingOptOutNotice(Notice.YES) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build() ] } @@ -1366,12 +1385,12 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS setuid request when privacy modules contain allowing settings should respond with valid bidders UIDs cookies"() { @@ -1607,12 +1626,12 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } @@ -1706,74 +1725,51 @@ class GppSyncUserActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } def "PBS cookie sync should process rule when geo doesn't intersection"() { diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitEidsActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitEidsActivitiesSpec.groovy index 85b4d064423..7529bf2bac2 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitEidsActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitEidsActivitiesSpec.groovy @@ -7,6 +7,16 @@ import org.prebid.server.functional.model.config.GppModuleConfig import org.prebid.server.functional.model.config.InequalityValueRule import org.prebid.server.functional.model.config.LogicalRestrictedRule import org.prebid.server.functional.model.db.StoredRequest +import org.prebid.server.functional.model.privacy.gpp.DataActivity +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsColoradoV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsConnecticutV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsVirginiaV1ChildSensitiveData import org.prebid.server.functional.model.request.amp.AmpRequest import org.prebid.server.functional.model.request.auction.Activity import org.prebid.server.functional.model.request.auction.ActivityRule @@ -683,122 +693,122 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { disallowGppLogic << [ SIMPLE_GPC_DISALLOW_LOGIC, new UsNatV1Consent.Builder() - .setMspaServiceProviderMode(1) - .setMspaOptOutOptionMode(2) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaOptOutOptionMode(MspaMode.NO) .build(), new UsNatV1Consent.Builder() - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSaleOptOutNotice(2) - .setSaleOptOut(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSaleOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingNotice(2) - .setSharingOptOutNotice(1) - .setSharingOptOut(1) - .setMspaServiceProviderMode(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingNotice(Notice.NO) + .setSharingOptOutNotice(Notice.YES) + .setSharingOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingOptOutNotice(2) - .setSharingOptOut(1) - .setSharingNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingOptOutNotice(Notice.NO) + .setSharingOptOut(OptOut.OPTED_OUT) + .setSharingNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOutNotice(2) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOut(1) - .setTargetedAdvertisingOptOutNotice(1) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOut(OptOut.OPTED_OUT) + .setTargetedAdvertisingOptOutNotice(Notice.YES) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(2) + .setSensitiveDataProcessingOptOutNotice(Notice.NO) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(2) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSensitiveDataLimitUseNotice(Notice.NO) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 1) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NOT_APPLICABLE, DataActivity.NO_CONSENT)) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 2) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE)) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(1, 0) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NO_CONSENT, DataActivity.NOT_APPLICABLE)) .build(), new UsNatV1Consent.Builder() - .setPersonalDataConsents(2) + .setPersonalDataConsents(DataActivity.CONSENT) .build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 1, - religiousBeliefs: 1, - healthInfo: 1, - orientation: 1, - citizenshipStatus: 1, - unionMembership: 1, + racialEthnicOrigin: DataActivity.NO_CONSENT, + religiousBeliefs: DataActivity.NO_CONSENT, + healthInfo: DataActivity.NO_CONSENT, + orientation: DataActivity.NO_CONSENT, + citizenshipStatus: DataActivity.NO_CONSENT, + unionMembership: DataActivity.NO_CONSENT, )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(0) + .setSensitiveDataLimitUseNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 2, - religiousBeliefs: 2, - healthInfo: 2, - orientation: 2, - citizenshipStatus: 2, - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - unionMembership: 2, - communicationContents: 2 + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(0) + .setSensitiveDataProcessingOptOutNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 2, - religiousBeliefs: 2, - healthInfo: 2, - orientation: 2, - citizenshipStatus: 2, - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - unionMembership: 2, - communicationContents: 2 + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geneticId: 1, - biometricId: 1, - idNumbers: 1, - accountInfo: 1, - communicationContents: 1 + geneticId: DataActivity.NO_CONSENT, + biometricId: DataActivity.NO_CONSENT, + idNumbers: DataActivity.NO_CONSENT, + accountInfo: DataActivity.NO_CONSENT, + communicationContents: DataActivity.NO_CONSENT )).build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - communicationContents: 2 + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build() ] } @@ -878,12 +888,12 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS auction call when privacy modules contain allowing settings should leave EIDS fields in request"() { @@ -1097,12 +1107,12 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } @@ -1191,74 +1201,51 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } def "PBS amp call when transmit EIDS activities is allowing request should leave EIDS fields field in active request and update proper metrics"() { @@ -1664,122 +1651,122 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { disallowGppLogic << [ SIMPLE_GPC_DISALLOW_LOGIC, new UsNatV1Consent.Builder() - .setMspaServiceProviderMode(1) - .setMspaOptOutOptionMode(2) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaOptOutOptionMode(MspaMode.NO) .build(), new UsNatV1Consent.Builder() - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSaleOptOutNotice(2) - .setSaleOptOut(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSaleOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingNotice(2) - .setSharingOptOutNotice(1) - .setSharingOptOut(1) - .setMspaServiceProviderMode(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingNotice(Notice.NO) + .setSharingOptOutNotice(Notice.YES) + .setSharingOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingOptOutNotice(2) - .setSharingOptOut(1) - .setSharingNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingOptOutNotice(Notice.NO) + .setSharingOptOut(OptOut.OPTED_OUT) + .setSharingNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOutNotice(2) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOut(1) - .setTargetedAdvertisingOptOutNotice(1) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOut(OptOut.OPTED_OUT) + .setTargetedAdvertisingOptOutNotice(Notice.YES) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(2) + .setSensitiveDataProcessingOptOutNotice(Notice.NO) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(2) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSensitiveDataLimitUseNotice(Notice.NO) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 1) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NOT_APPLICABLE, DataActivity.NO_CONSENT)) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 2) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE)) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(1, 0) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NO_CONSENT, DataActivity.NOT_APPLICABLE)) .build(), new UsNatV1Consent.Builder() - .setPersonalDataConsents(2) + .setPersonalDataConsents(DataActivity.CONSENT) .build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 1, - religiousBeliefs: 1, - healthInfo: 1, - orientation: 1, - citizenshipStatus: 1, - unionMembership: 1, + racialEthnicOrigin: DataActivity.NO_CONSENT, + religiousBeliefs: DataActivity.NO_CONSENT, + healthInfo: DataActivity.NO_CONSENT, + orientation: DataActivity.NO_CONSENT, + citizenshipStatus: DataActivity.NO_CONSENT, + unionMembership: DataActivity.NO_CONSENT, )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(0) + .setSensitiveDataLimitUseNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 2, - religiousBeliefs: 2, - healthInfo: 2, - orientation: 2, - citizenshipStatus: 2, - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - unionMembership: 2, - communicationContents: 2 + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(0) + .setSensitiveDataProcessingOptOutNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 2, - religiousBeliefs: 2, - healthInfo: 2, - orientation: 2, - citizenshipStatus: 2, - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - unionMembership: 2, - communicationContents: 2 + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geneticId: 1, - biometricId: 1, - idNumbers: 1, - accountInfo: 1, - communicationContents: 1 + geneticId: DataActivity.NO_CONSENT, + biometricId: DataActivity.NO_CONSENT, + idNumbers: DataActivity.NO_CONSENT, + accountInfo: DataActivity.NO_CONSENT, + communicationContents: DataActivity.NO_CONSENT )).build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - communicationContents: 2 + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build() ] } @@ -1877,12 +1864,12 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS amp call when privacy modules contain allowing settings should leave EIDS fields in request"() { @@ -2151,12 +2138,12 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } @@ -2265,73 +2252,50 @@ class GppTransmitEidsActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } } diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitPreciseGeoActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitPreciseGeoActivitiesSpec.groovy index 183e1013c2a..8489176b57e 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitPreciseGeoActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitPreciseGeoActivitiesSpec.groovy @@ -7,6 +7,15 @@ import org.prebid.server.functional.model.config.GppModuleConfig import org.prebid.server.functional.model.config.InequalityValueRule import org.prebid.server.functional.model.config.LogicalRestrictedRule import org.prebid.server.functional.model.db.StoredRequest +import org.prebid.server.functional.model.privacy.gpp.DataActivity +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsColoradoV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsConnecticutV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsVirginiaV1ChildSensitiveData import org.prebid.server.functional.model.request.amp.AmpRequest import org.prebid.server.functional.model.request.auction.Activity import org.prebid.server.functional.model.request.auction.ActivityRule @@ -1100,35 +1109,91 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: disallowGppLogic << [ SIMPLE_GPC_DISALLOW_LOGIC, - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessingOptOutNotice(2).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 1).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(1, 0).build(), - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build(), + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build(), + new UsNatV1Consent.Builder().setSensitiveDataProcessingOptOutNotice(Notice.NO).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NOT_APPLICABLE, DataActivity.NO_CONSENT)).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE)).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NO_CONSENT, DataActivity.NOT_APPLICABLE)).build(), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(2) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSensitiveDataLimitUseNotice(Notice.NO) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(0) + .setSensitiveDataLimitUseNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geolocation: 2 + geolocation: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(0) + .setSensitiveDataProcessingOptOutNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geolocation: 2 + geolocation: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(0) + .setSensitiveDataProcessingOptOutNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geolocation: 1 + geolocation: DataActivity.NO_CONSENT )).build() ] } + def "PBS auction call when privacy module contain some part of disallow logic US nat v2 should round lat/lon data to 2 digits"() { + given: "Default Generic BidRequests with gppConsent and account id" + def accountId = PBSUtils.randomNumber as String + def bidRequest = bidRequestWithGeo.tap { + it.setAccountId(accountId) + regs.gppSid = [US_NAT_V1.intValue] + regs.gpp = 'DBABLA~CAAAAAAAAASA.QA' // new UsNatV2Consent.Builder().setKnownChildSensitiveDataConsents(new UsNationalV2ChildSensitiveData(childFrom16to17: DataActivity.NO_CONSENT)) + } + + and: "Activities set for transmitPreciseGeo with rejecting privacy regulation" + def rule = new ActivityRule().tap { + it.privacyRegulation = [IAB_US_GENERAL] + } + + def activities = AllowActivities.getDefaultAllowActivities(TRANSMIT_PRECISE_GEO, Activity.getDefaultActivity([rule])) + + and: "Account gpp configuration" + def accountGppConfig = new AccountGppConfig(code: IAB_US_GENERAL, enabled: true) + + and: "Existed account with privacy regulation setup" + def account = getAccountWithAllowActivitiesAndPrivacyModule(accountId, activities, [accountGppConfig]) + accountDao.save(account) + + when: "PBS processes auction requests" + activityPbsService.sendAuctionRequest(bidRequest) + + then: "Bidder request should contain rounded geo data for device and user to 2 digits" + def bidderRequests = bidder.getBidderRequest(bidRequest.id) + verifyAll { + bidderRequests.device.ip == "43.77.114.0" + bidderRequests.device.ipv6 == "af47:892b:3e98:b400::" + bidderRequests.device.geo.lat == bidRequest.device.geo.lat.round(2) + bidderRequests.device.geo.lon == bidRequest.device.geo.lon.round(2) + + bidderRequests.device.geo.country == bidRequest.device.geo.country + bidderRequests.device.geo.region == bidRequest.device.geo.region + bidderRequests.device.geo.utcoffset == bidRequest.device.geo.utcoffset + } + + and: "Bidder request should mask several geo fields" + verifyAll { + !bidderRequests.device.geo.metro + !bidderRequests.device.geo.city + !bidderRequests.device.geo.zip + !bidderRequests.device.geo.accuracy + !bidderRequests.device.geo.ipservice + !bidderRequests.device.geo.ext + } + + and: "Bidder request shouldn't mask geo.{lat,lon} fields" + verifyAll { + bidderRequests.user.geo.lat == bidRequest.user.geo.lat + bidderRequests.user.geo.lon == bidRequest.user.geo.lon + } + } + def "PBS auction call when request have different gpp consent but match and rejecting should round lat/lon data to 2 digits"() { given: "Default Generic BidRequests with gppConsent and account id" def accountId = PBSUtils.randomNumber as String @@ -1186,12 +1251,12 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS auction call when privacy modules contain allowing settings should not round lat/lon data"() { @@ -1522,12 +1587,12 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } @@ -1645,74 +1710,51 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } def "PBS amp call with bidder allowed in activities should not round lat/lon data and update processed metrics"() { @@ -2327,31 +2369,31 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: disallowGppLogic << [ SIMPLE_GPC_DISALLOW_LOGIC, - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build(), - new UsNatV1Consent.Builder().setSensitiveDataProcessingOptOutNotice(2).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 1).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2).build(), - new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(1, 0).build(), - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build(), + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build(), + new UsNatV1Consent.Builder().setSensitiveDataProcessingOptOutNotice(Notice.NO).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NOT_APPLICABLE, DataActivity.NO_CONSENT)).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE)).build(), + new UsNatV1Consent.Builder().setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NO_CONSENT, DataActivity.NOT_APPLICABLE)).build(), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(2) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSensitiveDataLimitUseNotice(Notice.NO) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(0) + .setSensitiveDataLimitUseNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geolocation: 2 + geolocation: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(0) + .setSensitiveDataProcessingOptOutNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geolocation: 2 + geolocation: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(0) + .setSensitiveDataProcessingOptOutNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geolocation: 1 + geolocation: DataActivity.NO_CONSENT )).build() ] } @@ -2421,12 +2463,12 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS amp call when privacy modules contain allowing settings should not round lat/lon data"() { @@ -2806,12 +2848,12 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } @@ -2946,73 +2988,50 @@ class GppTransmitPreciseGeoActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } } diff --git a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy index fcbedb79823..58b86463b6c 100644 --- a/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy +++ b/src/test/groovy/org/prebid/server/functional/tests/privacy/GppTransmitUfpdActivitiesSpec.groovy @@ -1,6 +1,5 @@ package org.prebid.server.functional.tests.privacy - import org.prebid.server.functional.model.config.AccountGdprConfig import org.prebid.server.functional.model.config.AccountGppConfig import org.prebid.server.functional.model.config.ActivityConfig @@ -12,20 +11,26 @@ import org.prebid.server.functional.model.config.Purpose import org.prebid.server.functional.model.config.PurposeConfig import org.prebid.server.functional.model.config.PurposeEid import org.prebid.server.functional.model.db.StoredRequest +import org.prebid.server.functional.model.privacy.gpp.DataActivity +import org.prebid.server.functional.model.privacy.gpp.MspaMode +import org.prebid.server.functional.model.privacy.gpp.Notice +import org.prebid.server.functional.model.privacy.gpp.OptOut +import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsColoradoV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsConnecticutV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV2ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV2SensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsUtahV1ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsVirginiaV1ChildSensitiveData import org.prebid.server.functional.model.request.amp.AmpRequest import org.prebid.server.functional.model.request.auction.Activity import org.prebid.server.functional.model.request.auction.ActivityRule import org.prebid.server.functional.model.request.auction.AllowActivities -import org.prebid.server.functional.model.request.auction.BidRequest import org.prebid.server.functional.model.request.auction.Condition -import org.prebid.server.functional.model.request.auction.Data import org.prebid.server.functional.model.request.auction.Device -import org.prebid.server.functional.model.request.auction.Eid import org.prebid.server.functional.model.request.auction.Geo import org.prebid.server.functional.model.request.auction.RegsExt -import org.prebid.server.functional.model.request.auction.User -import org.prebid.server.functional.model.request.auction.UserExt -import org.prebid.server.functional.model.request.auction.UserExtData import org.prebid.server.functional.service.PrebidServerException import org.prebid.server.functional.util.PBSUtils import org.prebid.server.functional.util.privacy.gpp.v1.UsCaV1Consent @@ -37,7 +42,8 @@ import org.prebid.server.functional.util.privacy.gpp.v1.UsVaV1Consent import org.prebid.server.functional.model.privacy.gpp.UsCaliforniaV1SensitiveData import org.prebid.server.functional.model.privacy.gpp.UsNationalV1SensitiveData import org.prebid.server.functional.model.privacy.gpp.UsUtahV1SensitiveData -import spock.lang.IgnoreRest +import org.prebid.server.functional.util.privacy.gpp.v2.UsNatV2Consent +import spock.lang.PendingFeature import java.time.Instant @@ -942,122 +948,122 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { disallowGppLogic << [ SIMPLE_GPC_DISALLOW_LOGIC, new UsNatV1Consent.Builder() - .setMspaServiceProviderMode(1) - .setMspaOptOutOptionMode(2) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaOptOutOptionMode(MspaMode.NO) .build(), new UsNatV1Consent.Builder() - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSaleOptOutNotice(2) - .setSaleOptOut(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSaleOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingNotice(2) - .setSharingOptOutNotice(1) - .setSharingOptOut(1) - .setMspaServiceProviderMode(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingNotice(Notice.NO) + .setSharingOptOutNotice(Notice.YES) + .setSharingOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingOptOutNotice(2) - .setSharingOptOut(1) - .setSharingNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingOptOutNotice(Notice.NO) + .setSharingOptOut(OptOut.OPTED_OUT) + .setSharingNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOutNotice(2) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOut(1) - .setTargetedAdvertisingOptOutNotice(1) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOut(OptOut.OPTED_OUT) + .setTargetedAdvertisingOptOutNotice(Notice.YES) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(2) + .setSensitiveDataProcessingOptOutNotice(Notice.NO) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(2) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSensitiveDataLimitUseNotice(Notice.NO) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 1) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NOT_APPLICABLE, DataActivity.NO_CONSENT)) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 2) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE)) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(1, 0) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NO_CONSENT, DataActivity.NOT_APPLICABLE)) .build(), new UsNatV1Consent.Builder() - .setPersonalDataConsents(2) + .setPersonalDataConsents(DataActivity.CONSENT) .build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 1, - religiousBeliefs: 1, - healthInfo: 1, - orientation: 1, - citizenshipStatus: 1, - unionMembership: 1, + racialEthnicOrigin: DataActivity.NO_CONSENT, + religiousBeliefs: DataActivity.NO_CONSENT, + healthInfo: DataActivity.NO_CONSENT, + orientation: DataActivity.NO_CONSENT, + citizenshipStatus: DataActivity.NO_CONSENT, + unionMembership: DataActivity.NO_CONSENT, )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(0) + .setSensitiveDataLimitUseNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 2, - religiousBeliefs: 2, - healthInfo: 2, - orientation: 2, - citizenshipStatus: 2, - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - unionMembership: 2, - communicationContents: 2 + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(0) + .setSensitiveDataProcessingOptOutNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 2, - religiousBeliefs: 2, - healthInfo: 2, - orientation: 2, - citizenshipStatus: 2, - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - unionMembership: 2, - communicationContents: 2 + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geneticId: 1, - biometricId: 1, - idNumbers: 1, - accountInfo: 1, - communicationContents: 1 + geneticId: DataActivity.NO_CONSENT, + biometricId: DataActivity.NO_CONSENT, + idNumbers: DataActivity.NO_CONSENT, + accountInfo: DataActivity.NO_CONSENT, + communicationContents: DataActivity.NO_CONSENT )).build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - communicationContents: 2 + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build() ] } @@ -1118,8 +1124,7 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { ] } - @IgnoreRest - def "PBS auction call when privacy module contain some part of disallow logic which violates GPP 2 validation should remove UFPD fields in request"() { + def "PBS auction call when privacy module contain some part of disallow raw logic US nat v2 validation should remove UFPD fields in request"() { given: "Default Generic BidRequests with UFPD fields and account id" def accountId = PBSUtils.randomNumber as String def bidRequest = getBidRequestWithPersonalData(accountId).tap { @@ -1164,16 +1169,116 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { and: "Generic bidder request should have data in EIDS fields" assert bidderRequest.user.eids == bidRequest.user.eids - where: disallowGppLogic << [ - 'DBABLA~BAAAAAAAEgA.QA', - 'DBABLA~CAAAAAAAABCA.QA', - 'DBABLA~CAAAAAAAAASA.QA', - 'DBABLA~CAAAAAAAAASA.QA' + 'DBABLA~CAAAqqiqqgCA.QA', //SensitiveDataProcessing[1-7,9-16]=2 + 'DBABLA~CAAAVUAERACA.QA', //SensitiveDataProcessing[1-5,11,13,15]=1 + 'DBABLA~CAAAABRREQCA.QA', //SensitiveDataProcessing[6,7,9,10,12,14,16]=1 + 'DBABLA~CAAAACiiIgCA.QA' //SensitiveDataProcessing[6,7,9,10,12,14,16]=2 ] } + @PendingFeature + def "PBS auction call when privacy module contain some part of disallow logic US nat v2 validation should remove UFPD fields in request"() { + given: "Default Generic BidRequests with UFPD fields and account id" + def accountId = PBSUtils.randomNumber as String + def bidRequest = getBidRequestWithPersonalData(accountId).tap { + regs.gppSid = [US_NAT_V1.intValue] + regs.gpp = disallowGppLogic.build() + } + + and: "Activities set for transmitUfpd with rejecting privacy regulation" + def rule = new ActivityRule().tap { + it.privacyRegulation = [IAB_US_GENERAL] + } + + def activities = AllowActivities.getDefaultAllowActivities(TRANSMIT_UFPD, Activity.getDefaultActivity([rule])) + + and: "Account gpp configuration" + def accountGppConfig = new AccountGppConfig(code: IAB_US_GENERAL, enabled: true) + + and: "Existed account with privacy regulation setup" + def account = getAccountWithAllowActivitiesAndPrivacyModule(accountId, activities, [accountGppConfig]) + accountDao.save(account) + + when: "PBS processes auction requests" + activityPbsService.sendAuctionRequest(bidRequest) + + then: "Generic bidder request should have empty UFPD fields" + def bidderRequest = bidder.getBidderRequest(bidRequest.id) + verifyAll { + !bidderRequest.device.didsha1 + !bidderRequest.device.didmd5 + !bidderRequest.device.dpidsha1 + !bidderRequest.device.ifa + !bidderRequest.device.macsha1 + !bidderRequest.device.macmd5 + !bidderRequest.device.dpidmd5 + !bidderRequest.user.id + !bidderRequest.user.buyeruid + !bidderRequest.user.yob + !bidderRequest.user.gender + !bidderRequest.user.data + !bidderRequest.user.ext + } + + and: "Generic bidder request should have data in EIDS fields" + assert bidderRequest.user.eids == bidRequest.user.eids + where: + disallowGppLogic << [ + new UsNatV2Consent.Builder().setSensitiveDataProcessing( + new UsNationalV2SensitiveData( + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT, + consumerHealthData: DataActivity.CONSENT, + crimeVictim: DataActivity.CONSENT, + nationalOrigin: DataActivity.CONSENT, + transgenderStatus: DataActivity.CONSENT + )), + new UsNatV2Consent.Builder().setSensitiveDataProcessing( + new UsNationalV2SensitiveData( + racialEthnicOrigin: DataActivity.NO_CONSENT, + religiousBeliefs: DataActivity.NO_CONSENT, + healthInfo: DataActivity.NO_CONSENT, + orientation: DataActivity.NO_CONSENT, + citizenshipStatus: DataActivity.NO_CONSENT, + unionMembership: DataActivity.NO_CONSENT, + consumerHealthData: DataActivity.NO_CONSENT, + nationalOrigin: DataActivity.NO_CONSENT + )), + new UsNatV2Consent.Builder().setSensitiveDataProcessing( + new UsNationalV2SensitiveData( + geneticId: DataActivity.NO_CONSENT, + biometricId: DataActivity.NO_CONSENT, + idNumbers: DataActivity.NO_CONSENT, + accountInfo: DataActivity.NO_CONSENT, + communicationContents: DataActivity.NO_CONSENT, + crimeVictim: DataActivity.NO_CONSENT, + transgenderStatus: DataActivity.NO_CONSENT + )), + new UsNatV2Consent.Builder().setSensitiveDataProcessing( + new UsNationalV2SensitiveData( + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT, + crimeVictim: DataActivity.CONSENT, + transgenderStatus: DataActivity.CONSENT + )), + new UsNatV2Consent.Builder().setKnownChildSensitiveDataConsents( + new UsNationalV2ChildSensitiveData(childFrom16to17: DataActivity.NO_CONSENT)) + ] + } def "PBS auction call when request have different gpp consent but match and rejecting should remove UFPD fields in request"() { given: "Default Generic BidRequests with UFPD fields and account id" @@ -1223,13 +1328,13 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { assert bidderRequest.user.eids == bidRequest.user.eids where: - gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + gppConsent | gppSid + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS auction call when privacy modules contain allowing settings should leave UFPD fields in request"() { @@ -1535,14 +1640,14 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { assert bidderRequest.user.eids == bidRequest.user.eids where: - gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), - new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), - new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + gppConsent | valueRules + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } def "PBS auction call when custom privacy regulation empty and normalize is disabled should respond with an error and update metric"() { @@ -1645,74 +1750,51 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } def "PBS amp call when transmit UFPD activities is allowing request should leave UFPD fields field in active request and update proper metrics"() { @@ -2265,122 +2347,122 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { disallowGppLogic << [ SIMPLE_GPC_DISALLOW_LOGIC, new UsNatV1Consent.Builder() - .setMspaServiceProviderMode(1) - .setMspaOptOutOptionMode(2) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaOptOutOptionMode(MspaMode.NO) .build(), new UsNatV1Consent.Builder() - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSaleOptOutNotice(2) - .setSaleOptOut(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSaleOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingNotice(2) - .setSharingOptOutNotice(1) - .setSharingOptOut(1) - .setMspaServiceProviderMode(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingNotice(Notice.NO) + .setSharingOptOutNotice(Notice.YES) + .setSharingOptOut(OptOut.OPTED_OUT) + .setMspaServiceProviderMode(MspaMode.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSharingOptOutNotice(2) - .setSharingOptOut(1) - .setSharingNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSharingOptOutNotice(Notice.NO) + .setSharingOptOut(OptOut.OPTED_OUT) + .setSharingNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOutNotice(2) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOutNotice(Notice.NO) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setTargetedAdvertisingOptOut(1) - .setTargetedAdvertisingOptOutNotice(1) - .setSaleOptOut(1) - .setSaleOptOutNotice(1) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setTargetedAdvertisingOptOut(OptOut.OPTED_OUT) + .setTargetedAdvertisingOptOutNotice(Notice.YES) + .setSaleOptOut(OptOut.OPTED_OUT) + .setSaleOptOutNotice(Notice.YES) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(2) + .setSensitiveDataProcessingOptOutNotice(Notice.NO) .build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(2) - .setMspaServiceProviderMode(2) - .setMspaOptOutOptionMode(1) + .setSensitiveDataLimitUseNotice(Notice.NO) + .setMspaServiceProviderMode(MspaMode.NO) + .setMspaOptOutOptionMode(MspaMode.YES) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 1) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NOT_APPLICABLE, DataActivity.NO_CONSENT)) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 2) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE)) .build(), new UsNatV1Consent.Builder() - .setKnownChildSensitiveDataConsents(1, 0) + .setKnownChildSensitiveDataConsents(UsNationalV1ChildSensitiveData.getDefault(DataActivity.NO_CONSENT, DataActivity.NOT_APPLICABLE)) .build(), new UsNatV1Consent.Builder() - .setPersonalDataConsents(2) + .setPersonalDataConsents(DataActivity.CONSENT) .build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 1, - religiousBeliefs: 1, - healthInfo: 1, - orientation: 1, - citizenshipStatus: 1, - unionMembership: 1, + racialEthnicOrigin: DataActivity.NO_CONSENT, + religiousBeliefs: DataActivity.NO_CONSENT, + healthInfo: DataActivity.NO_CONSENT, + orientation: DataActivity.NO_CONSENT, + citizenshipStatus: DataActivity.NO_CONSENT, + unionMembership: DataActivity.NO_CONSENT, )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataLimitUseNotice(0) + .setSensitiveDataLimitUseNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 2, - religiousBeliefs: 2, - healthInfo: 2, - orientation: 2, - citizenshipStatus: 2, - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - unionMembership: 2, - communicationContents: 2 + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder() - .setSensitiveDataProcessingOptOutNotice(0) + .setSensitiveDataProcessingOptOutNotice(Notice.NOT_APPLICABLE) .setSensitiveDataProcessing(new UsNationalV1SensitiveData( - racialEthnicOrigin: 2, - religiousBeliefs: 2, - healthInfo: 2, - orientation: 2, - citizenshipStatus: 2, - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - unionMembership: 2, - communicationContents: 2 + racialEthnicOrigin: DataActivity.CONSENT, + religiousBeliefs: DataActivity.CONSENT, + healthInfo: DataActivity.CONSENT, + orientation: DataActivity.CONSENT, + citizenshipStatus: DataActivity.CONSENT, + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + unionMembership: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geneticId: 1, - biometricId: 1, - idNumbers: 1, - accountInfo: 1, - communicationContents: 1 + geneticId: DataActivity.NO_CONSENT, + biometricId: DataActivity.NO_CONSENT, + idNumbers: DataActivity.NO_CONSENT, + accountInfo: DataActivity.NO_CONSENT, + communicationContents: DataActivity.NO_CONSENT )).build(), new UsNatV1Consent.Builder().setSensitiveDataProcessing(new UsNationalV1SensitiveData( - geneticId: 2, - biometricId: 2, - idNumbers: 2, - accountInfo: 2, - communicationContents: 2 + geneticId: DataActivity.CONSENT, + biometricId: DataActivity.CONSENT, + idNumbers: DataActivity.CONSENT, + accountInfo: DataActivity.CONSENT, + communicationContents: DataActivity.CONSENT )).build() ] } @@ -2507,13 +2589,13 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { assert bidderRequest.user.eids == ampStoredRequest.user.eids where: - gppConsent | gppSid - new UsNatV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_NAT_V1 - new UsCaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CA_V1 - new UsVaV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_VA_V1 - new UsCoV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CO_V1 - new UsUtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_UT_V1 - new UsCtV1Consent.Builder().setMspaServiceProviderMode(1).setMspaOptOutOptionMode(2).build() | US_CT_V1 + gppConsent | gppSid + new UsNatV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_NAT_V1 + new UsCaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CA_V1 + new UsVaV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_VA_V1 + new UsCoV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CO_V1 + new UsUtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_UT_V1 + new UsCtV1Consent.Builder().setMspaServiceProviderMode(MspaMode.YES).setMspaOptOutOptionMode(MspaMode.NO).build() | US_CT_V1 } def "PBS amp call when privacy modules contain allowing settings should leave UFPD fields in request"() { @@ -2871,14 +2953,14 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { assert bidderRequest.user.eids == ampStoredRequest.user.eids where: - gppConsent | valueRules - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] - new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), - new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] - new UsNatV1Consent.Builder().setPersonalDataConsents(2).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), - new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + gppConsent | valueRules + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(false).build() | [new InequalityValueRule(GPC, NOTICE_PROVIDED)] + new UsNatV1Consent.Builder().setGpc(true).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new EqualityValueRule(SHARING_NOTICE, NOTICE_NOT_PROVIDED)] + new UsNatV1Consent.Builder().setPersonalDataConsents(DataActivity.CONSENT).build() | [new EqualityValueRule(GPC, NOTICE_PROVIDED), + new EqualityValueRule(PERSONAL_DATA_CONSENTS, NOTICE_NOT_PROVIDED)] } def "PBS amp call when custom privacy regulation empty and normalize is disabled should respond with an error and update metric"() { @@ -3001,74 +3083,51 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { where: gppSid | equalityValueRules | gppStateConsent - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: 2)) - US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder() - .setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: 2)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ID_NUMBERS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(idNumbers: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ACCOUNT_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(accountInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geolocation: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_COMMUNICATION_CONTENTS, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(communicationContents: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_CA_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsCaV1Consent.Builder().setSensitiveDataProcessing(new UsCaliforniaV1SensitiveData(orientation: DataActivity.CONSENT)) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.default) US_CA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2), PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsCaliforniaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_VA_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsVaV1Consent.Builder().setKnownChildSensitiveDataConsents(UsVirginiaV1ChildSensitiveData.default) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_CO_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(0) - - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: 2)) - US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder() - .setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCoV1Consent.Builder().setKnownChildSensitiveDataConsents(UsColoradoV1ChildSensitiveData.default) + + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RACIAL_ETHNIC_ORIGIN, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(racialEthnicOrigin: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_RELIGIOUS_BELIEFS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(religiousBeliefs: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_ORIENTATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(orientation: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_CITIZENSHIP_STATUS, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(citizenshipStatus: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_HEALTH_INFO, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(healthInfo: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GENETIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geneticId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_BIOMETRIC_ID, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(biometricId: DataActivity.CONSENT)) + US_UT_V1 | [new EqualityValueRule(SENSITIVE_DATA_GEOLOCATION, CONSENT)] | new UsUtV1Consent.Builder().setSensitiveDataProcessing(new UsUtahV1SensitiveData(geolocation: DataActivity.CONSENT)) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(1, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.getRandom([DataActivity.NOT_APPLICABLE])) US_UT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsUtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsUtahV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NOT_APPLICABLE), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 0, 0) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NOT_APPLICABLE)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.default) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(0, 2, 2) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getDefault(DataActivity.CONSENT, DataActivity.NOT_APPLICABLE, DataActivity.CONSENT)) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), PBSUtils.getRandomNumber(0, 2), 1) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom16to18 = DataActivity.NO_CONSENT }) US_CT_V1 | [new EqualityValueRule(CHILD_CONSENTS_BELOW_13, NO_CONSENT), - new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder() - .setKnownChildSensitiveDataConsents(PBSUtils.getRandomNumber(0, 2), 1, PBSUtils.getRandomNumber(0, 2)) + new EqualityValueRule(CHILD_CONSENTS_FROM_13_TO_16, NO_CONSENT)] | new UsCtV1Consent.Builder().setKnownChildSensitiveDataConsents(UsConnecticutV1ChildSensitiveData.getRandom().tap { it.childFrom13to16 = DataActivity.NO_CONSENT }) } def "PBS auction call when transmit UFPD activities is rejecting requests with activityTransition false should remove only UFPD fields in request"() { @@ -3125,30 +3184,4 @@ class GppTransmitUfpdActivitiesSpec extends PrivacyBaseSpec { eid << [new PurposeEid(activityTransition: false), new PurposeEid(activityTransitionKebabCase: false)] } - - private static BidRequest givenBidRequestWithAccountAndUfpdData(String accountId) { - BidRequest.getDefaultBidRequest().tap { - it.setAccountId(accountId) - it.ext.prebid.trace = VERBOSE - it.device = new Device().tap { - didsha1 = PBSUtils.randomString - didmd5 = PBSUtils.randomString - dpidsha1 = PBSUtils.randomString - ifa = PBSUtils.randomString - macsha1 = PBSUtils.randomString - macmd5 = PBSUtils.randomString - dpidmd5 = PBSUtils.randomString - } - it.user = User.defaultUser - it.user.customdata = PBSUtils.randomString - it.user.eids = [Eid.defaultEid] - it.user.data = [new Data(name: PBSUtils.randomString)] - it.user.buyeruid = PBSUtils.randomString - it.user.yob = PBSUtils.randomNumber - it.user.gender = PBSUtils.randomString - it.user.geo = Geo.FPDGeo - it.user.ext = new UserExt(data: new UserExtData(buyeruid: PBSUtils.randomString)) - it.regs.ext ?= new RegsExt() - } - } } diff --git a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/UsNatV2Consent.groovy b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/UsNatV2Consent.groovy index 09dfcb586ad..f59474c3e79 100644 --- a/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/UsNatV2Consent.groovy +++ b/src/test/groovy/org/prebid/server/functional/util/privacy/gpp/v2/UsNatV2Consent.groovy @@ -6,8 +6,8 @@ import org.prebid.server.functional.model.privacy.gpp.MspaMode import org.prebid.server.functional.model.privacy.gpp.Notice import org.prebid.server.functional.model.privacy.gpp.OptOut import org.prebid.server.functional.model.privacy.gpp.UsNationalV2ChildSensitiveData +import org.prebid.server.functional.model.privacy.gpp.UsNationalV2SensitiveData import org.prebid.server.functional.util.privacy.gpp.GppConsent -import org.prebid.server.functional.model.privacy.gpp.UsNationalV1SensitiveData class UsNatV2Consent extends GppConsent { @@ -73,7 +73,7 @@ class UsNatV2Consent extends GppConsent { this } - Builder setSensitiveDataProcessing(UsNationalV1SensitiveData sensitiveDataProcessing) { + Builder setSensitiveDataProcessing(UsNationalV2SensitiveData sensitiveDataProcessing) { fieldValue(UsNatV1Field.SENSITIVE_DATA_PROCESSING, sensitiveDataProcessing.contentList) this }