Skip to content

fix(ra-rpc): verify TLS key possession for attested servers - #1522

Merged
kvinwang merged 4 commits into
nextfrom
fix/ratls-server-key-possession
Nov 7, 2026
Merged

kvinwang merged 4 commits into
nextfrom
fix/ratls-server-key-possession

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

RA-TLS checks server attestation after the HTTP response. Reqwest's Rustls no-verifier also skips TLS handshake signatures, allowing a copied certificate to pass a later identity check without proving possession of its private key.

Keep the TLS adapter in client/tls.rs, delegate handshake signatures to rustls, and reuse the existing test PKI. Rename tls_no_check to tls_skip_ca_verification throughout callers; the default remains false. This skips CA-based certificate checks (trust chain, hostname, validity), not TLS key-possession checks. Client certificate authentication and separately configured attestation verification remain intact.

The regression server presents the pinned certificate but signs with a different key. Both TLS 1.2 and 1.3 accept it before the fix and reject it afterward; matching-key controls and CA-issued mTLS clients still work. The fix is independent of #1517's root rotation and temporary-CA removal.

Validation: 219 tests across ra-rpc, cert-client, KMS and dstack-util passed, as did strict Clippy, formatting, and REUSE. Linux x86_64, Rust 1.92.0, reqwest 0.13.4 / rustls 0.23.46, --all-features --locked --offline; loopback TCP, generated P-256 PKI, exact certificate pin, CA-issued client certificates, TLS 1.2 and 1.3. No hardware TEE or live deployment was used.

Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang merged commit 73c0e86 into next Nov 7, 2026
12 checks passed
@kvinwang
kvinwang deleted the fix/ratls-server-key-possession branch November 7, 2026 04:25
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