Repository navigation
Conversation
15 of 23 tasks
dhruv8sh
marked this pull request as ready for review
November 18, 2026 10:27
This was
linked to
issues
Nov 18, 2026
5 tasks
…ations When Prebid stores SharedID in a cookie, a consented navigation sets that cookie from the record if the request has none or a different value, and keeps Prebid's <name>_cst consent-hash companion consistent. Unchanged cookies get no Set-Cookie. A denied EC consent or _pubcid_optout expires both cookies, and with TCF Purpose 4 denied the browser's cookie is left alone. Creation is always on with cookie storage: a consented navigation from a reader with no SharedID and no _pubcid_optout gets a random UUID inside the navigation's single page-load write, so it adds no KV write. The sharedid identity provider generates by default with cookie storage (an explicit generate setting is honoured, and it is forced off when Prebid keeps SharedID in local storage only); without that provider the UUID joins browser ingest under the pubcid.org partner. A stored SharedID wins over a different cookie value on both paths: providers can opt into keeps_stored_uids, and the sharedid provider does. Write-back runs after the page-load write, never writes the record, and reads it once when the request has not. Closes #1593 Signed-off-by: dhruv8sh <dhruv8sh@proton.me>
dhruv8sh
force-pushed
the
feat/sharedid-write-back
branch
from
November 18, 2026 16:09
4102c32 to
593cb67
Compare
15 of 20 tasks
dhruv8sh
changed the base branch from
feat/identity-app-in-core
to
feat/sharedid-cleanup
November 18, 2026 16:09
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<name>_cstconsent-hash companion consistent, so Prebid does not rewrite the cookie from script, which Safari caps. A_pubcid_optoutcookie or denied EC consent expires both cookies. Denied EID consent (Purpose 4) leaves the browser's cookies alone (SID-2, SID-6)._pubcid_optoutgets a UUID v4, stored in the navigation's single page-load write, so it adds no KV write. Thesharedididentity provider creates it when configured (generatenow defaults to on with cookie storage); otherwise it joins browser ingest under thepubcid.orgpartner. Withhtml5storage only, nothing is created or set.keeps_stored_uids, and thesharedidprovider does, so its cookie no longer replaces a live stored UID.Stacks on #1584's PR (
feat/sharedid-cleanup), which stacks on #1489; review only the commit above it. The SharedID cookie name, opt-out read and canonicalpubcid.orgEID come from that PR.Choices made for this PR
<name>_cstassumes TCF, GPP and USP: the hash is computed the way Prebid computes it with all three consent modules present.Max-Age365 days). It is not taken from Prebid's configuredexpires.generate = falseon thesharedidprovider is honoured.Changes
crates/trusted-server-core/src/ec/sharedid.rs_cstconsent hash, creation of a SharedID for browser ingestcrates/trusted-server-core/src/ec/finalize.rscrates/trusted-server-core/src/ec/provider.rs,ec/coordinator/mod.rskeeps_stored_uidsprovider hook: a live stored UID wins over a cookie UIDcrates/trusted-server-identity-providers/src/lib.rs,src/sharedid.rsgeneratedefaults on with cookie storage and is forced off for local storage; stored ID winscrates/trusted-server-adapter-fastly/src/app.rs<name>_cstcookiedocs/guide/edge-cookies.md,docs/guide/configuration.mdsharedidprovider defaultCloses
Closes #1593
Acceptance criteria, verified on Fastly and in core tests:
Secure; SameSite=Lax, one year._pubcid_optoutgets none.storage.type = html5, the server neither creates nor sets a SharedID.<name>_cstgives noSet-Cookie.<name>_cstre-sets only the companion._pubcid_optout, expires both.Set-Cookieand leaves the browser's cookie alone.extendwith apixelUrlkeeps working alongside it. TheGETthat answerspixelUrlis T19.sharedidprovider.Spec
Spec: server-side identity on every adapter (WB-3, SID-2, SID-5, SID-6, DEC-7); plan task T13.
Test plan
cargo test-fastly && cargo test-fastly-reuse && cargo test-axum && cargo test-cloudflare && cargo test-spincargo clippy-fastly && cargo clippy-axum && cargo clippy-cloudflare && cargo clippy-cloudflare-wasm && cargo clippy-spin-native && cargo clippy-spin-wasm && cargo clippy-cli && cargo clippy-codegencargo fmt --all -- --checkcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute serve--test parity,scripts/lint-wasm-clock.sh,ts dev lint domains --changed-vs feat/s2s-eid-collection-providersChecklist
unwrap()in production code — useexpect("should ...")logmacros (notprintln!)