Skip to content

Forward trusted geo to Didomi notice loaders - #1127

Open
prk-Jr wants to merge 10 commits into
mainfrom
spec/85-didomi-geo-forwarding
Open

Forward trusted geo to Didomi notice loaders#1127
prk-Jr wants to merge 10 commits into
mainfrom
spec/85-didomi-geo-forwarding

Conversation

@prk-Jr

@prk-Jr prk-Jr commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add opt-in trusted country and region parameters to Didomi notice-loader URLs so browser and edge-cache identities select the correct geographic notice.
  • Canonicalize eligible loader requests through a private same-origin redirect, replace caller-supplied geo, and fail closed when complete trusted geo is unavailable.
  • Preserve Didomi SDK cache metadata while bypassing cache and enforcing private responses for Didomi API traffic.

Changes

File Change
crates/trusted-server-core/src/integrations/didomi.rs Adds typed configuration, geo normalization, exact loader matching, canonical redirects, authoritative upstream headers, API cache privacy, and regression coverage.
crates/trusted-server-core/src/config_payload.rs Verifies the new option survives the deployed configuration blob round trip.
crates/trusted-server-adapter-fastly/src/platform.rs Verifies query encoding, order, and duplicates survive Fastly request conversion.
trusted-server.example.toml Documents the disabled-by-default TOML option.
crates/trusted-server-integration-tests/fixtures/configs/trusted-server.integration.toml Adds the option to the integration fixture.
docs/guide/integrations/didomi.md Replaces the stale guide with the current TOML/typed-CLI configuration flow, corrects the inaccurate claim that publisher Authorization is forwarded, and documents geo, caching, limitations, and rollout checks.
docs/superpowers/specs/2026-09-07-didomi-geo-design.md Records the reviewed design and acceptance criteria.
docs/superpowers/plans/2026-09-07-didomi-geo-forwarding.md Records the completed implementation and verification plan.

Rollout considerations

Closes

Closes #85

Test plan

  • cargo test-fastly && cargo test-axum
  • cargo test-cloudflare && cargo test-spin
  • cargo clippy-fastly && cargo clippy-axum && cargo clippy-cloudflare
  • cargo clippy-cloudflare-wasm && cargo clippy-spin-native && cargo clippy-spin-wasm
  • cargo fmt --all -- --check
  • JS tests: cd crates/trusted-server-js/lib && npx vitest run (Node 24.12.0; 893 passed)
  • JS format: cd crates/trusted-server-js/lib && npm run format
  • Docs format: cd docs && npm run format
  • Adapter parity: cargo test --manifest-path crates/trusted-server-integration-tests/Cargo.toml --test parity
  • Focused Didomi tests: cargo test --package trusted-server-core --target aarch64-apple-darwin didomi
  • CLI and native integration-test package suites
  • WASM release build: cargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1
  • Local headless-Chrome verification through ts dev proxy and Viceroy: conflicting geo returned a private 307, then the canonical loader returned 200.
  • Manual staging verification with real Fastly geo, browser redirects, cache reuse, and Didomi notice selection (required before production enablement, not before merge)

Checklist

  • Changes follow CLAUDE.md conventions
  • No unwrap() added in production code
  • Uses repository log macros and no println!
  • New code has tests
  • No secrets or credentials committed

@ChristianPavilonis
ChristianPavilonis requested review from ChristianPavilonis and aram356 and removed request for ChristianPavilonis September 8, 2026 15:58

@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.

Summary

Reviewed the trusted geo forwarding flow through canonical redirects, upstream request construction, response privacy, and Fastly cache behavior. I found no actionable issues in revision eb4e9431695fdcfcf65cdcb7bd2bc3d6cc72cd2d.

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.

As publisher I would like to pass geo information to Didomi

2 participants