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

add okta email mfa support #1281

Merged
merged 4 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/provider/okta/okta.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
const (
IdentifierDuoMfa = "DUO WEB"
IdentifierSmsMfa = "OKTA SMS"
IdentifierEMailMfa = "OKTA EMAIL"
IdentifierPushMfa = "OKTA PUSH"
IdentifierTotpMfa = "GOOGLE TOKEN:SOFTWARE:TOTP"
IdentifierOktaTotpMfa = "OKTA TOKEN:SOFTWARE:TOTP"
Expand All @@ -50,6 +51,7 @@ var (
supportedMfaOptions = map[string]string{
IdentifierDuoMfa: "DUO MFA authentication",
IdentifierSmsMfa: "SMS MFA authentication",
IdentifierEMailMfa: "Email MFA authentication",
IdentifierPushMfa: "PUSH MFA authentication",
IdentifierTotpMfa: "TOTP MFA authentication",
IdentifierOktaTotpMfa: "Okta MFA authentication",
Expand Down Expand Up @@ -811,7 +813,7 @@ func verifyMfa(oc *Client, oktaOrgHost string, loginDetails *creds.LoginDetails,
switch mfa := challengeContext.mfaIdentifer; mfa {
case IdentifierYubiMfa:
return gjson.Get(challengeContext.challengeResponseBody, "sessionToken").String(), nil
case IdentifierSmsMfa, IdentifierTotpMfa, IdentifierOktaTotpMfa, IdentifierSymantecTotpMfa:
case IdentifierSmsMfa, IdentifierEMailMfa, IdentifierTotpMfa, IdentifierOktaTotpMfa, IdentifierSymantecTotpMfa:
mapkon marked this conversation as resolved.
Show resolved Hide resolved
var verifyCode = loginDetails.MFAToken
if verifyCode == "" {
verifyCode = prompter.RequestSecurityCode("000000")
Expand Down
4 changes: 2 additions & 2 deletions saml2aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ var MFAsByProvider = ProviderList{
"PingNTLM": []string{"Auto"}, // automatically detects PingID
"PingOne": []string{"Auto"}, // automatically detects PingID
"JumpCloud": []string{"Auto", "TOTP", "WEBAUTHN", "DUO", "PUSH"},
"Okta": []string{"Auto", "PUSH", "DUO", "SMS", "TOTP", "OKTA", "FIDO", "YUBICO TOKEN:HARDWARE", "SYMANTEC"}, // automatically detects DUO, SMS, ToTP, and FIDO
"OneLogin": []string{"Auto", "OLP", "SMS", "TOTP", "YUBIKEY", "DUO TOTP"}, // automatically detects OneLogin Protect, SMS and ToTP
"Okta": []string{"Auto", "PUSH", "DUO", "SMS", "EMAIL", "TOTP", "OKTA", "FIDO", "YUBICO TOKEN:HARDWARE", "SYMANTEC"}, // automatically detects DUO, SMS, ToTP, and FIDO
"OneLogin": []string{"Auto", "OLP", "SMS", "TOTP", "YUBIKEY", "DUO TOTP"}, // automatically detects OneLogin Protect, SMS and ToTP
mapkon marked this conversation as resolved.
Show resolved Hide resolved
"Authentik": []string{"Auto"},
"KeyCloak": []string{"Auto"}, // automatically detects ToTP
"GoogleApps": []string{"Auto"}, // automatically detects ToTP
Expand Down
Loading