SOA-C02 Exam QuestionsBrowse all questions from this exam

SOA-C02 Exam - Question 234


A company has mandated the use of multi-factor authentication (MFA) for all IAM users, and requires users to make all API calls using the CLI. However, users are not prompted to enter MFA tokens, and are able to run CLI commands without MFA. In an attempt to enforce MFA, the company attached an IAM policy to all users that denies API calls that have not been authenticated with MFA.

What additional step must be taken to ensure that API calls are authenticated using MFA?

Show Answer
Correct Answer: D

To ensure that API calls are authenticated using MFA, users must use temporary credentials obtained from the get-session-token command. This command prompts users to enter their MFA token and returns temporary security credentials, which include an MFA token. These temporary credentials are then used to sign API calls, enforcing the MFA requirement and ensuring that access remains secure by expiring after a set duration.

Discussion

8 comments
Sign in to comment
awsguru1998
Feb 13, 2023

D. Require users to use temporary credentials from the get-session token command to sign API calls. In order to enforce MFA for API calls using the CLI, the company needs to require users to use temporary credentials obtained from the get-session-token command. This command will prompt the user to enter their MFA token, and will return temporary security credentials that include an MFA token. The user can then use these temporary credentials to sign API calls, which will ensure that the calls are authenticated using MFA. The temporary credentials will automatically expire after a set duration, ensuring that access is limited and secure.

Spike2020
Feb 7, 2023

Answer D: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html

Christina666Option: D
Jul 25, 2023

Using the temporary security credentials that the call returns, IAM users can then make programmatic calls to API operations that require MFA authentication. An incorrect MFA code causes the API to return an access denied erro

VivecOption: D
Mar 10, 2023

The most appropriate step to ensure that API calls are authenticated using MFA is to require users to use temporary credentials from the get-session token command to sign API calls. This is because the get-session token command returns temporary security credentials consisting of an access key ID, a secret access key, and a session token that are valid only for a limited period of time. These credentials can be used to make API calls with MFA authentication.

Gomer
Apr 26, 2023

I hope answer is "D" and this isn't a trick question. The actual API/CLI calls are GetSessionToken and "get-session-token", NOT "get-session" token (no 2nd dash) Real world examples: https://sts.amazonaws.com/?Version=2011-06-15&Action=GetSessionToken&... aws sts get-session-token --serial-number arn-of-the-mfa-device --token-code code-from-token...

GomerOption: D
Apr 26, 2023

See my other response for justification for "D". I still wonder a little about "A". Not my field of expertise here, but I do know they do know they sometimes change syntax subtly to create a trick question.

CreatureOption: D
Jun 22, 2023

Concur with D and I'll reference this document - https://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html

10cc6baOption: D
Jul 15, 2024

D only