Skip to content

Commit 8d98f0c

Browse files
AlexBVolcyavolcy
authored andcommitted
Removed Digitrust From Prebid Server (prebid#1892)
Co-authored-by: avolcy <[email protected]>
1 parent 7abe51c commit 8d98f0c

File tree

18 files changed

+46
-266
lines changed

18 files changed

+46
-266
lines changed

adapters/adform/adformtest/supplemental/user-nil.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@
3131
},
3232
"user": {
3333
"ext": {
34-
"consent": "abc2",
35-
"digitrust": {
36-
"ID": "digitrustId",
37-
"KeyV": 1,
38-
"Pref": 0
39-
}
34+
"consent": "abc2"
4035
}
4136
}
4237
},

adapters/dmx/dmx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (adapter *DmxAdapter) MakeRequests(request *openrtb2.BidRequest, req *adapt
148148
}
149149
if dmxReq.User.Ext != nil {
150150
if err := json.Unmarshal(dmxReq.User.Ext, &userExt); err == nil {
151-
if len(userExt.Eids) > 0 || (userExt.DigiTrust != nil && userExt.DigiTrust.ID != "") {
151+
if len(userExt.Eids) > 0 {
152152
anyHasId = true
153153
}
154154
}

adapters/dmx/dmx_test.go

Lines changed: 18 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -643,50 +643,6 @@ func TestUserEidsOnly(t *testing.T) {
643643
}
644644
}
645645

646-
func TestUserDigitrustOnly(t *testing.T) {
647-
var w, h int = 300, 250
648-
649-
var width, height int64 = int64(w), int64(h)
650-
651-
bidder, buildErr := Builder(openrtb_ext.BidderDmx, config.Adapter{
652-
Endpoint: "https://dmx.districtm.io/b/v2"})
653-
654-
if buildErr != nil {
655-
t.Fatalf("Builder returned unexpected error %v", buildErr)
656-
}
657-
658-
imp1 := openrtb2.Imp{
659-
ID: "imp1",
660-
Ext: json.RawMessage("{\"bidder\":{\"dmxid\": \"1007\", \"memberid\": \"123456\", \"seller_id\":\"1008\"}}"),
661-
Banner: &openrtb2.Banner{
662-
W: &width,
663-
H: &height,
664-
Format: []openrtb2.Format{
665-
{W: 300, H: 250},
666-
},
667-
}}
668-
669-
inputRequest := openrtb2.BidRequest{
670-
Imp: []openrtb2.Imp{imp1, imp1, imp1},
671-
Site: &openrtb2.Site{
672-
Publisher: &openrtb2.Publisher{
673-
ID: "10007",
674-
},
675-
},
676-
User: &openrtb2.User{Ext: json.RawMessage(`{
677-
"digitrust": {
678-
"id": "11111111111",
679-
"keyv": 4
680-
}}`)},
681-
ID: "1234",
682-
}
683-
684-
actualAdapterRequests, _ := bidder.MakeRequests(&inputRequest, &adapters.ExtraRequestInfo{})
685-
if len(actualAdapterRequests) != 1 {
686-
t.Errorf("should have 1 request")
687-
}
688-
}
689-
690646
func TestUsersEids(t *testing.T) {
691647
var w, h int = 300, 250
692648

@@ -725,53 +681,56 @@ func TestUsersEids(t *testing.T) {
725681
"rtiPartner": "TDID"
726682
}
727683
}]
728-
},{
684+
},
685+
{
729686
"source": "pubcid.org",
730687
"uids": [{
731-
"id":"11111111"
688+
"id": "11111111"
732689
}]
733690
},
734-
{
691+
{
735692
"source": "id5-sync.com",
736693
"uids": [{
737694
"id": "ID5-12345"
738695
}]
739-
},
740-
{
696+
},
697+
{
741698
"source": "parrable.com",
742699
"uids": [{
743700
"id": "01.1563917337.test-eid"
744701
}]
745-
},{
702+
},
703+
{
746704
"source": "identityLink",
747705
"uids": [{
748706
"id": "11111111"
749707
}]
750-
},{
708+
},
709+
{
751710
"source": "criteo",
752711
"uids": [{
753712
"id": "11111111"
754713
}]
755-
},{
714+
},
715+
{
756716
"source": "britepool.com",
757717
"uids": [{
758718
"id": "11111111"
759719
}]
760-
},{
720+
},
721+
{
761722
"source": "liveintent.com",
762723
"uids": [{
763724
"id": "11111111"
764725
}]
765-
},{
726+
},
727+
{
766728
"source": "netid.de",
767729
"uids": [{
768730
"id": "11111111"
769731
}]
770-
}],
771-
"digitrust": {
772-
"id": "11111111111",
773-
"keyv": 4
774-
}}`)},
732+
}]
733+
}`)},
775734
ID: "1234",
776735
}
777736

adapters/rubicon/rubicon.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,11 @@ type rubiconUserDataExt struct {
9696
}
9797

9898
type rubiconUserExt struct {
99-
Consent string `json:"consent,omitempty"`
100-
DigiTrust *openrtb_ext.ExtUserDigiTrust `json:"digitrust"`
101-
Eids []openrtb_ext.ExtUserEid `json:"eids,omitempty"`
102-
TpID []rubiconExtUserTpID `json:"tpid,omitempty"`
103-
RP rubiconUserExtRP `json:"rp"`
104-
LiverampIdl string `json:"liveramp_idl,omitempty"`
99+
Consent string `json:"consent,omitempty"`
100+
Eids []openrtb_ext.ExtUserEid `json:"eids,omitempty"`
101+
TpID []rubiconExtUserTpID `json:"tpid,omitempty"`
102+
RP rubiconUserExtRP `json:"rp"`
103+
LiverampIdl string `json:"liveramp_idl,omitempty"`
105104
}
106105

107106
type rubiconSiteExtRP struct {
@@ -772,9 +771,6 @@ func (a *RubiconAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *ada
772771
continue
773772
}
774773
userExtRP.Consent = userExt.Consent
775-
if userExt.DigiTrust != nil {
776-
userExtRP.DigiTrust = userExt.DigiTrust
777-
}
778774
userExtRP.Eids = userExt.Eids
779775

780776
// set user.ext.tpid

adapters/rubicon/rubicon_test.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,11 +1039,7 @@ func TestOpenRTBRequest(t *testing.T) {
10391039
PxRatio: rubidata.devicePxRatio,
10401040
},
10411041
User: &openrtb2.User{
1042-
Ext: json.RawMessage(`{"digitrust": {
1043-
"id": "some-digitrust-id",
1044-
"keyv": 1,
1045-
"pref": 0
1046-
},
1042+
Ext: json.RawMessage(`{
10471043
"eids": [{
10481044
"source": "pubcid",
10491045
"id": "2402fc76-7b39-4f0e-bfc2-060ef7693648"
@@ -1117,10 +1113,6 @@ func TestOpenRTBRequest(t *testing.T) {
11171113
t.Fatal("Error unmarshalling request.user.ext object.")
11181114
}
11191115

1120-
assert.Equal(t, "some-digitrust-id", userExt.DigiTrust.ID, "DigiTrust ID id not as expected!")
1121-
assert.Equal(t, 1, userExt.DigiTrust.KeyV, "DigiTrust KeyV id not as expected!")
1122-
assert.Equal(t, 0, userExt.DigiTrust.Pref, "DigiTrust Pref id not as expected!")
1123-
11241116
assert.NotNil(t, userExt.Eids)
11251117
assert.Equal(t, 1, len(userExt.Eids), "Eids values are not as expected!")
11261118
assert.Contains(t, userExt.Eids, openrtb_ext.ExtUserEid{Source: "pubcid", ID: "2402fc76-7b39-4f0e-bfc2-060ef7693648"})

adapters/rubicon/rubicontest/exemplary/simple-video.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@
146146
}
147147
],
148148
"ext": {
149-
"digitrust": null,
150149
"rp": {
151150
"target": {
152151
"iab": [

endpoints/openrtb2/amp_auction_test.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ func TestGoodAmpRequests(t *testing.T) {
3232
goodRequests := map[string]json.RawMessage{
3333
"1": json.RawMessage(validRequest(t, "aliased-buyeruids.json")),
3434
"2": json.RawMessage(validRequest(t, "aliases.json")),
35-
"4": json.RawMessage(validRequest(t, "digitrust.json")),
3635
"5": json.RawMessage(validRequest(t, "gdpr-no-consentstring.json")),
3736
"6": json.RawMessage(validRequest(t, "gdpr.json")),
3837
"7": json.RawMessage(validRequest(t, "site.json")),
@@ -122,11 +121,6 @@ func TestAMPPageInfo(t *testing.T) {
122121
func TestGDPRConsent(t *testing.T) {
123122
consent := "BOu5On0Ou5On0ADACHENAO7pqzAAppY"
124123
existingConsent := "BONV8oqONXwgmADACHENAO7pqzAAppY"
125-
digitrust := &openrtb_ext.ExtUserDigiTrust{
126-
ID: "anyDigitrustID",
127-
KeyV: 1,
128-
Pref: 0,
129-
}
130124

131125
testCases := []struct {
132126
description string
@@ -165,12 +159,10 @@ func TestGDPRConsent(t *testing.T) {
165159
description: "Overrides Existing Consent - With Sibling Data",
166160
consent: consent,
167161
userExt: &openrtb_ext.ExtUser{
168-
Consent: existingConsent,
169-
DigiTrust: digitrust,
162+
Consent: existingConsent,
170163
},
171164
expectedUserExt: openrtb_ext.ExtUser{
172-
Consent: consent,
173-
DigiTrust: digitrust,
165+
Consent: consent,
174166
},
175167
},
176168
{

endpoints/openrtb2/auction.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,13 +1124,9 @@ func (deps *endpointDeps) validateUser(user *openrtb2.User, aliases map[string]s
11241124
}
11251125

11261126
if user.Ext != nil {
1127-
// Creating ExtUser object to check if DigiTrust is valid
1127+
// Creating ExtUser object
11281128
var userExt openrtb_ext.ExtUser
11291129
if err := json.Unmarshal(user.Ext, &userExt); err == nil {
1130-
if userExt.DigiTrust != nil && userExt.DigiTrust.Pref != 0 {
1131-
// DigiTrust is not valid. Return error.
1132-
return errors.New("request.user contains a digitrust object that is not valid.")
1133-
}
11341130
// Check if the buyeruids are valid
11351131
if userExt.Prebid != nil {
11361132
if len(userExt.Prebid.BuyerUIDs) < 1 {

endpoints/openrtb2/sample-requests/invalid-whole/digitrust.json

Lines changed: 0 additions & 46 deletions
This file was deleted.

endpoints/openrtb2/sample-requests/valid-whole/supplementary/digitrust.json

Lines changed: 0 additions & 50 deletions
This file was deleted.

exchange/exchange_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ func newRaceCheckingRequest(t *testing.T) *openrtb2.BidRequest {
17871787
User: &openrtb2.User{
17881788
ID: "our-id",
17891789
BuyerUID: "their-id",
1790-
Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw","digitrust":{"id":"digi-id","keyv":1,"pref":1}}`),
1790+
Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw"}`),
17911791
},
17921792
Regs: &openrtb2.Regs{
17931793
COPPA: 1,
@@ -1949,7 +1949,7 @@ func TestPanicRecoveryHighLevel(t *testing.T) {
19491949
User: &openrtb2.User{
19501950
ID: "our-id",
19511951
BuyerUID: "their-id",
1952-
Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw","digitrust":{"id":"digi-id","keyv":1,"pref":1}}`),
1952+
Ext: json.RawMessage(`{"consent":"BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw"}`),
19531953
},
19541954
Imp: []openrtb2.Imp{{
19551955
ID: "some-imp-id",

exchange/exchangetest/request-other-user-ext.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
"buyeruids": {
1313
"appnexus": "explicit-appnexus"
1414
}
15-
},
16-
"digitrust": {
17-
"id": "digi-id",
18-
"keyv": 1,
19-
"pref": 2
2015
}
2116
}
2217
},
@@ -48,14 +43,7 @@
4843
},
4944
"user": {
5045
"id": "foo",
51-
"buyeruid": "explicit-appnexus",
52-
"ext": {
53-
"digitrust": {
54-
"id": "digi-id",
55-
"keyv": 1,
56-
"pref": 2
57-
}
58-
}
46+
"buyeruid": "explicit-appnexus"
5947
},
6048
"imp": [
6149
{

0 commit comments

Comments
 (0)