-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(VpcInstanceAuthenticator): add support for new VPC authentication flow #172
Conversation
ef45f0b
to
e41e6d4
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.
Looks good overall. I pointed out a few minor things to fix, plus we should discuss whether to include/exclude the disableSslVerification and headers properties.
Also, I noticed that we don't do any testing with an actual JWT-based access token to test things like the expiration of a token or the need to acquire a new one within the "refresh window", etc.
But I noticed that we do that in the iam token manager and jwt token manager tests. I guess that would be sufficient since we're inheriting that functionality (jwt-token-manager) into the vpc-token-manager.
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.
Looks good!
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.
Reviewed latest updates. Looks good! 👍
…n flow This commit introduces the VpcInstanceAuthenticator. This authenticator implements the authentication flow within a VPC-managed compute resource that is configured to use the compute resource identity feature. This involves the use of the compute resource's local VPC Instance Metadata Service API to retrieve an instance identity token, and then exchange that token for an IAM access token. The IAM access token is then used to authenticate outbound REST API requests by adding an Authorization containing the access token.
Co-authored-by: Phil Adams <padamstx@gmail.com>
Co-authored-by: Phil Adams <padamstx@gmail.com>
Co-authored-by: Phil Adams <padamstx@gmail.com>
Co-authored-by: Phil Adams <padamstx@gmail.com>
Co-authored-by: Norbert Biczo <pyrooka@users.noreply.github.com>
Co-authored-by: Norbert Biczo <pyrooka@users.noreply.github.com>
Co-authored-by: Norbert Biczo <pyrooka@users.noreply.github.com>
7b07815
to
acd8514
Compare
Okay, all requested changes have now been addressed. This PR should be ready to merge once we complete the additional, external testing 👍 |
Co-authored-by: Norbert Biczo <pyrooka@users.noreply.github.com>
Co-authored-by: Norbert Biczo <pyrooka@users.noreply.github.com>
# [2.17.0](v2.16.0...v2.17.0) (2021-11-08) ### Features * **VpcInstanceAuthenticator:** add support for new VPC authentication flow ([#172](#172)) ([8bbe704](8bbe704))
🎉 This PR is included in version 2.17.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This commit introduces the VpcInstanceAuthenticator.
This authenticator implements the authentication flow
within a VPC-managed compute resource that is configured to
use the compute resource identity feature.
This involves the use of the compute resource's local
VPC Instance Metadata Service API to retrieve an instance identity
token, and then exchange that token for an IAM access token.
The IAM access token is then used to authenticate outbound REST
API requests by adding an Authorization containing the access token.
Checklist
npm test
passes (tip:npm run lint-fix
can correct most style issues)