id: okta-api-token

info:
  name: Okta API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/okta.yml
    - https://devforum.okta.com/t/api-token-length/5519
    - https://developer.okta.com/docs/guides/create-an-api-token/main/
  metadata:
    verified: true
    max-request: 1
  tags: okta,exposure,tokens

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?s)(?:okta|ssws).{0,40}\b(00[a-z0-9_-]{39}[a-z0-9_])\b
# digest: 4a0a00473045022073baa30cacb7d0fd2979daaa6adf65d928000c8ff86bb10f2842373b3a1a7384022100d617c2da94ed026fbbf31555c7dae36eb590b4714e5c3f497584cf2e62a0db9f:922c64590222798bb761d5b6d8e72950