

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Atlassian 서비스에서 OpenSearch Ingestion 파이프라인 사용
<a name="configure-client-atlassian"></a>

Atlassian Jira 및 Confluence 소스 플러그인을 사용하여 OpenSearch Ingestion 파이프라인으로 데이터를 수집할 수 있습니다. 이러한 통합을 통해 전체 Jira 프로젝트와 Confluence 스페이스를 동기화하는 동시에, 업데이트의 지속적인 모니터링 및 자동 동기화를 통해 실시간 연관성을 유지하여 검색 가능한 통합 지식 기반을 생성할 수 있습니다.

------
#### [ Integrating with Jira ]

Jira 콘텐츠를 OpenSearch에 통합하여 강력한 컨텍스트 검색 기능으로 Jira 경험을 혁신합니다. Data Prepper [Atlassian Jira](https://www.atlassian.com/software/jira) 소스 플러그인을 사용하면 업데이트의 지속적인 모니터링 및 자동 동기화를 통해 실시간 연관성을 유지하면서 전체 Jira 프로젝트를 동기화하여 검색 가능한 통합 지식 기반을 생성할 수 있습니다. 이 통합을 통해 특정 프로젝트, 문제 유형 및 상태에 대한 유연한 필터링 옵션을 통해 데이터를 동기화할 수 있으므로 필요한 정보만 가져올 수 있게 됩니다.

안전하고 안정적인 연결을 보장하기 위해 플러그인은 기본 API 키 인증 및 OAuth2 인증을 비롯한 여러 인증 방법을 지원하며, AWS Secrets Manager에 저장된 보안 암호를 사용하여 자격 증명을 관리하는 보안 기능이 추가되었습니다. 또한 중단 없는 액세스를 위한 자동 토큰 갱신 기능을 제공하여 지속적인 작업을 보장합니다. Atlassian의 [API 버전 2](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#version%22%3Eapi-version-2)를 기반으로 구축된 이 통합을 통해 팀은 OpenSearch의 고급 검색 기능을 통해 Jira 데이터에서 귀중한 인사이트를 얻을 수 있습니다.

------
#### [ Integrating with Confluence ]

Data Prepper의 Confluence 소스 플러그인을 통해 [Atlassian Confluence](https://www.atlassian.com/software/confluence) 콘텐츠를 OpenSearch에 통합하여 팀의 지식 관리 및 협업 기능을 개선합니다. 이 통합을 통해 검색 가능한 중앙 집중식 집단 지식 리포지토리를 생성하여 정보 검색과 팀 생산성을 개선할 수 있습니다. 이 플러그인은 Confluence 콘텐츠를 동기화하고 업데이트를 지속적으로 모니터링하여 OpenSearch 인덱스를 포괄적이고 최신의 상태로 유지합니다.

통합은 유연한 필터링 옵션을 제공하므로 특정 스페이스 또는 페이지 유형에서 콘텐츠를 선택적으로 가져와 조직의 니즈에 맞게 동기화된 콘텐츠를 조정할 수 있습니다. 이 플러그인은 기본 API 키와 OAuth2 인증 방법을 모두 지원하며, AWS Secrets Manager를 통해 자격 증명을 안전하게 관리할 수 있습니다. 플러그인의 자동 토큰 갱신 기능은 중단 없는 액세스와 원활한 운영을 보장합니다. Atlassian의 Confluence [API](https://developer.atlassian.com/cloud/confluence/rest/v1/intro/#auth)를 기반으로 구축된 이 통합을 통해 팀은 Confluence 콘텐츠에 OpenSearch의 고급 검색 기능을 활용하여 조직 내 정보 접근성과 활용도를 높일 수 있습니다.

------

**Topics**
+ [사전 조건](#atlassian-prerequisites)
+ [파이프라인 역할 구성](#atlassian-pipeline-role)
+ [Jira 커넥터 파이프라인 구성](#jira-connector-pipeline)
+ [Confluence 커넥터 파이프라인 구성](#confluence-connector-pipeline)
+ [데이터 일관성](#data-consistency)
+ [제한 사항](#limitations)
+ [Atlassian 커넥터에 대한 CloudWatch의 지표](#metrics)
+ [OAuth 2.0을 사용하여 Atlassian Jira 또는 Confluence에 Amazon OpenSearch Ingestion 파이프라인 연결](configure-client-atlassian-OAuth2-setup.md)

## 사전 조건
<a name="atlassian-prerequisites"></a>

OpenSearch Ingestion 파이프라인을 생성하기 전에 다음 단계를 완료합니다.

1. 다음 옵션 중 하나를 선택하여 Jira 사이트의 자격 증명을 준비합니다. OpenSearch Ingestion은 콘텐츠에 대한 `ReadOnly` 권한만 필요로 합니다.

   1. **옵션 1: API 키** - Atlassian 계정에 로그인하고 다음 주제의 정보를 사용하여 API 키를 생성합니다.
      + [Atlassian 계정의 API 토큰 관리](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/)

   1. **옵션 2: OAuth2** - Atlassian 계정에 로그인하고 [OAuth 2.0을 사용하여 Atlassian Jira 또는 Confluence에 Amazon OpenSearch Ingestion 파이프라인 연결](configure-client-atlassian-OAuth2-setup.md)의 정보를 사용합니다.

1. 이전 단계에서 생성한 자격 증명을 저장할 [AWS Secrets Manager의 보안 암호](https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_secret.html) 를 생성합니다. 절차에 따라 다음을 선택합니다.
   + **보안 암호 유형**에서 **다른 유형의 보안 암호**를 선택합니다.
   + **키/값 페어**에서 선택한 권한 부여 유형에 따라 다음 페어를 생성합니다.

------
#### [ API key ]

   ```
   {
      "username": user-name-usualy-email-id,
      "password": api-key
   }
   ```

------
#### [ OAuth 2.0 ]

   ```
   {
      "clientId": client-id
      "clientSecret": client-secret
      "accessKey": access-key
      "refreshKey": refresh-key
   }
   ```

------

   보안 암호를 생성한 후 보안 암호의 Amazon 리소스 이름(ARN)을 복사합니다. 이 ARN을 파이프라인 역할 권한 정책에 포함하게 됩니다.

## 파이프라인 역할 구성
<a name="atlassian-pipeline-role"></a>

사전 조건 섹션에서 생성된 보안 암호를 읽고 쓰려면 파이프라인에 전달된 역할에 다음 정책이 연결되어 있어야 합니다.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "SecretReadWrite",
            "Effect": "Allow",
            "Action": [
                "secretsmanager:GetResourcePolicy",
                "secretsmanager:GetSecretValue",
                "secretsmanager:DescribeSecret",
                "secretsmanager:PutSecretValue",
                "secretsmanager:ListSecretVersionIds"
            ],
            "Resource": "arn:aws:secretsmanager:us-east-1:111122223333:secret:secret-name-random-6-characters"
        }
    ]
}
```

------

이 역할에는 선택한 싱크에 액세스하고 쓸 수 있도록 하는 정책도 연결되어 있어야 합니다. 예를 들어 싱크로 OpenSearch를 선택하면 정책은 다음과 유사합니다.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "OpenSearchWritePolicy",
            "Effect": "Allow",
            "Action": "aoss:*",
            "Resource": "arn:aws:aoss:us-east-1:111122223333:collection/collection-id"
        }
    ]
}
```

------

## Jira 커넥터 파이프라인 구성
<a name="jira-connector-pipeline"></a>

사전 구성된 Atlassian Jira 블루프린트를 사용하여 이 파이프라인을 생성할 수 있습니다. 자세한 내용은 [블루프린트 작업](pipeline-blueprint.md) 단원을 참조하십시오.

*자리 표시자*를 자신의 정보로 바꿉니다.

```
version: "2"
extension:
  aws:
    secrets:
      jira-account-credentials:
        secret_id: "secret-arn"
        region: "secret-region"
        sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role"
atlassian-jira-pipeline:
  source:
    jira:
      # We only support one host url for now
      hosts: ["jira-host-url"]
      acknowledgments: true
      authentication:
        # Provide one of the authentication method to use. Supported methods are 'basic' and 'oauth2'.
        # For basic authentication, password is the API key that you generate using your jira account
        basic:
          username: ${{aws_secrets:jira-account-credentials:username}}
          password: ${{aws_secrets:jira-account-credentials:password}}
        # For OAuth2 based authentication, we require the following 4 key values stored in the secret
        # Follow atlassian instructions at the below link to generate these keys.
        # https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/
        # If you are using OAuth2 authentication, we also require, write permission to your AWS secret to
        # be able to write the renewed tokens back into the secret.
        # oauth2:
          # client_id: ${{aws_secrets:jira-account-credentials:clientId}}
          # client_secret: ${{aws_secrets:jira-account-credentials:clientSecret}}
          # access_token: ${{aws_secrets:jira-account-credentials:accessToken}}
          # refresh_token: ${{aws_secrets:jira-account-credentials:refreshToken}}
      filter:
        project:
          key:
            include:
              # This is not project name.
              # It is an alphanumeric project key that you can find under project details in Jira.
              - "project-key"
              - "project-key"
            # exclude:
              # - "project-key"
              # - "project-key"
        issue_type:
          include:
            - "issue-type"
            # - "Story"
            # - "Bug"
            # - "Task"
         # exclude:
             # - "Epic"
        status:
          include:
            - "ticket-status"
            # - "To Do"
            # - "In Progress"
            # - "Done"
         # exclude:
           # - "Backlog"

  sink:
    - opensearch:
        # Provide an Amazon OpenSearch Service domain endpoint
        hosts: [ "https://search-mydomain-1a2a3a4a5a6a7a8a9a0a9a8a7a.us-east-1.es.amazonaws.com" ]
        index: "index_${getMetadata(\"project\")}"
        # Ensure adding unique document id which is the unique ticket id in this case
        document_id: '${/id}'
        aws:
          # Provide a Role ARN with access to the domain. This role should have a trust relationship with osis-pipelines.amazonaws.com
          sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role"
          # Provide the region of the domain.
          region: "us-east-1"
          # Enable the 'serverless' flag if the sink is an Amazon OpenSearch Serverless collection
          serverless: false
          # serverless_options:
            # Specify a name here to create or update network policy for the serverless collection
            # network_policy_name: "network-policy-name"
        # Enable the 'distribution_version' setting if the Amazon OpenSearch Service domain is of version Elasticsearch 6.x
        # distribution_version: "es6"
        # Enable and switch the 'enable_request_compression' flag if the default compression setting is changed in the domain. 
        # See Amazon OpenSearch Service에서 HTTP 요청 압축
        # enable_request_compression: true/false
        # Optional: Enable the S3 DLQ to capture any failed requests in an S3 bucket. Delete this entire block if you don't want a DLQ.
        dlq:
          s3:
            # Provide an S3 bucket
            bucket: "your-dlq-bucket-name"
            # Provide a key path prefix for the failed requests
            # key_path_prefix: "kinesis-pipeline/logs/dlq"
            # Provide the region of the bucket.
            region: "us-east-1"
            # Provide a Role ARN with access to the bucket. This role should have a trust relationship with osis-pipelines.amazonaws.com
            sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role"
```

Jira 소스의 속성에 대한 키:

1. **hosts**: Jira 클라우드 또는 온프레미스 URL입니다. 일반적으로 `https://your-domain-name.atlassian.net/`과 같습니다.

1. **acknowledgments**: 싱크까지 데이터가 전송되도록 보장합니다.

1. **authentication**: 파이프라인이 Jira 인스턴스에 액세스하는 방법을 설명합니다. `Basic` 또는 `OAuth2`를 선택하고 AWS 보안 암호의 키를 참조하는 해당 키 속성을 지정합니다.

1. **filter**: 이 섹션에은 추출하고 동기화할 Jira 데이터 부분을 선택하는 데 도움이 됩니다.

   1. **project**: `include` 섹션에서 동기화하려는 프로젝트 키를 나열합니다. 그렇지 않으면 `exclude` 섹션에서 제외하려는 프로젝트를 나열합니다. 항상 포함 또는 제외 옵션 중 하나만 제공합니다.

   1. **issue\$1type**: 동기화하려는 특정 문제 유형입니다. 니즈에 맞는 유사한 `include` 또는 `exclude` 패턴을 따릅니다. 첨부 파일은 원래 첨부 파일에 대한 앵커 링크로 표시되지만 첨부 파일 콘텐츠는 추출되지 않습니다.

   1. **status**: 데이터 추출 쿼리에 적용할 특정 상태 필터입니다. `include`를 지정하면 해당 상태의 티켓만 동기화됩니다. `exclude`를 지정하면 제외된 상태가 나열된 티켓을 제외한 모든 티켓이 동기화됩니다.

## Confluence 커넥터 파이프라인 구성
<a name="confluence-connector-pipeline"></a>

사전 구성된 Atlassian Confluence 블루프린트를 사용하여 이 파이프라인을 생성할 수 있습니다. 자세한 내용은 [블루프린트 작업](pipeline-blueprint.md) 단원을 참조하십시오.

```
version: "2"
extension:
  aws:
    secrets:
      confluence-account-credentials:
        secret_id: "secret-arn"
        region: "secret-region"
        sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role"
atlassian-confluence-pipeline:
  source:
    confluence:
      # We currently support only one host URL.
      hosts: ["confluence-host-url"]
      acknowledgments: true
      authentication:
        # Provide one of the authentication method to use. Supported methods are 'basic' and 'oauth2'.
        # For basic authentication, password is the API key that you generate using your Confluence account
        basic:
          username: ${{aws_secrets:confluence-account-credentials:confluenceId}}
          password: ${{aws_secrets:confluence-account-credentials:confluenceCredential}}
        # For OAuth2 based authentication, we require the following 4 key values stored in the secret
        # Follow atlassian instructions at the following link to generate these keys:
        # https://developer.atlassian.com/cloud/confluence/oauth-2-3lo-apps/
        # If you are using OAuth2 authentication, we also require write permission to your AWS secret to
        # be able to write the renewed tokens back into the secret.
        # oauth2:
          # client_id: ${{aws_secrets:confluence-account-credentials:clientId}}
          # client_secret: ${{aws_secrets:confluence-account-credentials:clientSecret}}
          # access_token: ${{aws_secrets:confluence-account-credentials:accessToken}}
          # refresh_token: ${{aws_secrets:confluence-account-credentials:refreshToken}}
      filter:
        space:
          key:
            include:
              # This is not space name.
              # It is a space key that you can find under space details in Confluence.
              - "space key"
              - "space key"
           # exclude:
             #  - "space key"
             #  - "space key"
        page_type:
          include:
            - "content type"
            # - "page"
            # - "blogpost"
            # - "comment"
         # exclude:
            # - "attachment"

  sink:
    - opensearch:
        # Provide an Amazon OpenSearch Service domain endpoint
        hosts: [ "https://search-mydomain-1a2a3a4a5a6a7a8a9a0a9a8a7a.us-east-1.es.amazonaws.com" ]
         index: "index_${getMetadata(\"space\")}"
        # Ensure adding unique document id which is the unique ticket ID in this case.
        document_id: '${/id}'
        aws:
          # Provide the Amazon Resource Name (ARN) for a role with access to the domain. This role should have a trust relationship with osis-pipelines.amazonaws.com.
          sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role"
          # Provide the Region of the domain.
          region: "us-east-1"
          # Enable the 'serverless' flag if the sink is an Amazon OpenSearch Serverless collection
          serverless: false
          # serverless_options:
            # Specify a name here to create or update network policy for the serverless collection.
            # network_policy_name: "network-policy-name"
        # Enable the 'distribution_version' setting if the Amazon OpenSearch Service domain is of version Elasticsearch 6.x
        # distribution_version: "es6"
        # Enable and switch the 'enable_request_compression' flag if the default compression setting is changed in the domain. 
        # For more information, see Amazon OpenSearch Service에서 HTTP 요청 압축.
        # enable_request_compression: true/false
        # Optional: Enable the S3 DLQ to capture any failed requests in an S3 bucket. Delete this entire block if you don't want a DLQ.
        dlq:
          s3:
            # Provide an S3 bucket
            bucket: "your-dlq-bucket-name"
            # Provide a key path prefix for the failed requests
            # key_path_prefix: "kinesis-pipeline/logs/dlq"
            # Provide the Rregion of the bucket.
            region: "us-east-1"
            # Provide the Amazon Resource Name (ARN) for a role with access to the bucket. This role should have a trust relationship with osis-pipelines.amazonaws.com
            sts_role_arn: "arn:aws:iam::123456789012:role/Example-Role"
```

Confluence 소스의 주요 속성:

1. **hosts**: Confluence 클라우드 또는 온프레미스 URL입니다. 일반적으로 `https://your-domain-name.atlassian.net/`과 같습니다.

1. **acknowledgments**: 싱크까지 데이터가 전송되도록 보장합니다.

1. **authentication**: 파이프라인이 Confluence 인스턴스에 액세스하는 방법을 설명합니다. `Basic` 또는 `OAuth2`를 선택하고 AWS 보안 암호의 키를 참조하는 해당 키 속성을 지정합니다.

1. **filter**: 이 섹션에은 추출하고 동기화할 Confluence 데이터 부분을 선택하는 데 도움이 됩니다.

   1. **space**: `include` 섹션에서 동기화하려는 스페이스 키를 나열합니다. 그렇지 않으면 `exclude` 섹션에서 제외하려는 스페이스를 나열합니다. 항상 포함 또는 제외 옵션 중 하나만 제공합니다.

   1. **page\$1type**: 동기화하려는 특정 페이지 유형(예: 페이지, 블로그 게시물 또는 첨부 파일)입니다. 니즈에 맞는 유사한 `include` 또는 `exclude` 패턴을 따릅니다. 첨부 파일은 원래 첨부 파일에 대한 앵커 링크로 표시되지만 첨부 파일 콘텐츠는 추출되지 않습니다.

## 데이터 일관성
<a name="data-consistency"></a>

파이프라인 YAML에 지정된 필터를 기반으로 선택한 프로젝트(또는 공백)가 한 번 추출되고 대상 싱크에 완전히 동기화됩니다. 그런 다음 지속적인 변경 모니터링을 통해 변경 사항이 발생할 때 이를 캡처하고 싱크의 데이터를 업데이트합니다. 한 가지 예외는 변경 모니터링이 `create` 및 `update` 작업만 동기화하고 `delete` 작업은 동기화하지 않는다는 것입니다.

## 제한 사항
<a name="limitations"></a>
+ 사용자 삭제 작업은 동기화되지 않습니다. 싱크에 기록된 데이터는 싱크에 남아 있습니다. ID 매핑이 싱크 설정에 지정된 경우 업데이트는 기존 콘텐츠를 새 변경 사항으로 덮어씁니다.
+ 다음 API를 지원하지 않는 이전 버전의 Atlassian 소프트웨어를 사용하는 온프레미스 인스턴스는 이 소스와 호환되지 않습니다.
  + Jira Search API 버전 3
    + `rest/api/3/search`
    + `rest/api/3/issue`
  + Confluence
    + `wiki/rest/api/content/search`
    + `wiki/rest/api/content`
    + `wiki/rest/api/settings/systemInfo`

## Atlassian 커넥터에 대한 CloudWatch의 지표
<a name="metrics"></a>

**유형: Jira 커넥터 지표**


| 소스 | 지표 | 지표 유형 | 
| --- | --- | --- | 
| acknowledgementSetSuccesses.count | Counter | 승인이 활성화된 경우 이 지표는 성공적으로 동기화된 티켓 수를 제공합니다. | 
| acknowledgementSetFailures.count | Counter | 승인이 활성화된 경우 이 지표는 동기화에 실패한 티켓 수를 제공합니다. | 
| crawlingTime.avg | 타이머 | 모든 새 변경 사항을 크롤링하는 데 걸린 시간입니다. | 
| ticketFetchLatency.avg | 타이머 | 이 티켓은 평균 API 지연 시간을 가져옵니다. | 
| ticketFetchLatency.max | 타이머 | 이 티켓은 최대 API 지연 시간을 가져옵니다. | 
| ticketsRequested.count | Counter | 수행된 티켓 가져오기 요청 수입니다. | 
| ticketRequestedFailed.count | Counter | 실패한 티켓 가져오기 요청 수입니다. | 
| ticketRequestedSuccess.count | Counter | 성공한 티켓 가져오기 요청 수입니다. | 
| searchCallLatency.avg | 타이머 | 평균 API 호출 지연 시간을 검색합니다. | 
| searchCallLatency.max | 타이머 | 최대 API 호출 지연 시간을 검색합니다. | 
| searchResultsFound.count | Counter | 해당 검색 직접 호출에서 발견된 항목 수입니다. | 
| searchRequestFailed.count | Counter | 검색 API 직접 호출 실패 횟수입니다. | 
| authFailures.count | Counter | 인증 실패 횟수입니다. | 

**유형: Confluence 커넥터 지표**


| 소스 | 지표 | 지표 유형 | 
| --- | --- | --- | 
| acknowledgementSetSuccesses.count | Counter | 승인이 활성화된 경우 이 지표는 성공적으로 동기화된 페이지 수를 제공합니다. | 
| acknowledgementSetFailures.count | Counter | 승인이 활성화된 경우 이 지표는 동기화에 실패한 페이지 수를 제공합니다. | 
| crawlingTime.avg | 타이머 | 모든 새 변경 사항을 크롤링하는 데 걸린 시간입니다. | 
| pageFetchLatency.avg | 타이머 | 콘텐츠 가져오기 API 지연 시간(평균)입니다. | 
| pageFetchLatency.max | 타이머 | 콘텐츠 가져오기 API 지연 시간(최대)입니다. | 
| pagesRequested.count | Counter | API를 가져오는 콘텐츠의 간접 호출 횟수입니다. | 
| pageRequestFailed.count | Counter | 콘텐츠 가져오기 API의 실패한 요청 수입니다. | 
| pageRequestedSuccess.count | Counter | 콘텐츠 가져오기 API의 성공한 요청 수입니다. | 
| searchCallLatency.avg | 타이머 | 평균 API 호출 지연 시간을 검색합니다. | 
| searchCallLatency.max | 타이머 | 최대 검색 API 호출 지연 시간입니다. | 
| searchResultsFound.count | Counter | 해당 검색 직접 호출에서 발견된 항목 수입니다. | 
| searchRequestsFailed.count | Counter | 검색 API 직접 호출 실패 횟수입니다. | 
| authFailures.count | Counter | 인증 실패 횟수입니다. | 

# OAuth 2.0을 사용하여 Atlassian Jira 또는 Confluence에 Amazon OpenSearch Ingestion 파이프라인 연결
<a name="configure-client-atlassian-OAuth2-setup"></a>

이 주제의 정보를 참조하면 OAuth 2.0 인증을 사용하여 Amazon OpenSearch Ingestion 파이프라인을 구성하고 Jira 또는 Confluence 계정에 연결하는 데 도움이 됩니다. 이 Atlassian Services에서 OpenSearch Ingestion 파이프라인을 사용하기 위해 [사전 조건](configure-client-atlassian.md#atlassian-prerequisites)를 완료하는 경우 이 작업을 수행하되 API 키 자격 증명을 사용하지 않도록 선택합니다.

**Topics**
+ [OAuth 2.0 통합 앱 생성](#create-OAuth2-integration-app)
+ [Atlassian Developer 액세스 토큰 생성 및 새로 고침](#generate-and-refresh-jira-access-token)

## OAuth 2.0 통합 앱 생성
<a name="create-OAuth2-integration-app"></a>

다음 절차에 따라 Atlassian Developer 웹 사이트에서 OAuth 2.0 통합 앱을 생성합니다.

**OAuth 2.0 통합 앱을 생성하려면**

1. [https://developer.atlassian.com/console/myapps/](https://developer.atlassian.com/console/myapps/)에서 Atlassian Developer 계정에 로그인합니다.

1. **생성**, **OAuth 2.0 통합**을 선택합니다.

1. **이름**에 앱의 용도를 식별할 수 있는 이름을 입력합니다.

1. **Atlassian의 개발자 약관을 준수하는 데 동의합니다** 확인란을 선택하고 **생성**을 선택합니다.

1. 왼쪽 탐색 창에서 **권한 부여**를 선택한 다음 **추가**를 선택합니다.

1. **콜백 URL**에 **https://www.amazon.com** 또는 **https://www.example.com**과 같은 URL을 입력한 다음 **변경 사항 저장**을 선택합니다.

1. 왼쪽 탐색 메뉴에서 **권한** 페이지를 선택하고 Jira API 행에서 **추가**를 선택한 후 **구성**을 선택하고 모든 클래식 범위 읽기 권한(아래에 나와 있음)을 선택한 다음 저장을 선택합니다.

1. **세분화된 범위** 탭을 선택한 다음 **범위 편집**을 선택하여 **Jira API 편집** 대화 상자를 엽니다.

1. 사용 중인 소스 플러그인에 대한 권한을 선택합니다.

------
#### [ Jira ]

   ```
   read:audit-log:jira
   read:issue:jira
   read:issue-meta:jira
   read:attachment:jira
   read:comment:jira
   read:comment.property:jira
   read:field:jira
   read:field.default-value:jira
   read:field.option:jira
   read:field-configuration-scheme:jira
   read:field-configuration:jira
   read:issue-link:jira
   read:issue-link-type:jira
   read:issue-link-type:jira
   read:issue.remote-link:jira
   read:issue.property:jira
   read:resolution:jira
   read:issue-details:jira
   read:issue-type:jira
   read:issue-worklog:jira
   read:issue-field-values:jira
   read:issue.changelog:jira
   read:issue.transition:jira
   read:issue.vote:jira
   read:jira-expressions:jira
   ```

------
#### [ Confluence ]

   ```
   read:content:confluence
   read:content-details:confluence
   read:space-details:confluence
   read:audit-log:confluence
   read:page:confluence
   read:blogpost:confluence
   read:custom-content:confluence
   read:comment:confluence
   read:space:confluence
   read:space.property:confluence
   read:space.setting:confluence
   read:content.property:confluence
   read:content.metadata:confluence
   read:task:confluence
   read:whiteboard:confluence
   read:app-data:confluence
   manage:confluence-configuration
   ```

------

1. **저장**을 선택합니다.

자세한 내용은 Atlassian Developer 웹 사이트에서 [Implementing OAuth 2.0 (3LO)](https://developer.atlassian.com/cloud/oauth/getting-started/implementing-oauth-3lo/) 및 [Determining the scopes required for an operation](https://developer.atlassian.com/cloud/oauth/getting-started/determining-scopes/)을 참조하세요.

## Atlassian Developer 액세스 토큰 생성 및 새로 고침
<a name="generate-and-refresh-jira-access-token"></a>

다음 절차를 참조하면 Atlassian Developer 웹 사이트에서 Atlassian Developer 액세스 토큰을 생성하고 새로 고치는 데 도움이 됩니다.

**Jira 액세스 토큰을 생성하고 새로 고치려면**

1. [https://developer.atlassian.com/console/myapps/](https://developer.atlassian.com/console/myapps/)에서 Atlassian Developer 계정에 로그인합니다.

1. [OAuth 2.0 통합 앱 생성](#create-OAuth2-integration-app)에서 생성한 앱을 선택합니다.

1. 왼쪽 탐색 메뉴에서 **권한 부여**를 선택합니다.

1. 페이지 하단에서 세분화된 Atlassian API 권한 부여 URL 값을 복사하여 원하는 텍스트 편집기에 붙여 넣습니다.

   URL의 형식은 다음과 같습니다.

   ```
   https://auth.atlassian.com/authorize?
   audience=api.atlassian.com 
   &client_id=YOUR_CLIENT_ID
   &scope=REQUESTED_SCOPE%20REQUESTED_SCOPE_TWO
   &redirect_uri=https://YOUR_APP_CALLBACK_URL
   &state=YOUR_USER_BOUND_VALUE 
   &response_type=code
   &prompt=consent
   ```

1. `state=YOUR_USER_BOUND_VALUE`의 파라미터 값을 state="**sample\$1text**"와 같이 선택한 항목으로 변경합니다.

   자세한 내용은 Atlassian Developer 웹 사이트의 [What is the state parameter used for?](https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/#what-is-the-state-parameter-used-for-)를 참조하세요.

1. `scope` 섹션에는 이전 작업에서 선택한 세분화된 범위가 나열됩니다. 예: `scope=read%3Ajira-work%20read%3Ajira-user%20offline_access`

   `offline_access`는 `refresh_token`을 생성하고자 함을 나타냅니다.

1. 웹 브라우저 창을 열고 복사한 권한 부여 URL을 브라우저 창의 주소 표시줄에 입력합니다.

1. 대상 페이지가 열리면 정보가 올바른지 확인한 다음 **수락**을 선택하여 Jira 또는 Confluence 홈 페이지로 리디렉션합니다.

1. 홈 페이지를 로드한 후 이 페이지의 URL을 복사합니다. 이 URL에는 애플리케이션의 권한 부여 코드가 포함되어 있습니다. 이 코드를 사용하여 액세스 토큰을 생성하게 됩니다. `code=` 다음의 섹션 전체가 권한 부여 코드입니다.

1. 다음 cURL 명령을 사용하여 액세스 토큰을 생성합니다. *자리 표시자*를 자신의 정보로 바꿉니다.
**작은 정보**  
Postman과 같은 서드 파티 서비스를 사용할 수도 있습니다.

   ```
   curl --request POST --url 'https://auth.atlassian.com/oauth/token' \
   --header 'Content-Type: application/json' \
   --data '{"grant_type": "authorization_code",
   "client_id": "YOUR_CLIENT_ID",
   "client_secret": "YOUR_CLIENT_SECRET",
   "code": "AUTHORIZATION_CODE",
   "redirect_uri": "YOUR_CALLBACK_URL"}'
   ```

   이 명령에 대한 응답에는 `access_code` 및 `refresh_token` 값이 포함됩니다.