prebid / prebid-server

Open-source solution for running real-time advertising auctions in the cloud.
https://prebid.org/product-suite/prebid-server/
Apache License 2.0
425 stars 720 forks source link

Support for Dchain #3549

Open pm-saurabh-narkhede opened 6 months ago

pm-saurabh-narkhede commented 6 months ago

Type of Issue

Feature Request

Description

Ads.txt, and later SupplyChain and sellers.json, have been extremely successful in allowing DSPs and other buyers to determine the full chain of entities supplying inventory offered in bid requests. Similar transparency is essential for the sell side to provide visibility into buyers so they can: identify and block bad actors, make informed judgments about the provenance of creatives, and enforce limits on reselling and similar behaviors. This implementation should be as transparent as possible to sellers as well as to trusted third parties such as anti-malware scanning providers. It should enable them, including their representatives with only modest levels of technical sophistication, to easily understand who is participating in the delivery of any creative that is served on their inventory. Refer : https://iabtechlab.com/wp-content/uploads/2021/06/DemandChainObject-1.0-June2021.pdf

Sample Dchain Obj

{
  "dchain": {
    "ver": "1.0",
    "complete": 1,
    "nodes": [
      {
        "asi": null,
        "name": "FamousBrand",
        "domain": "famousbrand.example"
      },
      {
        "asi": null,
        "name": "RespectedAdAgency",
        "domain": "respectedadagency.example"
      },
      {
        "asi": "populardsp.example",
        "bsid": "12345"
      }
    ]
  }
}

Dchain Structure

type Dchain struct {
    Ver      string          `json:"ver,omitempty"`
    Complete int             `json:"complete,omitempty"`
    Nodes    []DchainNodes   `json:"nodes,omitempty"`
    Ext      json.RawMessage `json:"ext,omitempty"`
}

type DchainNodes struct {
    Asi    string          `json:"asi,omitempty"`
    Bsid   string          `json:"bsid,omitempty"`
    Rid    string          `json:"rid,omitempty"`
    Name   string          `json:"name,omitempty"`
    Domain string          `json:"domain,omitempty"`
    Ext    json.RawMessage `json:"ext,omitempty"`
}

Support in Prebid-Server

  1. Source of dchain in Bid Response:

    • When multiple adapters submit bids through their respective SSPs/AdServers, the dchain object can be found at bidResponse.seatBid.Bid.ext.dchain (as specified by IAB).
  2. Validation and Node Addition:

    • Adapters have the option to set dchain in their bid.meta.dchain.
    • If an adapter sets dchain in bid.meta.dchain, the Prebid Server will perform validation.
    • Valid bid.meta.dchain entries will have the node asi added as bidderCode for each valid entry.
  3. Handling Invalid or Absent bid.meta.dchain:

    • If bid.meta.dchain is either invalid or not present, Prebid Server will take action.
    • In such cases, Prebid Server has the capability to create a dchain.
    • The created dchain will be marked as incomplete, denoted by setting the complete field to 0 in the node.

This Support already exists in Prebid.js https://github.com/prebid/Prebid.js/blob/c794435db56bead2fb5b60f656f6b6793e76b6b2/modules/dchain.js#L112.

bretg commented 5 months ago

Comments:

  1. It's unclear to me that most Prebid Server host companies care about dchain, since the PBS company most likely isn't paying the publisher.
  2. The PBJS field bid.meta.dchain is not relevant for Prebid Server. Adapters should keep dchain at the iab location seatBid.Bid.ext.dchain
  3. schain validation was removed from Prebid.js, more precisely, moved to a test module. It does not necessary make sense to validate every dchain node in every response.
  4. There could be host and account configuration for whether dchains are validated. This validation could include a sampling rate. (?)
  5. Prebid Server could also be host- and account-configured to insert a node at the bottom of every bidresponse dchain. However, looking at the spec, it's unclear to me this makes sense unless the PBS Host Company is Fields that aren't relevant for PBS: asi, bsid, name. The only field that might be relevant is domain?

If a dchain fails a validation check, do we reject the bid response entirely or just warn? Or make that configurable?

bretg commented 5 months ago

Discussed in committee. @pm-saurabh-narkhede - can you help us understand the Prebid Server use case here? Few PBS host companies are payors as described by the IAB.

pm-saurabh-narkhede commented 3 weeks ago

Hi @bretg , As PubMatic internally discussed about this, for now we are not thinking about supporting it. If we got business interest again on this we will come up with all the info , use case and flow and discuss with you.

bretg commented 3 weeks ago

Thanks for the update @pm-saurabh-narkhede .

Will give other members of the community a couple of weeks to respond with an upvote. If no one expresses interest, we'll close this issue.