Skip to content

verifier: refactor az-snp-vtpm to avoid tss-esapi dep - #1

Open
shariqahmed-cohere wants to merge 1 commit into
coherefrom
shariq/portable-azsnp
Open

verifier: refactor az-snp-vtpm to avoid tss-esapi dep#1
shariqahmed-cohere wants to merge 1 commit into
coherefrom
shariq/portable-azsnp

Conversation

@shariqahmed-cohere

@shariqahmed-cohere shariqahmed-cohere commented Sep 9, 2026

Copy link
Copy Markdown

az-snp-vtpm depends on tss-esapi to unmarshall TPM quotes which limits its portability to linux. This change replaces that dependency with tpm2-protocol (combined with az-cvm-vtpm) to allow verifier to compile on other platforms.

The new impl leverages existing non-azure SNP functionality along with tpm2-protocol and az-cvm-vtpm. It also adds validity window check on vcek to keep functionality 1-to-1 with the previous az-snp-vtpm flow.


Note

Medium Risk
Changes attestation verification for Azure SNP vTPM (TPM parsing and SNP/VCEK validation paths); behavior is intended to stay equivalent but any mismatch in TPM or certificate handling would affect trust decisions.

Overview
Refactors Azure SNP vTPM verification so the az-snp-vtpm-verifier feature no longer depends on az-snp-vtpm or tss-esapi (libtss2). TPM quote parsing now uses tpm2-protocol; HCL handling comes from az-cvm-vtpm with default features off so only the HCL path is linked unless tpm-verifier opts into az-cvm-vtpm/verifier.

SNP/VCEK checks are aligned with the existing snp-verifier: sev certificate chains, report signature verification, and shared verify_report_tcb, plus an explicit VCEK not-before/not-after check that chain verification alone did not enforce. Legacy v0 evidence keeps a local Quote type in compat.rs so JSON layout stays unchanged; Azure TDX vTPM keeps its own From<Quote> for TpmQuote so the SNP build path does not pull in libtss2.

Reviewed by Cursor Bugbot for commit 9220bda. Bugbot is set up for automated code reviews on this repo. Configure here.

az-snp-vtpm depends on tss-esapi to unmarshall TPM quotes which limits its portability to linux. This change replaces that dependency with tpm2-protocol (combined with az-cvm-vtpm) to allow verifier to compile on other platforms.

Signed-off-by: Shariq Khalil Ahmed <shariq.ahmed@cohere.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@shariqahmed-cohere
shariqahmed-cohere marked this pull request as ready for review September 11, 2026 19:23
@shariqahmed-cohere

Copy link
Copy Markdown
Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9220bda. Configure here.

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