-
Notifications
You must be signed in to change notification settings - Fork 88
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
Update az snp / tdx vtpm dependency to 0.5 #293
Update az snp / tdx vtpm dependency to 0.5 #293
Conversation
I think you'll want to do |
I think I will wait until confidential-containers/guest-components#436 is merged. |
686a5ae
to
1148d9e
Compare
The stable check seems to have a legit failure. Maybe there were changes to the crate? |
Yes that's right. I am on it. |
072a4c2
to
f0a3d5e
Compare
cc: @mkulke for review of the updated tests. |
Can someone authorize the test runs? |
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.
the az-tdx-vtpm verifier has been merged since, should we adjust it in the same PR?
regarding the switch to v0.5: this changed the body of the evidence. we might want to consider versioning the evidence that we produce on the attester side. if someone sends evidence with older guest-components to this verifier it'll fail to serialize, with a potentially confusing error. :/
if we'd send { version: "v1" , ... }
from guest-components, we could verify this here with a readable error msg: "Evidence version < v1" or something
Alternatively we can change the Evidence type here to have pcrs: Option<...>
and fail with a similar error if it's None. but I find the first option preferable
f0a3d5e
to
641229d
Compare
What does this entail?
How do I do this? As in add the version where? |
bumping the az-tdx crate too, and a similar replacement of the evidence fixtures I guess. should be pretty much 1:1 to the az-snp changes |
The version would have to be added to the evidence type in guest-components and similarly in the verifier module here: At the moment the evidence is serialized as json and maybe serde will happily ignore an additional property but we would have to introduce such a field once we actually use the |
Once confidential-containers/guest-components#460 merged, I will udpate this PR to use 0.5.1 for az-cvm-vtpm crates and also update the guest components. |
2227155
to
d4dbd45
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.
small nits, otherwise lgtm
d4dbd45
to
b62f608
Compare
There is a dependency to guest-components in |
Replace `verion` with `version`. Signed-off-by: Suraj Deshmukh <[email protected]>
b62f608
to
b2e412c
Compare
- Update sub-crates az-snp-vtpm and az-tdx-vtpm to 0.5.1. - KBS-tools: Update guest-componenets revision. Signed-off-by: Suraj Deshmukh <[email protected]>
This commit updates the test fixtures, way to load quote and way to mess with quote for negative tests. Signed-off-by: Suraj Deshmukh <[email protected]>
b2e412c
to
c36b036
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.
There is a quote.verify_pcrs() check missing in each verifier.
Also, I don't think there is a pub fn to retrieve the PCRs from the quote yet. We can address this is a later PR when we actually consume the PCRs, as this probably needs a new minor release in the az-*-vtpm crates.
Why don't we use the generic Rather than reimplementing them here: https://github.com/confidential-containers/kbs/blob/3003ced913bf83fa11d3ef753bb621f9cd030ae8/attestation-service/verifier/src/az_tdx_vtpm/mod.rs#L76-L94 |
Ah, good question. There is a pending refactoring that will move the verification of report_data/nonce to from the verifiers to an upper level, so we cannot use the unified
it's not re-implementing. we're actually calling the library verification, we just have to extract the pubkey prior to sig verification. Finally, in the doc-comments on both verifier fns the individual verification steps are enumerated. it would be good to add that we perform a PCR digest check here. |
@mkulke done. |
The new update of the library now allows the user to verify if the digest of PCRs matches the digest in Quote. Signed-off-by: Suraj Deshmukh <[email protected]>
0fbae30
to
05039ea
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
@fitzthum if the code looks good to you can we merge this? |
No description provided.