Okta Executor¶
Category: Identity and Access
Script: okta.py
Integration: REST API
Faraday Plugin: Raw JSON
Website: https://www.okta.com
Description¶
Imports users, System Log events and, optionally, event hooks from an Okta tenant into Faraday. Each record becomes a host with one [IDENTITY] vulnerability, so you can audit identities and identity events alongside other findings.
Prerequisites¶
- An Okta tenant
- An Okta API token (SSWS) created by an administrator with permission to read users, System Log events and, if you enable event hooks, event hooks
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
OKTA_PAGES |
No | Maximum number of pages to read per endpoint (default: 5, maximum: 50) |
OKTA_DOMAIN |
Yes | Your Okta URL (e.g., https://example.okta.com) |
OKTA_API_TOKEN |
Yes | Okta API token |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
OKTA_FILTER |
string | No | Okta filter expression applied to both users and logs (e.g., status eq "ACTIVE" for users, eventType eq "user.session.start" for logs). If not set, all records are imported. |
OKTA_LIMIT |
string | No | Records per page, from 1 to 1000 (default: 200) |
OKTA_EVENT_HOOKS |
string | No | Set to true to also import the configured event hooks (default: false) |
YAML Configuration Example¶
executors:
okta:
repo_executor: okta.py
max_size: 65536
varenvs:
OKTA_DOMAIN: "https://example.okta.com"
OKTA_API_TOKEN: "<okta_api_token>"
params:
OKTA_FILTER:
mandatory: false
type: string
base: string
OKTA_LIMIT:
mandatory: false
type: string
base: string
OKTA_EVENT_HOOKS:
mandatory: false
type: string
base: string
How It Works¶
- Authenticates with the API token (
Authorization: SSWS ...) - Reads users from
GET /api/v1/usersand System Log events fromGET /api/v1/logs, following theLinkheader for pagination up toOKTA_PAGESpages - If
OKTA_EVENT_HOOKSistrue, readsGET /api/v1/eventHooks - Creates one host per record, each with one vulnerability:
- Users:
[IDENTITY] Okta user: <login>withinfoseverity and the user's status, dates and profile - Log events:
[IDENTITY] Okta event: <event type>, with severity from the event severity (DEBUG/INFOare info,WARNis medium,ERRORis high) - Event hooks: one entry per configured hook
- Users:
Notes¶
- User and event hook hosts use IP
0.0.0.0, with the user's login as hostname. Log event hosts use the client IP of the event, or0.0.0.0if there is none. - The user and event hook entries are inventory records, not security issues.
OKTA_FILTERis sent to both the users and logs endpoints, so use an expression valid for both, or expect an error response from one of them.- With the defaults, at most 1000 users and 1000 log events are imported. Increase
OKTA_PAGESorOKTA_LIMITfor larger tenants. - Setup variables can also be passed as execution arguments.
- The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor.