-
Notifications
You must be signed in to change notification settings - Fork 35
feat(report,hyperv)!: functionality to get fresh reports on Azure CVMs #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(report,hyperv)!: functionality to get fresh reports on Azure CVMs #141
Conversation
b7dd0bb to
e559ce3
Compare
|
Hello @hyperfinitism, Currently reviewing and testing on my side. Just had a quick question for you. With these changes would the -a (previously -p) flag still be needed? What I mean by this is that if someone builds with the hyperv feature enabled, then could we make it so that they only request reports from the TPM? or if hyperv is enabled they could still get reports from either the asp and the tpm? |
About the flag nameThe former However, as already mentioned, this name is misleading. In reality, at VM boot time, the paravisor running at VMPL0 requests an attestation report from the ASP and writes it into the vTPM NV index. The command In this PR, the behaviour is fundamentally different. The guest OS provides 'user data' to the paravisor (via the vTPM NV index), the paravisor derives REPORT_DATA from it, and then requests a fresh attestation report from the ASP using that REPORT_DATA. Since the semantic meaning of the flag changes completely, I believe it is better to rename it rather than keep the old name. As an alternative, for backward compatibility, we could keep the existing Behaviour when built with the
|
|
Yeah I understand the differences. What I'm asking is that if it would make sense to only request reports from the NV index if the tool was built with the hyperv feature, essentially removing the --azure-cvm flag. Or is there a reason that we would want to keep the functionality to get it from /dev/sev-guest in a hyperv snpguest. I guess for people that would want to share the same snpuguest binary between azure guests and regular linux ones, but I'm open to hear your thoughts. I don't really mind keeping the backward compatibility for --platform since this addition will be a breaking change regardless. |
|
Remove the
Is my understanding correct? I agree this approach represents a very natural and clean design. It simplifies both the CLI interface and the internal logic. On the other hand, as you pointed out, the current approach of a single binary with
|
|
@hyperfinitism where is the documentation for the NV index 0x01400002 ? thanks |
|
@elmarco |
|
@hyperfinitism thanks, I have access to an azure confidential vm, I can read 0x01400001 but not 0x01400002. Is there something special to do to have access to it? |
|
@elmarco tpm2_nvdefine 0x01400002 -C o -s 64The guest can then supply 64 bytes of data to this index: tpm2_nvwrite 0x01400002 -C o -i $USER_DATA_PATH |
|
@hyperfinitism Haven't forgotten about this PR. I'm trying to get an Azure VM running to test it on my side |
Signed-off-by: Takuma IMAMURA <[email protected]>
e559ce3 to
92a676c
Compare
|
Thank you for the follow-up. Really appreciate you taking the time to get an Azure CVM running for testing. As a quick update, the smaller patch (#136) was merged first, so I have rebased this PR onto the latest main to clean up the conflicts. |
Background
This pull request aims to implement the attestation flow described in Issue #116.
Currently, on Azure Confidential VMs,
snpguest(with thehypervfeature) only retrieves the boot-time SNP report that the paravisor writes into vTPM NV index 0x01400001.To request a fresh SNP report bound to arbitrary 64-byte data, the following attestation flow is required:
user-data) to NV index 0x01400002Runtime Claimscontaining the user-data, the vTPM attestation public key, VM configuration, etc., and passes the hash value of this JSON asREPORT_DATAto the ASPThis PR implements this flow.
What's changed
Flag name (breaking change)
snpguest report:-p, --platform→-a, --azure-cvmCLI behavior (breaking change)
snpguest report report.bin report-data.bin -asnpguest report report.bin report-data.bin -a -r-a(formerly-p) conflicts with-rWith these semantics, the
REPORT_DATAfield in the report will no longer match the rawreport-data.bin, since the paravisor computesuser-data→Runtime Claims→ SHA hash digest →REPORT_DATA.Code Structure
hypervmodule splits into separate submodules for clarityRelated Issue (Updated: 23 Jan 2026)
Issue #116 will remain open because the functionality for handling Runtime Claim JSON has not yet been implemented. To implement a complete attestation flow for Azure, the following data must be extracted from the HCL report blob read from the vTPM NV index:
Test
Test procedure
Test Environment