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

Client Hint support. #2646

Open
pm-harshad-mane opened this issue Mar 16, 2023 · 7 comments
Open

Client Hint support. #2646

pm-harshad-mane opened this issue Mar 16, 2023 · 7 comments

Comments

@pm-harshad-mane
Copy link

We discussed this issue in PBS PMC meeting on 15th March 2023.
Client Hint support. PBS is passing device.sua through to adapters.
Should we consider:
host company config for responding with Accept-CH.
But his may only be relevant for servers in the first-party domain
forwarding client-hint headers to bidders (Sec-CH-*)
@pm-harshad-mane and @bretg to discuss offline and open an issue as necessary.

@pm-harshad-mane
Copy link
Author

Here are the findings:
Referring to: https://developer.chrome.com/articles/user-agent-client-hints/#hint-scope-and-cross-origin-requests

By default, Client Hints will only be sent on same-origin requests. That means if you ask for specific hints on https://example.com, but the resources you want to optimize are on https://downloads.example.com they will not receive any hints.

To allow hints on cross-origin requests each hint and origin must be specified by a Permissions-Policy header.
To apply this to a User-Agent Client Hint, you need to lowercase the hint and remove the sec- prefix.

The example given on the above-mentioned page has example.com publisher domain and the browser treats downloads.example.com as cross-origin.

PBS hosted on ssp.com will also be treated as third-party by the browser but needs to verify whether the given solution of setting the Permissions-Policy header by the publisher will work for domains not having the same TLD.

CC: @bretg

@bretg
Copy link
Contributor

bretg commented Mar 17, 2023

Thanks @pm-harshad-mane, but perhaps you could help boil this down to the PBS impacts?

What I'm gathering is that PBS returning an Accept-CH header wouldn't do any good because PBS is never the exact same origin.

But does it make sense to forward any Sec-CH-* headers received on the request through to bid adapters?

@bretg bretg moved this from Triage to Needs Requirements in Prebid Server Prioritization Mar 24, 2023
@bretg
Copy link
Contributor

bretg commented May 10, 2023

Discussed in committee. We agreed that forwarding the headers may make technical sense, but that we should discuss with legal whether these things should be forwarded in anonymization scenarios.

@bretg
Copy link
Contributor

bretg commented Jun 27, 2023

Reviewed with Prebid Legal. It was agreed that passing low-entropy client-hint headers through to bid adapters is fine. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hints for a definition of which headers are considered low entropy. Currently the list is: Save-Data, Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform.

@bretg bretg moved this from Needs Requirements to Ready for Dev in Prebid Server Prioritization Jun 27, 2023
@bretg bretg moved this from Ready for Dev to Needs Requirements in Prebid Server Prioritization Sep 27, 2023
@pm-harshad-mane
Copy link
Author

@ShriprasadM can you please look into this ticket?

@ShriprasadM
Copy link
Contributor

ShriprasadM commented Sep 29, 2023

@ShriprasadM can you please look into this ticket?

@pm-harshad-mane : Sure will check with the team.
@pm-harshad-mane and @bretg : Please let me know if my understanding is correct here.

  1. PBS hosting suppose to ensure that Accept-CH response header is set with required client hints as values.
  2. PBS suppose to pass on low-entropy client-hint headers (Save-Data, Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform), though bidder is not setting Accept-CH response header

@bretg
Copy link
Contributor

bretg commented Jan 4, 2024

Done in PBS-Java 2.6.

@ShriprasadM - the only work item is to pass the low-entropy client-hint headers through to bidders. As noted above, "PBS returning an Accept-CH header wouldn't do any good because PBS is never the exact same origin."

@bretg bretg added the PBS-Go label Jan 4, 2024
@bretg bretg moved this from Needs Requirements to Ready for Dev in Prebid Server Prioritization Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready for Dev
Development

No branches or pull requests

3 participants