-
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
fix(ContainerAuthenticator): add sa-token as default CR token filename #241
Conversation
6f9805d
to
2151eb3
Compare
2151eb3
to
7c440fc
Compare
@@ -69,7 +69,9 @@ export class ContainerTokenManager extends IamRequestBasedTokenManager { | |||
throw new Error('At least one of `iamProfileName` or `iamProfileId` must be specified.'); | |||
} | |||
|
|||
this.crTokenFilename = options.crTokenFilename || DEFAULT_CR_TOKEN_FILEPATH; | |||
if (options.crTokenFilename) { |
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's really no reason to store the default filename in "this" if the user didn't specify a filename, so made this change to be consistent with Go and Java.
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!
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! And I confirmed this works with our internal cluster 👍
This commit adds support for a second default CR token filename. If the user doesn't specify a CR token filename, the authenticator will first try '/var/run/secrets/tokens/vault-token', and then '/var/run/secrets/tokens/sa-token' in that order. Signed-off-by: Phil Adams <phil_adams@us.ibm.com>
7c440fc
to
490db60
Compare
## [4.0.7](v4.0.6...v4.0.7) (2023-05-22) ### Bug Fixes * **ContainerAuthenticator:** add sa-token as default CR token filename ([#241](#241)) ([91f9932](91f9932))
🎉 This PR is included in version 4.0.7 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This PR modifies the ContainerAuthenticator so that it supports a second default CR token
filename.
Checklist
npm test
passes (tip:npm run lint-fix
can correct most style issues)