Background
Currently, when multiple WebAuthn (FIDO2) authenticators are enrolled in Okta, gimme-aws-creds always shows the factor picker:
Pick a factor:
[0] webauthn: iCloud Keychain
[1] webauthn: me@company.com
[2] webauthn: Security Key NFC by Yubico
Even if the user wants to consistently use one preferred authenticator, the CLI does not offer any way to remember or auto-select a preferred WebAuthn factor.
Examples:
- Touch ID on macOS
- Windows Hello on Windows
- A YubiKey / hardware security key
Proposal
Add an optional config key to .okta_aws_login_config:
[DEFAULT]
preferred_mfa_type = webauthn
preferred_webauthn = "webauthn: me@company.com"
Behavior
When logging in, the CLI fetches the list of available factors from Okta.
- If the
preferred_webauthn matches one of the WebAuthn factors exactly, the CLI auto-selects it.
- If the preferred factor is unavailable (e.g., Touch ID not enabled, Windows Hello locked, hardware key not connected), the CLI falls back to the standard Okta picker.
Existing config keys (preferred_mfa_type) remain fully supported for non-WebAuthn factors (push, totp, etc.).
Benefits
- Reduces unnecessary MFA picker prompts for users with multiple enrolled WebAuthn devices.
- Improves UX for users who want to consistently use Touch ID, Windows Hello, or a specific security key.
- Maintains security: fallback to picker ensures user always explicitly chooses if preferred factor isn’t available.
- Fully backward-compatible: CLI continues to work for users who don’t set the new key.
Notes / Edge Cases
If preferred factor name is not returned by Okta API, the picker should be shown as fallback.
Background
Currently, when multiple WebAuthn (FIDO2) authenticators are enrolled in Okta,
gimme-aws-credsalways shows the factor picker:Even if the user wants to consistently use one preferred authenticator, the CLI does not offer any way to remember or auto-select a preferred WebAuthn factor.
Examples:
Proposal
Add an optional config key to
.okta_aws_login_config:Behavior
When logging in, the CLI fetches the list of available factors from Okta.
preferred_webauthnmatches one of the WebAuthn factors exactly, the CLI auto-selects it.Existing config keys (
preferred_mfa_type) remain fully supported for non-WebAuthn factors (push, totp, etc.).Benefits
Notes / Edge Cases
If preferred factor name is not returned by Okta API, the picker should be shown as fallback.