Repository navigation
Conversation
Require explicit HTTPS origin and path grants plus current consent before disclosing canonical EC identity. Reevaluate every redirect and coordinate event cache bypass with terminal response privacy. Add shared CLI diagnostics, adapter and real-network coverage, operator migration guidance, and the reviewed design and implementation plan.
Brings the identity integration chain, now including the health and startup contract (#1617) on the EdgeZero cutover (#1506), into the creative proxy disclosure policy, and keeps the policy on every adapter's proxy path. Core proxy: proxy_request keeps the cutover's EdgeZero outbound client and redirect follower. The creative identity policy now runs at the cutover's two check points. The first target passes check_proxy_target, then CreativeHops rejects userinfo, rewrites the reserved ts-ec query to the authorized identity or to none, and picks the hop's cache policy. Each followed redirect goes through redirect_policy, which, on the creative route, takes EdgeZero's prepared request, applies the same per-hop decision with the raw Location path check, and follows the rewritten request. Identity endpoints bypass upstream caches. The chain state is shared with the policy, because EdgeZero keeps the policy for the whole chain, and the final response becomes private once an identity endpoint was visited. A final 3xx with a Location on the creative route is an error, and creative responses strip the first-party passthrough headers. The creative route sends the fixed creative header profile through a header-profile choice in proxy_outbound_request. append_ec_id is gone, and ProxyRequestConfig carries query_identity and disclosure in place of forward_ec_id. Target logging drops the query, as the PR does. Adapters: every adapter prepares the proxy policy when it builds state, alongside the cutover's identity-provider rejection, and passes the request's EcContext into handle_first_party_proxy. The finalize middleware keeps the cutover's handler-error rendering and Fastly's RequestGeo, and marks 4xx and 5xx creative proxy responses terminal-private. Fastly's test-only service injection in build_per_request_services is not needed on the cutover, so it is not carried. Core settings, config and consent: both sides' fields, checks, warnings and test imports are kept. Testlight keeps the base's response cap and uses without_ec_id. Tests: the PR's core proxy policy tests, its parity module and its Fastly named-route test run on ScriptedHttpClient in place of the removed platform HTTP stubs, and read each hop's URI and cache policy from the recorded requests. The parity origin answers by path through a request observer. The Fastly named-route test routes with the cutover's outbound client and a held US geo and runs the real entry-point finalize_response. The Fastly network fixture uses EdgeZero's Fastly client. The cutover's first-party proxy readback test now expects the creative header profile. The CLI proxy test keeps the cutover's in-process Axum fixture. The CLI proxy explain tests create the `[proxy]` table, which the cutover dropped from the integration fixture, so the appended endpoint tables still parse. Docs: the first-party proxy redirect list combines EdgeZero's redirect rules with the per-hop identity policy and the creative terminal-redirect rejection, and the proxy settings table keeps both sides' rows.
|
For the identity integration chain (#1608), this PR now stacks on #1617, and its base is The cutover replaced the proxy's own redirect loop with EdgeZero's outbound client and redirect follower, so the disclosure policy now runs at the follower's two check points:
What the follower changes. EdgeZero replays the same creative headers on each hop instead of this PR rebuilding them, and the values are the same. EdgeZero's cross-origin header stripping, its userinfo 502 and its 60 s chain deadline apply. Creative 4xx and 5xx privacy also covers handler errors rendered inside the middleware.
Checked locally at |
Summary
ts config proxy explain <URL> --json; preserve specialized integration/publisher asset fetching and verify actual CLI-to-Axum resource transport.Changes
.github/workflows/test.ymlcrates/trusted-server-adapter-axum/src/app.rscrates/trusted-server-adapter-axum/src/middleware.rscrates/trusted-server-adapter-cloudflare/src/app.rscrates/trusted-server-adapter-cloudflare/src/middleware.rscrates/trusted-server-adapter-fastly/src/app.rscrates/trusted-server-adapter-fastly/src/main.rscrates/trusted-server-adapter-fastly/src/middleware.rscrates/trusted-server-adapter-fastly/src/proxy_policy_runtime.rscrates/trusted-server-adapter-fastly/tests/proxy-policy-origin.mjscrates/trusted-server-adapter-fastly/tests/proxy-policy-origin.test.mjscrates/trusted-server-adapter-spin/src/app.rscrates/trusted-server-adapter-spin/src/middleware.rscrates/trusted-server-cli/src/commands/config/mod.rscrates/trusted-server-cli/src/commands/config/proxy.rscrates/trusted-server-cli/src/run.rscrates/trusted-server-cli/tests/config_env_overlay.rscrates/trusted-server-cli/tests/config_proxy.rscrates/trusted-server-cli/tests/proxy_trusted_server.rscrates/trusted-server-core/src/config.rscrates/trusted-server-core/src/consent/mod.rscrates/trusted-server-core/src/integrations/google_tag_manager.rscrates/trusted-server-core/src/integrations/gpt.rscrates/trusted-server-core/src/integrations/js_asset_proxy.rscrates/trusted-server-core/src/integrations/testlight.rscrates/trusted-server-core/src/lib.rscrates/trusted-server-core/src/proxy.rscrates/trusted-server-core/src/proxy_policy.rscrates/trusted-server-core/src/proxy_query.rscrates/trusted-server-core/src/response_privacy.rscrates/trusted-server-core/src/settings.rscrates/trusted-server-integration-tests/README.mdcrates/trusted-server-integration-tests/tests/parity.rsdocs/guide/configuration.mddocs/guide/first-party-proxy.mddocs/superpowers/plans/2026-11-16-1233-proxy-disclosure-policy.mddocs/superpowers/specs/2026-11-16-1233-proxy-disclosure-policy-design.mdscripts/README.mdtrusted-server.example.tomlCloses
Closes #1233
Spec
Proxy disclosure and cache policy, including two independent spec review rounds.
Implementation plan and A1–A22 traceability.
Test plan
The implementation checks below were recorded locally, except where explicitly marked as GitHub Actions or deployed staging evidence. Hosted CI status is separate and is not asserted here.
cargo test-fastly && cargo test-axum; alsocargo test-fastly-reuse,cargo test-cloudflare, andcargo test-spincargo clippy-fastly && cargo clippy-axum; also Cloudflare native/WASM, Spin native/WASM, CLI and codegen lint aliasescargo fmt --all -- --checkef13773ac35c52624bff60f733639bf7c7e91e28.fastly compute serveConfiguration hardening and compatibility
Invalid recipient origins, paths, IDs, duplicate selectors and non-roundtripping paths return configuration errors during typed validation/runtime preparation; every adapter prepares settings before routing. No panic-based recipient compilation is used. Regression coverage includes
proxy_identity_policy_rejects_invalid_runtime_configuration,identity_policy_rejects_invalid_origins,identity_policy_rejects_invalid_paths_and_rule_ids,identity_policy_rejects_duplicate_ids_and_normalized_selectors, andproxy_policy_rejects_selectors_changed_by_url_serialization.Deploy the new binary before publishing a nonempty
proxy.identity_endpointsconfiguration: older strict readers reject the new field. Empty defaults remain omitted. Existing signatures are still validated before query transformation, and removing a rule revokes future disclosure without re-signing URLs. Creative requests deliberately use a fixed user agent and restricted forwarded headers; unfollowed redirects carryingLocationreturn 502. Integration-owned identity payloads and click behavior remain outside this policy.Deployed Fastly qualification and remaining limits
Controlled HTTPS-origin checks passed against the deployed Fastly artifact from
ef13773ac35c52624bff60f733639bf7c7e91e28:Cache-Control: no-store, private, with validators and edge-cache directives removed, despite deliberately cacheable origin responses.Locationwhen the redirect limit was exhausted.CookieorAuthorizationheaders.The temporary recipient and fetch permission were removed by restoring and republishing the exact original staging configuration. Live checks confirmed the removed destination was denied without another origin request, while the homepage and existing allowed bundle still worked. Owned test processes and temporary credentials were removed.
These checks qualify the signed proxy policy on Fastly staging. They do not establish normal-page creative-proxy activation or a production recipient inventory: creative rewriting remained disabled, and no permanent identity-recipient rules were added. Cloudflare and Spin deployed qualification and manual
fastly compute servetesting remain unperformed. Hosted CI must be assessed separately before requesting review or merging.Checklist
unwrap()in production codelogmacros rather thanprintln!