Skip to content

Say certificate checks cover every outbound HTTPS request - #1616

Open
prk-Jr wants to merge 3 commits into
feat/s2s-eid-collection-providersfrom
fix/1556-identity-backend-tls
Open

prk-Jr wants to merge 3 commits into
feat/s2s-eid-collection-providersfrom
fix/1556-identity-backend-tls

Conversation

@prk-Jr

@prk-Jr prk-Jr commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #1506 (spec/edgezero-pr275-migration). Retarget to main once #1506 merges.

Summary

  • After the EdgeZero cut, every outbound HTTPS request verifies TLS, including identity (pull sync) backends. proxy.certificate_check = false no longer relaxes anything, but the error, warning, settings doc comment, guides and example config still said it relaxed the origin.
  • This rewords those to say what the code does and adds a test that pins the behavior. Pull sync sends the same request and stores the partner ID whether the check is on or off.

Changes

File Change
crates/trusted-server-core/src/ec/pull_sync.rs Add dispatch_pull_sync_ignores_relaxed_certificate_check and a pull_once helper
crates/trusted-server-core/src/config.rs Reword the certificate_check error and warning
crates/trusted-server-core/src/settings.rs Reword the certificate_check doc comment
docs/guide/configuration.md, docs/guide/edgezero.md, docs/guide/error-reference.md Say TLS is verified on every outbound HTTPS request
trusted-server.example.toml Same wording in the example config
docs/superpowers/specs/2026-11-16-identity-backend-certificate-checks-design.md Design spec
docs/superpowers/plans/2026-11-16-identity-backend-certificate-checks.md Implementation plan

Closes

Closes #1556

Spec

Not a feature. The design notes are in docs/superpowers/specs/2026-11-16-identity-backend-certificate-checks-design.md.

Test plan

  • cargo test-fastly: left to CI. The local Viceroy is older than the pinned 0.21.0
  • 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
  • JS format: cd crates/trusted-server-js/lib && npm run format
  • Docs format: cd docs && npm run format
  • Other: the new test and both existing certificate_check config tests pass natively. A mutation check broke the test both ways: making the relaxed setting change the URL, and adding a header. ts dev lint domains --changed-vs origin/main is clean.

Checklist

  • Feature PRs: spec linked above, ending in a review log of two or more agent review rounds (not a feature)
  • 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

proxy.certificate_check only relaxed TLS for the origin wording-wise, but
EdgeZero verifies every outbound HTTPS request regardless. Update the error,
warning, settings docs, guides and example config to say so, and test that
pull sync sends the same request and stores the partner ID whether the
check is on or off.

Closes #1556
@prk-Jr prk-Jr self-assigned this Nov 16, 2026
@prk-Jr
prk-Jr marked this pull request as ready for review November 17, 2026 05:29
Pull sync: the base deletes core ec/pull_sync.rs, so the merge takes the
deletion. This pull request changed only that file's tests, adding the
differential certificate-check test, so the test moves to where pull
sync now sends: the Fastly post-delivery work, which builds the
after-response pull-sync provider from the settings and sends its lookup
through OutboundLookupTransport. The ported test runs post-delivery work
with certificate_check true and false, each against its own fresh live
row in the local identity store, and asserts the same method, URL,
headers and body, the lookup transport's timeout, buffered cap,
decoding and cache policy, and that both runs store the partner UID.
The pull-sync test helpers take the EC ID so this test never writes
the row the other pull-sync tests share.

Docs: the certificate_check guide entry names identity providers, pull
sync among them, since pull sync is one in the base.

The config message, settings doc comment, guides and example config
apply this pull request's wording unchanged.
@aram356
aram356 changed the base branch from spec/edgezero-pr275-migration to feat/s2s-eid-collection-providers November 19, 2026 05:37
@aram356

aram356 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

For the identity integration chain (#1608), this PR now stacks on #1489, which deletes ec/pull_sync.rs and runs pull sync as an after-response provider through OutboundLookupTransport on the post-delivery client. 1bbc923cd merges #1489's head a7262c7db, and the base is now feat/s2s-eid-collection-providers.

This PR's only change in pull_sync.rs was its test, dispatch_pull_sync_ignores_relaxed_certificate_check; the lookup transport takes no settings, so there is no production setting left to flip. The test moves to where pull sync now sends, as post_delivery.rs's after_response_pull_sync_ignores_relaxed_certificate_check. It runs pull sync once with certificate_check true and once false, each on its own fresh row, and asserts the same method, URI, headers and body and that both runs store the partner UID. A mutation that made the pull URL depend on certificate_check made it fail. configuration.md now lists identity providers, EC pull sync among them, under certificate_check.

Checked locally at 1bbc923cd: cargo fmt, all eight clippy aliases and the core build-digest clippy, scripts/lint-wasm-clock.sh, test-fastly, test-fastly-reuse, test-axum (64), test-cloudflare (66), test-spin (89), parity (33), build-digest (10), host CLI tests (972), docs and Markdown format, and the URL-host lint against #1489, all passing (test-fastly 4,064).

Takes #1489's new head e4ae9ca, which brings #1506's repin of
EdgeZero to rc/identity at 9d02d7b3. The merge is clean, and this PR's tree
changes only by that repin.

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.

Certificate checks on identity backends that still follow proxy.certificate_check

2 participants