Run on aws sev-snp which uses vlek - #8116
Draft
Ivar (aɪvɑr) (ivarprudnikov) wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening this so not to lose the work after trying to run CCF on AWS SEV-SNP. Not sure if you want to support it or if there is anyone waiting for it.
On shared-tenancy SEV-SNP hosts (AWS
m6a/c6a), reports are signed by a VLEK and the chip ID is all zeros. CCF assumed VCEK, so it requested /vcek/v1/Milan/000... from AMD KDS and failed to start. It seemed like a low hanging fruit to try and extend the logic and to expand the reach of the framework.The implementation:
signing_keyflag in the signed report, not from cloud-provider detectionsnp_ioctl6.h: retrieve the host certificate table via SNP_GET_EXT_REPORT and extract the VLEK leaf. Accepts the VLEK or VCEK GUID slot, in big-endian or mixed-endian order, as hosts differ (AWS emitted big-endian)attestation_sev_snp{,_endorsements}.h: VLEK reports use/vlek/v1/<product>/cert_chain; chip ID becomes optional; Azure/THIM endorsement types reject VLEKattestation.cpp: verification accepts either signer. VCEK keeps chip-ID matching; VLEK requires no chip-ID extension and an all-zero report chip IDquote_generation.h,node_state.h,quote_endorsements_client.h: seed the fetch pipeline with the host-supplied leafHow it was tested:
c6a.largeinstance on AWS with AMD SEV-SNP enabled, usingUbuntu 24.04ca-certificates curl docker-ce docker-ce-cli docker-buildx-plugindocker run --rm -it --network=host --device=/dev/sev-guest -v $(pwd)/workspace:/host --entrypoint cchost scitt-snp:vlek --config /host/dev-config.jsonscitt-snp:vlekwas just an imported docker image tag