aws / aws/aws-cli

mfa_serial support for user profiles

Open
#9,019 7 comments 39 reactions 0 assignees View on GitHub
cross-sdk feature-request p2
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

I know that it is currently possible to specify `mfa_serial` on profiles and cli tool will automatically ask for the MFA token to authenticate when you will make a call under this profile when assume role is used.

Curious is there are any reason not to support mfa on default (source) profile, like to be able to attach this policy to all admin users

```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowIfMFAPresent",
"Effect": "Allow",
"Resource": "*",
"Action": "*",
"Condition": {
"Bool": {
"aws:MultiFactorAuthPresent": "true"
}
}
}
]
}
```

And after that allow cli tool to use config like

```
[default]
region = us-west-2
aws_access_key_id = YYY1
aws_secret_access_key = XXX1
mfa_serial = ZZZ1
```

So in that case I will be able to call

```
aws s3 ls
```

And that will ask me for the mfa token if it is expired or has not been set.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.