-
Notifications
You must be signed in to change notification settings - Fork 90
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
az-snp/tdx-vtpm-verifier: add PCRs to claims map #334
az-snp/tdx-vtpm-verifier: add PCRs to claims map #334
Conversation
bbf9843
to
e832896
Compare
}; | ||
|
||
let mut tpm_values = serde_json::Map::new(); | ||
for (i, pcr) in quote.pcrs_sha256().enumerate() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's pcrs_sha256
coming from? I couldn't track it down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.rs/az-snp-vtpm/latest/az_snp_vtpm/vtpm/struct.Quote.html#method.pcrs_sha256
those are the measurement digests from the CVM's vTPM. The launch measurements in TD/SNP reports do not tell us much beyond the HW state of the guest here, since the reports are fetched at early boot. Measurement of e.g. kernel, initrd, rootfs and more is deferred to the TPM registers. So we will have reference values for, say quote.tpm.pcr11
, to verify the UKI of the confidential guest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mkulke, that info is helpful. Yeah I was sanity-checking the element iteration/ordering when I asked this question, I believe. LGTM, nice PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice PR!
e832896
to
7b908df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I've merged confidential-containers/guest-components#486
Do we need to bump the version in the client Cargo file to pick that up?
7b908df
to
8c5c470
Compare
PCR values are added in a `"tpm": { "pcr0": ..., "pcrN": ... }` hierarchy, to the claims map so they can be compared to reference values. Signed-off-by: Magnus Kulke <[email protected]>
8c5c470
to
d155be0
Compare
PCR values are added in a
"tpm": { "pcr0": ..., "pcrN": ... }
hierarchy to the claims map so they can be compared to reference values.