Skip to content

Use TAV for SNP attestation verification - #8083

Draft
cjen1-msft wants to merge 4 commits into
microsoft:mainfrom
cjen1-msft:tee-attestation-integration-tav
Draft

Use TAV for SNP attestation verification#8083
cjen1-msft wants to merge 4 commits into
microsoft:mainfrom
cjen1-msft:tee-attestation-integration-tav

Conversation

@cjen1-msft

@cjen1-msft cjen1-msft commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Integrates TAV into CCF for snp attestation verification.

This might be our first 8.X PR as the 'optimal' deduplication approach will be that TavSnpAttestation replaces AttestationReport, but that then turns the accessors from data accessors into a struct into ffi calls.
So this would be a breaking API change.

For purely internal use this would not be a breaking change.

Update:
Specifically for https://github.com/microsoft/scitt-ccf-ledger this would break their current build.
I think the best option here is to mark the PODS struct as deprecated and move all our internal stuff over to TAV.
Then in either 8.X or 9.X we dedupe it.

@cjen1-msft cjen1-msft mentioned this pull request Jul 20, 2026
@cjen1-msft
cjen1-msft force-pushed the tee-attestation-integration-tav branch 2 times, most recently from a1af44a to 70019d1 Compare July 21, 2026 09:44
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2ec11cce-7838-47b5-be19-21425a3a3bbf
@cjen1-msft
cjen1-msft force-pushed the tee-attestation-integration-tav branch from 70019d1 to b96a3d6 Compare August 5, 2026 16:26
@cjen1-msft
cjen1-msft marked this pull request as ready for review August 5, 2026 18:34
@cjen1-msft
cjen1-msft requested a review from a team as a code owner August 5, 2026 18:34
Copilot AI lite review requested due to automatic review settings August 5, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR integrates the TEE Attestation Verification (TAV) FFI crate into CCF’s Rust umbrella (ccf-rs) and switches SEV-SNP attestation verification in the PAL layer to use tav_verify_snp_attestation, while keeping CCF’s existing report parsing and policy checks.

Changes:

  • Add the TAV FFI crate to ccf-rs and update the locked Rust dependency graph.
  • Replace PAL-side SNP certificate-chain, signature, and TCB verification logic with a TAV verification call and map failures to CCF errors.
  • Update SEV-SNP attestation validation tests and build system wiring (Rust build deps, PAL include/link settings).

Custom instructions used:

  • .github/copilot-instructions.md
  • .github/instructions/reviewing.instructions.md

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/rust/src/lib.rs Re-exports the new TAV FFI crate from the ccf-rs umbrella.
src/rust/Cargo.toml Adds the vendored tee-attestation-verification-ffi dependency with OpenSSL crypto feature.
src/rust/Cargo.lock Locks new transitive dependencies introduced by TAV integration.
src/pal/test/snp_attestation_validation.cpp Adds/updates negative tests to expect TAV failure paths and error codes.
src/pal/tav_ffi.h Introduces RAII wrappers for TAV error/report handles used by PAL.
src/pal/attestation.cpp Replaces local SNP chain/signature verification with tav_verify_snp_attestation and consistent error reporting.
CMakeLists.txt Updates ccf_pal link libraries and adds include path for TAV FFI headers.
cmake/ccf_rs.cmake Ensures the Rust build target reruns when the vendored TAV FFI Cargo.toml changes.

Comment thread src/rust/Cargo.toml

[dependencies]
cose-rs = { path = "../cose/cose_rs" }
tav = { package = "tee-attestation-verification-ffi", path = "../../3rdparty/internal/tee-attestation-verification/ffi", default-features = false, features = ["crypto_openssl"] }
Comment thread CMakeLists.txt
ccf_pal
SRCS ${CCF_DIR}/src/pal/attestation.cpp
LINK_LIBS ccfcrypto
LINK_LIBS ccfcrypto ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} m
@cjen1-msft
cjen1-msft force-pushed the tee-attestation-integration-tav branch from 8ad6daa to 06c0172 Compare August 6, 2026 17:05
@cjen1-msft
cjen1-msft marked this pull request as draft August 6, 2026 17:05
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.

2 participants