aws-export-assume-profile
aws-export-assume-profile copied to clipboard
fixes and features - mfa and credentials file support, etc
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 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.
I have an updated shellcheck installation method for your travis.yml. will submit when i get in front of computer