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

fixes and features - mfa and credentials file support, etc #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

keen99
Copy link

@keen99 keen99 commented Jun 24, 2019

this was work done for myself - to support the needs of my environment. figured I'd share it back in case it's helpful.

  • ugly rework of [[ ... =~ ...]] tests that were failing unexpectedly (bash version issue? I gave up trying to diagnose) using a hopefully more portable simple grep
  • add support for profiles that are in the credentials file (required for MFA roles)
  • remove SESSION_PROFILE code, we need to use the extracted profile for MFA profiles to work
  • make session names less generic, easier to id what created the session
  • add AWS_EXPIRATION export to allow knowledge of when the token will expire

 - ugly rework of `[[ ... =~ ...]]` tests that were failng unexpectedly (bash version issue? I gave up trying to diagnose) using a hopefully more portable simple grep
 - add support for profiles that are in the credentials file (required for MFA roles)
 - remove SESSION_PROFILE code, we need to use the extracted profile for MFA profiles to work
 - make session names less generic, easier to id what created the session
 - add AWS_EXPIRATION export to allow knowledge of when the token will expire
@cytopia
Copy link
Owner

cytopia commented Jun 24, 2019

@keen99 thank you very much for the effort and contribution. Before merging I will have to thoroughly test this and ensure the code changes will not introduce any issues on us. So please expect some time until merge.

add AWS_EXPIRATION export to allow knowledge of when the token will expire

I've also initially thought about adding this. Be aware if you assume into a login role and then assume further into a permission role, the current AWS limit is 1 hour (unlike only one level of assuming, where you can have 12 hours).

Bare with me, I will report any issues or workings on this one and will also address the shellcheck issues.

@virgilwashere
Copy link

I have an updated shellcheck installation method for your travis.yml. will submit when i get in front of computer

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

Successfully merging this pull request may close these issues.

3 participants