Skip to content
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

AWS node attestor needs to use different cert for different regions #2126

Closed
xinlaini opened this issue Feb 27, 2021 · 6 comments · Fixed by #4124
Closed

AWS node attestor needs to use different cert for different regions #2126

xinlaini opened this issue Feb 27, 2021 · 6 comments · Fixed by #4124
Assignees
Labels
help wanted Issues with this label are ready to start work but are in need of someone to do it priority/backlog Issue is approved and in the backlog
Milestone

Comments

@xinlaini
Copy link

  • Version: 3ee20c9
  • Platform: GCP
  • Subsystem: node attestor plugin for aws

We recently spun up an AWS vm in eu-south-1 (Milan), our existing spire-server (running from GCP) failed to attest the new VM with "cryptography signature verification failures".

It seems that the aws_iid plugin is using a hardcoded cert regardless of the region the aws vm lives in.

However, according to aws doc (for PKCS7 signature verification), milan region has a different DSA cert. I suspect the should have a different RSA cert for that region as well (which I believe is what aws_iid code is using).

It seems not correct to hard code the cert to be used for all region's node attestation.

@evan2645
Copy link
Member

Thank you for opening this @xinlaini!

I remember when we implemented the aws_iid attestor, and being surprised that the validation cert was defined statically on the documentation website. I'm again surprised to find that there are now different certs for some regions :) I feel like that wasn't the case when the plugin was implemented.

At any rate, thanks again for opening this, I think it's clear that we need to pull in all the certs defined on the webpage you linked to, and choose the right cert based on region.

@xinlaini xinlaini changed the title AWS node attestor need to use different cert for different regions AWS node attestor needs to use different cert for different regions Feb 27, 2021
@azdagron azdagron added the priority/backlog Issue is approved and in the backlog label Apr 17, 2023
@azdagron azdagron added this to the 1.6.4 milestone Apr 17, 2023
@azdagron
Copy link
Member

Another interesting tidbit is that the current certificate expires next year. We'll need a plan in place for dealing with that as well. We'll go ahead and schedule this soon to give us time to come up with something.

@azdagron azdagron added the help wanted Issues with this label are ready to start work but are in need of someone to do it label Apr 17, 2023
@maxlambrecht
Copy link
Member

maxlambrecht commented May 1, 2023

I submitted a draft PR addressing the two aspects of this issue: lack of support for several regions and the expiration of the currently used certificate (in June next year)

The changes involve:

The issue with these changes is that they break backward compatibility.

@maxlambrecht
Copy link
Member

Update: the PR is ready, supports all regions, and is backward compatible.

@evan2645 evan2645 modified the milestones: 1.6.4, 1.7.0 May 11, 2023
@shashankram
Copy link
Contributor

@maxlambrecht @evan2645 @azdagron is this fix available in 1.6.4 or will it only be available in 1.7.0? Also do we know which region the cert was hardcoded to previously?

@azdagron
Copy link
Member

Answered in slack :) For posterity, this is 1.7.0 only and the key in reference is the main RSA key specified at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/verify-signature.html.

The following AWS public certificate is for all AWS Regions, except Hong Kong, Bahrain, UAE, Cape Town, Milan, Spain, Zurich, Jakarta, Melbourne, Hyderabad, China, and GovCloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues with this label are ready to start work but are in need of someone to do it priority/backlog Issue is approved and in the backlog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants