Skip to content

Refuse EC creation when a trusted JA4 contradicts the UA - #1661

Open
dhruv8sh wants to merge 23 commits into
feat/1520-configurable-browser-gatefrom
feat/1592-ja4-ua-contradiction
Open

dhruv8sh wants to merge 23 commits into
feat/1520-configurable-browser-gatefrom
feat/1592-ja4-ua-contradiction

Conversation

@dhruv8sh

@dhruv8sh dhruv8sh commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • ID-7: where a trusted JA4 is available, refuse Edge Cookie creation when the JA4's TLS client family contradicts the User-Agent's browser family. A scripted client (Python, Go) sending a Chrome User-Agent no longer gets a record. An unrecognised JA4, no JA4, or a User-Agent that claims no browser never blocks (DEC-18).
  • The family comes from the JA4 cipher-suite hash (JA4_b), which names the TLS stack and survives browser releases. The data is four entries from FoxIO's public JA4+ mapping (Chromium, Firefox, Safari, CPython's default context), each quoting its source row, and it lives in core as the issue asks. Cipher lists that are a TLS library's generic default (OpenSSL-style, Go crypto/tls) are left out, and so is the QUIC hash 55b375c5d22e (the three TLS 1.3 suites every HTTP/3 client offers, so Firefox and Safari over HTTP/3 would read as Chromium), so a scanning or corporate proxy built on them is never refused; Go clients are therefore not detected.
  • A contradiction is its own DeviceSignals.ja4_contradiction field that the browser gates read. known_browser keeps its allowlist analytics meaning, so stored records and auction telemetry are unchanged.
  • JA4 now comes only from EdgeZero's request ingress (ctx.ja4(), already in the pinned EdgeZero revision), per EZI-3. The Fastly adapter's direct SDK JA4 read for identity is deleted. Axum applies the rule when EdgeZero's trusted JA4 proxy header is configured.
  • Stacked on Make the Edge Cookie browser gate configurable #1656 (feat/1520-configurable-browser-gate), whose browser gates this rule feeds.

Changes

File Change
crates/trusted-server-core/src/ec/ja4_family.rs New. TlsFamily classification from JA4_b and the User-Agent family check. Entries for Chromium, Firefox, Safari and Python, each citing FoxIO ja4plus-mapping.csv at 288d3c3d. Unit tests.
crates/trusted-server-core/src/ec/device.rs New ja4_contradiction field; both browser gates refuse on it. known_browser stays the allowlist result.
crates/trusted-server-core/src/ec/app/lifecycle.rs read_request always derives device signals from the User-Agent and ctx.ja4() with the configured exemption; a DeviceSignals extension no longer overrides them. Tests for contradicting, unknown and missing JA4 under lenient and strict, and for each exemption value.
crates/trusted-server-core/src/ec/mod.rs Registers the module; doc comments point to read_request and ingress JA4.
crates/trusted-server-adapter-cloudflare/tests/routes.rs Pins that Cloudflare creates no record whatever cf.botManagement.ja4 says: its record store is not bound yet, so the EC route answers 501 (Cloudflare follows the MVP per #1559).
crates/trusted-server-adapter-fastly/src/{app,main}.rs Removes derive_device_signals and its direct get_tls_ja4() read. Tests put JA4 into the ingress instead of inserting DeviceSignals. A #[cfg(test)] assemble_app_with_middleware lets the conformance runner add one middleware.
crates/trusted-server-core/src/test_support/identity_conformance.rs, crates/trusted-server-adapter-{fastly,axum}/src/identity_conformance.rs The harness takes a JA4 and User-Agent per navigation, with ContradictingJa4, BrowserEngineMismatch, CurrentFirefox and CurrentSafari scenarios (ID-7's acceptance). Both runners deliver JA4 through EdgeZero's request ingress, so the production path runs.
docs/guide/edge-cookies.md, docs/guide/configuration.md, trusted-server.example.toml Describe the rule, its data source, the corporate TLS proxy caveat and ja4_contradiction_exempt.
crates/trusted-server-core/src/settings.rs New [ec].ja4_contradiction_exempt: off (default, every contradiction blocks), non_browser (a non-browser TLS stack behind a browser User-Agent no longer blocks; an engine mismatch still does), all (no contradiction blocks). Skipped from serialization at its default; unknown values fail loading.
crates/trusted-server-core/src/test_support/ja4.rs New. Shared User-Agent and cited JA4 fixtures and helpers that put a captured JA4 into the request ingress.
CHANGELOG.md Unreleased entry, marked Breaking.

Closes

Closes #1592. Plan item T12 is scoped to Fastly, which this PR verifies, and it also covers Axum. ID-7 on the remaining adapters is tracked in #1581 (Axum acceptance) and #1596 (Cloudflare); Spin creates no records yet.

Spec

Spec: server-side identity on every adapter, ID-7, DEC-18 and EZI-3 (plan ID T12).

Test plan

  • cargo test-fastly && cargo test-axum (Fastly 4266 passed; Axum 119 passed, after merging the updated Make the Edge Cookie browser gate configurable #1656)
  • cargo clippy-fastly && cargo clippy-axum
  • cargo fmt --all -- --check
  • JS tests: cd crates/trusted-server-js/lib && npx vitest run (no JS changes)
  • JS format: cd crates/trusted-server-js/lib && npm run format (no JS changes)
  • Docs format: Prettier check on the changed docs and CHANGELOG.md
  • WASM build: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1
  • Manual testing via fastly compute serve
  • Other: cargo test-cloudflare (71 passed), cargo test-spin (90 passed), Cloudflare, Spin native and CLI clippy. Mutation checks: ignoring each exemption value, restoring the DeviceSignals shortcut, not passing the setting, serializing the default, a Fastly middleware that drops the JA4, gates ignoring ja4_contradiction, a contradiction writing known_browser = false, restoring a Go row, and restoring the QUIC row each fail a named test. Checked against the Add server-side identity on every adapter spec and plan #1559 spec at 9ea63979a: compliant, with the spec notes below.

Notes for review

  • Coverage gaps: Go, curl and Java are not caught. Go's rows are crypto/tls defaults shared by any Go program (including proxies), and FoxIO has no curl or Java rows; no fingerprint was invented. The 43-cipher OpenSSL-style Python row is left out for the same reason.
  • Strict JA4 parsing: JA4 now passes EdgeZero's strict parser. A value it rejects counts as no JA4: never a contradiction, allowed under lenient, refused under strict. Documented and tested.
  • Spec notes for Add server-side identity on every adapter spec and plan #1559: ID-7/DEC-18 state the refusal without an opt-out, without dropping generic library rows, and without the iOS any-engine rule; the spec should record ja4_contradiction_exempt and these choices. DEC-18's "never from a platform SDK" is still not true for Fastly's ClientInfo.tls_ja4 (DataDome, Read DataDome's JA4 from EdgeZero ingress and drop ClientInfo.tls_ja4 #1663) and the JA4 debug endpoint (Add JA4/TLS fingerprint debug endpoint #645), neither of which touches identity.
  • Corporate TLS proxies: a proxy that decrypts and re-encrypts traffic presents its own JA4. If that matches a listed non-browser library, its users get no EC by default. A publisher can set ja4_contradiction_exempt = "non_browser", or "all" to also cover engine mismatches such as an iPad in desktop mode. The Add server-side identity on every adapter spec and plan #1559 spec (ID-7, DEC-18) should record this opt-out.
  • Fastly JA4 capture in tests: under Viceroy EdgeZero's own JA4 capture reads an empty SDK value and discards hook-supplied ingress, so the Fastly runner writes the scenario JA4 into the ingress EdgeZero built, through a test-only middleware. Everything after that is the production path.
  • iOS: iOS browsers are checked only against non-browser stacks, not against a specific browser engine, on purpose: whether every iOS browser's TLS comes from Apple's stack is not confirmed.
  • DataDome: it still reads JA4 through ClientInfo.tls_ja4. Moving it to ctx.ja4() is tracked in Read DataDome's JA4 from EdgeZero ingress and drop ClientInfo.tls_ja4 #1663.
  • Not added, by decision: a rule refusing a browser User-Agent whose JA4 shows no ALPN, since no public data directly backs it.

Checklist

  • Feature PRs: spec linked above, ending in a review log of two or more agent review rounds
  • Changes follow AGENTS.md conventions
  • No unwrap() in production code — use expect("should ...")
  • Uses log macros (not println!)
  • New code has tests
  • No secrets or credentials committed

Add the ID-7 family rule in core. The TLS client family comes from the
JA4 cipher-suite hash (JA4_b), matched against public FoxIO JA4+ mapping
entries for Chromium, Firefox, Safari, Python and Go. When it contradicts
the browser family the User-Agent claims, `DeviceSignals` marks the
client a known non-browser, so both browser gates refuse creation and
the record's `known_browser` analytics reads false. An unlisted JA4, no
JA4, or a User-Agent that claims no browser never blocks, and iOS
browsers are checked only against non-browser stacks.

The shared app now reads JA4 only from EdgeZero's request ingress, the
source of `ctx.ja4()`, so the Fastly adapter no longer derives device
signals from the SDK's JA4, and Axum applies the rule when EdgeZero's
trusted JA4 proxy header is configured. The shared conformance suite
gains a contradicting-JA4 scenario that the Fastly and Axum runners
supply.

Refs #1592
A TLS-intercepting proxy replaces a reader's JA4 with its own. When that
JA4 is a listed non-browser stack (Python, Go), the ID-7 rule refuses
every reader behind the proxy. Setting allow_non_browser_tls = true stops
a non-browser stack from contradicting a browser User-Agent; a
browser-engine mismatch is still refused. The key is off by default and
skipped from serialization at its default, so older runtimes still load
a config that leaves it unset.

Refs #1592
A boolean could only exempt non-browser TLS stacks. An operator who needs
the JA4 rule off entirely, for example behind a proxy that re-terminates
TLS with a browser library, had no switch. [ec].ja4_contradiction_exempt
takes off (default, every contradiction blocks), non_browser (a Python or
Go stack behind a browser User-Agent is allowed, an engine mismatch still
blocks) or all. It follows the browser_gate pattern: snake_case values,
unknown values rejected, and skipped from serialization at its default so
older runtimes still load a default blob. The unreleased boolean is gone.

read_request no longer trusts a DeviceSignals request extension: it
derives signals for every request from the User-Agent and the JA4 in
EdgeZero's request ingress, so no caller can bypass the rule. Tests and
both conformance runners now supply JA4 through RequestIngress. Under
Viceroy the Fastly runner cannot reach EdgeZero's own capture, which reads
get_tls_ja4() of a client request and drops hook-supplied ingress, so a
test-only middleware fills the ingress JA4 claim that capture would make.
The conformance suite also checks a browser-engine mismatch and current
Firefox and Safari JA4s on every runner, per ID-7.

JA4 and User-Agent fixtures move into test_support::ja4, stale doc
comments about adapter-derived signals are corrected, and the changelog
marks the refusal as breaking and drops the claim that a refused request
stores known_browser = false.

Refs #1592
Keep only non-browser cipher hashes specific to one client library: the
FoxIO Python row whose 18 suites are CPython's own default-context list.
Drop the 43-suite Python row and every GoLang row, which are TLS library
default lists that proxies built on those libraries also send.

Add DeviceSignals.ja4_contradiction for the ID-7 rule, read by
allows_creation, so known_browser and telemetry's is_known_browser keep
their allowlist meaning and a contradiction is not stored.

Pin that a JA4 EdgeZero's parser rejects as malformed counts as none
(no ja4_class, no contradiction, strict refuses, lenient allows), and that
Cloudflare's EC route answers 501 whatever Bot Management's JA4, because
Cloudflare binds no EC record store yet. Document both.

Refs #1592
…ate' into feat/1592-ja4-ua-contradiction

# Conflicts:
#	docs/guide/configuration.md
#	trusted-server.example.toml
The Axum redirect test now uses the shared Chrome User-Agent fixture,
since #1661's runner has no local USER_AGENT constant.
dhruv8sh added a commit that referenced this pull request Nov 24, 2026
T19 is blocked by T12. Route, auction-ingest and Axum provider tests now
refuse a Python JA4 behind a Chrome User-Agent instead of inserting a
DeviceSignals override, which #1661 no longer honours.
@prk-Jr
prk-Jr added this pull request to stack #1665 November 25, 2026 04:10
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids
from the Prebid config into the auction EIDs, and a99dd66, a62601b,
d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30
days from the UTC day start and pass the request time into finalize. They
arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623,
#1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540,
#1566, #1624, #1641, #1642, #1646, #1626 and #1656, with #1646's move of
the request time into IdentityApp::finalize. It also brings d5276ee,
which publishes the native AWS runtime files without GNU mv -T, and
Christian's merge 5597d3e of #1538 into #1540, through #1566's merge.

The base now also carries the Axum serving line (#1613, #1616, #1617, #1615,
#1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which
decodes the Spin discovery document with Response::json, and #1627's merge
of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI.

It also brings b2d4bfd from #1488, which records the known UID hashes
on lookup results with a setter, so the provider IDs the write planner
logs are not derived from them.

Restacking on the Axum serving line conflicts in CHANGELOG.md and the
Fastly main.rs imports.

Fastly imports: this PR drops the DeviceSignals import and #1617 drops
HEADER_X_TS_VERSION with the old /health response, so neither remains.

CHANGELOG: this PR's JA4 contradiction entry stays first under Changed,
followed by #1617's breaking health and readiness entry.

The base now also carries #1506's repin of EdgeZero to rc/identity at
d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly
0.13.3, url 2.5.9 and Viceroy 0.22.0.

The base now also carries #1627's 4d0c1a2, which renames the generic
runtime KV store to trusted_server_runtime_kv, #1488's a610152 and
9104fd3, which add hashed-email intake for the LiveRamp and ID5
identity providers, #1646's aa31559, which gates identity writes for
rejected clients, and #1626's d07f789, which withholds a mirrored UID
while another source owner is opted out.

Known non-browser fixtures: #1646's aa31559 marks a refused client by
inserting DeviceSignals with known_browser Some(false) into the request,
in the Fastly test identity_writes_are_refused_only_for_known_non_browsers
and in both conformance runners for its known non-browser navigation and
EC route checks. This PR derives the signals from the User-Agent and the
trusted JA4 instead, so an inserted DeviceSignals is not read. The merge
keeps #1646's test and checks and gives their known non-browser a Chrome
User-Agent with a trusted Python JA4, the contradiction this PR refuses,
as this PR already does for the /auction body ingest test: the Fastly
test inserts it as a runtime TLS JA4, and the Fastly and Axum runners
supply it in place of the navigation's JA4 for a known_non_browser API
request.

Fastly signal tests: ingress_browser_signals_reach_ec_finalize_state keeps
this PR's looks_like_browser assertion and adds #1646's check that a
browser keeps the KV-backed finalize path.
request_without_browser_signals_does_not_look_like_a_browser and this
PR's contradiction test stay beside #1646's write test.

Device signals doc: this PR's known_browser and ja4_contradiction entries
stand, and the module doc keeps #1646's and #1656's refusal rules: under
the lenient gate only a known non-browser or a JA4 contradiction refuses
creation and record writes, and the strict gate also refuses missing
signals.

Settings: this PR's `ja4_contradiction_exempt` and #1488's `hashed_email`
both follow `browser_gate` in Ec and in its Default; the merge keeps both.
The Axum conformance runner drops #1646's now unused DeviceSignals import.
aram356 added a commit that referenced this pull request Nov 25, 2026
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids
from the Prebid config into the auction EIDs, and a99dd66, a62601b,
d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30
days from the UTC day start and pass the request time into finalize. They
arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623,
#1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540,
#1566, #1624, #1641, #1642 and #1646, with #1646's move of the request
time into IdentityApp::finalize. It also brings d5276ee, which publishes
the native AWS runtime files without GNU mv -T, and Christian's merge
5597d3e of #1538 into #1540, through #1566's merge.

The base now also carries the Axum serving line (#1613, #1616, #1617, #1615,
#1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which
decodes the Spin discovery document with Response::json, and #1627's merge
of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI.

This PR already carries #1646's head 461aa0d, so the merge adds only
#1646's new merge 166944769 of #1642 and the chain below it, including the
identity conformance check that now strips the mirrored UID's exp.

It also brings b2d4bfd from #1488, which records the known UID hashes
on lookup results with a setter, so the provider IDs the write planner
logs are not derived from them.

Restacking on the Axum serving line conflicts in the Axum startup tests,
where #1617 waits for /ready, since liveness stays up after a caught
initialization failure, and this PR rewrites the wait to retry a port
collision and to require the child's own ready lifecycle event.

Axum startup tests: wait_ready keeps this PR's collision retry and
lifecycle check, then probes #1617's /ready and returns the /health
response once the child is ready.

The fixture drains each child's output through this PR's log readers, so
#1617's assert_serves_failure_router reaps the stopped child and reads
those captured logs instead of collecting the pipes, which the readers
already own.

The base now also carries #1506's repin of EdgeZero to rc/identity at
d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly
0.13.3, url 2.5.9 and Viceroy 0.22.0.

This PR now stacks on #1661 instead of #1646, so rc/identity can take both
as plain merges. #1661 sits on #1656 and #1626, which sit on #1646, so the
merge also brings #1626 (provider opt-outs and legacy EID expiry on Fastly
and Axum), #1656 (the configurable Edge Cookie browser gate) and #1661
(refusing EC creation when a trusted JA4 contradicts the User-Agent).

Fastly identity conformance fixture: #1661 records each scenario's runtime
TLS JA4 through a RuntimeTlsJa4 middleware in place of derived device
signals, takes the User-Agent from the scenario and drops the browser flag.
This PR adds geo consent requests with their own trusted client IP settings
and no browser device signals. The merge assembles the conformance app with
#1661's middleware and keeps this PR's geo_configured flag and
producer_settings. It sends the scenario's User-Agent unless the API request
supplies one, and inserts the scenario's JA4 only for requests without a geo
consent exchange, because this PR derived device signals only for those.

The base now also carries #1627's 4d0c1a2, which renames the generic
runtime KV store to trusted_server_runtime_kv, #1488's a610152 and
9104fd3, which add hashed-email intake for the LiveRamp and ID5
identity providers, #1646's aa31559, which gates identity writes for
rejected clients, and #1626's d07f789, which withholds a mirrored UID
while another source owner is opted out.

Fastly conformance JA4: the rebuilt #1661 merge supplies a trusted Python
JA4 behind the Chrome User-Agent for #1646's known non-browser API
requests, and this PR inserts the scenario's JA4 only without a geo
consent exchange, with its producer_settings. The merge keeps both: a
known non-browser request gets the Python JA4, any other request the
scenario's JA4 unless it is a geo consent exchange.

This PR's head moves to e8015ca, its clean merge of #1646's aa31559,
which the base already carries, so it adds no change beyond the base.

Axum lib.rs: the base now carries #1636, through #1626's merge of it, whose
after_response_drain_tests module sits where this PR adds its
geo_conformance module. The crate keeps both test modules.
aram356 added a commit that referenced this pull request Nov 25, 2026
This brings in 1f054c6 from #1488, which forwards ortb2.user.ext.eids
from the Prebid config into the auction EIDs, and a99dd66, a62601b,
d1eb75f and 394892b from #1489, which cap mirrored UID expiry at 30
days from the UTC day start and pass the request time into finalize. They
arrive through the chain's merges into #1639, #1640, #1612, #1628, #1623,
#1531, #1532, #1533, #1534, #1536, #1535, #1537, #1539, #1538, #1540,
#1566, #1624, #1641, #1642 and #1646, with #1646's move of the request
time into IdentityApp::finalize. It also brings d5276ee, which publishes
the native AWS runtime files without GNU mv -T, and Christian's merge
5597d3e of #1538 into #1540, through #1566's merge.

The base now also carries the Axum serving line (#1613, #1616, #1617, #1615,
#1635, #1637 and #1627), which #1533 merged, and #1627's b958107, which
decodes the Spin discovery document with Response::json, and #1627's merge
of #1625 (006b45e), which pins Wrangler for the Cloudflare smoke and CI.

The merge also brings the 12 #1646 commits this PR lacked, from 48a43ae
to 461aa0d: dhruv8sh's page-phase lookup and /auction EID work
(48a43ae, 82fe088, 1d0a74f, 838586e and his chain merges a061c01,
ecf16e8, e1d23a0, edcf4c5 and 9a020e1), the merge 9cad928 of
#1641 into #1642, and prk-Jr's "Merge providers-awaited into shared
identity" (4ffbaf8) and "Restore Fastly auction browser gating"
(461aa0d).

Edge cookies guide: a conflict is the request lifecycle paragraph.
The merge takes #1646's sentences on positive identity cookies, core
expiries and /auction body EIDs, and keeps this PR's closing sentences on
the default ec.sliding_refresh = false flow and sliding renewal.

Fastly adapter tests: 82fe088 from #1646 removed the navigation-lookups
thread-local and the page-lookups argument of apply_edgezero_ec_finalize,
since the handler now collects page lookups onto the EC context. This PR's
sliding_ec_renews_held_publisher_identity_before_terminal_privacy test
drops its two take_navigation_lookups calls and passes no page lookups to
finalize. Its configuration has no record store or providers, so no
lookups were collected before either, and its assertions are unchanged.

It also brings b2d4bfd from #1488, which records the known UID hashes
on lookup results with a setter, so the provider IDs the write planner
logs are not derived from them.

The base now also carries #1506's repin of EdgeZero to rc/identity at
d063a8e7 and its merge of main's Fastly SDK 0.13.3 upgrade (#1671): fastly
0.13.3, url 2.5.9 and Viceroy 0.22.0.

This PR now stacks on #1661 instead of #1646, so rc/identity can take both
as plain merges. #1661 sits on #1656 and #1626, which sit on #1646, so the
merge also brings #1626 (provider opt-outs and legacy EID expiry on Fastly
and Axum), #1656 (the configurable Edge Cookie browser gate) and #1661
(refusing EC creation when a trusted JA4 contradicts the User-Agent).

Cloudflare route tests: both PRs add a test at the end of the file. The
merge keeps both, this PR's
sliding_ec_configuration_preserves_unsupported_platform_responses and
#1661's ec_route_creates_no_record_whatever_the_bot_management_ja4.

Fastly sliding EC test: #1617, which now sits below this PR, answers GET
/health through the router's probe hook as an operational response, which
carries no EC state. This PR's
sliding_ec_renews_held_publisher_identity_before_terminal_privacy routes
/health through the router and expected EC state on every path but the
unsupported EC route, so it now also accepts the liveness probe without EC
state. Its check that /health issues no renewal cookie is unchanged.

The base now also carries #1627's 4d0c1a2, which renames the generic
runtime KV store to trusted_server_runtime_kv, #1488's a610152 and
9104fd3, which add hashed-email intake for the LiveRamp and ID5
identity providers, #1646's aa31559, which gates identity writes for
rejected clients, and #1626's d07f789, which withholds a mirrored UID
while another source owner is opted out.

Settings: this PR's MaxAgeDays and #1488's HashedEmailSource are both
added before Ec in settings.rs; the merge keeps both.

This PR's head moves to fbe5670, its merge of #1646's aa31559, which
models admitted clients in the core sliding tests, finalizes them with
the store gate and adds refused_client_gets_no_renewal_or_record_io, and
adds the proposal's review log. Taken as the change from the old head
668d501, the new head would replay #1646 commits the base already
carries in rebuilt form. The merge takes only fbe5670's own resolution,
the change from a plain merge of 668d501 and aa31559 to fbe5670:
the sliding tests and the proposal apply cleanly, and its Fastly sliding
test port is the one this merge already made.
aram356 added a commit that referenced this pull request Nov 25, 2026
…1622 into rc/identity

#1622 (244ca26) now carries the whole chain, each PR merging the one below
it:

- #1506 (c197404) repins EdgeZero to rc/identity at d063a8e7, which
  carries EdgeZero main's Fastly SDK 0.13.3 upgrade through every EdgeZero PR
  here, and merges Trusted Server main's upgrade (#1671): fastly 0.13.3, url
  2.5.9 and Viceroy 0.22.0.
- #1614, #1525, #1526, #1487 and #1488 take it in turn. #1488 also adds
  b2d4bfd, which records known UID hashes with a setter.
- #1489, the identity spine (#1639, #1640, #1612, #1628 and #1623), #1531 and
  #1532.
- The Axum serving line: #1613, #1616, #1617, #1615, #1635, #1637 and #1627,
  chained, with #1627's b958107 decoding the Spin discovery document with
  Response::json and #1627's merge of #1625, which brings #1625's Wrangler pin
  into the chain.
- The held line on #1627: #1533, #1534, #1536, #1535, #1537, #1539, #1538,
  #1540, #1566, #1624, #1641, #1642 and #1646. #1646 keeps its own shared
  after-response runner in ec::app::lookups.
- #1636 (72096cd) on #1646 (b5a5f62), draining Axum
  after-response identity tasks on SIGTERM through #1646's shared runner.
- The EC route line on #1636: #1626 (067531e), which merges #1636, the
  draft #1656, #1661, #1662 and #1622, and through #1622's merge of it,
  #1620's round-6 head.

Each conflict was resolved in the PR that sits higher. This merge is clean.

Since the last update the chain also takes #1488's hashed-email intake
(a610152 and 9104fd3) and its POST, body and header options for the
status call (f063a76), #1627's split of the generic runtime KV store into
trusted_server_runtime_kv (4d0c1a2), #1646's gate on identity writes for
rejected clients (aa31559) its native container test of the failure router
(4f4c036) and that test's header check on an ordinary route (71a573a),
#1626's withholding of a mirrored UID while another source owner is opted
out (d07f789), and #1617's description of the Axum startup failure router
(6d174a8) and of the startup failures that still exit before listening
(4c07cad). #1636 no longer sits in the Axum serving line; it arrives
through #1626, which merges it on top of #1646. Its new head adopts #1646's
after-response runner in place of the one rc/identity took with cf1102c.

Cloudflare guide: #1627's merge of #1625 now keeps both #1625's tool version
clause and #1627's TRUSTED_SERVER_RUNTIME_KV binding in the smoke paragraph,
and fixes #1625's smoke script test for #1617's Python floor and Worker
build, and #1537's merge fixes its ts stub for #1537's storage template
step, so this merge needs no resolution.
aram356 added a commit that referenced this pull request Nov 25, 2026
#1655 (b76163b) now sits on #1661 and resolves its Cloudflare route test
conflict with #1661 in its own merge. The merge is clean.
aram356 added a commit that referenced this pull request Nov 25, 2026
#1659 (c4d2ce7) now sits on #1661 and resolves its Fastly conformance
fixture conflict with #1661's JA4 middleware in its own merge. The merge is
clean.
@aram356

aram356 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed fb7793a0e, a merge of #1656's new head 1b3da24f7. It brings #1646's aa315593f, which gates identity writes for rejected clients, #1617's health contract and #1488's hashed-email settings below it, and #1506's repin of EdgeZero to rc/identity at d063a8e7 with main's Fastly SDK upgrade (#1671). Resolutions:

@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed b33c45b39, a merge of #1656's new head f0681ae7c. It brings #1537's b181544a0, "Accept any Fastly EC store link name at startup", which #1537's owner merged up through #1539, #1538 and #1540. The merge had no conflicts.

Takes #1656's new head 6eee4a2, which carries #1506's repin of EdgeZero to
rc/identity at 459bd27d (42e0c46): PR 275 at 0e2a58ae, the stack's test
fixes and EdgeZero 536's bounded record update, RecordHandle::update.

The merge is clean.
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 62543b0f7, a merge of #1656's new head 6eee4a2fb, which brings #1506's repin of EdgeZero to rc/identity at 459bd27d (42e0c46c7): EdgeZero #275 at 0e2a58ae, the EdgeZero stack's test fixes and EdgeZero #536's bounded record update, RecordHandle::update. The merge had no conflicts.

#1656's new head b60755b brings #1539's cf4e815, "Expect the failure router in the native container test", and #1646's a18abf4, "Compare undeclared Axum KV stores with assert_eq". The merge is clean.
aram356 added a commit that referenced this pull request Nov 26, 2026
#1661's new head 2e0bbb0 brings #1539's cf4e815, "Expect the failure router in the native container test", and #1646's a18abf4, "Compare undeclared Axum KV stores with assert_eq". The merge is clean.
@aram356

aram356 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 2e0bbb0cb, a merge of #1656's new head b60755b68, which brings #1539's cf4e815d4, the native container test's failure-router expectation, and #1646's a18abf428, the reworked KV check in the store metadata test. The only change to this PR's tree is that store test. The merge had no conflicts.

Takes #1656's new head f03c64a, which carries #1506's repin of EdgeZero to
rc/identity at 1619078a (8edc50e), a revert that removes EdgeZero 522
(portable Fastly record providers) and 524 (outbound mTLS client
identities).

The merge is clean.
@aram356

aram356 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration branch (#1608), I pushed 5d951a783.

Takes #1656's new head f03c64a, which carries #1506's repin of EdgeZero to rc/identity at 1619078a (8edc50e), a revert that removes IABTechLab/edgezero#522 (portable Fastly record providers) and IABTechLab/edgezero#524 (outbound mTLS client identities).

The merge is clean.

@ChristianPavilonis ChristianPavilonis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default behavior matches ID-7, and the Fastly and Axum conformance tests pass on the reviewed tree. Before merging, please confirm whether ID-7 allows an operator exemption and whether a contradiction should also stop updates to existing EC records. Both are reasonable policy choices, but they should be explicit in the design and release notes.

The conformance tests verify cookie and record behavior with supplied ingress metadata. They do not verify native JA4 capture.

ja4: &str,
exempt: Ja4ContradictionExempt,
) -> bool {
if exempt == Ja4ContradictionExempt::All {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirm the ID-7 exception before merging. ID-7 requires refusal on a recognized contradiction. The default still complies, but the new exemption can waive that refusal under either browser gate. If the proxy compatibility exception is approved, please record its scope and update the acceptance criteria. Otherwise, keep the refusal unconditional.

insert_ja4(
request.extensions_mut(),
captured_ja4(
if known_browser {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ID-7 also cover existing-record updates? This fixture confirms that a contradiction stops /auction from saving consented EIDs to a live row, even though /auction never creates an EC. The same gate also suppresses ordinary navigation writes and provider dispatch for returning readers. If that broader scope is intentional, please document it in the design and breaking-change note. If not, leave existing-row-only operations on the prior gate. Keep the withdrawal exception and the explicit EC POST’s provider refusal either way.

counts as no JA4 under both rules. `strict` blocks everything `lenient`
blocks.

`ja4_contradiction_exempt` names the JA4 contradictions that stop blocking

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document rollout and rollback order if the exemption stays. Older runtimes reject the entire config when it contains a non-default exemption. This matters on Axum with shared AppConfig: rolling back the image alone can leave the old runtime unable to become ready. Upgrade readers before publishing the key, and restore compatible config before rolling back the runtime.

request.user_agent = FIREFOX_USER_AGENT;
request.ja4 = Some(CHROMIUM_JA4);
}
Self::CurrentFirefox => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exercise ID-7’s unlisted-JA4 case through the adapters. The Chrome, Firefox, and Safari positive cases all use listed cipher hashes. The core test checks eligibility for one unlisted value, but it never observes a cookie or stored row. Please keep the matching-family controls and add unlisted-JA4 positive cases to the shared Fastly and Axum suite.


The shared application creates a new EC record before issuing its cookie on an eligible publisher document navigation of any method, or an admitted same-origin `POST /_ts/api/v1/ec`. Document classification uses `Sec-Fetch-Dest: document` or, without Fetch Metadata, an `Accept` header naming `text/html`. Fastly and Axum retain navigation eligibility on HTML error documents and exclude redirect statuses 301, 302, 303, 307 and 308. A navigation returning `304 Not Modified` retains its lifecycle permission even without Content-Type, because it validates the cached document. Positive identity cookies remain restricted to eligible document and EC responses; core-generated EC, configured SharedID/companion and mirror expiries may accompany any already-finalized response, as described below. An EC ID collision on create retries with a fresh ID, up to five attempts, inside that request's one creation write. Integration proxies and `/auction` use an existing EC but never mint one. Partner identify and batch-sync routes also skip generation. `/auction` may conditionally save explicit body EIDs into an existing live record without issuing positive identity cookies. During pre-routing, Trusted Server builds consent from request-local cookies, headers, geolocation, and policy defaults; it does not load consent from a separate KV store. The document-navigation flow is shown below.

Creation also checks the client's TLS fingerprint where the runtime supplies a trusted one. Trusted Server reads JA4 only through EdgeZero (`ctx.ja4()`): Fastly fills it from the client TLS connection, and Axum only from a trusted proxy header: EdgeZero's protected CloudFront path (`CloudFront-Viewer-JA4-Fingerprint`), or the header named by `EDGEZERO__ADAPTER__JA4_HEADER` from peers in `EDGEZERO__ADAPTER__JA4_TRUSTED_PROXY_CIDRS`. EdgeZero discards a value that is not a well-formed JA4 fingerprint, so it counts as no JA4. Cloudflare fills `ctx.ja4()` from Bot Management, but Cloudflare has no EC record store yet: it creates no ECs, its EC route answers `501` before identity is read, and the rule does not run there. When the JA4's TLS client family contradicts the browser family the User-Agent claims, the request creates no EC under either `ec.browser_gate` rule. That covers a browser User-Agent over a non-browser TLS stack and a User-Agent of one browser engine over another engine's stack, such as a Firefox User-Agent with a Chromium JA4. The family comes from the JA4 cipher-suite hash (its middle section), matched against a short table of public FoxIO JA4+ entries in `crates/trusted-server-core/src/ec/ja4_family.rs`. The table names Chromium, Firefox and Safari, and one non-browser stack: Python's own default TLS context. It lists no Go entry and no other Python entry, because those cipher lists are a TLS library's defaults that every program built on the library sends, including scanning and corporate proxies, so Go clients and Python clients that replace the default context are not checked. A JA4 the table does not list, a missing JA4 and a User-Agent that claims no browser never block, and iOS browsers are only checked against non-browser stacks. A TLS-intercepting proxy in front of a reader replaces the reader's JA4 with its own, so a listed non-browser proxy stack blocks creation for its users. Set `ec.ja4_contradiction_exempt = "non_browser"` to exempt non-browser TLS stacks while a browser-engine mismatch still blocks, or `"all"` to exempt every contradiction (see [EC Configuration](/guide/configuration#ec-configuration)). Only JA4 section 1 is stored; the rule reads the full value in memory. A contradiction is not stored and does not change the stored `known_browser` flag, which still comes only from the known-browser allowlist and feeds analytics.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify how the protected CloudFront path is enabled. The stock manifest does not select that JA4 source, and the example origin request policy does not forward the JA4 header. Please say that this path requires explicit manifest selection, a protected ingress configuration, and forwarding the viewer JA4 header.

/// Absent, missing, malformed or unexposed JA4 reads as `None`.
fn trusted_ja4(request: &Request) -> Option<&str> {
match request.extensions().get::<RequestIngress>()?.ja4()? {
CapturedJa4::Captured { fingerprint, .. } => Some(fingerprint.as_str()),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the validated fingerprint type. This turns EdgeZero’s Ja4Fingerprint into text, then the device and family classifiers split it again. Pass &Ja4Fingerprint through the production path and use summary() and cipher_hash(). The current ingress lookup agrees with ctx.ja4() at the pinned revision; this is a simplification, not a provenance bug.

///
/// Returns the same errors as [`assemble_app`].
#[cfg(test)]
pub(crate) fn assemble_app_with_middleware(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Share Fastly app assembly. The test and production paths share a router builder but duplicate startup and retained-app construction. A single assembly path with a test-only middleware hook would keep future startup changes covered by conformance.

Comment on lines +129 to 132
let known_non_browser = self.known_browser == Some(false) || self.ja4_contradiction;
match gate {
BrowserGate::Lenient => !known_non_browser,
BrowserGate::Strict => !known_non_browser && self.looks_like_browser(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Distinguish a gate denial from analytics classification. A contradiction can block creation even when known_browser is Some(true). Use that distinction in the guide and changelog too: missing JA4 does not cause a contradiction but still fails strict; all disables contradiction checking only; Cloudflare can capture JA4 but lacks an EC store.

Suggested change
let known_non_browser = self.known_browser == Some(false) || self.ja4_contradiction;
match gate {
BrowserGate::Lenient => !known_non_browser,
BrowserGate::Strict => !known_non_browser && self.looks_like_browser(),
let blocked_by_signals = self.known_browser == Some(false) || self.ja4_contradiction;
match gate {
BrowserGate::Lenient => !blocked_by_signals,
BrowserGate::Strict => !blocked_by_signals && self.looks_like_browser(),

Comment on lines +3 to +8
//! A browser's TLS `ClientHello` comes from its own TLS stack: Chromium
//! browsers use `BoringSSL`, Firefox uses NSS, and Safari and every iOS
//! browser use Apple's stack. `JA4_b`, the middle section of a JA4
//! fingerprint, is a truncated hash of the sorted cipher-suite list. It names
//! that stack, ignores GREASE and Chromium's extension-order randomization,
//! and survives browser releases that only change extensions (`JA4_c`).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Narrow the classifier rationale. The module intro says every iOS browser uses Apple’s TLS stack, but the classifier deliberately does not assume that. The QUIC comment and fixture also say every HTTP/3 client must offer the same three suites, which RFC 9001 §5.3 does not require. Keep the conservative classification choices and correct the comments.

Suggested change
//! A browser's TLS `ClientHello` comes from its own TLS stack: Chromium
//! browsers use `BoringSSL`, Firefox uses NSS, and Safari and every iOS
//! browser use Apple's stack. `JA4_b`, the middle section of a JA4
//! fingerprint, is a truncated hash of the sorted cipher-suite list. It names
//! that stack, ignores GREASE and Chromium's extension-order randomization,
//! and survives browser releases that only change extensions (`JA4_c`).
//! `JA4_b`, the middle section of a JA4 fingerprint, hashes the sorted
//! cipher-suite list. The rule uses it to recognize a small set of TLS
//! client families. It does not assume which TLS stack an iOS browser
//! uses, and extension-only changes do not affect this hash.

PR #1656's new head brings the cascaded owner review fixes from #1525, #1526, #1488, #1489, #1639, #1531, #1532, #1615, #1637, #1533, #1536, #1535, #1537, #1538 and #1646.

CHANGELOG.md: #1525 added the allow_insecure_http entry, and #1661 reworded the ec.browser_gate entry for trusted JA4 on Axum. The resolution keeps #1525's entry first and #1661's wording of the browser-gate entry.

docs/guide/edge-cookies.md: #1639 rewrote the pull-sync room sentences, and #1661 added that a trusted JA4 contradicting the User-Agent denies identity. The resolution keeps #1639's paragraph with #1661's sentence.

crates/trusted-server-adapter-axum/src/identity_conformance.rs (merged clean, did not compile): #1646 added a provider-deadline test using the file's USER_AGENT constant, which #1661 replaced with the shared CHROME_USER_AGENT. The resolution uses CHROME_USER_AGENT in that test as #1661 does elsewhere.
PR #1656's new head brings wave B: #1506's merge of main ab5c24f (#1501, js_asset_proxy rewriter ordering) and its repin of EdgeZero to rc/identity 8a73c0978806, carried up through the chain.

CHANGELOG.md: main's #1501 entry and #1506's repinned EdgeZero entry sit at the top of Changed, where #1661 added the JA4 and User-Agent contradiction entry. The resolution keeps all three, base first.

Cargo.lock changes only the 10 EdgeZero package sources, now at 8a73c097; the codegen crate's nested Cargo.lock is unchanged.
@aram356

aram356 commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Round 12 identity realignment: rc/identity is now at db7dce634, and EdgeZero is pinned to its rc/identity at 8a73c097. This branch fast-forwarded from 5d951a783 to 5027c0b37:

Each merge message says what it carries and how any conflict was resolved.

PR #1656's new head brings #1535's owner fix that keeps mirrored GPP consent through transient CMP not-ready states (#1678), #1535's move of the consent-update test host to publisher.example.com for the URL-host lint and #1540's allow-domain marks on the deployment guide's reference links. The merge is clean.
PR #1656's new head brings #1506's move of the five auction endpoint test requests from test-publisher.com to publisher.example.com, for the URL-host lint. The merge is clean.

@prk-Jr prk-Jr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The JA4 family rule is narrow and well sourced. I checked all four CIPHER_HASH_FAMILIES rows, and the QUIC row the PR leaves out, against FoxIO's ja4plus-mapping.csv at 288d3c3d, and each row matches its cited entry. Signals come from one place: IdentityApp::read_request is the only production caller of DeviceSignals::derive_with_tls_rule, and every adapter decides through it. Approving. The approval depends on Christian's open ID-7 questions being settled before merge: whether ja4_contradiction_exempt is an approved exception to ID-7's refusal, whether a contradiction should also stop writes to existing records, and the unlisted-JA4 acceptance cases on the Fastly and Axum suites that ID-7 lists. I agree with all three and have not repeated them.

Non-blocking

⛏ nitpick

  • QUIC_JA4 sits outside the fixture group. See inline at crates/trusted-server-core/src/test_support/ja4.rs:89.

Cross-cutting / body-level findings

  • 📝 Production JA4 capture on Fastly, traced at the pinned EdgeZero 8a73c097. The conformance runner adds JA4 through a test-only middleware, so these steps show the production path separately:

    • main passes FastlyRequest::from_client() through serve, which calls send_request_with_registries_and_hooks.
    • That calls dispatch_with_handles. It calls capture_request_ingress(&req) on the client request, which records CapturedJa4::from_runtime_tls(req.get_tls_ja4()). It also removes any RequestIngress a prepare hook inserted.
    • trusted_ja4 reads that RequestIngress exactly as ctx.ja4() does.

    The HTTP/2 fingerprint still reaches DeviceSignals through ClientInfo.h2_fingerprint, so known_browser analytics keep their input after derive_device_signals is removed.

CI Status

At ef355a13, 28 checks pass and none fail. These 6 are still queued:

  • integration tests
  • integration tests (Fastly EC lifecycle)
  • format-typescript
  • Native provider acceptance script
  • Fastly response diff script
  • CLAUDE.md symlink guard

captured_ja4(CHROMIUM_JA4, Ja4Source::RuntimeTls),
);
}
/// Chromium over QUIC (`FoxIO` JA4+ mapping). Its cipher hash covers only the three

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⛏ nitpick: QUIC_JA4 comes right after insert_browser_signals with no blank line, apart from the other fixture constants. Moving it below UNLISTED_JA4 keeps the fixtures in one group. Its wording is already covered by Christian's RFC 9001 comment on ja4_family.rs. A move can't be a single suggestion, so here is the change to apply by hand:

pub const UNLISTED_JA4: &str = "t13d1516h2_000000000000_000000000000";
/// Chromium over QUIC (`FoxIO` JA4+ mapping). ...
pub const QUIC_JA4: &str = "q13d0312h3_55b375c5d22e_06cda9e17597";

prk-Jr and others added 2 commits December 2, 2026 14:24
QUIC_JA4 sat after insert_browser_signals with no blank line, apart from
the fixture constants it belongs with. Move it next to UNLISTED_JA4.
PR #1656's new head brings #1656's strict browser gate wording, plus #1506's repin of EdgeZero to rc/identity ef5cbf30, which renames Fastly backends to ez_b31v2_* and moves the yanked pin-project-lite, chacha20 and spin, #1625's shared Wrangler installer for CI, #1639's pull reserve boundary check and wording, #1613's conformance doc alignment, #1616's certificate policy and pull-sync fixture corrections, #1617's preserved startup diagnostics and hardened runtime checks, #1635's complete startup evidence in native fixtures, #1637's shared readable non-Unicode Geo fixture, #1627's Spin store reads and retained runtime coverage, #1535's Sourcepoint consent mirror deduplication and consent update coverage, #1636's stronger after-response body and drain checks and #1626's enforcement of stored and carried provider opt-outs.

CHANGELOG.md: #1506's repin moved the EdgeZero pin entry to ef5cbf30 with EdgeZero pull request 275 at a3c5f3dd, and #1661 added its JA4 contradiction entry after that line. The resolution keeps #1506's pin entry followed by #1661's entry.

crates/trusted-server-core/src/ec/device.rs: #1656's owner commit c4c6a1b says the strict gate refuses a request missing either ja4_class or platform_class, and #1661 rewrote the module doc around the new ja4_contradiction field. The resolution keeps #1661's doc with #1656's wording for the strict gate.

Cargo.lock changes only the EdgeZero package sources (now ef5cbf30) and the yanked pin-project-lite, chacha20 and spin; the codegen crate's nested Cargo.lock is unchanged.
@aram356
aram356 removed this pull request from stack #1665 December 3, 2026 11:34
@aram356
aram356 added this pull request to stack #1731 December 3, 2026 11:35
aram356 added a commit that referenced this pull request Dec 3, 2026
PR #1675's new head brings #1675's switches that turn off POST /auction while the auction is disabled and the first-party creative endpoints while creative rewriting is off, together with the identity chain between #1646 and #1675 that #1667 did not carry yet: #1636's Axum after-response drain on SIGTERM, #1626's provider opt-outs and legacy EID expiry on Fastly and Axum, #1656's configurable Edge Cookie browser gate, #1661's refusal of EC creation when a trusted JA4 contradicts the User-Agent, and #1662's Fastly EC route acceptance and capped mirrored expiry.

docs/guide/configuration.md: #1675 reworded the enabled row of the [auction] table to say that it also turns on POST /auction, and #1667 added the mtls_slot row, which widened the table. The resolution keeps #1675's enabled text and #1667's mtls_slot row, with the table reformatted by Prettier.

Semantic break in crates/trusted-server-core/src/integrations/prebid.rs: #1675's owner commit d141923 added a test plan with no browser routes, whose ProviderConfig and AuctionPlanConfig literals predate #1667's 0985d67, which added the mtls provider field, and eaa2b3e, which added the mtls_slot plan field. The merge applies cleanly but the core tests no longer compile. The fix belongs in this link because it is where the two changes first meet. The literal gains mtls: false and mtls_slot: Default::default(), as #1667 wrote in the neighboring prebid.rs literals.

Cargo.lock is unchanged.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 15 identity realignment: rc/identity is now at 391a08578, and EdgeZero is pinned to its rc/identity at ef5cbf308. This branch fast-forwarded from ec1e7246a to a3c937f7e:

This round's link updates the CHANGELOG pin text and a device.rs doc comment.

Each merge message says what it carries and how any conflict was resolved.

Carries #1533's Axum startup-test port fix (779e446) and nothing
else. Owner commits pushed to other chain PRs since round 15 come in
with the next round.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Cascade of #1533's Axum startup-test port fix (779e44673): e61a93c62 merges it into this PR. There were no conflicts and nothing else changed. The fix moves free_loopback_port in crates/trusted-server-adapter-axum/tests/routes.rs below the ephemeral port range, and #1533's note has the details. Owner commits pushed to other chain PRs since round 15 come in with the next round. rc/identity is now 62f8e41e2.

@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Merged #1627's runtime KV removal (7c2b84f45) into this branch as 3d3494fa6, on top of e61a93c62.

At the maintainer's request, that commit removes the generic runtime KV store trusted_server_runtime_kv. Nothing reads or writes it, and the managed Fastly deploy made every service provision and pay for it. edgezero.toml and the Fastly Hooks::stores() now declare only trusted_server_kv, and RuntimeServices::kv_store() is unavailable on every adapter.

Only that commit was merged, not the base branch's new head. Conflicts were resolved in edgezero.toml, the Fastly Hooks::stores() in app.rs, fastly.toml, the Viceroy template, the integration tests' config.rs, trusted-server.example.toml, docs/guide/architecture.md and docs/guide/edgezero.md. Only trusted_server_kv stays declared, this branch's record-store comment and local seeds are kept, and the runtime-KV lines are dropped. The Axum README and docs/guide/axum-dev.md keep this branch's Axum wording.

Checks on this head: no reference to the removed store remains and cargo fmt --check passes; clippy-fastly, clippy-axum, clippy-cloudflare and clippy-spin-native pass. rc/identity (b9dc3153e) passed the full CI gate list with the removal.

PR #1656's new head brings #1487's change that strips `ts-eids` from publisher-origin requests unless the operator opts in and #1646's fix that preserves filter headers through identity finalization.

crates/trusted-server-core/src/ec/app/lifecycle.rs: #1661 adds the
`trusted_ja4` helper next to the private `cookie_value` helper, and #1646
(through #1656) deletes `cookie_value` because identity capture now reads
`ts-eids` with `cookie_value_all_fields`. The resolution keeps
`trusted_ja4` and drops `cookie_value`, which has no callers left.

Semantic fix in crates/trusted-server-adapter-axum/src/identity_conformance.rs:
#1661 replaces the file's local `USER_AGENT` constant with the shared
`CHROME_USER_AGENT`, and #1646's new response-finalization test still
sent `USER_AGENT`. The test now sends `CHROME_USER_AGENT`.
@aram356

aram356 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Round 17 identity realignment: rc/identity is now at 0ed862633, and EdgeZero stays pinned to its rc/identity at ef5cbf308. This branch fast-forwarded from 3d3494fa6 to 3e889bddc:

In lifecycle.rs this round's link keeps this PR's trusted_ja4 and drops cookie_value, which #1646 replaced with cookie_value_all_fields and which has no callers left. #1646's new Axum conformance test now sends this PR's CHROME_USER_AGENT.

Each merge message says what it carries and how any conflict was resolved.

@aram356

aram356 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

Merged #1614's /_ts/ local answers (48930c270) into this branch as 358098c5a, on top of 3e889bddc.

Trusted Server owns the /_ts/ namespace (#1740). A request for /_ts or any /_ts/ path that no route handles now gets a local 404 on Fastly, Axum, Cloudflare and Spin, and never reaches the publisher origin. The path is matched after percent-decoding. Paths outside the namespace, such as /_tsx or /articles/_ts/x, still go to the publisher origin, and every routed /_ts/ path answers as before.

This merge takes #1656's new head (118ce2309), which carries 48930c270 and nothing else new to this branch. The merge conflicted only in the Cloudflare tests/routes.rs, where both sides add a test at the end of the file. The resolution keeps this branch's tests first and the new /_ts/ test after them.

Checks on this head: no conflict markers; cargo fmt --all -- --check passes; the merge adds exactly #1614's change to this branch's files; it merges cleanly with every lower head in its stack; clippy-fastly, clippy-axum, clippy-cloudflare and clippy-spin-native pass. rc/identity (e72407155) passed the full CI gate list with the change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refuse record creation when a trusted JA4 contradicts the User-Agent

4 participants