aws-export-assume-profile icon indicating copy to clipboard operation
aws-export-assume-profile copied to clipboard

fixes and features - mfa and credentials file support, etc

Open keen99 opened this issue 5 years ago • 2 comments

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

keen99 avatar Jun 24 '19 18:06 keen99

@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.

cytopia avatar Jun 24 '19 19:06 cytopia

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

virgilwashere avatar Jul 01 '19 23:07 virgilwashere