Skip to content

refactor(attestation)!: verify only attested evidence - #266

Merged
samlaf merged 1 commit into
seismicfrom
sl/sei-396-refactorattestation-verify-only-attested-evidence
Aug 26, 2026
Merged

refactor(attestation)!: verify only attested evidence#266
samlaf merged 1 commit into
seismicfrom
sl/sei-396-refactorattestation-verify-only-attested-evidence

Conversation

@samlaf

@samlaf samlaf commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixes SEI-396.

The verifier returns Ok(None) for evidence that declares attestation_type: none when its policy names no attested platform. seismic-attestation passed that through as a reachable success: VerifiedSeismicAttestation::NoAttestation, verified measurements that measure nothing. Every Seismic relying party appraises a TEE node, so that outcome is never wanted, and modelling it cost an Option in the crate's own signatures.

It was reachable only through verify_evidence_with_predicate, which builds its policy from the peer's own claimed type: a peer claiming none got a policy for none, and the verifier accepted. Both admission predicates happened to reject the variant, but nothing enforced it — a future predicate written to appraise measurements would have admitted an unattested peer, since NoAttestation carries none to fail on.

verify_with_backend_policy now refuses a None result with AttestationError::Unattested before any predicate runs. That makes the rest unreachable, so it goes: the NoAttestation variant, the Option on from_backend, and AttestationError::MissingMeasurements. A test drives none evidence through the predicate path with an admit-everything predicate and asserts the refusal.

The none-claiming joiner's refusal moves from the admission layer to the verification layer; its wire error stays
RootKeyRefusal::RequesterEvidenceUnusable, now by an explicit Unattested arm in rpc_error pinned by test rather than by placement. The admission tests that used NoAttestation as their non-Azure case use DcapTdx, a type a predicate can actually receive.

verify_evidence_with_policy also absorbs its _and_options twin and takes VerifyOptions directly. Running without TDX hardware stays the verifier's mock feature, which produces real DcapTdx evidence against a mock root.

Fixes SEI-396.

The verifier returns Ok(None) for evidence that declares
attestation_type: none when its policy names no attested platform.
seismic-attestation passed that through as a reachable success:
VerifiedSeismicAttestation::NoAttestation, verified measurements that
measure nothing. Every Seismic relying party appraises a TEE node, so
that outcome is never wanted, and modelling it cost an Option in the
crate's own signatures.

It was reachable only through verify_evidence_with_predicate, which
builds its policy from the peer's own claimed type: a peer claiming
`none` got a policy for `none`, and the verifier accepted. Both
admission predicates happened to reject the variant, but nothing
enforced it — a future predicate written to appraise measurements
would have admitted an unattested peer, since NoAttestation carries
none to fail on.

verify_with_backend_policy now refuses a None result with
AttestationError::Unattested before any predicate runs. That makes
the rest unreachable, so it goes: the NoAttestation variant, the
Option on from_backend, and AttestationError::MissingMeasurements.
A test drives `none` evidence through the predicate path with an
admit-everything predicate and asserts the refusal.

The `none`-claiming joiner's refusal moves from the admission layer
to the verification layer; its wire error stays
RootKeyRefusal::RequesterEvidenceUnusable, now by an explicit
Unattested arm in rpc_error pinned by test rather than by placement.
The admission tests that used NoAttestation as their non-Azure case
use DcapTdx, a type a predicate can actually receive.

verify_evidence_with_policy also absorbs its _and_options twin and
takes VerifyOptions directly. Running without TDX hardware stays the
verifier's `mock` feature, which produces real DcapTdx evidence
against a mock root.
@samlaf
samlaf requested a review from cdrappi as a code owner August 26, 2026 16:45
@linear-code

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown

SEI-396

@samlaf
samlaf merged commit e026b87 into seismic Aug 26, 2026
5 checks passed
@samlaf
samlaf deleted the sl/sei-396-refactorattestation-verify-only-attested-evidence branch August 26, 2026 17:00
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