Skip to content
Pwnversity
AUD-OKTAintermediate · 14 min · upd. 2026-11

Auditing Okta

OktaIdPMFA

Okta is the identity provider (IdP) that holds the keys to every other application: whoever controls an Okta super admin can sign in as any employee to any connected app. Known incidents have rarely exploited a technical flaw in Okta. Almost always they abused legitimate features in the wrong hands: an MFA reset requested over the phone, a federated IdP added by a compromised admin, a session token copied from a support file. The audit reviews who can use those features and whether anyone would notice.

Okta runs the service and enforces some minimums the customer can no longer turn off. The customer decides:

  • who administers, and with which role;
  • which authenticators are accepted and how an account is recovered;
  • which policies protect each application;
  • which external IdPs are accepted and which API tokens exist;
  • whether anyone watches the System Log.
flowchart LR
    U["Users"] -->|"FastPass, FIDO2"| O(("Okta<br/>customer org"))
    HD["Internal help desk<br/>(MFA reset)"] -->|"risk:<br/>social engineering"| O
    AD["Admin Console<br/>super admins and roles"] --> O
    IDP["External IdP<br/>(inbound federation)"] -->|"a compromised admin<br/>can add one"| O
    T["SSWS tokens /<br/>OAuth service apps"] -->|"management API"| O
    O -->|"SSO"| A["Apps: mail, cloud,<br/>VPN, code, HR"]
    O --> L["System Log<br/>SIEM"]
Control What to look for Recommended
Super Administrator Many super admins; roles assigned permanently Few; custom roles with minimal permissions for daily work
Help desk roles The help desk can reset other admins’ MFA Roles with resource sets that exclude the admin groups
Standing privileges Admins whose role is always active Govern Okta Admin Roles: time-bound requests and access reviews
IdP creation Any admin with a broad role can add an IdP Delegated to a minimal custom role
Service accounts Tokens created by people who may leave A service account or, better, an OAuth service app

What Okta already enforces, according to its Secure Identity Commitment and Secure by Design announcements:

  • MFA required to sign in to the Admin Console in every existing org. In new orgs it is a default requirement that cannot be changed.
  • Protected actions: they require re-authentication to:
    • assign or revoke the super admin role;
    • create or modify an external IdP;
    • reset a super admin’s MFA;
    • change the protected actions themselves.
  • Admin session binding to the IP address (on by default in the Admin Console since October 23, 2023) and, optionally, to the ASN.
  • Default session duration for the admin apps: a 12-hour lifetime and 15 minutes of idle time.
  • Global session policy (OKTA_SIGN_ON) and per-app authentication policies (ACCESS_POLICY):
    • critical apps (mail, cloud, VPN, the console itself) ask for re-authentication on every access;
    • no “any network, one factor” rule.
  • Enrollment and recovery (MFA_ENROLL, PASSWORD):
    • self-service recovery only from trusted networks and with the strongest authenticator available;
    • email or SMS as the only recovery path is a finding.
  • ThreatInsight: its action can be none, audit (logs only) or block (logs and blocks requests from suspicious IP addresses).
  • Dynamic network zones: they block anonymizing proxies and Tor.
  • Help desk process: Okta recommends visual verification, manager approval before resetting factors, and “new device” and “suspicious activity” notifications to the user. It is a process control, not a setting, and it is audited all the same (see vishing).
API token (SSWS) OAuth 2.0 service app
Permissions Inherits those of the admin who created it, and changes when theirs change Scopes (okta.users.read…) plus an admin role assigned to the app
Lifetime Expires after 30 days without use; each call restarts the clock Short-lived access tokens
When the creator is deactivated The token is removed Does not depend on a person
Authentication Static secret in a header Client credentials with a JWT signed with a private key
Network restriction Allowed network zones per token Not verified in this card
Status in the docs The API reference marks it as deprecated Recommended method

The audit lists the tokens, who created them, their last use and their network restriction. Any token created by a personal super admin account is a finding: it has all of that person’s permissions and nobody links it to an integration.

Paths checked against the OpenAPI specification of the Okta management API (version 2026.44.0, okta/okta-management-openapi-spec repository):

Ventana de terminal
O=https://company.okta.com/api/v1
H="Authorization: Bearer $TOKEN" # service app with read-only scopes
curl -s -H "$H" "$O/iam/assignees/users" | jq -r '.value[].id' # users with admin roles
curl -s -H "$H" "$O/users/$ID/roles" | jq -r '.[].type' # roles of each one
curl -s -H "$H" "$O/idps" | jq -r '.[] | .type + " " + .name + " " + .status' # federated IdPs
curl -s -H "$H" "$O/api-tokens" | jq -r '.[] | .name + " " + .userId + " " + (.network.connection // "-")'
curl -s -H "$H" "$O/policies?type=OKTA_SIGN_ON" | jq -r '.[].name'
curl -s -H "$H" "$O/threats/configuration" | jq -r '.action'
curl -s -H "$H" "$O/logs?since=2026-11-01T00:00:00Z&filter=eventType+eq+%22system.idp.lifecycle.create%22"

Inside the console, HealthInsight compares the org with Okta’s recommendations and is a good starting point.

An external IdP (inbound federation, sometimes “Org2Org”) lets users sign in to Okta after authenticating to another provider. It is useful in mergers and migrations. In the hands of an attacker with a super admin role, it is a way to add their own IdP and sign in as any user without knowing their password or MFA.

In the audit:

  • every IdP in /idps has an owner and a documented reason;
  • unused ones are deactivated;
  • if the org does not use inbound federation, any user.authentication.auth_via_IDP is an alert.

Okta’s System Log has 1,224 event types in the official CSV catalog (okta-event-types.csv, downloaded on November 21, 2026). Every name used here is checked against that catalog.

The script reads a JSON export of events (the published, eventType, actor, target and securityContext.isProxy fields of the LogEvent schema). It flags critical events and detects the cross-tenant impersonation chain: MFA reset, admin role granted, new IdP and federated sign-in within 24 hours.

import json, sys
from datetime import datetime, timedelta
CRITICAL = {
"user.mfa.factor.reset_all": "All factors reset",
"user.account.privilege.grant": "Admin role granted",
"system.idp.lifecycle.create": "IdP created",
"system.idp.lifecycle.update": "IdP modified",
"system.api_token.create": "API token (SSWS) created",
"policy.lifecycle.update": "Policy modified",
"policy.rule.update": "Policy rule modified",
"zone.update": "Network zone modified",
"user.session.impersonation.initiate": "Impersonation session started",
}
CHAIN = ["user.mfa.factor.reset_all", "user.account.privilege.grant",
"system.idp.lifecycle.create", "user.authentication.auth_via_IDP"]
def ts(e):
return datetime.fromisoformat(e["published"].replace("Z", "+00:00"))
events = sorted(json.load(open(sys.argv[1])), key=ts)
for e in events:
t = e["eventType"]
proxy = (e.get("securityContext") or {}).get("isProxy")
if t in CRITICAL or proxy:
target = ", ".join(x.get("alternateId", "?") for x in e.get("target") or [])
print(f'{e["published"]} {t:38} {e["actor"]["alternateId"]:22} -> {target}'
+ (" [ANONYMIZING PROXY]" if proxy else ""))
seen = {}
for e in events:
if e["eventType"] in CHAIN:
seen.setdefault(e["eventType"], ts(e))
if all(k in seen for k in CHAIN):
steps = [seen[k] for k in CHAIN]
if steps == sorted(steps) and steps[-1] - steps[0] < timedelta(hours=24):
print("\nALERT: MFA reset -> admin role -> new IdP -> federated sign-in in",
steps[-1] - steps[0])

Real output on a synthetic sample of 7 events that reproduces the sequence Okta described in 2023, with made-up user names:

$ python3 okta_triage.py syslog-synthetic.json
2026-11-20T21:14:03Z user.mfa.factor.reset_all helpdesk1@example.test -> it-admin@example.test
2026-11-20T21:20:47Z user.session.start it-admin@example.test -> [ANONYMIZING PROXY]
2026-11-20T21:26:30Z user.account.privilege.grant it-admin@example.test -> svc-sync@example.test [ANONYMIZING PROXY]
2026-11-20T21:31:02Z system.idp.lifecycle.create it-admin@example.test -> Okta-Org2Org [ANONYMIZING PROXY]
2026-11-20T21:44:19Z user.authentication.auth_via_IDP cfo@example.test -> [ANONYMIZING PROXY]
2026-11-21T08:00:00Z system.api_token.create ana@example.test -> terraform
ALERT: MFA reset -> admin role -> new IdP -> federated sign-in in 0:30:16

In production, the same logic goes into the SIEM as a correlation rule (see SIEM). Events are collected from /logs or with a log stream to the SIEM.

Okta supports customer penetration testing and provides test environments for it. Its policy asks you to:

  • test against Developer or trial orgs whenever they are available, and with test accounts;
  • not social-engineer Okta’s support desk or staff.

Social engineering against the customer’s help desk is only in scope if the engagement contract says so explicitly.

  • Cross-tenant impersonation (August and September 2023). Attackers called several customers’ internal help desks to get all factors reset for users holding the super admin role. With those accounts they:

    • gave more privileges to other accounts;
    • added their own IdP as a federation source;
    • signed in to applications as other users.

    Okta published the list of events to watch and the mitigations this card uses.

  • Okta’s support system (September and October 2023). With a stolen credential, an attacker read files from 134 customers in the support case management system. Among them were HAR files with session tokens, which it used to hijack sessions at 5 customers. Okta revoked the tokens, recommended sanitizing HAR files before sharing them and bound admin sessions to network location. The follow-up at Cloudflare is in Cloudflare.

  • DelAuth and bcrypt (July to October 2024). The cache key for AD/LDAP delegated authentication was computed with bcrypt over userId + username + password. bcrypt ignores anything past 72 bytes, so with a username of 52 characters or more the password fell outside the hash. The username alone was enough to reuse a cached authentication if:

    • there was no MFA;
    • the AD agent was not responding.

    It was live from July 23 to October 30, 2024. MFA in the policy would have blocked the abuse.

  • Few super admins; custom roles with minimal permissions; time-bound privileges (Govern Okta Admin Roles)
  • Help desk roles with no power over the admin groups
  • Admins on FastPass or FIDO2, from managed devices and trusted zones; anonymizing proxies blocked
  • Protected actions on; session binding to IP and ASN in the admin apps
  • Critical apps re-authenticate on every access; no single-factor rule
  • Self-service recovery limited to trusted networks; no SMS or email as the only path
  • ThreatInsight on block; dynamic zones against anonymizers
  • Help desk process with strong verification and approval before resetting factors; user notifications on
  • SSWS tokens inventoried, network-restricted and replaced with OAuth service apps with minimal scopes
  • Every federated IdP has an owner and a reason; alert on system.idp.lifecycle.* and on user.authentication.auth_via_IDP if federation is not used
  • System Log in the SIEM with rules for user.mfa.factor.reset_all, user.account.privilege.grant, system.api_token.create and policy and zone changes
  • HealthInsight reviewed