Currently, If you specify an mfa-code on the Scout2 command line, it will be ignored without any warnings or errors.
In Scout2, __main.py__ calls read_creds from opinel/utils/credentials.py
In opinel/utils/credentials.py, the read_creds function only does an init_sts_session with the mfa-code if the force_init bool is set to True, but that never happens if your ~/.aws/credentials file doesn't contain a SessionToken already. If the session token doesn't exist, it should probably set force_init to True.
Currently, If you specify an mfa-code on the Scout2 command line, it will be ignored without any warnings or errors.
In Scout2,
__main.py__
callsread_creds
fromopinel/utils/credentials.py
In
opinel/utils/credentials.py
, theread_creds
function only does aninit_sts_session
with the mfa-code if theforce_init
bool is set to True, but that never happens if your~/.aws/credentials
file doesn't contain a SessionToken already. If the session token doesn't exist, it should probably setforce_init
to True.