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

AssumeRoleTokenProviderNotSetError #58

Closed
ledor473 opened this issue Oct 25, 2021 · 0 comments · Fixed by #59
Closed

AssumeRoleTokenProviderNotSetError #58

ledor473 opened this issue Oct 25, 2021 · 0 comments · Fixed by #59

Comments

@ledor473
Copy link
Contributor

When attempting to use ssm-helpers using an IAM Role with MFA Enabled, I get the following error:

$ ssm session --region us-east-1 --profile profile-with-mfa

FATAL   Error when trying to create session:
AssumeRoleTokenProviderNotSetError: assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.

Based on this blog post the change is minimal and would likely be safe to add to this project: https://aws.amazon.com/blogs/developer/assume-aws-iam-roles-with-mfa-using-the-aws-sdk-for-go/

There’s no harm in always setting the AssumeRoleTokenProvider session for applications that will always be run by a person. The field is only used if the shared configuration’s profile has a role to assume, and then sets the mfa_serial field. Otherwise, the option is ignored.
and

The SDK doesn’t automatically set the AssumeRoleTokenProvider with a default value. This is because of the risk of halting an application unexpectedly while the token provider waits for a nonexistent user to provide a value due to a configuration change. You must set this value to use MFA roles with the SDK.

ledor473 pushed a commit to ledor473/ssm-helpers that referenced this issue Oct 25, 2021
ncatelli pushed a commit that referenced this issue Oct 27, 2021
Co-authored-by: Louis-Etienne Dorval <c-louis.dorval@hulu.com>
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 a pull request may close this issue.

1 participant