Skip to content

New direct command for Direct Authentication (out-of-bounds MFA)#277

Merged
monde merged 6 commits intomasterfrom
mfa_oob
May 22, 2025
Merged

New direct command for Direct Authentication (out-of-bounds MFA)#277
monde merged 6 commits intomasterfrom
mfa_oob

Conversation

@monde
Copy link
Contributor

@monde monde commented May 20, 2025

New direct command that implements out-of-bounds MFA (Direct Authentication). OOB MFA combines the username/password grant with a push to Okta Verify for the second factor.

# use the shell to read in username/password, both can be set directly as CLI
# flags for the headless use case

# zsh style
# read "myusername?Okta Username: " && read -s "mypassword?Okta Password: " && echo

# bash style
$ read -p "Okta Username: " myusername && read -s -p "Okta Password: " mypassword && echo

Okta Username: test@example.com
Okta Password:

$ okta-aws-cli direct \
  --format noop \
  --org-domain test.okta.com \
  --oidc-client-id 0oa123 \
  --authz-id aus456 \
  --aws-iam-role arn:aws:iam::1234567890:role/my-role \
  --username "${myusername}" \
  --password "${mypassword}" \
  --exec -- aws sts get-caller-identity

{
    "UserId": "ZYZ789:okta-aws-cli",
    "Account": "1234567890",
    "Arn": "arn:aws:sts::1234567890:assumed-role/my-role"
}

@monde monde requested a review from duytiennguyen-okta May 20, 2025 23:31
@monde monde merged commit 64982ce into master May 22, 2025
6 checks passed
@monde monde deleted the mfa_oob branch May 22, 2025 16:04
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 this pull request may close these issues.

2 participants