Add EC consent logging and Sourcepoint consent support#678
Closed
ChristianPavilonis wants to merge 12 commits intoedge-cookie-sourcepoint-consentfrom
Closed
Add EC consent logging and Sourcepoint consent support#678ChristianPavilonis wants to merge 12 commits intoedge-cookie-sourcepoint-consentfrom
ChristianPavilonis wants to merge 12 commits intoedge-cookie-sourcepoint-consentfrom
Conversation
Implement Story 4 (#537): partner KV store with API key hashing, POST /admin/partners/register with basic-auth protection, strict field validation (ID format, URL allowlists, domain normalization), and pull-sync config validation. Includes index-based API key lookup and comprehensive unit tests.
Implement Story 9 (#542): server-to-server pull sync that runs after send_to_client() on organic traffic only. Refactors the Fastly adapter entrypoint from #[fastly::main] to explicit Request::from_client() + send_to_client() to enable post-send background work. Pull sync enumerates pull-enabled partners, checks staleness against pull_sync_ttl_sec, validates URL hosts against the partner allowlist, enforces hourly rate limits, and dispatches concurrent outbound GETs with Bearer auth. Responses with uid:null or 404 are no-ops; valid UIDs are upserted into the identity graph. Includes EC ID format validation to prevent dispatch on spoofed values, partner list_registered() for KV store enumeration, and configurable pull_sync_concurrency (default 3).
Move admin route matching and basic-auth coverage to /_ts/admin for a hard cutover, and align tests and docs so operational guidance matches runtime behavior.
Implement Story 4 (#537): partner KV store with API key hashing, POST /admin/partners/register with basic-auth protection, strict field validation (ID format, URL allowlists, domain normalization), and pull-sync config validation. Includes index-based API key lookup and comprehensive unit tests.
Move admin route matching and basic-auth coverage to /_ts/admin for a hard cutover, and align tests and docs so operational guidance matches runtime behavior.
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
Changes
crates/trusted-server-core/src/consent/mod.rsallows_ec_creation.crates/trusted-server-core/src/ec/consent.rscrates/trusted-server-core/src/ec/finalize.rscrates/trusted-server-core/src/ec/mod.rscrates/trusted-server-core/src/integrations/registry.rscrates/trusted-server-core/src/publisher.rscrates/trusted-server-adapter-fastly/src/logging.rscrates/js/lib/src/integrations/sourcepoint/index.tscrates/js/lib/test/integrations/sourcepoint/index.test.tscrates/js/lib/build-all.mjscrates/js/lib/src/integrations/prebid/_user_id_modules.generated.tscrates/js/lib/src/integrations/prebid/index.tsuserSyncsettings.crates/js/lib/test/integrations/prebid/index.test.tscrates/trusted-server-core/src/integrations/prebid.rsuser_syncconfig serialization into the injected Prebid JS config.trusted-server.tomlCloses
Closes #
Test plan
cargo test --workspacecargo clippy --workspace --all-targets --all-features -- -D warningscargo fmt --all -- --checkcd crates/js/lib && npx vitest runcd crates/js/lib && npm run formatcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute servecargo fmt --all;cargo check --workspace;cd crates/js/lib && npx vitest run test/integrations/sourcepoint/index.test.ts test/integrations/prebid/index.test.tsChecklist
unwrap()in production code — useexpect("should ...")tracingmacros (notprintln!)