-
Notifications
You must be signed in to change notification settings - Fork 55
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
joinservice: cache certificates for Azure SEV-SNP attestation #2336
Conversation
This introduces attestation-variant-specific code in otherwise attestation-variant-agnostic code. This can get messy if we add more variants in the future. We should try to reduce this where possible.
Not sure if all of this makes sense or if there are better ways. Please think about it. |
I definitely see the point here and agree. Regarding having a |
True. We should discuss that with @daniel-weisse. I think he has designed most of the current architecture. |
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.
What about adding the ASK as an optional value to the Azure attestation config?
While this would still require attestation variant specific code in the join-service, it would keep the function signature intact, and also allows us to easily disable the caching behavior for the CLI (by not setting the optional ASK field).
We already do something similar for the MAA URL on Azure.
✅ Deploy Preview for constellation-docs canceled.
|
32e0d25
to
19cfd86
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.
Implementation looks good to me now
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.
Please run e2e tests before merging.
Otherwise looks good to me
Looks good from a high level. I think Daniel and Thomas are the best reviewers when it comes to the attestation details. |
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
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Co-authored-by: Thomas Tendyck <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Co-authored-by: Thomas Tendyck <[email protected]>
Co-authored-by: Thomas Tendyck <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
Signed-off-by: Moritz Sanft <[email protected]>
a92dbef
to
32888f9
Compare
Signed-off-by: Moritz Sanft <[email protected]>
Coverage report
|
// X509CertToPem takes an x.509 certificate and returns it as a PEM-encoded certificate. | ||
func X509CertToPem(cert *x509.Certificate) ([]byte, error) { |
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.
// X509CertToPem takes an x.509 certificate and returns it as a PEM-encoded certificate. | |
func X509CertToPem(cert *x509.Certificate) ([]byte, error) { | |
// X509CertToPEM takes an x.509 certificate and returns it as a PEM-encoded certificate. | |
func X509CertToPEM(cert *x509.Certificate) ([]byte, error) { |
PEM should be the correct form here
Context
Caching ASK intermediate certificates is a prerequisite for VLEK-based signer attestation as performed on AWS SEV-SNP, but can also be used on Azure.
Proposed change(s)
constellation/internal/attestation/azure/snp/validator.go
Lines 267 to 271 in d3c9769
Additional info
Checklist