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

Stack

Summary

  • add the OpenSSL-backed TAV FFI crate to the ccf-rs umbrella
  • replace PAL SNP certificate-chain, report-signature, and TCB verification with tav_verify_snp_attestation
  • retain the existing CCF SNP report type, report accessors, and CCF-specific policy checks
  • defer migration of report ownership and accessors to a later change

Testing

  • Rust 1.90 locked release umbrella build and tav_verify_snp_attestation symbol check
  • snp_attestation_test (12 cases, 49 assertions)
  • ccf target build
  • CMake and C++ formatting
  • copyright, ASCII, public include, and diff checks
  • independent verifier correctness and MVP scope reviews

@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