diff --git a/adapters/adform/adformtest/supplemental/user-nil.json b/adapters/adform/adformtest/supplemental/user-nil.json index 5f02fe85971..96ea1dbff71 100644 --- a/adapters/adform/adformtest/supplemental/user-nil.json +++ b/adapters/adform/adformtest/supplemental/user-nil.json @@ -31,12 +31,7 @@ }, "user": { "ext": { - "consent": "abc2", - "digitrust": { - "ID": "digitrustId", - "KeyV": 1, - "Pref": 0 - } + "consent": "abc2" } } }, diff --git a/adapters/dmx/dmx.go b/adapters/dmx/dmx.go index 7124d229347..adcec4a33c5 100644 --- a/adapters/dmx/dmx.go +++ b/adapters/dmx/dmx.go @@ -148,7 +148,7 @@ func (adapter *DmxAdapter) MakeRequests(request *openrtb2.BidRequest, req *adapt } if dmxReq.User.Ext != nil { if err := json.Unmarshal(dmxReq.User.Ext, &userExt); err == nil { - if len(userExt.Eids) > 0 || (userExt.DigiTrust != nil && userExt.DigiTrust.ID != "") { + if len(userExt.Eids) > 0 { anyHasId = true } } diff --git a/adapters/dmx/dmx_test.go b/adapters/dmx/dmx_test.go index a9f1e8bbc79..409290c110d 100644 --- a/adapters/dmx/dmx_test.go +++ b/adapters/dmx/dmx_test.go @@ -643,50 +643,6 @@ func TestUserEidsOnly(t *testing.T) { } } -func TestUserDigitrustOnly(t *testing.T) { - var w, h int = 300, 250 - - var width, height int64 = int64(w), int64(h) - - bidder, buildErr := Builder(openrtb_ext.BidderDmx, config.Adapter{ - Endpoint: "https://dmx.districtm.io/b/v2"}) - - if buildErr != nil { - t.Fatalf("Builder returned unexpected error %v", buildErr) - } - - imp1 := openrtb2.Imp{ - ID: "imp1", - Ext: json.RawMessage("{\"bidder\":{\"dmxid\": \"1007\", \"memberid\": \"123456\", \"seller_id\":\"1008\"}}"), - Banner: &openrtb2.Banner{ - W: &width, - H: &height, - Format: []openrtb2.Format{ - {W: 300, H: 250}, - }, - }} - - inputRequest := openrtb2.BidRequest{ - Imp: []openrtb2.Imp{imp1, imp1, imp1}, - Site: &openrtb2.Site{ - Publisher: &openrtb2.Publisher{ - ID: "10007", - }, - }, - User: &openrtb2.User{Ext: json.RawMessage(`{ - "digitrust": { - "id": "11111111111", - "keyv": 4 - }}`)}, - ID: "1234", - } - - actualAdapterRequests, _ := bidder.MakeRequests(&inputRequest, &adapters.ExtraRequestInfo{}) - if len(actualAdapterRequests) != 1 { - t.Errorf("should have 1 request") - } -} - func TestUsersEids(t *testing.T) { var w, h int = 300, 250 @@ -725,53 +681,56 @@ func TestUsersEids(t *testing.T) { "rtiPartner": "TDID" } }] - },{ + }, + { "source": "pubcid.org", "uids": [{ - "id":"11111111" + "id": "11111111" }] }, - { + { "source": "id5-sync.com", "uids": [{ "id": "ID5-12345" }] - }, - { + }, + { "source": "parrable.com", "uids": [{ "id": "01.1563917337.test-eid" }] - },{ + }, + { "source": "identityLink", "uids": [{ "id": "11111111" }] - },{ + }, + { "source": "criteo", "uids": [{ "id": "11111111" }] - },{ + }, + { "source": "britepool.com", "uids": [{ "id": "11111111" }] - },{ + }, + { "source": "liveintent.com", "uids": [{ "id": "11111111" }] - },{ + }, + { "source": "netid.de", "uids": [{ "id": "11111111" }] - }], - "digitrust": { - "id": "11111111111", - "keyv": 4 - }}`)}, + }] + }`)}, ID: "1234", } diff --git a/adapters/rubicon/rubicon.go b/adapters/rubicon/rubicon.go index 73f6a5d39ca..84d8596449c 100644 --- a/adapters/rubicon/rubicon.go +++ b/adapters/rubicon/rubicon.go @@ -96,12 +96,11 @@ type rubiconUserDataExt struct { } type rubiconUserExt struct { - Consent string `json:"consent,omitempty"` - DigiTrust *openrtb_ext.ExtUserDigiTrust `json:"digitrust"` - Eids []openrtb_ext.ExtUserEid `json:"eids,omitempty"` - TpID []rubiconExtUserTpID `json:"tpid,omitempty"` - RP rubiconUserExtRP `json:"rp"` - LiverampIdl string `json:"liveramp_idl,omitempty"` + Consent string `json:"consent,omitempty"` + Eids []openrtb_ext.ExtUserEid `json:"eids,omitempty"` + TpID []rubiconExtUserTpID `json:"tpid,omitempty"` + RP rubiconUserExtRP `json:"rp"` + LiverampIdl string `json:"liveramp_idl,omitempty"` } type rubiconSiteExtRP struct { @@ -772,9 +771,6 @@ func (a *RubiconAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ada continue } userExtRP.Consent = userExt.Consent - if userExt.DigiTrust != nil { - userExtRP.DigiTrust = userExt.DigiTrust - } userExtRP.Eids = userExt.Eids // set user.ext.tpid diff --git a/adapters/rubicon/rubicon_test.go b/adapters/rubicon/rubicon_test.go index 8f8d3fb1557..3674c872d73 100644 --- a/adapters/rubicon/rubicon_test.go +++ b/adapters/rubicon/rubicon_test.go @@ -1039,11 +1039,7 @@ func TestOpenRTBRequest(t *testing.T) { PxRatio: rubidata.devicePxRatio, }, User: &openrtb2.User{ - Ext: json.RawMessage(`{"digitrust": { - "id": "some-digitrust-id", - "keyv": 1, - "pref": 0 - }, + Ext: json.RawMessage(`{ "eids": [{ "source": "pubcid", "id": "2402fc76-7b39-4f0e-bfc2-060ef7693648" @@ -1117,10 +1113,6 @@ func TestOpenRTBRequest(t *testing.T) { t.Fatal("Error unmarshalling request.user.ext object.") } - assert.Equal(t, "some-digitrust-id", userExt.DigiTrust.ID, "DigiTrust ID id not as expected!") - assert.Equal(t, 1, userExt.DigiTrust.KeyV, "DigiTrust KeyV id not as expected!") - assert.Equal(t, 0, userExt.DigiTrust.Pref, "DigiTrust Pref id not as expected!") - assert.NotNil(t, userExt.Eids) assert.Equal(t, 1, len(userExt.Eids), "Eids values are not as expected!") assert.Contains(t, userExt.Eids, openrtb_ext.ExtUserEid{Source: "pubcid", ID: "2402fc76-7b39-4f0e-bfc2-060ef7693648"}) diff --git a/adapters/rubicon/rubicontest/exemplary/simple-video.json b/adapters/rubicon/rubicontest/exemplary/simple-video.json index a90670e53be..408cbb7979d 100644 --- a/adapters/rubicon/rubicontest/exemplary/simple-video.json +++ b/adapters/rubicon/rubicontest/exemplary/simple-video.json @@ -146,7 +146,6 @@ } ], "ext": { - "digitrust": null, "rp": { "target": { "iab": [ diff --git a/endpoints/openrtb2/amp_auction_test.go b/endpoints/openrtb2/amp_auction_test.go index 7322861efd5..a0e78a4a8eb 100644 --- a/endpoints/openrtb2/amp_auction_test.go +++ b/endpoints/openrtb2/amp_auction_test.go @@ -32,7 +32,6 @@ func TestGoodAmpRequests(t *testing.T) { goodRequests := map[string]json.RawMessage{ "1": json.RawMessage(validRequest(t, "aliased-buyeruids.json")), "2": json.RawMessage(validRequest(t, "aliases.json")), - "4": json.RawMessage(validRequest(t, "digitrust.json")), "5": json.RawMessage(validRequest(t, "gdpr-no-consentstring.json")), "6": json.RawMessage(validRequest(t, "gdpr.json")), "7": json.RawMessage(validRequest(t, "site.json")), @@ -122,11 +121,6 @@ func TestAMPPageInfo(t *testing.T) { func TestGDPRConsent(t *testing.T) { consent := "BOu5On0Ou5On0ADACHENAO7pqzAAppY" existingConsent := "BONV8oqONXwgmADACHENAO7pqzAAppY" - digitrust := &openrtb_ext.ExtUserDigiTrust{ - ID: "anyDigitrustID", - KeyV: 1, - Pref: 0, - } testCases := []struct { description string @@ -165,12 +159,10 @@ func TestGDPRConsent(t *testing.T) { description: "Overrides Existing Consent - With Sibling Data", consent: consent, userExt: &openrtb_ext.ExtUser{ - Consent: existingConsent, - DigiTrust: digitrust, + Consent: existingConsent, }, expectedUserExt: openrtb_ext.ExtUser{ - Consent: consent, - DigiTrust: digitrust, + Consent: consent, }, }, { diff --git a/endpoints/openrtb2/auction.go b/endpoints/openrtb2/auction.go index d8a7fa689b9..c9f2bbdb68f 100644 --- a/endpoints/openrtb2/auction.go +++ b/endpoints/openrtb2/auction.go @@ -1124,13 +1124,9 @@ func (deps *endpointDeps) validateUser(user *openrtb2.User, aliases map[string]s } if user.Ext != nil { - // Creating ExtUser object to check if DigiTrust is valid + // Creating ExtUser object var userExt openrtb_ext.ExtUser if err := json.Unmarshal(user.Ext, &userExt); err == nil { - if userExt.DigiTrust != nil && userExt.DigiTrust.Pref != 0 { - // DigiTrust is not valid. Return error. - return errors.New("request.user contains a digitrust object that is not valid.") - } // Check if the buyeruids are valid if userExt.Prebid != nil { if len(userExt.Prebid.BuyerUIDs) < 1 { diff --git a/endpoints/openrtb2/sample-requests/invalid-whole/digitrust.json b/endpoints/openrtb2/sample-requests/invalid-whole/digitrust.json deleted file mode 100644 index 1fb7169fced..00000000000 --- a/endpoints/openrtb2/sample-requests/invalid-whole/digitrust.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "description": "Invalid digitrust object in user extension", - "mockBidRequest": { - "id": "request-with-invalid-digitrust-obj", - "site": { - "page": "test.somepage.com" - }, - "imp": [ - { - "id": "my-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 600 - } - ] - }, - "pmp": { - "deals": [ - { - "id": "some-deal-id" - } - ] - }, - "ext": { - "appnexus": { - "placementId": 12883451 - } - } - } - ], - "user": { - "yob": 1989, - "ext": { - "digitrust": { - "id": "sample-digitrust-id", - "keyv": 1, - "pref": 1 - } - } - } - }, - "expectedReturnCode": 400, - "expectedErrorMessage": "Invalid request: request.user contains a digitrust object that is not valid.\n" -} diff --git a/endpoints/openrtb2/sample-requests/valid-whole/supplementary/digitrust.json b/endpoints/openrtb2/sample-requests/valid-whole/supplementary/digitrust.json deleted file mode 100644 index 5cd070745ab..00000000000 --- a/endpoints/openrtb2/sample-requests/valid-whole/supplementary/digitrust.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "description": "Well formed amp request with digitrust extension that should run properly", - "mockBidRequest": { - "id": "request-with-valid-digitrust-obj", - "site": { - "page": "test.somepage.com" - }, - "imp": [ - { - "id": "my-imp-id", - "banner": { - "format": [ - { - "w": 300, - "h": 600 - } - ] - }, - "pmp": { - "deals": [ - { - "id": "some-deal-id" - } - ] - }, - "ext": { - "appnexus": { - "placementId": 12883451 - } - } - } - ], - "user": { - "yob": 1989, - "ext": { - "digitrust": { - "id": "sample-digitrust-id", - "keyv": 1, - "pref": 0 - } - } - } - }, - "expectedBidResponse": { - "id":"request-with-valid-digitrust-obj", - "bidid":"test bid id", - "nbr":0 - }, - "expectedReturnCode": 200 -} diff --git a/exchange/exchange_test.go b/exchange/exchange_test.go index c0a1a1c9307..48b77bb2725 100644 --- a/exchange/exchange_test.go +++ b/exchange/exchange_test.go @@ -1361,7 +1361,7 @@ func newRaceCheckingRequest(t *testing.T) *openrtb2.BidRequest { User: &openrtb2.User{ ID: "our-id", BuyerUID: "their-id", - Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw","digitrust":{"id":"digi-id","keyv":1,"pref":1}}`), + Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw"}`), }, Regs: &openrtb2.Regs{ COPPA: 1, @@ -1523,7 +1523,7 @@ func TestPanicRecoveryHighLevel(t *testing.T) { User: &openrtb2.User{ ID: "our-id", BuyerUID: "their-id", - Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw","digitrust":{"id":"digi-id","keyv":1,"pref":1}}`), + Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw"}`), }, Imp: []openrtb2.Imp{{ ID: "some-imp-id", diff --git a/exchange/exchangetest/request-other-user-ext.json b/exchange/exchangetest/request-other-user-ext.json index 9bd4c02fb42..f9fb3264c3c 100644 --- a/exchange/exchangetest/request-other-user-ext.json +++ b/exchange/exchangetest/request-other-user-ext.json @@ -12,11 +12,6 @@ "buyeruids": { "appnexus": "explicit-appnexus" } - }, - "digitrust": { - "id": "digi-id", - "keyv": 1, - "pref": 2 } } }, @@ -48,14 +43,7 @@ }, "user": { "id": "foo", - "buyeruid": "explicit-appnexus", - "ext": { - "digitrust": { - "id": "digi-id", - "keyv": 1, - "pref": 2 - } - } + "buyeruid": "explicit-appnexus" }, "imp": [ { diff --git a/exchange/exchangetest/request-user-no-prebid.json b/exchange/exchangetest/request-user-no-prebid.json index bb36ba8aeeb..aae11606baa 100644 --- a/exchange/exchangetest/request-user-no-prebid.json +++ b/exchange/exchangetest/request-user-no-prebid.json @@ -8,11 +8,6 @@ "user": { "id": "foo", "ext": { - "digitrust": { - "id": "digi-id", - "keyv": 1, - "pref": 2 - } } }, "imp": [ @@ -45,11 +40,6 @@ "id": "foo", "buyeruid": "implicit-appnexus", "ext": { - "digitrust": { - "id": "digi-id", - "keyv": 1, - "pref": 2 - } } }, "imp": [ diff --git a/exchange/utils.go b/exchange/utils.go index 7f69b341704..405d06a516a 100644 --- a/exchange/utils.go +++ b/exchange/utils.go @@ -378,7 +378,7 @@ func extractBuyerUIDs(user *openrtb2.User) (map[string]string, error) { userExt.Prebid = nil // Remarshal (instead of removing) if the ext has other known fields - if userExt.Consent != "" || userExt.DigiTrust != nil || len(userExt.Eids) > 0 { + if userExt.Consent != "" || len(userExt.Eids) > 0 { if newUserExtBytes, err := json.Marshal(userExt); err != nil { return nil, err } else { diff --git a/exchange/utils_test.go b/exchange/utils_test.go index 5a281f9a360..5a9fa187f62 100644 --- a/exchange/utils_test.go +++ b/exchange/utils_test.go @@ -1788,7 +1788,7 @@ func newAdapterAliasBidRequest(t *testing.T) *openrtb2.BidRequest { User: &openrtb2.User{ ID: "our-id", BuyerUID: "their-id", - Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw","digitrust":{"id":"digi-id","keyv":1,"pref":1}}`), + Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw"}`), }, Regs: &openrtb2.Regs{ Ext: json.RawMessage(`{"gdpr":1}`), @@ -1833,7 +1833,7 @@ func newBidRequest(t *testing.T) *openrtb2.BidRequest { ID: "our-id", BuyerUID: "their-id", Yob: 1982, - Ext: json.RawMessage(`{"digitrust":{"id":"digi-id","keyv":1,"pref":1}}`), + Ext: json.RawMessage(`{}`), }, Imp: []openrtb2.Imp{{ ID: "some-imp-id", diff --git a/openrtb_ext/user.go b/openrtb_ext/user.go index b83f82330db..d5e6ae678cc 100644 --- a/openrtb_ext/user.go +++ b/openrtb_ext/user.go @@ -10,11 +10,6 @@ type ExtUser struct { Prebid *ExtUserPrebid `json:"prebid,omitempty"` - // DigiTrust breaks the typical Prebid Server convention of namespacing "global" options inside "ext.prebid.*" - // to match the recommendation from the broader digitrust community. - // For more info, see: https://github.com/digi-trust/dt-cdn/wiki/OpenRTB-extension#openrtb-2x - DigiTrust *ExtUserDigiTrust `json:"digitrust,omitempty"` - Eids []ExtUserEid `json:"eids,omitempty"` } @@ -23,14 +18,6 @@ type ExtUserPrebid struct { BuyerUIDs map[string]string `json:"buyeruids,omitempty"` } -// ExtUserDigiTrust defines the contract for bidrequest.user.ext.digitrust -// More info on DigiTrust can be found here: https://github.com/digi-trust/dt-cdn/wiki/Integration-Guide -type ExtUserDigiTrust struct { - ID string `json:"id"` // Unique device identifier - KeyV int `json:"keyv"` // Key version used to encrypt ID - Pref int `json:"pref"` // User optout preference -} - // ExtUserEid defines the contract for bidrequest.user.ext.eids // Responsible for the Universal User ID support: establishing pseudonymous IDs for users. // See https://github.com/prebid/Prebid.js/issues/3900 for details. diff --git a/privacy/scrubber.go b/privacy/scrubber.go index edaa5bb07c6..e07ebd0581b 100644 --- a/privacy/scrubber.go +++ b/privacy/scrubber.go @@ -225,11 +225,8 @@ func scrubUserExtIDs(userExt json.RawMessage) json.RawMessage { } _, hasEids := userExtParsed["eids"] - _, hasDigitrust := userExtParsed["digitrust"] - if hasEids || hasDigitrust { + if hasEids { delete(userExtParsed, "eids") - delete(userExtParsed, "digitrust") - result, err := json.Marshal(userExtParsed) if err == nil { return result diff --git a/privacy/scrubber_test.go b/privacy/scrubber_test.go index 9207315f593..1198d0bbc9c 100644 --- a/privacy/scrubber_test.go +++ b/privacy/scrubber_test.go @@ -202,7 +202,7 @@ func TestScrubUser(t *testing.T) { BuyerUID: "anyBuyerUID", Yob: 42, Gender: "anyGender", - Ext: json.RawMessage(`{"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), + Ext: json.RawMessage(`{}`), Geo: &openrtb2.Geo{ Lat: 123.456, Lon: 678.89, @@ -327,7 +327,7 @@ func TestScrubUser(t *testing.T) { BuyerUID: "anyBuyerUID", Yob: 42, Gender: "anyGender", - Ext: json.RawMessage(`{"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), + Ext: json.RawMessage(`{}`), Geo: &openrtb2.Geo{}, }, scrubUser: ScrubStrategyUserNone, @@ -340,7 +340,7 @@ func TestScrubUser(t *testing.T) { BuyerUID: "anyBuyerUID", Yob: 42, Gender: "anyGender", - Ext: json.RawMessage(`{"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), + Ext: json.RawMessage(`{}`), Geo: &openrtb2.Geo{ Lat: 123.46, Lon: 678.89, @@ -359,7 +359,7 @@ func TestScrubUser(t *testing.T) { BuyerUID: "anyBuyerUID", Yob: 42, Gender: "anyGender", - Ext: json.RawMessage(`{"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), + Ext: json.RawMessage(`{}`), Geo: &openrtb2.Geo{ Lat: 123.456, Lon: 678.89, @@ -586,18 +586,18 @@ func TestScrubUserExtIDs(t *testing.T) { expected: json.RawMessage(`{"anyExisting":42}}`), }, { - description: "Remove eids + digitrust", - userExt: json.RawMessage(`{"eids":[{"source":"anySource","id":"anyId","uids":[{"id":"anyId","ext":{"id":42}}],"ext":{"id":42}}],"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), + description: "Remove eids", + userExt: json.RawMessage(`{"eids":[{"source":"anySource","id":"anyId","uids":[{"id":"anyId","ext":{"id":42}}],"ext":{"id":42}}]}`), expected: json.RawMessage(`{}`), }, { - description: "Remove eids + digitrust - With Other Data", - userExt: json.RawMessage(`{"anyExisting":42,"eids":[{"source":"anySource","id":"anyId","uids":[{"id":"anyId","ext":{"id":42}}],"ext":{"id":42}}],"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), + description: "Remove eids - With Other Data", + userExt: json.RawMessage(`{"anyExisting":42,"eids":[{"source":"anySource","id":"anyId","uids":[{"id":"anyId","ext":{"id":42}}],"ext":{"id":42}}]}`), expected: json.RawMessage(`{"anyExisting":42}`), }, { - description: "Remove eids + digitrust - With Other Nested Data", - userExt: json.RawMessage(`{"anyExisting":{"existing":42},"eids":[{"source":"anySource","id":"anyId","uids":[{"id":"anyId","ext":{"id":42}}],"ext":{"id":42}}],"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), + description: "Remove eids - With Other Nested Data", + userExt: json.RawMessage(`{"anyExisting":{"existing":42},"eids":[{"source":"anySource","id":"anyId","uids":[{"id":"anyId","ext":{"id":42}}],"ext":{"id":42}}]}`), expected: json.RawMessage(`{"anyExisting":{"existing":42}}`), }, { @@ -620,21 +620,6 @@ func TestScrubUserExtIDs(t *testing.T) { userExt: json.RawMessage(`{"anyExisting":{"existing":42},"eids":[{"source":"anySource","id":"anyId","uids":[{"id":"anyId","ext":{"id":42}}],"ext":{"id":42}}]}`), expected: json.RawMessage(`{"anyExisting":{"existing":42}}`), }, - { - description: "Remove digitrust Only", - userExt: json.RawMessage(`{"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), - expected: json.RawMessage(`{}`), - }, - { - description: "Remove digitrust Only - With Other Data", - userExt: json.RawMessage(`{"anyExisting":42,"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), - expected: json.RawMessage(`{"anyExisting":42}`), - }, - { - description: "Remove digitrust Only - With Other Nested Data", - userExt: json.RawMessage(`{"anyExisting":{"existing":42},"digitrust":{"id":"anyId","keyv":4,"pref":8}}`), - expected: json.RawMessage(`{"anyExisting":{"existing":42}}`), - }, } for _, test := range testCases {