Open
Conversation
Afaik, aws cli supports access token to be set in the credential file. So I have a local cron job that updates access token in `.aws/credentials` and `.s3cfg` file. By this change, s3cmd won't request a token if it is set in `.s3cfg` or `.aws/credentails` though it is not given by command line
| self.access_token = access_token | ||
| # Do not refresh the IAM role when an access token is provided. | ||
| # Do not refresh the IAM role when an access token is provided. | ||
| if self.access_token: |
Contributor
There was a problem hiding this comment.
It's basically equal to previous if statement
Contributor
There was a problem hiding this comment.
I don't think that it is the case if i'm not wrong.
Without this fix, if the access_token is set directly in the configuration file (and not set with command line or env var); then the access_token_refresh will not be disabled.
But, I'm wondering if there is not a side effect to this. Something like the goal was especially to not be stuck if an access token was written in the file. Especially for the case of a "configure" that would write the access token.
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.
Afaik, aws cli supports access token to be set in the credential file.
So I have a local cron job that updates access token in
.aws/credentialsand.s3cfgfile.By this change, s3cmd won't request a token if it is set in
.s3cfgor.aws/credentailsthough it is not given by command line