Skip to content

fix(v0.5): verify RA-TLS key possession and key-handover peer - #1523

Closed
kvinwang wants to merge 1 commit into
release/v0.5.xfrom
fix/v05-ratls-server-key-possession
Closed

kvinwang wants to merge 1 commit into
release/v0.5.xfrom
fix/v05-ratls-server-key-possession

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Backport of #1522 (7ed5475), plus #1108's verification of the actual key-handover connection, to release/v0.5.x.

The Rustls backend of reqwest 0.12.28 skips TLS handshake signatures when danger_accept_invalid_certs(true) is used. A peer holding only a copied certificate can therefore pass a later certificate/attestation identity check. Keep CA bypass for RA-TLS, but verify TLS 1.2 and 1.3 signatures and preserve the configured mTLS client identity.

Onboarding now captures and authorizes the source attestation on the connection that returns GetKmsKey, before using the keys. The temporary-CA preflight, CA-issued client certificate, RPC schema, and 0.5 behavior remain supported; no root-epoch protocol or temporary-CA removal is included. Land the standalone mainline fix first.

Validation: Linux x86_64, Rust 1.92.0, release 0.5.12 source, reqwest 0.12.28 / rustls 0.23.37. Loopback mTLS fixtures use generated P-256 keys and an exact server-certificate pin; the impersonator presents that certificate but signs with another key. Unmodified release code wrongly accepts it under both TLS 1.2 and 1.3; the fix rejects both while matching-key controls succeed. Six tests across ra-rpc, cert-client and KMS pass (--all-features --locked --offline), as do strict Clippy, formatting, and REUSE. No live KMS or hardware TEE onboarding was tested.

Adapt 7ed5475 from #1522 to the release layout and reqwest 0.12 API.
Retain TLS handshake-signature verification while bypassing CA validation.

Also backport #1108's source-attestation binding to the connection that
returns the root keys. Keep the 0.5 temporary-CA protocol and public RPCs.

Signed-off-by: Kevin Wang <wy721@qq.com>
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.

1 participant