feat(auth): add support for new service version in VPC Instant Auth#273
Open
pyrooka wants to merge 3 commits into
Open
feat(auth): add support for new service version in VPC Instant Auth#273pyrooka wants to merge 3 commits into
pyrooka wants to merge 3 commits into
Conversation
In this commit we fix an issue where the golangci-lint would fail. Signed-off-by: András Felleg <afelleg@gmail.com>
88ccf93 to
2ed3c94
Compare
Signed-off-by: Norbert Biczo <pyrooka@users.noreply.github.com>
Signed-off-by: Norbert Biczo <pyrooka@users.noreply.github.com>
2ed3c94 to
a37baf5
Compare
| } | ||
|
|
||
| // getCreateAccessTokenPath returns the operation path for creating an access token based on the service version. | ||
| func (authenticator *VpcInstanceAuthenticator) getCreateAccessTokenPath() string { |
There was a problem hiding this comment.
What if the version is greater than 2025-08-26 ?
The latest ones use the new endpoints
| } | ||
|
|
||
| // Set the params and request body. | ||
| builder.AddQuery("version", vpcauthMetadataServiceVersion) |
There was a problem hiding this comment.
Suggested change
| builder.AddQuery("version", authenticator.serviceVersion()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR adds support for the new VPC Instance Metadata Service version (2025-08-26) with the following changes:
ServiceVersionfield (default: "2022-03-01") that switches to new API paths (/identity/v1/token,/identity/v1/iam_tokens) when set to "2025-08-26"TokenLifetimefield (default: 300s) for customizable token expirationSetServiceVersion(),SetTokenLifetime()) orVPC_IMS_VERSIONenvironment variable