Skip to content

tvc-axum: signed responses with attestation/manifest headers - #199

Draft
emostov wants to merge 18 commits into
mainfrom
zeke/tvc-axum-utils
Draft

tvc-axum: signed responses with attestation/manifest headers#199
emostov wants to merge 18 commits into
mainfrom
zeke/tvc-axum-utils

Conversation

@emostov

@emostov emostov commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Adds a tvc-axum crate: a tower ResponseSigningLayer that signs every response with the enclave ephemeral key (and optionally the quorum key) using RFC 9421/9530 headers, and attaches x-tvc-attestation-doc (user_data = manifest hash, public_key = ephemeral key) and x-tvc-manifest-envelope headers so clients can verify the full trust chain. Includes a QosJson<T> response type for canonical qos_json bodies.

Ships the client-side verifiers: verify_quorum_signature (quorum response signature against a known quorum key) and verify_response_trust_chain (qos_core attestation/manifest verification, then the ephemeral response signature with the attested key).

The trust-chain verifier lives in qos_core (tkhq/qos#765); [patch.crates-io] points qos_* at that branch until it publishes.

Verification: cargo fmt -- --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test -p tvc-axum, cargo build --workspace.

@socket-security

socket-security Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedaxum@​0.8.99710093100100

View full report

emostov added 3 commits July 15, 2026 22:35
…pers

qos_core 0.12.2 on crates.io does not yet contain the fake manifest
builder and trust chain verifier (qos PR #765). Patch all qos_* crates
to the same git revision since qos_core uses in-repo path dependencies.

TODO: remove once qos PR #765 merges and a new qos_core version is
published, then bump the qos_* version pins.
The fake manifest builder and trust chain verifier now live in
qos_core::protocol::services::boot (fake behind the "mock" feature),
ported from tvc-utils in qos PR #765. Switch the tests to those paths
and drop the tvc-utils dev-dependency.
The fake manifest builder and trust chain verifier were ported verbatim
to qos_core::protocol::services::boot::{fake, verify} in qos PR #765
(tkhq/qos#765). tvc-axum tests already consume
them from qos_core, so the crate has no remaining users.
@emostov emostov changed the title tvc-axum + tvc-utils: signed responses with attestation/manifest headers + fake manifest helpers tvc-axum: signed responses with attestation/manifest headers Jul 16, 2026
emostov added 8 commits July 16, 2026 11:48
The qos branch removed the boot::fake module and changed
verify_attestation_and_manifest to take a validation time and a
ManifestCommitmentKind. Replace the fake helpers with test-local
envelope construction (threshold-1 manifest-set approval) and seed the
mock NSM with the setup manifest commitment PCR so emitted attestation
documents pass full verification.
verify_quorum_signature checks the quorum response signature with a
known quorum public key. verify_response_trust_chain verifies the
attestation and manifest headers with qos_core's
verify_attestation_and_manifest, then checks the ephemeral response
signature with the attested key and returns it. Both rebuild the RFC
9421 signature base from a SignedResponseParts, recomputing the RFC
9530 content digest from the body so a tampered body fails
verification.
Exercise verify_quorum_signature and verify_response_trust_chain
end-to-end against responses emitted by ResponseSigningLayer: happy
path for both (quorum key taken from the verified manifest), wrong
quorum key, tampered body and status, expectation mismatch propagating
the qos VerifyError, and missing quorum entry. Drops the hand-rolled
signature-base tests these supersede.
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