How to fix: Okta API token (SSWS) in source
Okta SSWS tokens grant full admin access to the org - user CRUD, app assignments, factor reset. Treat like a root password.
Why it matters
An Okta SSWS token with full admin scope lets an attacker create new admin users, reset MFA factors for existing users (enabling account takeover of any employee), assign users to any application, and exfiltrate the entire directory including all user attributes.
Okta SSWS tokens grant full admin access to the org - user CRUD, app assignments, factor reset. Treat like a root password.
How to fix it
- 1Revoke the token immediately: Okta Admin → Security → API → Tokens → Revoke
- 2Audit the Okta System Log for API calls made with the token
- 3Switch to OAuth2 service apps with the minimum required API scopes
Code examples
Rotate Okta token via API
# Revoke the compromised SSWS token
curl -X DELETE \
-H 'Authorization: SSWS YOUR_ADMIN_TOKEN' \
'https://YOUR_ORG.okta.com/api/v1/api-tokens/TOKEN_ID'
# Audit recent API usage in the System Log
curl -H 'Authorization: SSWS YOUR_ADMIN_TOKEN' \
'https://YOUR_ORG.okta.com/api/v1/logs?since=2024-01-01T00:00:00Z&filter=eventType+eq+"system.api_token.create"'References
Detected automatically by VulnRadar. The check id is secret-okta-api-token, stable across every scan so you can filter or diff on it.
More secrets checks
Questions
- How severe is Okta API token (SSWS) in source?
- VulnRadar rates this critical severity in the secrets category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id secret-okta-api-token, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Okta API token (SSWS) in source map to?
- It maps to CWE-798. In the OWASP Top 10 it falls under A07:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.