[STACKED on #964] fix(verifier): validate one-shot certificate profile - #938
Merged
Conversation
kvinwang
force-pushed
the
codex/fix-ra-tls-security-profile
branch
from
July 31, 2026 03:32
ee8e684 to
6c9626a
Compare
kvinwang
changed the base branch from
master
to
codex/feat-simulator-seeded-attestation
July 31, 2026 03:32
Base automatically changed from
codex/feat-simulator-seeded-attestation
to
master
August 5, 2026 11:55
kvinwang
force-pushed
the
codex/fix-ra-tls-security-profile
branch
from
August 5, 2026 11:55
309de9f to
cdda5fa
Compare
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.
Problem
The
dstack-verifier --verify-certone-shot path reads a certificate directly from disk, so it does not pass through rustls/WebPKI certificate validation. Certificates with an invalid self-signature, validity period, key usage, extended key usage, or SAN profile could reach the one-shot attestation trust decision.Root cause and fix
Validate the required endpoint certificate profile in
dstack-verifierbefore performing RA-TLS attestation and public-key-binding verification.The profile policy intentionally lives in
dstack-verifier, not thera-tlslibrary:ra-tlsremains responsible only for parsing and cryptographically verifying the embedded attestation and its binding to the certificate SPKI. This avoids implying that the reusable library API performs general TLS/WebPKI endpoint validation.Implementation
x509-parsersignature verification only indstack-verifier.Changed paths relative to the stacked parent:
dstack/Cargo.lockdstack/verifier/Cargo.tomldstack/verifier/src/main.rsScope
This PR addresses the certificate-file one-shot path only. Normal TLS connections remain subject to their TLS stack's certificate verification. The reusable
ra-tlsverification API continues to verify attestation evidence and SPKI binding without imposing an application-specific X.509 profile.Dependency and merge order
codex/feat-simulator-seeded-attestationVerification
cargo check -p dstack-verifier: passed.cargo test -p ra-tls --lib: passed (13 tests).git diff --check: passed.