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

Add support for session expiration #7

Open
tomisaacson opened this issue May 3, 2019 · 4 comments
Open

Add support for session expiration #7

tomisaacson opened this issue May 3, 2019 · 4 comments

Comments

@tomisaacson
Copy link

No description provided.

tomisaacson pushed a commit to parsley72/get-aws-profile-bash that referenced this issue May 3, 2019
@whereisaaron
Copy link
Owner

Thank you for the contribution @tomisaacson. Is aws_session_expiration / AWS_SESSION_EXPIRATION a supported setting or environment variable? I couldn't spot it is the AWS documentation?

https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-global
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html

@tomisaacson
Copy link
Author

I didn't notice that. It's definitely used in a bunch of tools (https://www.google.com/search?q="aws_session_expiration"), I just assumed it was.

@whereisaaron
Copy link
Owner

Yeah I found a few examples where an environment variable was used, but not where stored in the credentials file. Sometimes the environment variables had different names and value formats, e.g. I saw AWS_SESSION_EXPIRES, AWS_SESSION_EXPIRATION, AWS_SESSION_EXPIRATION_UNIX. Seems like something tools set after running assume-role to remember the duration in order to renew early.

virgilwashere added a commit to virgilwashere/get-aws-profile-bash that referenced this issue Jul 14, 2019
Although it's not an officially supported environment variable,
it has widespead support.

Closes whereisaaron#7

- Fix some variables - make compatible with `set -o nounset`
- bump version to `0.0.4`
@whereisaaron
Copy link
Owner

This feature is now part of PR #10. Pending documentation and testing it will get merged there.

@tomisaacson does #10 also meet your needs?

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

2 participants