Repository: prebid/prebid-server
Pull request #2365 (2022-08-31 15:27:13)

Update yaml files for gzip supported bidders
Now that GZIP Compression support has been added/merged https://github.com/prebid/prebid-server/pull/2347, this PR merely updates the yaml files of the bidders who support GZIP compression (supported bidders taken from who supports it from PBS Java)


Patch:
diff --git a/adapters/adnuntius/adnuntius.go b/adapters/adnuntius/adnuntius.go
index 19c52166..57b6590b 100644
--- a/adapters/adnuntius/adnuntius.go
+++ b/adapters/adnuntius/adnuntius.go
@@ -95,7 +95,7 @@ func setHeaders(ortbRequest openrtb2.BidRequest) http.Header {
 	return headers
 }
 
-func makeEndpointUrl(ortbRequest openrtb2.BidRequest, a *adapter) (string, []error) {
+func makeEndpointUrl(ortbRequest openrtb2.BidRequest, a *adapter, noCookies bool) (string, []error) {
 	uri, err := url.Parse(a.endpoint)
 	if err != nil {
 		return "", []error{fmt.Errorf("failed to parse Adnuntius endpoint: %v", err)}
@@ -106,11 +106,18 @@ func makeEndpointUrl(ortbRequest openrtb2.BidRequest, a *adapter) (string, []err
 		return "", []error{fmt.Errorf("failed to parse Adnuntius endpoint: %v", err)}
 	}
 
-	var deviceExt extDeviceAdnuntius
-	if ortbRequest.Device != nil && ortbRequest.Device.Ext != nil {
-		if err := json.Unmarshal(ortbRequest.Device.Ext, &deviceExt); err != nil {
-			return "", []error{fmt.Errorf("failed to parse Adnuntius endpoint: %v", err)}
+	if !noCookies {
+		var deviceExt extDeviceAdnuntius
+		if ortbRequest.Device != nil && ortbRequest.Device.Ext != nil {
+			if err := json.Unmarshal(ortbRequest.Device.Ext, &deviceExt); err != nil {
+				return "", []error{fmt.Errorf("failed to parse Adnuntius endpoint: %v", err)}
+			}
+		}
+
+		if deviceExt.NoCookies {
+			noCookies = true
 		}
+
 	}
 
 	_, offset := a.time.Now().Zone()
@@ -122,7 +129,7 @@ func makeEndpointUrl(ortbRequest openrtb2.BidRequest, a *adapter) (string, []err
 		q.Set("consentString", consent)
 	}
 
-	if deviceExt.NoCookies {
+	if noCookies {
 		q.Set("noCookies", "true")
 	}
 
@@ -160,13 +167,7 @@ func (a *adapter) generateRequests(ortbRequest openrtb2.BidRequest) ([]*adapters
 	var requestData []*adapters.RequestData
 	networkAdunitMap := make(map[string][]adnAdunit)
 	headers := setHeaders(ortbRequest)
-
-	endpoint, err := makeEndpointUrl(ortbRequest, a)
-	if err != nil {
-		return nil, []error{&errortypes.BadInput{
-			Message: fmt.Sprintf("failed to parse URL: %s", err),
-		}}
-	}
+	var noCookies bool = false
 
 	for _, imp := range ortbRequest.Imp {
 		if imp.Banner == nil {
@@ -188,6 +189,10 @@ func (a *adapter) generateRequests(ortbRequest openrtb2.BidRequest) ([]*adapters
 			}}
 		}
 
+		if adnuntiusExt.NoCookies == true {
+			noCookies = true
+		}
+
 		network := defaultNetwork
 		if adnuntiusExt.Network != "" {
 			network = adnuntiusExt.Network
@@ -202,6 +207,13 @@ func (a *adapter) generateRequests(ortbRequest openrtb2.BidRequest) ([]*adapters
 			})
 	}
 
+	endpoint, err := makeEndpointUrl(ortbRequest, a, noCookies)
+	if err != nil {
+		return nil, []error{&errortypes.BadInput{
+			Message: fmt.Sprintf("failed to parse URL: %s", err),
+		}}
+	}
+
 	site := defaultSite
 	if ortbRequest.Site != nil && ortbRequest.Site.Page != "" {
 		site = ortbRequest.Site.Page
diff --git a/config/config.go b/config/config.go
index 1c500adc..a6d71ee0 100644
--- a/config/config.go
+++ b/config/config.go
@@ -1085,7 +1085,6 @@ func SetupViper(v *viper.Viper, filename string) {
 	v.SetDefault("adapters.yieldlab.endpoint", "https://ad.yieldlab.net/yp/")
 	v.SetDefault("adapters.yieldmo.endpoint", "https://ads.yieldmo.com/exchange/prebid-server")
 	v.SetDefault("adapters.yieldone.endpoint", "https://y.one.impact-ad.jp/hbs_imp")
-	v.SetDefault("adapters.yssp.disabled", true)
 	v.SetDefault("adapters.zeroclickfraud.endpoint", "http://{{.Host}}/openrtb2?sid={{.SourceId}}")
 
 	v.SetDefault("max_request_size", 1024*256)
diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go
index 978b634c..1d34708d 100755
--- a/exchange/adapter_builders.go
+++ b/exchange/adapter_builders.go
@@ -313,7 +313,6 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder {
 		openrtb_ext.BidderYieldlab:          yieldlab.Builder,
 		openrtb_ext.BidderYieldmo:           yieldmo.Builder,
 		openrtb_ext.BidderYieldone:          yieldone.Builder,
-		openrtb_ext.BidderYSSP:              yahoossp.Builder,
 		openrtb_ext.BidderZeroClickFraud:    zeroclickfraud.Builder,
 	}
 }
diff --git a/exchange/adapter_util.go b/exchange/adapter_util.go
index e95978b6..6ecac1ea 100644
--- a/exchange/adapter_util.go
+++ b/exchange/adapter_util.go
@@ -81,6 +81,7 @@ func GetDisabledBiddersErrorMessages(infos config.BidderInfos) map[string]string
 		"lifestreet":   `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
 		"adagio":       `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
 		"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
+		"yssp":         `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
 	}
 
 	for name, info := range infos {
diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go
index 4ddc21c8..a1795b32 100644
--- a/openrtb_ext/bidders.go
+++ b/openrtb_ext/bidders.go
@@ -238,7 +238,6 @@ const (
 	BidderYieldlab          BidderName = "yieldlab"
 	BidderYieldmo           BidderName = "yieldmo"
 	BidderYieldone          BidderName = "yieldone"
-	BidderYSSP              BidderName = "yssp"
 	BidderZeroClickFraud    BidderName = "zeroclickfraud"
 )
 
@@ -402,7 +401,6 @@ func CoreBidderNames() []BidderName {
 		BidderYieldlab,
 		BidderYieldmo,
 		BidderYieldone,
-		BidderYSSP,
 		BidderZeroClickFraud,
 	}
 }
diff --git a/openrtb_ext/imp_adnuntius.go b/openrtb_ext/imp_adnuntius.go
index bde30f05..b1e41e80 100644
--- a/openrtb_ext/imp_adnuntius.go
+++ b/openrtb_ext/imp_adnuntius.go
@@ -1,6 +1,7 @@
 package openrtb_ext
 
 type ImpExtAdnunitus struct {
-	Auid    string `json:"auId"`
-	Network string `json:"network"`
+	Auid      string `json:"auId"`
+	Network   string `json:"network"`
+	NoCookies bool   `json:noCookies`
 }
diff --git a/static/bidder-info/adkernel.yaml b/static/bidder-info/adkernel.yaml
index 8d9096b2..a267bb67 100644
--- a/static/bidder-info/adkernel.yaml
+++ b/static/bidder-info/adkernel.yaml
@@ -12,4 +12,5 @@ capabilities:
 userSync:
   redirect:
     url: "https://sync.adkernel.com/user-sync?t=image&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r={{.RedirectURL}}"
-    userMacro: "{UID}"
\ No newline at end of file
+    userMacro: "{UID}"
+endpointCompression: "GZIP"
\ No newline at end of file
diff --git a/static/bidder-info/improvedigital.yaml b/static/bidder-info/improvedigital.yaml
index 649246ab..3a33275f 100644
--- a/static/bidder-info/improvedigital.yaml
+++ b/static/bidder-info/improvedigital.yaml
@@ -16,3 +16,4 @@ userSync:
   redirect:
     url: "https://ad.360yield.com/server_match?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r={{.RedirectURL}}"
     userMacro: "{PUB_USER_ID}"
+endpointCompression: "GZIP"
\ No newline at end of file
diff --git a/static/bidder-info/invibes.yaml b/static/bidder-info/invibes.yaml
index 6b7cd6a1..1b87ea09 100644
--- a/static/bidder-info/invibes.yaml
+++ b/static/bidder-info/invibes.yaml
@@ -9,4 +9,5 @@ userSync:
   # invibes supports user syncing, but requires configuration by the host. contact this
   # bidder directly at the email address in this file to ask about enabling user sync.
   supports:
-    - iframe
\ No newline at end of file
+    - iframe
+endpointCompression: "GZIP"
\ No newline at end of file
diff --git a/static/bidder-info/kargo.yaml b/static/bidder-info/kargo.yaml
index 689d9b5d..852c7ef3 100644
--- a/static/bidder-info/kargo.yaml
+++ b/static/bidder-info/kargo.yaml
@@ -12,3 +12,4 @@ userSync:
   redirect:
     url: "https://crb.kargo.com/api/v1/dsync/PrebidServer?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r={{.RedirectURL}}"
     userMacro: "$UID"
+endpointCompression: "GZIP"
\ No newline at end of file
diff --git a/static/bidder-info/mobilefuse.yaml b/static/bidder-info/mobilefuse.yaml
index 18a90a88..1a588898 100644
--- a/static/bidder-info/mobilefuse.yaml
+++ b/static/bidder-info/mobilefuse.yaml
@@ -6,3 +6,4 @@ capabilities:
     mediaTypes:
       - banner
       - video
+endpointCompression: "GZIP"
\ No newline at end of file
diff --git a/static/bidder-info/onetag.yaml b/static/bidder-info/onetag.yaml
index b0aeeafe..1a00a9f3 100644
--- a/static/bidder-info/onetag.yaml
+++ b/static/bidder-info/onetag.yaml
@@ -16,3 +16,4 @@ userSync:
   iframe:
     url: "https://onetag-sys.com/usync/?redir={{.RedirectURL}}"
     userMacro: "${USER_TOKEN}"
+endpointCompression: "GZIP"
\ No newline at end of file
diff --git a/static/bidder-info/triplelift.yaml b/static/bidder-info/triplelift.yaml
index 8a86428d..0347161d 100644
--- a/static/bidder-info/triplelift.yaml
+++ b/static/bidder-info/triplelift.yaml
@@ -19,4 +19,5 @@ userSync:
     userMacro: $UID
   redirect:
     url: "https://eb2.3lift.com/getuid?gdpr={{.GDPR}}&cmp_cs={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redir={{.RedirectURL}}"
-    userMacro: "$UID"
\ No newline at end of file
+    userMacro: "$UID"
+endpointCompression: "GZIP"
\ No newline at end of file
diff --git a/static/bidder-info/yssp.yaml b/static/bidder-info/yssp.yaml
deleted file mode 100644
index a1a20e0c..00000000
--- a/static/bidder-info/yssp.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-maintainer:
-  email: "hb-fe-tech@oath.com"
-gvlVendorID: 25
-capabilities:
-  app:
-    mediaTypes:
-      - banner
-  site:
-    mediaTypes:
-      - banner
-userSync:
-  # yssp supports user syncing, but requires configuration by the host. contact this
-  # bidder directly at the email address in this file to ask about enabling user sync.
-  supports:
-    - redirect
\ No newline at end of file
diff --git a/static/bidder-params/adnuntius.json b/static/bidder-params/adnuntius.json
index a8e65bea..ff975501 100644
--- a/static/bidder-params/adnuntius.json
+++ b/static/bidder-params/adnuntius.json
@@ -12,6 +12,10 @@
         "network": {
             "type": "string",
             "description": "Network if required"
+        },
+        "noCookies": {
+            "type": "boolean",
+            "description": "Disable cookies being set by the ad server."
         }
     },
 
diff --git a/static/bidder-params/yssp.json b/static/bidder-params/yssp.json
deleted file mode 100644
index fdadc747..00000000
--- a/static/bidder-params/yssp.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-	"$schema": "http://json-schema.org/draft-04/schema#",
-	"title": "YSSP Adapter Params",
-	"description": "A schema which validates params accepted by the YSSP adapter",
-	"type": "object",
-	"properties": {
-		"dcn": {
-			"type": "string",
-			"minLength": 1,
-			"description": "Site ID provided by One Mobile"
-		},
-		"pos": {
-			"type": "string",
-			"minLength": 1,
-			"description": "Placement ID"
-		}
-	},
-	"required": ["dcn", "pos"]
-}


Test patch:
diff --git a/adapters/adnuntius/adnuntiustest/supplemental/check-noCookies-parameter.json b/adapters/adnuntius/adnuntiustest/supplemental/check-noCookies-parameter.json
new file mode 100644
index 00000000..b0d74565
--- /dev/null
+++ b/adapters/adnuntius/adnuntiustest/supplemental/check-noCookies-parameter.json
@@ -0,0 +1,104 @@
+{
+	"mockBidRequest": {
+		"id": "test-request-id",
+		"user": {
+			"id": "1kjh3429kjh295jkl"
+		},
+		"imp": [
+			{
+				"id": "test-imp-id",
+				"banner": {
+					"format": [
+						{
+							"w": 300,
+							"h": 250
+						},
+						{
+							"w": 300,
+							"h": 600
+						}
+					]
+				},
+				"ext": {
+					"bidder": {
+						"auId": "123",
+						"noCookies": true
+					}
+				}
+			}
+		]
+	},
+	"httpCalls": [
+		{
+			"expectedRequest": {
+				"uri": "http://whatever.url?format=json&noCookies=true&tzo=0",
+				"body": {
+					"adUnits": [
+						{
+							"auId": "123",
+							"targetId": "123-test-imp-id",
+							"dimensions": [[300,250],[300,600]]
+						}
+					],
+					"metaData": {
+						"usi": "1kjh3429kjh295jkl"
+					},
+					"context": "unknown"
+				}
+			},
+			"mockResponse": {
+				"status": 200,
+				"body": {
+					"adUnits": [
+						{
+							"auId": "0000000000000123",
+							"targetId": "123-test-imp-id",
+							"html": "<ADCODE>",
+							"responseId": "adn-rsp-900646517",
+							"ads": [
+								{
+									"destinationUrls": {
+										"url": "http://www.google.com"
+									},
+									"bid": {
+										"amount": 20.0,
+										"currency": "NOK"
+									},
+									"adId": "adn-id-1559784094",
+									"creativeWidth": "980",
+									"creativeHeight": "240",
+									"creativeId": "jn9hpzvlsf8cpdmm",
+									"lineItemId": "q7y9qm5b0xt9htrv"
+								}
+							]
+						}
+					]
+				}
+			}
+		}
+	],
+	"expectedBidResponses": [
+		{
+			"bids": [
+				{
+					"bid": {
+						"id": "adn-id-1559784094",
+						"impid": "test-imp-id",
+						"price": 20000,
+						"adm": "<ADCODE>",
+						"adid": "adn-id-1559784094",
+						"adomain": [
+							"google.com"
+						],
+						"cid": "q7y9qm5b0xt9htrv",
+						"crid": "jn9hpzvlsf8cpdmm",
+						"w": 980,
+						"h": 240
+					},
+					"type": "banner"
+				}
+			],
+			"currency": "NOK"
+		}
+	]
+}
diff --git a/exchange/adapter_util_test.go b/exchange/adapter_util_test.go
index 59b58f08..5266e67e 100644
--- a/exchange/adapter_util_test.go
+++ b/exchange/adapter_util_test.go
@@ -240,6 +240,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) {
 				"lifestreet":   `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
 				"adagio":       `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
 				"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
+				"yssp":         `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
 			},
 		},
 		{
@@ -249,6 +250,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) {
 				"lifestreet":   `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
 				"adagio":       `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
 				"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
+				"yssp":         `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
 			},
 		},
 		{
@@ -258,6 +260,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) {
 				"lifestreet":   `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
 				"adagio":       `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
 				"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
+				"yssp":         `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
 				"appnexus":     `Bidder "appnexus" has been disabled on this instance of Prebid Server. Please work with the PBS host to enable this bidder again.`,
 			},
 		},
@@ -268,6 +271,7 @@ func TestGetDisabledBiddersErrorMessages(t *testing.T) {
 				"lifestreet":   `Bidder "lifestreet" is no longer available in Prebid Server. Please update your configuration.`,
 				"adagio":       `Bidder "adagio" is no longer available in Prebid Server. Please update your configuration.`,
 				"somoaudience": `Bidder "somoaudience" is no longer available in Prebid Server. Please update your configuration.`,
+				"yssp":         `Bidder "yssp" is no longer available in Prebid Server. If you're looking to use the Yahoo SSP adapter, please rename it to "yahoossp" in your configuration.`,
 				"appnexus":     `Bidder "appnexus" has been disabled on this instance of Prebid Server. Please work with the PBS host to enable this bidder again.`,
 			},
 		},