From 134d9daaf063c0290e6af5754c37ddc034bebcb3 Mon Sep 17 00:00:00 2001 From: Oronno Mamun Date: Wed, 20 Nov 2024 20:44:40 -0500 Subject: [PATCH 1/3] IX: fix ix adapter handling of paapi config --- .../org/prebid/server/bidder/ix/IxBidder.java | 9 ++- .../response/AuctionConfigExtBidResponse.java | 14 ++++ .../ix/model/response/IxExtBidResponse.java | 7 +- .../prebid/server/bidder/ix/IxBidderTest.java | 4 +- .../java/org/prebid/server/it/IxTest.java | 16 ++++ ...ivacy-sandbox-test-auction-ix-request.json | 24 ++++++ ...vacy-sandbox-test-auction-ix-response.json | 74 +++++++++++++++++++ .../privacy-sandbox-test-ix-bid-request.json | 65 ++++++++++++++++ .../privacy-sandbox-test-ix-bid-response.json | 55 ++++++++++++++ 9 files changed, 258 insertions(+), 10 deletions(-) create mode 100644 src/main/java/org/prebid/server/bidder/ix/model/response/AuctionConfigExtBidResponse.java create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-request.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-response.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-request.json create mode 100644 src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-response.json diff --git a/src/main/java/org/prebid/server/bidder/ix/IxBidder.java b/src/main/java/org/prebid/server/bidder/ix/IxBidder.java index 5c7c468af8f..8191a106c94 100644 --- a/src/main/java/org/prebid/server/bidder/ix/IxBidder.java +++ b/src/main/java/org/prebid/server/bidder/ix/IxBidder.java @@ -409,11 +409,12 @@ private static ExtBidPrebidVideo videoInfo(ExtBidPrebidVideo extBidPrebidVideo) private List extractFledge(IxBidResponse bidResponse) { return Optional.ofNullable(bidResponse) .map(IxBidResponse::getExt) - .map(IxExtBidResponse::getFledgeAuctionConfigs) - .orElse(Collections.emptyMap()) - .entrySet() + .map(IxExtBidResponse::getProtectedAudienceAuctionConfigs) + .filter(CollectionUtils::isNotEmpty) + .orElse(Collections.emptyList()) .stream() - .map(e -> FledgeAuctionConfig.builder().impId(e.getKey()).config(e.getValue()).build()) + .map(ixAuctionConfig -> FledgeAuctionConfig.builder().impId(ixAuctionConfig.getBidId()) + .config(ixAuctionConfig.getConfig()).build()) .toList(); } } diff --git a/src/main/java/org/prebid/server/bidder/ix/model/response/AuctionConfigExtBidResponse.java b/src/main/java/org/prebid/server/bidder/ix/model/response/AuctionConfigExtBidResponse.java new file mode 100644 index 00000000000..709fab87429 --- /dev/null +++ b/src/main/java/org/prebid/server/bidder/ix/model/response/AuctionConfigExtBidResponse.java @@ -0,0 +1,14 @@ +package org.prebid.server.bidder.ix.model.response; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.node.ObjectNode; +import lombok.Value; + +@Value(staticConstructor = "of") +public class AuctionConfigExtBidResponse { + + @JsonProperty("bidId") + String bidId; + + ObjectNode config; +} diff --git a/src/main/java/org/prebid/server/bidder/ix/model/response/IxExtBidResponse.java b/src/main/java/org/prebid/server/bidder/ix/model/response/IxExtBidResponse.java index c292317d22c..c586817df2c 100644 --- a/src/main/java/org/prebid/server/bidder/ix/model/response/IxExtBidResponse.java +++ b/src/main/java/org/prebid/server/bidder/ix/model/response/IxExtBidResponse.java @@ -1,15 +1,14 @@ package org.prebid.server.bidder.ix.model.response; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.node.ObjectNode; import lombok.Value; -import java.util.Map; +import java.util.List; @Value(staticConstructor = "of") public class IxExtBidResponse { - @JsonProperty("fledge_auction_configs") - Map fledgeAuctionConfigs; + @JsonProperty("protectedAudienceAuctionConfigs") + List protectedAudienceAuctionConfigs; } diff --git a/src/test/java/org/prebid/server/bidder/ix/IxBidderTest.java b/src/test/java/org/prebid/server/bidder/ix/IxBidderTest.java index 18f020f2bc0..35726f5a205 100644 --- a/src/test/java/org/prebid/server/bidder/ix/IxBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/ix/IxBidderTest.java @@ -27,6 +27,7 @@ import org.mockito.junit.jupiter.MockitoExtension; import org.prebid.server.VertxTest; import org.prebid.server.bidder.ix.model.request.IxDiag; +import org.prebid.server.bidder.ix.model.response.AuctionConfigExtBidResponse; import org.prebid.server.bidder.ix.model.response.IxBidResponse; import org.prebid.server.bidder.ix.model.response.IxExtBidResponse; import org.prebid.server.bidder.ix.model.response.NativeV11Wrapper; @@ -49,7 +50,6 @@ import org.prebid.server.version.PrebidVersionProvider; import java.util.List; -import java.util.Map; import java.util.function.Function; import java.util.function.UnaryOperator; @@ -778,7 +778,7 @@ public void makeBidderResponseShouldReturnFledgeAuctionConfig() throws JsonProce final IxBidResponse bidResponseWithFledge = IxBidResponse.builder() .cur(bidResponse.getCur()) .seatbid(bidResponse.getSeatbid()) - .ext(IxExtBidResponse.of(Map.of(impId, fledgeAuctionConfig))) + .ext(IxExtBidResponse.of(List.of(AuctionConfigExtBidResponse.of(impId, fledgeAuctionConfig)))) .build(); final BidderCall httpCall = givenHttpCall(bidRequest, mapper.writeValueAsString(bidResponseWithFledge)); diff --git a/src/test/java/org/prebid/server/it/IxTest.java b/src/test/java/org/prebid/server/it/IxTest.java index 13e9c7209ba..a2264ff030b 100644 --- a/src/test/java/org/prebid/server/it/IxTest.java +++ b/src/test/java/org/prebid/server/it/IxTest.java @@ -33,4 +33,20 @@ public void openrtb2AuctionShouldRespondWithBidsFromIx() throws IOException, JSO // then assertJsonEquals("openrtb2/ix/test-auction-ix-response.json", response, singletonList("ix")); } + + @Test + public void openrtb2AuctionShouldRespondWithBidsFromIxForPrivacySandboxRequest() throws IOException, JSONException { + // given + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/ix-exchange")) + .withRequestBody(equalToJson(jsonFrom("openrtb2/ix/privacy-sandbox-test-ix-bid-request.json", + prebidVersionProvider))) + .willReturn(aResponse().withBody(jsonFrom("openrtb2/ix/privacy-sandbox-test-ix-bid-response.json")))); + + // when + final Response response = responseFor("openrtb2/ix/privacy-sandbox-test-auction-ix-request.json", + Endpoint.openrtb2_auction); + + // then + assertJsonEquals("openrtb2/ix/privacy-sandbox-test-auction-ix-response.json", response, singletonList("ix")); + } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-request.json new file mode 100644 index 00000000000..1fc85c3cd79 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-request.json @@ -0,0 +1,24 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "banner": { + "w": 300, + "h": 250 + }, + "ext": { + "ae": 1, + "ix": { + "siteId": "10002" + } + } + } + ], + "tmax": 5000, + "regs": { + "ext": { + "gdpr": 0 + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-response.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-response.json new file mode 100644 index 00000000000..5be6fc4788c --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-response.json @@ -0,0 +1,74 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 4.7, + "adm": "adm6", + "crid": "crid6", + "ext": { + "prebid": { + "type": "banner" + }, + "origbidcpm": 4.7 + } + } + ], + "seat": "ix", + "group": 0 + } + ], + "cur": "USD", + "ext": { + "responsetimemillis": { + "ix": "{{ ix.response_time_ms }}" + }, + "prebid": { + "auctiontimestamp": 0, + "fledge": { + "auctionconfigs": [ + { + "impid": "imp_id", + "bidder": "ix", + "adapter": "ix", + "config": { + "seller": "https://test.casalemedia.com", + "decisionLogicUrl": "https://test.casalemedia.com/decision-logic.js", + "trustedScoringSignalsURL": "https://test.casalemedia.com/123", + "interestGroupBuyers": [ + "https://test.com" + ], + "sellerSignals": { + "callbackURL": "https://test.casalemedia.com/callback/1", + "debugURL": "https://test.casalemedia.com/debug/1", + "width": 300, + "height": 250 + }, + "sellerTimeout": 150, + "perBuyerSignals": { + "https://test.com": [ + { + "key": "value" + } + ] + }, + "perBuyerCurrencies": { + "*": "USD" + }, + "sellerCurrency": "USD", + "requestedSize": { + "width": 300, + "height": 250 + }, + "maxTrustedBiddingSignalsURLLength": 1000 + } + } + ] + } + }, + "tmaxrequest": 5000 + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-request.json new file mode 100644 index 00000000000..ef303b14b8e --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-request.json @@ -0,0 +1,65 @@ +{ + "id": "request_id", + "imp": [ + { + "id": "imp_id", + "secure": 1, + "banner": { + "format": [ + { + "h": 250, + "w": 300 + } + ], + "w": 300, + "h": 250 + }, + "ext": { + "ae": 1, + "tid": "${json-unit.any-string}", + "bidder": { + "siteId": "10002" + } + } + } + ], + "source": { + "tid": "${json-unit.any-string}" + }, + "site": { + "domain": "www.example.com", + "page": "http://www.example.com", + "publisher": { + "id": "10002", + "domain": "example.com" + }, + "ext": { + "amp": 0 + } + }, + "device": { + "ua": "userAgent", + "ip": "193.168.244.1" + }, + "at": 1, + "tmax": "${json-unit.any-number}", + "cur": [ + "USD" + ], + "regs": { + "gdpr": 0 + }, + "ext": { + "prebid": { + "server": { + "externalurl": "http://localhost:8080", + "gvlid": 1, + "datacenter": "local", + "endpoint": "/openrtb2/auction" + } + }, + "ixdiag": { + "pbsv": "{{ pbs.java.version }}" + } + } +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-response.json new file mode 100644 index 00000000000..c62e7c626b9 --- /dev/null +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-response.json @@ -0,0 +1,55 @@ +{ + "id": "request_id", + "seatbid": [ + { + "bid": [ + { + "id": "bid_id", + "impid": "imp_id", + "price": 4.7, + "adm": "adm6", + "crid": "crid6" + } + ], + "seat": "seatId6" + } + ], + "ext": { + "protectedAudienceAuctionConfigs": [ + { + "bidId": "imp_id", + "config": { + "seller": "https://test.casalemedia.com", + "decisionLogicUrl": "https://test.casalemedia.com/decision-logic.js", + "trustedScoringSignalsURL": "https://test.casalemedia.com/123", + "interestGroupBuyers": [ + "https://test.com" + ], + "sellerSignals": { + "callbackURL": "https://test.casalemedia.com/callback/1", + "debugURL": "https://test.casalemedia.com/debug/1", + "width": 300, + "height": 250 + }, + "sellerTimeout": 150, + "perBuyerSignals": { + "https://test.com": [ + { + "key": "value" + } + ] + }, + "perBuyerCurrencies": { + "*": "USD" + }, + "sellerCurrency": "USD", + "requestedSize": { + "width": 300, + "height": 250 + }, + "maxTrustedBiddingSignalsURLLength": 1000 + } + } + ] + } +} From bae8fd6e1f9bf55707de9b94cb8ce3655ea0d6b0 Mon Sep 17 00:00:00 2001 From: Oronno Mamun Date: Mon, 25 Nov 2024 10:07:17 -0500 Subject: [PATCH 2/3] IX: used same integration test for privacy sandbox case --- .../java/org/prebid/server/it/IxTest.java | 16 ---- ...ivacy-sandbox-test-auction-ix-request.json | 24 ------ ...vacy-sandbox-test-auction-ix-response.json | 74 ------------------- .../privacy-sandbox-test-ix-bid-request.json | 65 ---------------- .../privacy-sandbox-test-ix-bid-response.json | 55 -------------- .../openrtb2/ix/test-auction-ix-request.json | 1 + .../openrtb2/ix/test-auction-ix-response.json | 42 ++++++++++- .../it/openrtb2/ix/test-ix-bid-request.json | 1 + .../it/openrtb2/ix/test-ix-bid-response.json | 40 +++++++++- 9 files changed, 82 insertions(+), 236 deletions(-) delete mode 100644 src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-request.json delete mode 100644 src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-response.json delete mode 100644 src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-request.json delete mode 100644 src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-response.json diff --git a/src/test/java/org/prebid/server/it/IxTest.java b/src/test/java/org/prebid/server/it/IxTest.java index a2264ff030b..13e9c7209ba 100644 --- a/src/test/java/org/prebid/server/it/IxTest.java +++ b/src/test/java/org/prebid/server/it/IxTest.java @@ -33,20 +33,4 @@ public void openrtb2AuctionShouldRespondWithBidsFromIx() throws IOException, JSO // then assertJsonEquals("openrtb2/ix/test-auction-ix-response.json", response, singletonList("ix")); } - - @Test - public void openrtb2AuctionShouldRespondWithBidsFromIxForPrivacySandboxRequest() throws IOException, JSONException { - // given - WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/ix-exchange")) - .withRequestBody(equalToJson(jsonFrom("openrtb2/ix/privacy-sandbox-test-ix-bid-request.json", - prebidVersionProvider))) - .willReturn(aResponse().withBody(jsonFrom("openrtb2/ix/privacy-sandbox-test-ix-bid-response.json")))); - - // when - final Response response = responseFor("openrtb2/ix/privacy-sandbox-test-auction-ix-request.json", - Endpoint.openrtb2_auction); - - // then - assertJsonEquals("openrtb2/ix/privacy-sandbox-test-auction-ix-response.json", response, singletonList("ix")); - } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-request.json deleted file mode 100644 index 1fc85c3cd79..00000000000 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-request.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "request_id", - "imp": [ - { - "id": "imp_id", - "banner": { - "w": 300, - "h": 250 - }, - "ext": { - "ae": 1, - "ix": { - "siteId": "10002" - } - } - } - ], - "tmax": 5000, - "regs": { - "ext": { - "gdpr": 0 - } - } -} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-response.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-response.json deleted file mode 100644 index 5be6fc4788c..00000000000 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-auction-ix-response.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "id": "request_id", - "seatbid": [ - { - "bid": [ - { - "id": "bid_id", - "impid": "imp_id", - "price": 4.7, - "adm": "adm6", - "crid": "crid6", - "ext": { - "prebid": { - "type": "banner" - }, - "origbidcpm": 4.7 - } - } - ], - "seat": "ix", - "group": 0 - } - ], - "cur": "USD", - "ext": { - "responsetimemillis": { - "ix": "{{ ix.response_time_ms }}" - }, - "prebid": { - "auctiontimestamp": 0, - "fledge": { - "auctionconfigs": [ - { - "impid": "imp_id", - "bidder": "ix", - "adapter": "ix", - "config": { - "seller": "https://test.casalemedia.com", - "decisionLogicUrl": "https://test.casalemedia.com/decision-logic.js", - "trustedScoringSignalsURL": "https://test.casalemedia.com/123", - "interestGroupBuyers": [ - "https://test.com" - ], - "sellerSignals": { - "callbackURL": "https://test.casalemedia.com/callback/1", - "debugURL": "https://test.casalemedia.com/debug/1", - "width": 300, - "height": 250 - }, - "sellerTimeout": 150, - "perBuyerSignals": { - "https://test.com": [ - { - "key": "value" - } - ] - }, - "perBuyerCurrencies": { - "*": "USD" - }, - "sellerCurrency": "USD", - "requestedSize": { - "width": 300, - "height": 250 - }, - "maxTrustedBiddingSignalsURLLength": 1000 - } - } - ] - } - }, - "tmaxrequest": 5000 - } -} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-request.json deleted file mode 100644 index ef303b14b8e..00000000000 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-request.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "id": "request_id", - "imp": [ - { - "id": "imp_id", - "secure": 1, - "banner": { - "format": [ - { - "h": 250, - "w": 300 - } - ], - "w": 300, - "h": 250 - }, - "ext": { - "ae": 1, - "tid": "${json-unit.any-string}", - "bidder": { - "siteId": "10002" - } - } - } - ], - "source": { - "tid": "${json-unit.any-string}" - }, - "site": { - "domain": "www.example.com", - "page": "http://www.example.com", - "publisher": { - "id": "10002", - "domain": "example.com" - }, - "ext": { - "amp": 0 - } - }, - "device": { - "ua": "userAgent", - "ip": "193.168.244.1" - }, - "at": 1, - "tmax": "${json-unit.any-number}", - "cur": [ - "USD" - ], - "regs": { - "gdpr": 0 - }, - "ext": { - "prebid": { - "server": { - "externalurl": "http://localhost:8080", - "gvlid": 1, - "datacenter": "local", - "endpoint": "/openrtb2/auction" - } - }, - "ixdiag": { - "pbsv": "{{ pbs.java.version }}" - } - } -} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-response.json deleted file mode 100644 index c62e7c626b9..00000000000 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/privacy-sandbox-test-ix-bid-response.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "id": "request_id", - "seatbid": [ - { - "bid": [ - { - "id": "bid_id", - "impid": "imp_id", - "price": 4.7, - "adm": "adm6", - "crid": "crid6" - } - ], - "seat": "seatId6" - } - ], - "ext": { - "protectedAudienceAuctionConfigs": [ - { - "bidId": "imp_id", - "config": { - "seller": "https://test.casalemedia.com", - "decisionLogicUrl": "https://test.casalemedia.com/decision-logic.js", - "trustedScoringSignalsURL": "https://test.casalemedia.com/123", - "interestGroupBuyers": [ - "https://test.com" - ], - "sellerSignals": { - "callbackURL": "https://test.casalemedia.com/callback/1", - "debugURL": "https://test.casalemedia.com/debug/1", - "width": 300, - "height": 250 - }, - "sellerTimeout": 150, - "perBuyerSignals": { - "https://test.com": [ - { - "key": "value" - } - ] - }, - "perBuyerCurrencies": { - "*": "USD" - }, - "sellerCurrency": "USD", - "requestedSize": { - "width": 300, - "height": 250 - }, - "maxTrustedBiddingSignalsURLLength": 1000 - } - } - ] - } -} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-request.json index 0c46e680fbc..1fc85c3cd79 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-request.json @@ -8,6 +8,7 @@ "h": 250 }, "ext": { + "ae": 1, "ix": { "siteId": "10002" } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json index 8685c8ede1a..5be6fc4788c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json @@ -27,7 +27,47 @@ "ix": "{{ ix.response_time_ms }}" }, "prebid": { - "auctiontimestamp": 0 + "auctiontimestamp": 0, + "fledge": { + "auctionconfigs": [ + { + "impid": "imp_id", + "bidder": "ix", + "adapter": "ix", + "config": { + "seller": "https://test.casalemedia.com", + "decisionLogicUrl": "https://test.casalemedia.com/decision-logic.js", + "trustedScoringSignalsURL": "https://test.casalemedia.com/123", + "interestGroupBuyers": [ + "https://test.com" + ], + "sellerSignals": { + "callbackURL": "https://test.casalemedia.com/callback/1", + "debugURL": "https://test.casalemedia.com/debug/1", + "width": 300, + "height": 250 + }, + "sellerTimeout": 150, + "perBuyerSignals": { + "https://test.com": [ + { + "key": "value" + } + ] + }, + "perBuyerCurrencies": { + "*": "USD" + }, + "sellerCurrency": "USD", + "requestedSize": { + "width": 300, + "height": 250 + }, + "maxTrustedBiddingSignalsURLLength": 1000 + } + } + ] + } }, "tmaxrequest": 5000 } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request.json index 0658f90c813..ef303b14b8e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request.json @@ -15,6 +15,7 @@ "h": 250 }, "ext": { + "ae": 1, "tid": "${json-unit.any-string}", "bidder": { "siteId": "10002" diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-response.json index 9d9d7035ed7..c62e7c626b9 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-response.json @@ -13,5 +13,43 @@ ], "seat": "seatId6" } - ] + ], + "ext": { + "protectedAudienceAuctionConfigs": [ + { + "bidId": "imp_id", + "config": { + "seller": "https://test.casalemedia.com", + "decisionLogicUrl": "https://test.casalemedia.com/decision-logic.js", + "trustedScoringSignalsURL": "https://test.casalemedia.com/123", + "interestGroupBuyers": [ + "https://test.com" + ], + "sellerSignals": { + "callbackURL": "https://test.casalemedia.com/callback/1", + "debugURL": "https://test.casalemedia.com/debug/1", + "width": 300, + "height": 250 + }, + "sellerTimeout": 150, + "perBuyerSignals": { + "https://test.com": [ + { + "key": "value" + } + ] + }, + "perBuyerCurrencies": { + "*": "USD" + }, + "sellerCurrency": "USD", + "requestedSize": { + "width": 300, + "height": 250 + }, + "maxTrustedBiddingSignalsURLLength": 1000 + } + } + ] + } } From 3b090ce4da67b833220f53d4a416e30fcb459b68 Mon Sep 17 00:00:00 2001 From: Oronno Mamun Date: Wed, 27 Nov 2024 11:54:26 -0500 Subject: [PATCH 3/3] IX: remove redundent filter and add nonNull check --- src/main/java/org/prebid/server/bidder/ix/IxBidder.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/prebid/server/bidder/ix/IxBidder.java b/src/main/java/org/prebid/server/bidder/ix/IxBidder.java index 8191a106c94..5fb26e698fd 100644 --- a/src/main/java/org/prebid/server/bidder/ix/IxBidder.java +++ b/src/main/java/org/prebid/server/bidder/ix/IxBidder.java @@ -410,11 +410,13 @@ private List extractFledge(IxBidResponse bidResponse) { return Optional.ofNullable(bidResponse) .map(IxBidResponse::getExt) .map(IxExtBidResponse::getProtectedAudienceAuctionConfigs) - .filter(CollectionUtils::isNotEmpty) .orElse(Collections.emptyList()) .stream() - .map(ixAuctionConfig -> FledgeAuctionConfig.builder().impId(ixAuctionConfig.getBidId()) - .config(ixAuctionConfig.getConfig()).build()) + .filter(Objects::nonNull) + .map(ixAuctionConfig -> FledgeAuctionConfig.builder() + .impId(ixAuctionConfig.getBidId()) + .config(ixAuctionConfig.getConfig()) + .build()) .toList(); } }