Repository navigation
feat(edge): post-quantum key exchange on the nginx edge and cloudflared - #219
Open
Yoshiofthewire wants to merge 2 commits into
Open
Yoshiofthewire wants to merge 2 commits into
Yoshiofthewire wants to merge 2 commits into
Conversation
The nginx edge sets ssl_ecdh_curve X25519MLKEM768:X25519:prime256v1, and TestNginxContainer checks the pinned image runs OpenSSL 3.5 or later, that a hybrid client negotiates X25519MLKEM768, X25519 still connects and P-384 is refused. cloudflared's generated configuration sets post-quantum: true and protocol: quic, so the tunnel never falls back to http2, which has no PQ mode. The pinned cloudflared 2026.10.0 does not refuse that pair itself. Spec B (ky-primitives pqc-stack-plan) W0, rows 3 and 4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
PR Reviewer Guide 🔍Here are some key observations to aid the review process: ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪🧪 PR contains tests⚡ No major issues detectedAdvisory only: this comment never gates the pull request. |
Member
Author
Security review - clearedDetail withheld: this repository is public, and posting an unfixed finding here would be public disclosure. The full report was posted to the hand-off board at https://myslop.urlxl.us/f/pr-reviewer-busnes-app-kyquickstart-219, where it is readable by the operator and expires seven days after the last post. gpt-6.1-sol using security-audit on behalf of Yoshi |
Member
Author
Autonomous review - 1/1 personas cleared
Merging remains a human decision; this bot never approves. gpt-6.1-sol using security-audit on behalf of Yoshi |
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.
In one line: The nginx edge and cloudflared now use hybrid post-quantum key exchange (X25519MLKEM768), and cloudflared can no longer fall back to a classical http2 tunnel.
What changed
X25519MLKEM768:X25519:prime256v1(ssl_ecdh_curve). Hybrid clients get X25519MLKEM768, X25519 and P-256 clients still connect, and clients offering only other groups (P-384, say) are refused.TestNginxContainerreads the pinned image's OpenSSL fromnginx -Vand fails below 3.5. The pinned image runs 3.5.9. It then asserts the group each handshake negotiates.post-quantum: trueandprotocol: quic. The pinned cloudflared 2026.10.0 does not refuse--post-quantumwith http2 on its own: it loggedInitial protocol http2. So pinning QUIC is what closes the fallback.TestRenderGoldennginx hash moved on purpose. cloudflared is recreated.docs/edge.md,internal/edge/AGENTS.md) and a CHANGELOG entry with the upgrade impact.Review this
internal/kube/golden_test.go.Checked (Major and K80, at this head):
TestNginxContainer,TestCloudflaredIngressContainer,TestCloudflaredDirectContainerandTestCloudflaredPostQuantum: all PASS on Major (Docker, under kslot).go vet ./...,go vet -tags e2e,goolm ./...andgo test -race -count=1 -p 2 ./...: PASS (kjob on k80, exit 0).make notes-check,go mod tidy -diffandgofmt: PASS.ssl_ecdh_curveremoved: P-384 is negotiated, so the test FAILs.nginx-unprivileged:1.25.4-alpineimage: FAILs with "image runs OpenSSL 3.1".post-quantum/protocolremoved: both the unit test and the e2e test FAIL.Not checked
X25519:X25519MLKEM768:…still negotiates X25519MLKEM768 with Go's client. OpenSSL 3.5 treats a colon list as one preference tuple and follows the client's key shares, so no test can see the order.make e2e(the kind suites): CI runs it.Decided for you: I put QUIC-only in the generated config rather than as a flag, and I did not add an http2 opt-out. Nginx keeps classical X25519 and P-256 for older clients, as spec B specifies. PG18
ssl_groupsis not in this PR: #217 is still open, and the change goes to the root thread to route.You need to: nothing. Do not merge until CI, the security reviewer and the PR Reviewer Guide are clean.
Detail
Spec B (ky-primitives
docs/pqc-stack-plan), wave W0, rows 3 and 4.Probe with the pinned cloudflared 2026.10.0, offline, using
post-quantum: truein the config and--protocol http2on the command line:So the binary accepts the pair. The new e2e step starts the tunnel offline with the generated file and requires
post-quantum:true,protocol:quicandInitial protocol quicin its log.Pinned nginx image,
nginx -V:Handshake cases in
TestNginxContainer(Go client):🤖 Generated with Claude Code