Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSA initialization #3424

Closed
bretg opened this issue Jan 23, 2024 · 10 comments
Closed

DSA initialization #3424

bretg opened this issue Jan 23, 2024 · 10 comments

Comments

@bretg
Copy link
Contributor

bretg commented Jan 23, 2024

Publishers are generally responsible for creating the DSA object in the Prebid.js, but in some use cases, they can't, including App and AMP. And some Publishers might find it difficult to update their Prebid.js configuration across a broad network of sites in a short period.

Prebid Server host companies can help resolve this with stored request updates, but making a broad update across potentially thousands of DB entries in a short period might be difficult or undesirable.

So we propose a couple of new DSA account config flags:

privacy.dsa.default: >
    {
                    "required": 1,
                    "pubrender": 1,
                    "datatopub": 1,
                    "transparency": [{
                        "domain": "example.com",
                        "params":[1]
                    }]
   }
privacy.dsa.gdpr_only: true
  1. If regs.ext.dsa exists and is not null, use it. We're done.
  2. else, if privacy.dsa.default exists and is not null:
    1. If privacy.dsa.gdpr_only is false (defaults to false) copy the default value into regs.ext.dsa. Done.
    2. If privacy.dsa.gdpr_only is true (defaults to false) check the internal_gdpr flag, and if true, copy the default value into regs.ext.dsa. Done.

Note that the internal_gdpr flag is defined in the first flow chart of https://docs.google.com/document/d/1g0zAYc_EfqyilKD8N2qQ47uz0hdahY-t8vfb-vxZL5w/edit#heading=h.yjh8s4sv17vv . In short, it's true (1) when GDPR is enabled for the account and any of these are true:

  • regs.ext.gdpr:1
  • regs.gdpr:1
  • configured to treat existence of TCF consent string as in-scope and consent string is present (PBS-Java only)
  • device.geo.country is in EEA list
@bretg bretg changed the title DSA initialization in core DSA initialization Jan 23, 2024
@bretg bretg moved this from Triage to Needs Requirements in Prebid Server Prioritization Jan 23, 2024
@bretg bretg moved this from Needs Requirements to Triage in Prebid Server Prioritization Jan 23, 2024
@SyntaxNode
Copy link
Contributor

SyntaxNode commented Jan 23, 2024

Edge Case

To keep this logic simple, an empty dsa object counts as "exists". In the following case privacy.dsa.default would not be used.

"regs": {
  "ext": {
    "dsa": {}
  }
}

@bretg
Copy link
Contributor Author

bretg commented Jan 23, 2024

does an empty dsa object count as "exists"?

Whatever's easier/more consistent with similar edge cases. I don't have a lot of sympathy for a request that comes in with an empty DSA object.

I think exists is ok, but if you prefer exists and not null, can go with that.

@SyntaxNode
Copy link
Contributor

It's easier to define "exists" as "not null", such that an empty object {} would be considered as "exists". This keeps the origin check simple.

@Net-burst
Copy link

Gentlemen, IAB updated the spec and changed the names of 2 fields:

regs.ext.dsa.required --> regs.ext.dsa.dsarequired
regs.ext.dsa.transparency[].params --> regs.ext.dsa.transparency[].dsaparams

@Net-burst
Copy link

Net-burst commented Feb 21, 2024

Support for this was released as part of https://github.com/prebid/prebid-server-java/releases/tag/2.10.0
The only deviation from this spec in PBS-Java is the use of the kebab-case instead of the snake_case: privacy.dsa.gdpr_only -> privacy.dsa.gdpr-only. This was done to be in line with all other account config options in PBS Java.

@bsardo
Copy link
Collaborator

bsardo commented Feb 23, 2024

I assume copying the default into the bid should happen before validation which means a bid with the defaults could still be discarded if DSA validation fails.

@bretg
Copy link
Contributor Author

bretg commented Feb 23, 2024

I assume copying the default into the bid should happen before validation which means a bid with the defaults could still be discarded if DSA validation fails.

correct

@bsardo
Copy link
Collaborator

bsardo commented Feb 25, 2024

@bretg If a host specifies a default DSA object and it is missing one of the integer fields (dsarequired, pubrender, datatopub), should we set these to some default value or should we omit them from the the DSA object injected into the bid requests? This impacts the validation logic that compares what is set in the request with what is set in a bid response (i.e. pubrender vs adrender, dsarequired vs whether the object is present).

If we set them to defaults, the validation logic is ok as is. If we omit, what is the validation behavior? If dsarequired or pubrender are not specified, do we skip any validation rules involving that omitted field? There's also the possibility we could always discard the bid.

This is also relevant to a DSA specified on the incoming request. We previously said we don't care about the contents, we will just pass it through, but given that we have expanded the validation rules beyond just dsarequired, we need to consider either defaults or a change to the validation logic.

@bretg
Copy link
Contributor Author

bretg commented Feb 25, 2024

should we set these to some default value or should we omit them from the the DSA object

omit. No one really knows how this is going to work in the real world, so no defaults are feasible for now.

If we omit, what is the validation behavior? If dsarequired or pubrender are not specified, do we skip any validation rules involving that omitted field?

Easy - if the field that triggers the validation isn't specified, skip the validation. This is perfectly reasonable and under control of the publisher. Will update the other issue.

@bretg
Copy link
Contributor Author

bretg commented Feb 25, 2024

FWIW, the initial issue said "If the request didn't contain regs.ext.dsa.dsarequired doesn't exist, then no response validation is done.

Updated #3438

@bretg bretg closed this as completed Jul 1, 2024
@github-project-automation github-project-automation bot moved this from Ready for Dev to Done in Prebid Server Prioritization Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants