-
Notifications
You must be signed in to change notification settings - Fork 827
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
MFA required every time when using source_profile #532
Comments
#520 (comment) has an example of config that should do what you want, although it's subject to change depending on the outcome of that issue. |
The issue is that our mfa caching isn't kicking in (see the There are 2 underlying issues
I'm working on a fix to those, but in the meantime there is a simple fix - add |
Adding |
I believe this should be fixed in #569. Let me know if it's not |
@mtibben came here with a similar issue. Just upgraded from (I think) 4.x where I was used to my MFA role being cached for 9 hours. On 5.x any duration >1h prevented caching which felt like a big regression. However have now moved to the 6.x beta release and it seems to cache it fine, so thanks for the update! |
Great, glad v6 is working out for you |
.aws/config
(redacted if necessary)aws-vault --debug
(redacted if necessary)After having used
aws-vault
for years I discovered that I can usesource_profile
to not have to add each of my profiles individually – and since I often use a lot of different roles that all are assumed by the same credentials this simplifies things a lot.However, I noticed it doesn't work to have a profile with
mfa_serial
with asource_profile
that does not havemfa_serial
. Or to be specific: it works, but I have to type the MFA code every time, the session doesn't seem to be saved.I don't know if this is working as intended, or even not solvable. There exist a workaround (add profiles that require MFA separately). I can see how it could be a problem if a profile and its source had different MFAs configured, or if there are multiple profiles with different MFAs configured using the same source profile – in other words, I can see how it could be that this has no good solution, but I also know too little about how it works to know for sure.
This is how I have things set up (redacted and simplified). In this setup all I have done is
aws-vault add theo
. Thereadonly
anddev
profiles don't require MFA, but I need MFA to use thesysadmin
role.Here is a session where I first use the
readonly
profile to list S3, then the sysadmin role, which requires me to enter an MFA code, which is expected, but then I again run the same command with thesysadmin
role and again have to enter an MFA code.If remove
source_profile
from thesysadmin
profile and add credentials usingaws-vault add sysadmin
I would not have to enter an MFA code the second time.The text was updated successfully, but these errors were encountered: