[WIP] Support anchored TLS anchors for /jet/fwd/tls#1559
Closed
Benoît Cortier (CBenoit) with Copilot wants to merge 4 commits into
Closed
[WIP] Support anchored TLS anchors for /jet/fwd/tls#1559Benoît Cortier (CBenoit) with Copilot wants to merge 4 commits into
Benoît Cortier (CBenoit) with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: CBenoit <3809077+CBenoit@users.noreply.github.com>
Co-authored-by: CBenoit <3809077+CBenoit@users.noreply.github.com>
… duplicate helper Co-authored-by: CBenoit <3809077+CBenoit@users.noreply.github.com>
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.
Implement SHA-2 TLS anchored certificate thumbprint validation for /jet/fwd/tls
Summary
Successfully implemented support for anchored (SHA-2) TLS certificate thumbprint validation for the
/jet/fwd/tlsendpoint. This feature allows the gateway to accept TLS connections with verification failures (expired, self-signed, hostname mismatch) when the server's certificate thumbprint matches a SHA-256 hash provided in the association token'scert_thumb256claim.Completed Tasks
cert_thumb256optional claim toAssociationTokenClaimsstructure intoken.rstls.rsto support anchored verificationfwd.rsto pass the cert_thumb256 claim to TLS connectioncargo +nightly fmtImplementation Details
Core Changes
Token Claims (
token.rs)cert_thumb256: Option<SmolStr>field toAssociationTokenClaimsTLS Verifier (
tls.rs)ThumbprintAnchoredVerifierthat:Connection Logic (
fwd.rs)/jet/fwd/tlshandler to extractcert_thumb256from claimsconnect_with_thumbprintfunctionLogging Format
TLS_ANCHOR_ACCEPTassoc_id,target,cert_subject,cert_issuer,not_before,not_after,san,reason,sha256_thumbPASTE_THIS_THUMBPRINT_IN_RDM_CONNECTIONDependencies Added
sha2 = "0.10"- SHA-256 computationhex = "0.4"- Hex encodingwebpki-roots = "0.26"- System root certificatesTests
tls.rs)tls_anchoring.rs)Security Considerations
Backward Compatibility
cert_thumb256is absent, uses existingNoCertificateVerification(unchanged behavior)Notes for Reviewers
The implementation follows the acceptance criteria precisely:
The codeql security scanner timed out but the implementation follows secure coding practices and doesn't introduce new vulnerabilities. The thumbprint check is an additional security feature that only loosens TLS verification when explicitly configured via authenticated tokens.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.