Skip to main content

OKTA

Constant OKTA 

Source
pub const OKTA: &str = "# The Okta System Log, as its API answers, `[...]`, which the definition\n# unwraps, or as log streaming delivers it, one event after another.\n#\n# Sign-ins become OCSF Authentication; changes to an account, its password,\n# and its factors, Account Change; group membership, Group Management; and\n# admin privileges, User Access Management. Okta has hundreds of other event\n# types; each becomes an API Activity whose operation is the event type, so\n# that none is lost for having no kind of its own.\n#\n# The actor is who acted. What was acted on is Okta\'s `target` array, in an\n# order fixed per event type: the user first, then the group, application,\n# or role. The whole array is kept under `unmapped`, as are `client`,\n# `authenticationContext`, `securityContext`, `debugContext`, `outcome`, and\n# `transaction`, which rules compare as Okta writes them.\n\nname: okta\nversion: 1\nframing: json-values\ndecoding: json\nunwrap: \".\"\n\n# The ATT&CK data components its records supply: those ATT&CK names for\n# saas:okta and Okta:SystemLog, of the records the kinds below read.\ndata_components:\n  - Application Log Content\n  - Logon Session Creation\n  - Logon Session Metadata\n  - User Account Authentication\n  - User Account Creation\n  - User Account Metadata\n  - User Account Modification\n\ncommon:\n  time: { from: published, as: timestamp }\n  metadata.version: { value: \"1.5.0\" }\n  metadata.product.name: { value: Okta }\n  metadata.product.vendor_name: { value: Okta }\n  metadata.uid: uuid\n  metadata.event_code: eventType\n  metadata.correlation_uid: transaction.id\n  message: displayMessage\n  severity: severity\n  severity_id:\n    from: severity\n    map: { DEBUG: 1, INFO: 1, WARN: 3, ERROR: 4 }\n    otherwise: 99\n  status: outcome.result\n  status_id:\n    from: outcome.result\n    map: { SUCCESS: 1, ALLOW: 1, FAILURE: 2, DENY: 2 }\n    otherwise: 99\n  status_detail: outcome.reason\n  actor.user.uid: actor.id\n  actor.user.name: actor.alternateId\n  actor.user.full_name: actor.displayName\n  actor.user.type: actor.type\n  actor.session.uid: authenticationContext.externalSessionId\n  src_endpoint.ip: { from: client.ipAddress, as: ip }\n  src_endpoint.location.city: client.geographicalContext.city\n  src_endpoint.location.region: client.geographicalContext.state\n  src_endpoint.location.country: client.geographicalContext.country\n  src_endpoint.location.lat: client.geographicalContext.geolocation.lat\n  src_endpoint.location.long: client.geographicalContext.geolocation.lon\n  http_request.user_agent: client.userAgent.rawUserAgent\n\nkinds:\n  - name: sign_in\n    when:\n      eventType: user.session.start\n    # Authentication: Logon.\n    class: { class_uid: 3002, activity_id: 1 }\n    fields: &sign_in\n      user.uid: actor.id\n      user.name: actor.alternateId\n      auth_protocol: authenticationContext.credentialType\n    unmapped: [\".\"]\n\n  - name: sign_in_with_factor\n    when:\n      eventType: user.authentication.auth_via_mfa\n    # Authentication: Logon, with a second factor.\n    class: { class_uid: 3002, activity_id: 1 }\n    fields:\n      user.uid: actor.id\n      user.name: actor.alternateId\n      auth_protocol: authenticationContext.credentialType\n      is_mfa: { value: true }\n    unmapped: [\".\"]\n\n  - name: single_sign_on\n    when:\n      eventType: user.authentication.sso\n    # Authentication: Logon, to the application in the first target.\n    class: { class_uid: 3002, activity_id: 1 }\n    fields:\n      user.uid: actor.id\n      user.name: actor.alternateId\n      service.name: target.0.displayName\n      service.uid: target.0.id\n    unmapped: [\".\"]\n\n  - name: sign_out\n    when:\n      eventType: user.session.end\n    # Authentication: Logoff.\n    class: { class_uid: 3002, activity_id: 2 }\n    fields: *sign_in\n    unmapped: [\".\"]\n\n  - name: account_created\n    when:\n      eventType: user.lifecycle.create\n    # Account Change: Create, of the user in the first target.\n    class: { class_uid: 3001, activity_id: 1 }\n    fields: &target_user\n      user.uid: target.0.id\n      user.name: target.0.alternateId\n      user.full_name: target.0.displayName\n    unmapped: [\".\"]\n\n  - name: account_activated\n    when:\n      eventType: user.lifecycle.activate\n    # Account Change: Enable.\n    class: { class_uid: 3001, activity_id: 2 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: account_reactivated\n    when:\n      eventType: user.lifecycle.reactivate\n    # Account Change: Enable.\n    class: { class_uid: 3001, activity_id: 2 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: account_deactivated\n    when:\n      eventType: user.lifecycle.deactivate\n    # Account Change: Disable.\n    class: { class_uid: 3001, activity_id: 5 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: account_suspended\n    when:\n      eventType: user.lifecycle.suspend\n    # Account Change: Disable.\n    class: { class_uid: 3001, activity_id: 5 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: account_deleted\n    when:\n      eventType: user.lifecycle.delete.initiated\n    # Account Change: Delete.\n    class: { class_uid: 3001, activity_id: 6 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: password_changed\n    when:\n      eventType: user.account.update_password\n    # Account Change: Password Change.\n    class: { class_uid: 3001, activity_id: 3 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: password_reset\n    when:\n      eventType: user.account.reset_password\n    # Account Change: Password Reset.\n    class: { class_uid: 3001, activity_id: 4 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: account_locked\n    when:\n      eventType: user.account.lock\n    # Account Change: Lock. Okta locks the account that failed to sign in,\n    # which is the actor.\n    class: { class_uid: 3001, activity_id: 9 }\n    fields:\n      user.uid: actor.id\n      user.name: actor.alternateId\n      user.full_name: actor.displayName\n    unmapped: [\".\"]\n\n  - name: account_unlocked\n    when:\n      eventType: user.account.unlock_by_admin\n    # Account Change: Unlock.\n    class: { class_uid: 3001, activity_id: 12 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: factor_activated\n    when:\n      eventType: user.mfa.factor.activate\n    # Account Change: MFA Factor Enable.\n    class: { class_uid: 3001, activity_id: 10 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: factor_deactivated\n    when:\n      eventType: user.mfa.factor.deactivate\n    # Account Change: MFA Factor Disable.\n    class: { class_uid: 3001, activity_id: 11 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: factors_reset\n    when:\n      eventType: user.mfa.factor.reset_all\n    # Account Change: MFA Factor Disable, of every factor.\n    class: { class_uid: 3001, activity_id: 11 }\n    fields: *target_user\n    unmapped: [\".\"]\n\n  - name: group_member_added\n    when:\n      eventType: group.user_membership.add\n    # Group Management: Add User; the user is the first target, the group\n    # the second.\n    class: { class_uid: 3006, activity_id: 3 }\n    fields: &member\n      user.uid: target.0.id\n      user.name: target.0.alternateId\n      user.full_name: target.0.displayName\n      group.uid: target.1.id\n      group.name: target.1.displayName\n    unmapped: [\".\"]\n\n  - name: group_member_removed\n    when:\n      eventType: group.user_membership.remove\n    # Group Management: Remove User.\n    class: { class_uid: 3006, activity_id: 4 }\n    fields: *member\n    unmapped: [\".\"]\n\n  - name: privilege_granted\n    when:\n      eventType: user.account.privilege.grant\n    # User Access Management: Assign Privileges, to the user in the first\n    # target. The role is in the event\'s `debugContext`, kept as written.\n    class: { class_uid: 3005, activity_id: 1 }\n    fields: &privilege\n      user.uid: target.0.id\n      user.name: target.0.alternateId\n      user.full_name: target.0.displayName\n    unmapped: [\".\"]\n\n  - name: privilege_revoked\n    when:\n      eventType: user.account.privilege.revoke\n    # User Access Management: Revoke Privileges.\n    class: { class_uid: 3005, activity_id: 2 }\n    fields: *privilege\n    unmapped: [\".\"]\n\n  - name: other\n    when:\n      # Every System Log event is of version 0, so this kind takes each\n      # event of a type no kind above names.\n      version: \"0\"\n    # API Activity: Other, the operation being the event type.\n    class: { class_uid: 6003, activity_id: 99 }\n    fields:\n      api.operation: eventType\n      api.request.uid: debugContext.debugData.requestId\n    unmapped: [\".\"]\n";
Expand description

The Okta System Log definition shipped with this crate: sign-ins, accounts, factors, groups, privileges, and every other event type.