Okta

Collect system logs from Okta

status: beta role: aggregator delivery: best effort acknowledgements: yes egress: stream state: stateless
output: logs

Configuration

Example configurations

{
  "sources": {
    "my_source_id": {
      "type": "okta",
      "domain": "foo.okta.com",
      "token": "00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    }
  }
}
[sources.my_source_id]
type = "okta"
domain = "foo.okta.com"
token = "00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
sources:
  my_source_id:
    type: okta
    domain: foo.okta.com
    token: 00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{
  "sources": {
    "my_source_id": {
      "type": "okta",
      "domain": "foo.okta.com",
      "scrape_interval_secs": 15,
      "scrape_timeout_secs": 5,
      "token": "00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    }
  }
}
[sources.my_source_id]
type = "okta"
domain = "foo.okta.com"
scrape_interval_secs = 15
scrape_timeout_secs = 5
token = "00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
sources:
  my_source_id:
    type: okta
    domain: foo.okta.com
    scrape_interval_secs: 15
    scrape_timeout_secs: 5
    token: 00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

domain

required string literal
The Okta subdomain to scrape
Examples
"foo.okta.com"

scrape_interval_secs

optional uint
The interval between scrapes. Requests are run concurrently so if a scrape takes longer than the interval, a new scrape will be started. This can take extra resources, set the timeout to a value lower than the scrape interval to prevent this from happening.
default: 15(seconds)

scrape_timeout_secs

optional float
The timeout for each scrape request.
default: 5(seconds)

since

optional uint
The time to look back for logs. This is used to determine the start time of the first request (that is, the earliest log to fetch)

tls

optional object
TLS configuration.

tls.alpn_protocols

optional [string]

Sets the list of supported ALPN protocols.

Declare the supported ALPN protocols, which are used during negotiation with a peer. They are prioritized in the order that they are defined.

tls.ca_file

optional string literal

Absolute path to an additional CA certificate file.

The certificate must be in the DER or PEM (X.509) format. Additionally, the certificate can be provided as an inline string in PEM format.

Examples
"/path/to/certificate_authority.crt"

tls.crt_file

optional string literal

Absolute path to a certificate file used to identify this server.

The certificate must be in DER, PEM (X.509), or PKCS#12 format. Additionally, the certificate can be provided as an inline string in PEM format.

If this is set and is not a PKCS#12 archive, key_file must also be set.

Examples
"/path/to/host_certificate.crt"

tls.key_file

optional string literal

Absolute path to a private key file used to identify this server.

The key must be in DER or PEM (PKCS#8) format. Additionally, the key can be provided as an inline string in PEM format.

Examples
"/path/to/host_certificate.key"

tls.key_pass

optional string literal

Passphrase used to unlock the encrypted key file.

This has no effect unless key_file is set.

Examples
"${KEY_PASS_ENV_VAR}"
"PassWord1"

tls.server_name

optional string literal

Server name to use when using Server Name Indication (SNI).

Only relevant for outgoing connections.

Examples
"www.example.com"

Enables certificate verification. For components that create a server, this requires that the client connections have a valid client certificate. For components that initiate requests, this validates that the upstream has a valid certificate.

If enabled, certificates must not be expired and must be issued by a trusted issuer. This verification operates in a hierarchical manner, checking that the leaf certificate (the certificate presented by the client/server) is not only valid, but that the issuer of that certificate is also valid, and so on, until the verification process reaches a root certificate.

Do NOT set this to false unless you understand the risks of not verifying the validity of certificates.

tls.verify_hostname

optional bool

Enables hostname verification.

If enabled, the hostname used to connect to the remote host must be present in the TLS certificate presented by the remote host, either as the Common Name or as an entry in the Subject Alternative Name extension.

Only relevant for outgoing connections.

Do NOT set this to false unless you understand the risks of not verifying the remote hostname.

token

required string literal
API token for authentication
Examples
"00xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Outputs

<component_id>

Default output stream of the component. Use this component’s ID as an input to downstream transforms and sinks.

Output Types

Logs

Warning

The fields shown below will be different if log namespacing is enabled. See Log Namespacing for more details

Event

An Okta system log event
Fields
* required object
fields from the Okta system log
Examples
{
  "actor": {
    "alternateId": "john.doe@example.com",
    "detailEntry": null,
    "displayName": "John Doe",
    "id": "00util3j01jqL21aM1d6",
    "type": "User"
  },
  "authenticationContext": {
    "authenticationProvider": null,
    "authenticationStep": 0,
    "credentialProvider": null,
    "credentialType": null,
    "externalSessionId": "idxBagel62CatsUkTankATonA",
    "interface": null,
    "issuer": null,
    "rootSessionId": "idxBagel62CatsUkTankATonA"
  },
  "client": {
    "device": "Computer",
    "geographicalContext": {
      "city": "New York",
      "country": "United States",
      "geolocation": {
        "lat": 40.3157,
        "lon": -74.01
      },
      "postalCode": 10013,
      "state": "New York"
    },
    "id": null,
    "ipAddress": "10.0.0.1",
    "userAgent": {
      "browser": "CHROME",
      "os": "Mac OS X",
      "rawUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
    },
    "zone": null
  },
  "debugContext": {
    "debugData": {
      "requestId": "ab609228fe84ce59cd3bf4690bcce016",
      "requestUri": "/idp/idx/authenticators/poll",
      "url": "/idp/idx/authenticators/poll"
    }
  },
  "device": {
    "device_integrator": null,
    "disk_encryption_type": "ALL_INTERNAL_VOLUMES",
    "id": "gu1fd8yj3x1feOg3N1d9",
    "jailbreak": null,
    "managed": false,
    "name": "Mac15,6",
    "os_platform": "OSX",
    "os_version": "14.6.0",
    "registered": true,
    "screen_lock_type": "BIOMETRIC",
    "secure_hardware_present": true
  },
  "displayMessage": "User login to Okta",
  "eventType": "user.session.start",
  "legacyEventType": "core.user_auth.login_success",
  "outcome": {
    "reason": null,
    "result": "SUCCESS"
  },
  "published": "2024-08-13T15:58:20.353Z",
  "request": {
    "ipChain": [
      {
        "geographicalContext": {
          "city": "New York",
          "country": "United States",
          "geolocation": {
            "lat": 40.3157,
            "lon": -74.01
          },
          "postalCode": 10013,
          "state": "New York"
        },
        "ip": "10.0.0.1",
        "source": null,
        "version": "V4"
      }
    ]
  },
  "securityContext": {
    "asNumber": 394089,
    "asOrg": "ASN 0000",
    "domain": null,
    "isProxy": false,
    "isp": "google"
  },
  "severity": "INFO",
  "target": [
    {
      "alternateId": "unknown",
      "detailEntry": null,
      "displayName": "Okta Verify",
      "id": "p7d7dh1jf0HM0kP2e1d7",
      "type": "AuthenticatorEnrollment"
    },
    {
      "alternateId": "Okta Admin Console",
      "detailEntry": null,
      "displayName": "Okta Admin Console",
      "id": "0oatLeaf9sQv1qInq5d6",
      "type": "AppInstance"
    }
  ],
  "transaction": {
    "detail": null,
    "id": "ab609228fe84ce59cat7fa690big3016",
    "type": "WEB"
  },
  "uuid": "dc9fd3c0-598c-11ef-8478-2b7584bf8d5a",
  "version": 0
}

Telemetry

Metrics

link

component_discarded_events_total

counter
The number of events dropped by this component.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
host optional
The hostname of the system Vector is running on.
intentional
True if the events were discarded intentionally, like a filter transform, or false if due to an error.
pid optional
The process ID of the Vector instance.

component_errors_total

counter
The total number of errors encountered by this component.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
error_type
The type of the error
host optional
The hostname of the system Vector is running on.
pid optional
The process ID of the Vector instance.
stage
The stage within the component at which the error occurred.

component_received_bytes_total

counter
The number of raw bytes accepted by this component from source origins.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
container_name optional
The name of the container from which the data originated.
file optional
The file from which the data originated.
host optional
The hostname of the system Vector is running on.
mode optional
The connection mode used by the component.
peer_addr optional
The IP from which the data originated.
peer_path optional
The pathname from which the data originated.
pid optional
The process ID of the Vector instance.
pod_name optional
The name of the pod from which the data originated.
uri optional
The sanitized URI from which the data originated.

component_received_event_bytes_total

counter
The number of event bytes accepted by this component either from tagged origins like file and uri, or cumulatively from other origins.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
container_name optional
The name of the container from which the data originated.
file optional
The file from which the data originated.
host optional
The hostname of the system Vector is running on.
mode optional
The connection mode used by the component.
peer_addr optional
The IP from which the data originated.
peer_path optional
The pathname from which the data originated.
pid optional
The process ID of the Vector instance.
pod_name optional
The name of the pod from which the data originated.
uri optional
The sanitized URI from which the data originated.

component_received_events_count

histogram

A histogram of the number of events passed in each internal batch in Vector’s internal topology.

Note that this is separate than sink-level batching. It is mostly useful for low level debugging performance issues in Vector due to small internal batches.

component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
container_name optional
The name of the container from which the data originated.
file optional
The file from which the data originated.
host optional
The hostname of the system Vector is running on.
mode optional
The connection mode used by the component.
peer_addr optional
The IP from which the data originated.
peer_path optional
The pathname from which the data originated.
pid optional
The process ID of the Vector instance.
pod_name optional
The name of the pod from which the data originated.
uri optional
The sanitized URI from which the data originated.

component_received_events_total

counter
The number of events accepted by this component either from tagged origins like file and uri, or cumulatively from other origins.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
container_name optional
The name of the container from which the data originated.
file optional
The file from which the data originated.
host optional
The hostname of the system Vector is running on.
mode optional
The connection mode used by the component.
peer_addr optional
The IP from which the data originated.
peer_path optional
The pathname from which the data originated.
pid optional
The process ID of the Vector instance.
pod_name optional
The name of the pod from which the data originated.
uri optional
The sanitized URI from which the data originated.

component_sent_event_bytes_total

counter
The total number of event bytes emitted by this component.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
host optional
The hostname of the system Vector is running on.
output optional
The specific output of the component.
pid optional
The process ID of the Vector instance.

component_sent_events_total

counter
The total number of events emitted by this component.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
host optional
The hostname of the system Vector is running on.
output optional
The specific output of the component.
pid optional
The process ID of the Vector instance.

source_lag_time_seconds

histogram
The difference between the timestamp recorded in each event and the time when it was ingested, expressed as fractional seconds.
component_id
The Vector component ID.
component_kind
The Vector component kind.
component_type
The Vector component type.
host optional
The hostname of the system Vector is running on.
pid optional
The process ID of the Vector instance.

How it works

API Token

The okta source uses the Okta HTTP API, you will need to generate an API token in the Okta admin console with sufficient permissions.

Context

By default, the okta source augments events with helpful context keys.

Lookback & Polling

The okta source polls Okta for new log events, by default beginning at the current time on startup, following the API’s pagination links for the next interval.

The since parameter begins fetching logs generated prior to Vector’s startup

State

This component is stateless, meaning its behavior is consistent across each input.