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

The Credential Process assumer should only set AWS_PROFILE, not other variables #263

Open
chrnorm opened this issue Sep 26, 2022 · 2 comments
Assignees

Comments

@chrnorm
Copy link
Contributor

chrnorm commented Sep 26, 2022

If users have a credential_process configured, the AWS CLI automatically handles refreshing credentials when they expire.

[profile my-profile]
credential_process = some-other-cli

However, when running assume my-profile the AWS CLI will not automatically refresh credentials. This is because we are exporting AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN.

We should detect if a credential_process is in use and then only set AWS_PROFILE. We should not set any of the env vars listed above, as they cause the AWS CLI to not automatically refresh credentials.

@tomharrisonjr
Copy link

@chrnorm -- this would be a really valuable feature, potentially solving several problems in one shot, I think:

  • needless refresh, as noted in the description
  • multiple terminal windows open with env vars that report AWS_SESSION_EXPIRATION relative to their last refresh, rather than the most recent one
  • incompatibilities with tools that are configured to use profiles ... but pick up the env vars instead (and again, could be multiples if you have multiple terminal windows open

@ajonnavi
Copy link

+1 to this request. We have been trying to adopt this tool org wide, and having to --export on every terminal window is painful. It would be great \if the option could only populate the credentials file and set AWS_PROFILE variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants