# Okta 프로필

## 개요

Okta 로그 소스 통합을 Panther에서 구성하여 다음을 가져오도록 설정할 수 있습니다 [사용자 프로필](#okta.users) 와 [디바이스 프로필](#okta.devices) Panther 관리 보강(Enrichment)으로. 이는 탐지 논리 및 검색 쿼리에서 프로필 및 디바이스 데이터를 사용할 수 있음을 의미합니다.

Okta에서 사용자 프로필을 사용자화하려면 다음을 따르세요 [그들의 문서](https://help.okta.com/en-us/Content/Topics/users-groups-profiles/usgp-add-custom-user-attributes.htm). 디텍션 논리에서 유용할 사용자 지정 속성(예: 해당 사용자가 예상되는 권한 수준)을 추가하는 것을 고려할 수 있습니다.

방법 알아보기 [여기에서 저장된 증가 데이터를 보는 방법](https://docs.panther.com/ko/enrichment/..#viewing-and-managing-enrichments).

### 예시 디텍션 사용 사례

탐지에서 Okta 사용자 및 디바이스 프로필 데이터를 활용할 수 있습니다. 다음 예시 사용 사례를 참조하세요:

* 행동이 발생한 디바이스가 전화기이며 행위자가 시스템 관리자(System Administrator)가 아닌 경우를 탐지합니다.
* 오프보딩이 완료되지 않았음을 나타낼 수 있는 종료된 직원에 의해 작업이 수행되는 경우를 탐지합니다.
* 디텍션 구성에서 이벤트 행위자의 직책에 따라 알러트 심각도 수준을 조정합니다. 예를 들어, 시스템 관리자가 일부 작업을 수행한 경우 `정보` 심각도 수준을 사용할 수 있지만 `HIGH` 다른 역할의 사용자가 수행한 경우에는

## Panther에서 Okta 사용자 및 디바이스 프로필을 설정하는 방법

Okta 로그 소스 통합을 Panther에서 처음 설정할 때 또는 나중에 소스를 편집하여 Okta 사용자 및 디바이스 프로필을 구성할 수 있습니다.

어느 흐름에서든 Okta 프로필 가져오기 설정을 켠 다음 프로필 데이터를 새로 고칠 주기를 설정합니다.

{% hint style="info" %}
Panther에서 Okta 사용자 및/또는 디바이스 프로필을 활성화하려면 먼저(또는 동시에) Okta를 로그 소스로 온보딩해야 합니다. Okta 디바이스 또는 사용자 프로필 통합을 설정하는 것은 불가능합니다 *없이* Panther에 Okta를 로그 소스로 온보딩하는 동안.
{% endhint %}

### Okta 디바이스 프로필 전제 조건

* Okta 디바이스 프로필을 Panther로 가져오려면 다음이 필요합니다 [Okta Devices](https://www.okta.com/platform/devices/) 활성화됨.

### Okta 소스 설정 중 Panther에서 Okta 프로필 구성

* 다음을 따르세요 [Panther에서 새 Okta 소스를 만드는 방법에 대한 이 지침을 따르세요](https://docs.panther.com/ko/data-onboarding/supported-logs/okta#how-to-onboard-okta-logs-to-panther), 특히 다음에 주의하세요 **사용자 프로필 활성화** 와 **디바이스 프로필 활성화** 필드로 구성됩니다.

### Okta 소스 설정 후 Panther에서 Okta 프로필 구성

Panther에 Okta 로그 소스를 이미 생성한 후 다음 중 하나의 방법으로 Okta 프로필을 설정할 수 있습니다 [각 룰과 예약된 룰의 기본 이벤트 임계값은 **엔리치먼트 프로바이더** 탭](#configure-okta-profiles-after-okta-log-source-setup-from-the-enrichment-providers-screen) 이전에 생성한 Snowflake 사용자 이름, 예를 들면 [다음 **로그 소스** 탭](#configure-okta-profiles-after-okta-log-source-setup-from-the-log-sources-screen) 콘솔에서.

{% tabs %}
{% tab title="콘솔: Enrichment Providers" %}
**보강 제공자(Enrichment Providers) 화면에서 Okta 로그 소스 설정 후 Okta 프로필 구성**

1. Panther 콘솔의 왼쪽 탐색 창에서 **구성** > E**nrichment 제공자**.
2. 오른쪽 상단에서 **새로 만들기**.
3. 를 선택하고 Panther가 설치된 계정 ID를 입력하십시오. **Okta**.
4. Panther에서 이미 생성한 Okta 로그 소스 목록이 표시되는 팝업 모달에서 프로필 데이터를 가져올 소스를 클릭하세요.\
   ![An Available Okta Sources modal lists an Okta source called "test," which is circled. Below, there is a Done button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-4965a5333e508d430ac118eea69450f7b68e6b63%2FScreenshot%202023-10-04%20at%204.30.48%20PM.png?alt=media)
   * 아직 Okta 로그 소스를 설정하지 않은 경우 대신 다음을 따르세요 [Okta 로그를 Panther에 온보딩하는 방법](https://docs.panther.com/ko/data-onboarding/supported-logs/okta#how-to-onboard-okta-logs-to-panther) 지침에서 단계를 완료했습니다.
5. 페이지에서 **인리치먼트** 페이지에서 오른쪽에 있는 토글을 클릭하세요 **사용자 프로필** 및/또는 **디바이스 프로필** `켜기`.
   * 켜 놓은 각 토글에 대해 `켜기`설정하세요. **새로고침 기간(분)**&#xC774;는 Panther가 Okta에 저장된 내용으로 프로필 데이터를 업데이트하는 주기를 나타냅니다.

     <div align="left"><figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-b79037763a50b3ad2df82262bd631d598c4768f5%2FScreenshot%202023-10-04%20at%203.33.06%20PM.png?alt=media" alt="In the Enrichment settings box, there are toggles for User Profiles and Device Profiles. Next to each is a Refresh period (min) field." width="375"><figcaption></figcaption></figure></div>
6. 오른쪽 상단에서 **"Resource": "\<secret ARN>"**.
   {% endtab %}

{% tab title="콘솔: 로그 소스" %}
**로그 소스 화면에서 Okta 로그 소스 설정 후 Okta 프로필 구성**

1. Panther 콘솔의 왼쪽 탐색 창에서 **구성** > **로그 소스**.
2. 프로필을 설정하려는 Okta 로그 소스를 찾아 해당 이름을 클릭하세요.
3. 로그 소스 페이지의 오른쪽 상단에서 클릭하세요 **구성,** 그런 다음 **편집을 클릭합니다.**\
   ![The Okta Sand Box log source page has Overview, Schemas, Health, and Filters tabs. On the right side, there is a Configuration button, with an arrow pointing from it to an Edit button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-3b206a915e2b404965b1521559fdfe363f45f446%2FScreenshot%202023-06-01%20at%202.09.59%20PM.png?alt=media)
4. 오른쪽 상단에서 **인리치먼트**.
5. 페이지에서 **인리치먼트** 페이지에서 오른쪽에 있는 토글을 클릭하세요 **사용자 프로필** 및/또는 **디바이스 프로필** `켜기`.
   * 켜 놓은 각 토글에 대해 `켜기`설정하세요. **새로고침 기간(분)**&#xC774;는 Panther가 Okta에 저장된 내용으로 프로필 데이터를 업데이트하는 주기를 나타냅니다.

     <div align="left"><figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-b79037763a50b3ad2df82262bd631d598c4768f5%2FScreenshot%202023-10-04%20at%203.33.06%20PM.png?alt=media" alt="In the Enrichment settings box, there are toggles for User Profiles and Device Profiles. Next to each is a Refresh period (min) field." width="375"><figcaption></figcaption></figure></div>
6. 오른쪽 상단에서 **"Resource": "\<secret ARN>"**.
   {% endtab %}
   {% endtabs %}

## 지원되는 프로필 유형

Panther는 Okta에서 다음을 가져오는 것을 지원합니다 [사용자 프로필](#okta.users) 와 [디바이스 프로필](#okta.devices) 아래는 각 프로필 유형의 데이터가 어떻게 구조화되어 있는지에 대한 스키마입니다.

### Okta.Users

```yaml
스키마: Okta.Users
설명: Panther가 관리하는 Okta 사용자 프로필
참조 URL: https://developer.okta.com/docs/reference/api/users/#list-users
필드:
    - name: match
      설명: 조회 테이블과 일치시킬 키
      type: array
      element:
        type: string
    - 이름: id
      설명: 이 사용자의 Okta 내부 ID
      type: string
      지표:
        - actor_id
    - 이름: created
      설명: 사용자 레코드 생성 시간
      type: timestamp
      timeFormats:
        - rfc3339
    - 이름: activated
      설명: 사용자 레코드의 활성화 시간
      type: timestamp
      timeFormats:
        - rfc3339
    - 이름: statusChanged
      설명: 사용자 상태가 변경된 시간
      type: timestamp
      timeFormats:
        - rfc3339
    - 이름: lastLogin
      설명: 마지막 인증 시간
      type: timestamp
      timeFormats:
        - rfc3339
    - 이름: lastUpdated
      설명: 마지막 레코드 업데이트 시간
      type: timestamp
      timeFormats:
        - rfc3339
    - 이름: passwordChanged
      설명: 마지막 비밀번호 변경 시간
      type: timestamp
      timeFormats:
        - rfc3339
    - 이름: status
      설명: 사용자의 상태
      type: string
    - 이름: profile
      설명: Okta 사용자 프로필
      유형: json
```

### Okta.Devices

```yaml
스키마: Okta.Devices
설명: Panther가 관리하는 Okta 디바이스 프로필
참조 URL: https://developer.okta.com/docs/reference/api/devices/#list-devices
필드:
    - name: match
      설명: 조회 테이블과 일치시킬 키
      type: array
      element:
        type: string
    - 이름: id
      설명: 이 디바이스의 Okta 내부 ID
      type: string
    - 이름: created
      설명: 디바이스 레코드 생성 시간
      type: timestamp
      timeFormats:
        - rfc3339
    - 이름: lastUpdated
      설명: 마지막 레코드 업데이트 시간
      type: timestamp
      timeFormats:
        - rfc3339
    - 이름: status
      설명: 디바이스의 상태
      type: string
    - 이름: resourceType
      설명: 디바이스의 유형
      type: string
    - 이름: resourceDisplayName
      설명: 장치 이름
      type: object
      필드:
        - 이름: value
          설명: 장치 이름
          type: string
        - 이름: sensitive
          설명: 민감한 경우 true
          유형: boolean
    - name: resourceId
      설명: 디바이스의 외부 ID
      type: string
    - 이름: resourceAlternateId
      설명: 디바이스의 대체 외부 ID
      type: string
    - 이름: profile
      설명: Okta 디바이스 프로필
      유형: json
    - 이름: users
      설명: 이 디바이스와 연관된 사용자들
      type: array
      element:
        type: object
        필드:
            - 이름: id
              설명: 이 사용자의 Okta 내부 ID
              type: string
              지표:
                - actor_id
            - 이름: emails
              설명: 이 사용자와 연관된 이메일들
              type: array
              element:
                type: string
                지표:
                    - 이메일
```

## 예시: 탐지에서 Okta 프로필 데이터 사용하기

Okta 사용자 또는 디바이스 프로필을 설정하고 데이터 가져오기가 완료되면 탐지 논리에서 해당 데이터를 참조할 수 있습니다.

다음 Okta 사용자 프로필이 주어졌을 때:

```json
{
    "activated": "2023-02-22 20:14:57",
    "created": "2023-02-22 20:14:57",
    "id": "00u7364cqlAxlJrgX1d7",
    "lastlogin": "2023-02-22 20:28:05",
    "lastupdated": "2023-02-22 20:27:57",
    "match": [
        "00u7364cqlAxlJrgX1d7",
	"henry.ford@panther.com"
    ],
    "p_any_actor_ids": [
	"00u7364cqlAxlJrgX1d7"
    ],
    "p_any_emails": [
	"henry.ford@panther.com"
    ],
    "p_event_time": "2023-06-01 20:48:36.12",
    "p_log_type": "Okta.Users",
    "p_parse_time": "2023-06-01 20:48:36.12",
    "p_row_id": "623cde25b9568494cebbdfc118a310",
    "p_schema_version": 0,
    "passwordchanged": "2023-02-22 20:27:57",
    "profile": {
	"email": "henry.ford@panther.com",
	"firstName": "Henry",
	"lastName": "Ford",
	"login": "henry.ford@panther.com",
	"manager": "Joe Jacobs",
	"mobilePhone": null,
	"secondEmail": null
	},
    "status": "ACTIVE",
    "statuschanged": "2023-02-22 20:27:57"
}
```

그리고 다음 들어오는 이벤트:

```json
{
    "actorEmail": "henry.ford@panther.com",
    "action": "deleted_file"
}
```

탐지를 거치기 전에 이벤트는 Okta 프로필 데이터로 보강되어 다음과 같이 됩니다:

```json
{
    "actorEmail": "henry.ford@panther.com",
    "action": "deleted_file",
    "p_enrichment": {
    	"okta_users": {
    	    "actorEmail": {
    		"p_match": "henry.ford@panther.com",
                "activated": "2023-02-22 20:14:57",
	        "created": "2023-02-22 20:14:57",
		"id": "00u7364cqlAxlJrgX1d7",
		"lastlogin": "2023-02-22 20:28:05",
		"lastupdated": "2023-02-22 20:27:57",
		"match": [
		    "00u7364cqlAxlJrgX1d7",
		    "henry.ford@panther.com"
		],
		"p_any_actor_ids": [
		    "00u7364cqlAxlJrgX1d7"
		],
		"p_any_emails": [
		    "henry.ford@panther.com"
		],
		"passwordchanged": "2023-02-22 20:27:57",
		"profile": {
		    "email": "henry.ford@panther.com",
		    "firstName": "Henry",
		    "lastName": "Ford",
		    "login": "henry.ford@panther.com",
		    "manager": "Joe Jacobs",
		    "mobilePhone": null,
		    "secondEmail": null
		},
	        "status": "ACTIVE",
		"statuschanged": "2023-02-22 20:27:57"
    	    }
    	}
    }
}
```

그런 다음 Okta 프로필 데이터를 참조하는 탐지를 다음과 같이 작성할 수 있습니다:

{% tabs %}
{% tab title="Python" %}

```python
def rule(event):
  userManager = deep_get(event, 'p_enrichment', 'okta_users', 'actorEmail', 'profile', 'manager')
  
  return userManager == 'Joe Jacobs'
```

{% endtab %}

{% tab title="YAML" %}

```yaml
event, "data", "details", "request", "path", default="<NO_REQUEST_PATH_FOUND>"
  - Enrichment:
      테이블: okta_users
      선택자: actorEmail
      필드경로: profile.manager
    request_path == "/api/v2/guardian/policies",
    값: Joe Jacobs
```

{% endtab %}
{% endtabs %}
