# Zendesk 로그

## 개요

Panther는 Zendesk에서 로그를 직접 가져오는 것을 지원합니다. Panther는 [Zendesk 감사 로그 ](https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/)를 쿼리하여 가져올 수 있습니다. [Zendesk Support API](https://developer.zendesk.com/api-reference/ticketing/introduction/).

Panther에서 Zendesk를 로그 소스로 설정하려면, 먼저 Zendesk에서 Panther에 대한 권한을 부여한 다음 Panther에서 Zendesk를 로그 소스로 설정해야 합니다.

다음 제한 사항에 유의하세요:

* Zendesk API 속도 제한은 귀하의 Zendesk Suite 플랜에 따라 달라집니다.
  * 자세한 내용은 [Zendesk의 속도 제한 문서](https://developer.zendesk.com/api-reference/introduction/rate-limits/) 를 참조하세요.
* 이 통합은 Zendesk의 Enterprise 및 Enterprise Plus Suite 플랜에서만 사용할 수 있습니다.
  * 자세한 내용은 이 [Zendesk 감사 로그 문서](https://support.zendesk.com/hc/en-us/articles/4408828001434-Viewing-the-audit-log-for-changes) 를 참조하세요.

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

### 1단계: Panther용 Zendesk 구성

Panther와 통합하도록 Zendesk를 구성하는 방법에는 세 가지 옵션이 있습니다:

* [옵션 1: 새 OAuth2 앱 만들기](#option-1-create-a-new-oauth2-app)
* [옵션 2: Zendesk 이메일과 비밀번호 제공](#option-2-provide-zendesk-email-and-password)
* [옵션 3: API 토큰 생성](#option-3-generate-an-api-token)

#### 옵션 1: 새 OAuth2 앱 만들기

{% hint style="info" %}
OAuth2 앱을 등록하려면 Zendesk Support 관리자여야 합니다.

Panther의 Zendesk 통합이 계속 정상적으로 작동하려면 OAuth2 앱을 만드는 사용자가 Zendesk에서 삭제되지 않아야 하며 계속 관리자 권한을 가져야 합니다.

자세한 내용은 [Zendesk의 OAuth 문서](https://developer.zendesk.com/documentation/ticketing/working-with-oauth/using-oauth-to-authenticate-zendesk-api-requests-in-a-web-app/).
{% endhint %}

1. Zendesk Admin Center에 로그인하세요.
2. 왼쪽 사이드바에서 톱니바퀴 아이콘을 클릭한 다음 **Channels > Apps and Integrations> APIs> Zendesk API**.
3. 다음을 클릭하세요. **OAuth Clients** 탭으로 이동한 후, **Add Oauth Client** 를 클라이언트 목록 오른쪽에서 클릭하세요.
   * 애플리케이션 등록 페이지가 나타납니다. **Secret** 필드는 미리 채워져 있습니다.
4. 다음 필수 항목을 입력하세요:
   * **Client Name**: Zendesk Support 인스턴스에 접근 권한이 있는 앱 목록에서 보게 될 이름입니다.
   * **Unique Identifier**: 필드를 클릭하면 입력한 앱 이름으로 자동 채워집니다. 원하시면 변경할 수 있습니다.
   * **Client kind**: 다음으로 설정하세요. **Confidential**.
   * **Redirect URLs**: Panther UI의 Zendesk 로그 소스 온보딩 흐름에서 찾을 수 있습니다(스크린샷 참조 [아래](#step-2-create-a-new-zendesk-source-in-panther)). 이 URL은 Zendesk Support가 사용자에게 애플리케이션 접근 권한을 허용할지 여부에 대한 결정을 전달하는 데 사용됩니다.
5. 을 클릭합니다 **저장**.
6. 안내가 표시되면 **Secret** 값을 복사하여 안전하게 보관하세요. 다음 단계에서 필요합니다.
   * 문자가 텍스트 상자 너비를 넘어갈 수 있으므로, 복사하기 전에 모두 선택했는지 확인하세요.
7. 을 클릭합니다 **저장**.

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-e0d69ce246f2813464dbb38ce8531122bf844414%2Fimage.png?alt=media" alt="The gear icon is selected on the left sidebar in Zendesk. The OAuth Clients page is displayed. There is a button on the right labeled &#x22;Add OAuth client.&#x22;"><figcaption></figcaption></figure>

#### 옵션 2: Zendesk 이메일과 비밀번호 제공

{% hint style="info" %}
Panther의 Zendesk 통합이 계속 정상적으로 작동하려면, 이메일과 비밀번호가 사용되는 Zendesk Support 관리자 사용자가 Zendesk에서 삭제되지 않아야 하며 계속 관리자 권한을 가져야 합니다.
{% endhint %}

또한 Panther에 Zendesk Support 관리자 이메일과 비밀번호를 제공하여 Zendesk를 로그 소스로 설정할 수도 있습니다. 이 방법을 선택하면, 이 문서의 마지막 섹션으로 이동하여 Panther Console에서 Zendesk를 로그 소스로 온보딩할 때 관리자 이메일과 비밀번호를 준비하세요.

#### 옵션 3: API 토큰 생성

{% hint style="info" %}
API 토큰을 만들려면 Zendesk Support 관리자여야 합니다.

Panther의 Zendesk 통합이 계속 정상적으로 작동하려면 API 토큰을 만드는 사용자가 Zendesk에서 삭제되지 않아야 하며 계속 관리자 권한을 가져야 합니다.

Zendesk API 토큰 생성에 대해 자세히 알아보기 [여기](https://support.zendesk.com/hc/en-us/articles/226022787-Generating-a-new-API-token-).
{% endhint %}

1. Zendesk Support 계정에 로그인하세요.
2. 왼쪽 사이드바에서 톱니바퀴 아이콘을 클릭한 다음 **Channels > Apps and Integrations> APIs > Zendesk API**.
3. 다음을 클릭하세요. **설정** 탭을 선택하고 Token Access가 활성화되어 있는지 확인하세요.
4. 다음을 클릭하세요. **+** 버튼을 **Active API Tokens**.
5. 오른쪽에 있는 토큰 이름을 입력한 다음 **Create**를 클릭하세요. 토큰이 생성되어 팝업 창에 표시됩니다.
6. 토큰(빨간색으로 표시됨)을 복사하여 안전한 위치에 저장하세요. 다음 단계에서 필요합니다.
   * **참고**: 이 창을 닫으면 전체 토큰은 다시는 표시되지 않습니다.

<figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-8f87cf6b69204a51fbd404527185ebf715a5d3af%2Fimage.png?alt=media" alt="The gear icon in the left sidebar is selected, and the API link on the left is highlighted. The Zendesk API page is displayed, with the Settings tab selected. The page lists active API tokens."><figcaption></figcaption></figure>

### 2단계: Panther에서 새 Zendesk 소스 만들기

1. Panther Console의 왼쪽 탐색 표시줄에서 **구성** > **로그 소스**.
2. 을 클릭합니다 **Create New.**
3. 선택 **Zendesk** 를 사용 가능한 로그 소스 목록에서 선택하세요.
4. 오른쪽 상단 모서리에서 **Start Setup.**
5. 다음 화면에서 설명이 포함된 **Name** 을 소스 이름으로 입력하세요. 예: `My Zendesk Audit logs` 그리고 조직의 **Zendesk Subdomain**.
6. 을 클릭합니다 **Setup.**
7. Zendesk로부터 로그를 수신하도록 Panther를 승인하세요. 앞서 이 문서에서 [선택한 옵션에 따라](#step-1-configure-zendesk-for-panther) Zendesk를 구성하기 위해 아래의 안내 단계를 따르세요:
   * **옵션 1: OAuth2 인증 흐름 사용**
     1. 관리자로 Zendesk에 로그인하세요.
     2. 아래 필드를 입력하세요. 애플리케이션을 등록한 후 Zendesk 계정의 OAuth 앱 상세 페이지에서 이 정보를 찾을 수 있습니다.
        * **Client ID**: Zendesk에서 받은 고유 식별자를 입력하세요.
        * **Client Secret:** 이 문서의 앞 단계에서 얻은 Zendesk의 Secret을 입력하세요.\
          ![The image displays the source credentials screen in the Panther Console. "Use OAuth2 Authorization Flow" is selected, and fields for Client ID and Client Secret are displayed.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-463320c31f19e49144af6a09cd460582d90437a7%2FScreenshot%202023-05-18%20at%203.57.18%20PM.png?alt=media)
     3. 을 클릭합니다 **Setup**.
     4. 에서 **설정 확인** 페이지에서 **Grant Access**.\
        ![A page titled "Grant Access to Panther"  has a blue "Grant Access" button.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-9c36f1e5bf597b81d7be0701cde1a85dedcab225%2FScreenshot%202023-05-18%20at%205.26.45%20PM.png?alt=media)
     5. 를 클릭하세요. Zendesk로 이동하여 Panther가 Zendesk 로그에 접근하도록 허용하라는 요청을 받게 됩니다. **Allow**.\
        ![A prompt is shown, reading "Allow your-integration-name to access your Zendesk account?" — below, it says, "This application would be able to: Read all audit logs data." Below that, there are "Deny" and "Allow" buttons.](https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-bd540dce33900fd5571da28c5696605fc8f500b4%2FScreenshot%202023-05-17%20at%204.26.33%20PM.png?alt=media)
   * **옵션 2: 이메일과 비밀번호 사용**
     1. 다음 필드를 입력하세요:
        1. **Email**: Zendesk Support 관리자 **이메일.**
        2. **Password**: Zendesk Support 관리자 **비밀번호.**
     2. 을 클릭합니다 **Setup**.
   * **옵션 3: API 인증 사용**
     1. 다음 필드를 입력하세요:
        * **Email:** Zendesk Support 관리자 **Email**.
        * **API Token:** 이 문서의 앞부분에서 Zendesk에서 생성한 API 토큰을 입력하세요.
     2. 을 클릭합니다 **Setup**.
8. 성공 화면으로 이동합니다:\\

   <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-e55cedf82c6a6adc66ec5c14ebdcb164c3b1dcca%2FScreenshot%202023-08-03%20at%204.33.30%20PM.png?alt=media" 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>

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

     <figure><img src="https://2400888838-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LgdiSWdyJcXPahGi9Rs-2910905616%2Fuploads%2Fgit-blob-c48119abd559990173004bde99ff4907fdd2ded2%2FScreenshot%202023-08-03%20at%204.26.54%20PM.png?alt=media" 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에서 관리하는](https://docs.panther.com/detections/panther-managed) Zendesk용 규칙이 포함된 [panther-analysis GitHub 저장소](https://github.com/panther-labs/panther-analysis/tree/master/rules/zendesk_rules).

## 지원되는 로그 유형

### Zendesk.Audit

감사 로그는 계정이 생성된 이후 Zendesk에서 발생한 다양한 변경 사항을 보여줍니다. 이러한 변경 사항의 기록을 무기한 저장하며, 전체 변경 내역을 볼 수 있습니다.

참조: [감사 로그에 대한 Zendesk 문서.](https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/)

```yaml
schema: Zendesk.Audit
parser:
    native:
        name: Zendesk.Audit
description: 감사 로그는 계정이 생성된 이후 Zendesk에서 발생한 다양한 변경 사항을 보여줍니다. 이러한 변경 사항의 기록을 무기한 저장하며, 전체 변경 내역을 볼 수 있습니다.
referenceURL: https://developer.zendesk.com/rest_api/docs/support/audit_logs
필드:
    - name: action
      description: 값은 'login', 'create', 'update', 또는 'destroy'일 수 있습니다
      유형: string
    - name: action_label
      description: action 필드의 지역화된 문자열
      유형: string
    - name: actor_id
      description: 티켓을 생성한 사용자의 id
      유형: bigint
    - name: change_description
      description: 발생한 변경 사항에 대한 설명
      유형: string
    - name: created_at
      필수: true
      description: 감사가 생성된 시각
      유형: timestamp
      timeFormat: rfc3339
      isEventTime: true
    - name: id
      필수: true
      description: 생성 시 자동으로 할당된 id
      유형: bigint
    - name: ip_address
      description: 감사를 수행하는 사용자의 IP 주소
      유형: string
      indicators:
        - ip
    - name: source_id
      description: 감사 대상 항목의 id
      유형: bigint
    - name: source_label
      description: 감사 대상 항목의 이름
      유형: string
    - name: source_type
      description: 감사 대상 항목의 유형
      유형: string
    - name: url
      description: 감사 로그에 접근하기 위한 URL
      유형: string
```
