# Okta 로그

## 개요

Panther는 다음을 쿼리하여 Okta 이벤트를 가져올 수 있습니다 [Okta System Log API](https://developer.okta.com/docs/reference/api/system-log/). Panther는 1분마다 System Log API를 쿼리합니다. Panther가 API에 액세스하려면 새 API 토큰을 생성하거나 기존 토큰을 사용해야 합니다.

다음도 활성화할 수 있습니다 [Okta 사용자 및 디바이스 프로필](/ko/enrichment/okta.md).

### 동영상 안내

{% embed url="<https://youtu.be/QqoddCp1Vy8>" %}
Okta 로그를 Panther에 온보딩하는 방법을 보여주는 동영상 안내
{% endembed %}

## Okta 로그를 Panther에 온보딩하는 방법

### 1단계: 새 Okta API 토큰 생성

{% hint style="info" %}
System Logs를 쿼리할 권한이 있는 Okta API 토큰을 생성하려면 다음 유형의 Okta 관리자 중 하나로 로그인해야 합니다: [슈퍼 관리자](https://help.okta.com/en-us/Content/Topics/Security/administrators-super-admin.htm), [조직 관리자](https://help.okta.com/en-us/Content/Topics/Security/administrators-org-admin.htm), 또는 [읽기 전용 관리자](https://help.okta.com/en-us/Content/Topics/Security/administrators-read-only-admin.htm).

다음을 사용하는 것을 권장합니다 [읽기 전용 관리자](https://help.okta.com/en-us/Content/Topics/Security/administrators-read-only-admin.htm) 역할, 최소 권한을 위해.

참조하세요 [Okta의 문서](https://help.okta.com/en-us/Content/Topics/Security/Administrators.htm) 관리자 역할 관리에 대한 자세한 내용은 참조하세요.
{% endhint %}

1. Okta 관리자로 로그인합니다.
2. Okta Admin Console에서 다음으로 이동합니다 **Security** > **API.**
3. 다음으로 이동합니다 **Tokens** 탭을 클릭합니다.
4. 을 클릭한 다음 **Create token.**
5. 토큰에 대한 설명이 포함된 이름을 입력합니다. 예: `Panther API 토큰`.
6. 다음을 복사합니다 **토큰 값** 그리고 안전한 위치에 저장합니다. 다음 단계에서 필요합니다.
   * **참고**: Okta는 이 값을 다시 표시하지 않습니다.

### 2단계: Panther에서 새 Okta 소스 생성

1. Panther Console의 왼쪽 탐색 모음에서 **구성하세요.** > **로그 소스**.
2. 을 클릭한 다음 **새로 만들기 를 클릭합니다.**
3. “Okta”를 검색한 다음 해당 타일을 클릭합니다.
4. 슬라이드아웃 패널에서 다음을 클릭합니다 **설정 시작**.
5. 다음 **구성** 페이지에서 다음 필드를 입력합니다:
   * **이름**: 소스에 대한 설명이 포함된 이름을 입력합니다. 예: `내 Okta 로그`.
   * **Okta 하위 도메인**: Okta 조직 도메인의 하위 도메인을 입력합니다. 다음을 참조할 수 있습니다 [Okta 문서](https://developer.okta.com/docs/guides/find-your-domain/main/) 에서 Okta org 도메인에 대해 자세히 확인할 수 있습니다.
   * **Okta 도메인**: Okta 도메인 드롭다운에서 적절한 도메인 이름을 선택합니다.
   * **API 토큰**: 이전 단계에서 생성한 토큰 값을 입력합니다.
6. 을 클릭한 다음 **설정**.
7. 다음 **Enrichment** 페이지에서 다음을 활성화하려면 [Okta Identity Profiles](/ko/enrichment/okta.md), 오른쪽의 **User Profiles** 및/또는 **Device Profiles**, 토글을 클릭하여 `켜기`.

   * 참고 [Okta 디바이스 프로필 활성화를 위한 사전 요구 사항](/ko/enrichment/okta.md#prerequisite-for-okta-device-profiles).
   * 각 토글이 다음으로 설정된 경우 `켜기`, 다음을 설정합니다 **새로 고침 주기(분)**. 이는 Panther가 Okta에 저장된 내용으로 프로필 데이터를 업데이트하는 주기를 나타냅니다.

   <figure><img src="/files/db71859e15bc3c83fe7a64c561f5c12cf65c6bb7" alt="On the Enrichment settings page of the Create Okta source flow, there are toggles for User Profiles and Device Profiles. Next to each of the toggles is a Refresh period (min) field." width="375"><figcaption></figcaption></figure>
8. 을 클릭한 다음 **설정**. 성공 화면으로 이동합니다:\\

   <figure><img src="/files/e0820e5acb9452e294cfe3ba72060f0fbbfd3b32" alt="The success screen reads, &#x22;Everything looks good! Panther will now automatically pull &#x26; process logs from your account&#x22;" width="281"><figcaption></figcaption></figure>

   * 선택적으로 하나 이상의 [디택션 Packs](https://docs.panther.com/detections/panther-managed/packs).
   * 그 **이벤트가 처리되지 않을 때 알러트 트리거** 설정의 기본값은 **예**. 이 옵션은 활성화된 상태로 두는 것을 권장합니다. 일정 시간이 지나 로그 소스에서 데이터가 더 이상 유입되지 않으면 알림을 받게 되기 때문입니다. 기간은 구성할 수 있으며 기본값은 24시간입니다.\\

     <figure><img src="/files/7db146cd7acee3d0704a4a8b2157f230cfa22168" alt="The &#x22;Trigger an alert when no events are processed&#x22; toggle is set to YES. The &#x22;How long should Panther wait before it sends you an alert that no events have been processed&#x22; setting is set to 1 Day" width="320"><figcaption></figcaption></figure>

## Panther에서 관리하는 탐지 규칙

참조하세요 [Panther에서 관리하는](/ko/detections/panther-managed.md) 의 Okta용 룰 [panther-analysis GitHub 저장소에 있습니다](https://github.com/panther-labs/panther-analysis/tree/main/rules/okta_rules). 여기에는 다음이 포함됩니다:

* [Okta 관리자 역할 할당됨](https://github.com/panther-labs/panther-analysis/blob/cd220c87982011d4ad156c7daecd2857c358d154/rules/okta_rules/okta_admin_role_assigned.py) - 사용자에게 Okta에서 관리 권한이 부여되었습니다
* [Okta API 키 생성됨](https://github.com/panther-labs/panther-analysis/blob/cd220c87982011d4ad156c7daecd2857c358d154/rules/okta_rules/okta_api_key_created.py) - 사용자가 Okta에서 API 키를 생성했습니다
* [Okta API 키 취소됨](https://github.com/panther-labs/panther-analysis/blob/cd220c87982011d4ad156c7daecd2857c358d154/rules/okta_rules/okta_api_key_revoked.py) - 사용자가 Okta에서 API 키를 취소했습니다
* [지리적으로 비현실적인 Okta 로그인](https://github.com/panther-labs/panther-analysis/blob/cd220c87982011d4ad156c7daecd2857c358d154/rules/okta_rules/okta_geo_improbable_access.py) - 사용자가 매우 멀리 떨어진 두 지리적 위치에서 연속으로 로그인했습니다
* [Okta MFA 전역 비활성화](https://github.com/panther-labs/panther-analysis/blob/cd220c87982011d4ad156c7daecd2857c358d154/rules/okta_rules/okta_admin_disabled_mfa.py) - 관리자가 Okta 시스템 전체 MFA를 비활성화했습니다
* [Okta 지원 자격 증명 재설정](https://github.com/panther-labs/panther-analysis/blob/cd220c87982011d4ad156c7daecd2857c358d154/rules/okta_rules/okta_support_reset.py) - Okta 지원팀이 사용자의 비밀번호 또는 MFA를 재설정했습니다
* [Okta 지원 액세스 허용됨](https://github.com/panther-labs/panther-analysis/blob/cd220c87982011d4ad156c7daecd2857c358d154/rules/okta_rules/okta_account_support_access.py) - Okta 지원 액세스가 허용되었습니다

## 사용자 지정 디택션

#### 의심스러운 동작 보고 예시

사용자가 자신의 계정에서 의심스러운 동작을 보고했습니다:

```python
def 룰(event):
    if event.get('eventtype') == 'user.account.report_suspicious_activity_by_enduser':
        return True
```

#### 사용자 지정 디택션 패턴

다음은 몇 가지 일반적인 함수와 예시 [`deep_get()`](/ko/detections/rules/python.md#deep_get) 입니다. Okta 로그에 대한 사용자 지정 디택션을 작성할 때 사용됩니다. 다양한 이벤트 유형에 대한 자세한 내용은 Okta [문서](https://developer.okta.com/docs/reference/api/event-types/).

```python
#Okta에는 여기에 나열된 많은 이벤트 유형이 있습니다. 이러한 eventtypes 중 하나를 기반으로 디택션을 시작할 수 있습니다
#https://developer.okta.com/docs/reference/api/event-types/
event.get('eventtype')

#도시, 주, 위도, 경도 등에 액세스하려면 
deep_get(event, 'client', 'geographicalContext', 'city')
deep_get(event, 'client', 'geographicalContext', 'state')
deep_get(event, 'client', 'geographicalContext', 'country')
deep_get(event, 'client', 'geographicalContext', 'geolocation', 'lon')
deep_get(event, 'client', 'geographicalContext', 'geolocation', 'lat')

#이벤트 소스에 대한 세부 정보
deep_get(event, 'client' 'device')
deep_get(event, 'client', 'ipAddress')
deep_get(event, 'client', 'userAgent')


deep_get(event, 'actor', 'alternateId')
deep_get(event, 'actor', 'displayName')

## Okta와 함께 유용할 수 있는 전역 헬퍼

# panther_base_helpers 내
def okta_알러트_context(event: dict):
    """Okta 알러트 자동화를 위한 공통 컨텍스트를 반환합니다"""
    return {
        "ips": event.get("p_any_ip_addresses", []),
        "actor": event.get("actor", ""),
        "target": event.get("target", ""),
        "client": event.get("client", ""),
    }
    
# panther_base_helpers 내
def is_ip_in_network(ip_addr, networks):
    """주어진 IP가 IP 범위 목록 내에 있는지 확인합니다"""
    return any(ip_address(ip_addr) in ip_network(network) for network in networks)
```

## 지원되는 로그 유형

### Okta.SystemLog

Okta System Log는 플랫폼 활동을 이해하고 문제를 진단하는 데 사용할 수 있는 감사 추적을 제공하기 위해 조직과 관련된 시스템 이벤트를 기록합니다.

참조: [System Log API에 대한 Okta 문서.](https://developer.okta.com/docs/reference/api/system-log/)

```yaml
schema: Okta.SystemLog
description: |
    Okta System Log는 플랫폼 활동을 이해하고 문제를 진단하는 데 사용할 수 있는 감사 추적을 제공하기 위해 조직과 관련된 시스템 이벤트를 기록합니다.
referenceURL: https://developer.okta.com/docs/reference/api/system-log/
fields:
    - name: uuid
      required: true
      description: 개별 이벤트의 고유 식별자
      type: string
    - name: published
      required: true
      description: 이벤트가 게시된 타임스탬프
      type: timestamp
      timeFormat: rfc3339
      isEventTime: true
    - name: eventType
      required: true
      description: 게시된 이벤트의 유형
      type: string
    - 이름: version
      required: true
      description: 버전 관리 표시자
      type: string
    - name: severity
      required: true
      description: '이벤트의 심각도를 나타냅니다: DEBUG, INFO, WARN, ERROR'
      type: string
    - name: legacyEventType
      description: 연결된 Events API Action objectType 속성 값
      type: string
    - name: displayMessage
      description: 이벤트의 표시 메시지
      type: string
    - name: actor
      description: 작업을 수행한 엔터티를 설명합니다
      type: object
      fields:
        - name: id
          required: true
          description: actor의 ID
          type: string
        - name: type
          required: true
          description: actor의 유형
          type: string
        - name: alternateId
          description: actor의 대체 ID
          type: string
          indicators:
            - 이메일
        - name: displayName
          description: actor의 표시 이름
          type: string
        - 이름: details
          description: actor에 대한 세부 정보
          type: json
        - name: detailEntry
          description: 세부 항목
          type: json
    - name: client
      description: 작업을 요청한 클라이언트
      type: object
      fields:
        - name: id
          description: OAuth 요청의 경우 요청을 수행하는 OAuth 클라이언트의 ID입니다. SSWS 토큰 요청의 경우 요청을 수행하는 에이전트의 ID입니다.
          type: string
        - 이름: userAgent
          description: actor가 작업을 수행하는 데 사용한 사용자 에이전트
          type: object
          fields:
            - name: browser
              description: 클라이언트가 웹 브라우저인 경우 이 필드는 웹 브라우저의 유형을 식별합니다(예: CHROME, FIREFOX)
              type: string
            - 이름: os
              description: 클라이언트가 실행되는 운영 체제(예: Windows 10)
              type: string
            - name: rawUserAgent
              description: HTTP/1.1 Semantics and Content의 5.5.3절에 따라 형식이 지정된 사용자 에이전트의 원시 문자열 표현입니다. 브라우저와 OS 필드는 모두 이 필드에서 파생될 수 있습니다.
              type: string
        - name: geographicalContext
          description: 클라이언트가 요청을 보낸 물리적 위치
          type: object
          fields:
            - name: geolocation
              description: 지리적 위치 좌표(위도, 경도)를 포함합니다
              type: object
              fields:
                - name: lat
                  description: 위도
                  type: float
                - name: lon
                  description: 경도
                  type: float
            - 이름: city
              description: 사용 가능한 경우 지리적 위치 좌표를 포함하는 영역을 아우르는 도시(예: Seattle, San Francisco)
              type: string
            - 이름: state
              description: 지리적 위치 좌표를 포함하는 영역을 아우르는 주/도 전체 이름(예: Montana, Incheon)
              type: string
            - 이름: 국가
              description: 지리적 위치 좌표를 포함하는 영역을 아우르는 국가 전체 이름(예: France, Uganda)
              type: string
            - name: postalCode
              description: 지리적 위치 좌표를 포함하는 영역을 아우르는 국가 전체 이름(예: France, Uganda)
              type: string
        - 이름: zone
          description: 클라이언트 위치가 매핑되는 Zone의 이름
          type: string
        - name: ipAddress
          description: 클라이언트가 요청을 보낸 IP 주소
          type: string
          indicators:
            - ip
        - name: device
          description: 클라이언트가 사용한 디바이스 유형(예: Computer)
          type: string
    - name: request
      description: 작업을 시작한 요청
      type: object
      fields:
        - name: ipChain
          description: 들어오는 요청이 프록시를 통과하는 경우 해당 프록시의 IP 주소가 여기 (clientIp, proxy1, proxy2, ...) 형식으로 저장됩니다.
          type: array
          element:
            type: object
            fields:
                - name: ip
                  description: IP 주소
                  type: string
                  indicators:
                    - ip
                - name: geographicalContext
                  description: IP 주소의 지리적 컨텍스트
                  type: object
                  fields:
                    - name: geolocation
                      description: 지리적 위치 좌표(위도, 경도)를 포함합니다
                      type: object
                      fields:
                        - name: lat
                          description: 위도
                          type: float
                        - name: lon
                          description: 경도
                          type: float
                    - 이름: city
                      description: 사용 가능한 경우 지리적 위치 좌표를 포함하는 영역을 아우르는 도시(예: Seattle, San Francisco)
                      type: string
                    - 이름: state
                      description: 지리적 위치 좌표를 포함하는 영역을 아우르는 주/도 전체 이름(예: Montana, Incheon)
                      type: string
                    - 이름: 국가
                      description: 지리적 위치 좌표를 포함하는 영역을 아우르는 국가 전체 이름(예: France, Uganda)
                      type: string
                    - name: postalCode
                      description: 지리적 위치 좌표를 포함하는 영역을 아우르는 국가 전체 이름(예: France, Uganda)
                      type: string
                - 이름: version
                  description: IP 버전
                  type: string
                - name: source
                  description: 소스 관련 세부 정보
                  type: string
    - name: outcome
      description: 작업의 결과
      type: object
      fields:
        - name: result
          description: '작업의 결과: SUCCESS, FAILURE, SKIPPED, ALLOW, DENY, CHALLENGE, UNKNOWN'
          type: string
        - 이름: reason
          description: 결과의 이유, 예: INVALID_CREDENTIALS
          type: string
    - 이름: target
      description: 작업의 대상이 0개 이상일 수 있습니다
      type: array
      element:
        type: object
        fields:
            - name: id
              required: true
              description: 대상의 ID
              type: string
            - name: type
              required: true
              description: 대상의 유형
              type: string
            - name: alternateId
              description: 대상의 대체 ID
              type: string
            - name: displayName
              description: 대상의 표시 이름
              type: string
            - 이름: details
              description: 대상에 대한 세부 정보
              type: json
            - name: detailEntry
              description: 세부 항목
              type: json
            - name: changeDetails
              description: 변경 사항에 대한 세부 정보
              type: json
    - name: transaction
      description: 작업의 트랜잭션 세부 정보
      type: object
      fields:
        - name: id
          description: 이 트랜잭션의 고유 식별자입니다.
          type: string
        - name: type
          description: 트랜잭션의 종류를 설명합니다. WEB은 웹 요청을 나타냅니다. JOB은 비동기 작업을 나타냅니다.
          type: string
        - name: detail
          description: 이 트랜잭션의 세부 정보.
          type: json
    - name: debugContext
      description: 작업의 디버그 요청 데이터
      type: object
      fields:
        - name: debugData
          description: 이벤트 유형에 따라 달라지는 기타 정보를 포함하는 동적 필드입니다.
          type: json
    - name: authenticationContext
      description: 작업의 인증 데이터
      type: object
      fields:
        - name: authenticationProvider
          description: 제공된 자격 증명을 사용하여 actor의 신원을 증명하는 시스템
          type: string
        - name: authenticationStep
          설명: 인증 파이프라인에서 0부터 시작하는 단계 번호입니다. 현재는 사용되지 않으며 항상 0으로 설정됩니다.
          유형: int
        - 이름: credentialProvider
          설명: 자격 증명 공급자는 신원과 그에 연결된 자격 증명을 관리하는 소프트웨어 서비스입니다. 자격 증명 공급자가 제공한 자격 증명을 통해 인증이 발생하면, 해당 자격 증명 공급자가 여기에 기록됩니다.
          type: string
        - 이름: credentialType
          설명: 자격 증명에 사용된 기본 기술/방식
          type: string
        - 이름: rootSessionId
          type: string
        - 이름: issuer
          설명: 자격 증명을 생성하고 발급한 특정 소프트웨어 엔터티입니다.
          type: object
          fields:
            - name: id
              설명: 인증 유형에 따라 다릅니다. 인증이 SAML 2.0인 경우, id는 SAML 어설션의 발급자입니다. 소셜 로그인인 경우, id는 토큰의 발급자입니다.
              type: string
            - name: type
              설명: SAML 어설션 또는 토큰의 발급자 및 출처에 관한 정보입니다.
              type: string
        - 이름: externalSessionId
          설명: 행위자의 세션 ID를 나타내는 프록시
          type: string
        - 이름: interface
          설명: 행위자가 인증하는 제3자 사용자 인터페이스(있는 경우)입니다.
          type: string
        - 이름: authenticatorProvider
          설명: '사용 중단됨: 이 필드는 하위 호환성을 위해 유지됩니다.'
          type: string
    - 이름: securityContext
      설명: 작업의 보안 데이터
      type: object
      fields:
        - 이름: asNumber
          설명: 이벤트 요청의 출처가 된 자율 시스템과 관련된 자율 시스템 번호
          type: bigint
        - 이름: asOrg
          설명: 이벤트 요청의 출처가 된 자율 시스템과 관련된 조직
          type: string
        - 이름: isp
          설명: 이벤트 요청을 전송하는 데 사용된 인터넷 서비스 제공업체
          type: string
        - 이름: domain
          설명: 수신 이벤트 요청의 IP 주소와 연결된 도메인 이름
          type: string
          indicators:
            - 도메인
        - 이름: isProxy
          설명: 이벤트의 요청이 알려진 프록시에서 발생한 것인지 여부를 지정합니다
          type: boolean
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panther.com/ko/data-onboarding/supported-logs/okta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
