# Azure 저장소 연결

Azure 스토리지를 Mindkosh에 연결하고 데이터를 추가하려면 먼저 Azure 자격 증명을 추가해야 합니다.

{% hint style="warning" %}
자체 클라우드 서비스 계정을 Mindkosh와 연결할 때 클라우드 스토리지 계정에 데이터 송출(egress) 요금이 적용될 수 있습니다. 자세한 내용은 클라우드 제공업체에 문의하세요.&#x20;
{% endhint %}

### Azure용 자격 증명 만들기

스토리지를 Mindkosh에 연결하는 권장 방법은 다음을 사용하는 것입니다. *Azure Active Directory* (다른 이름으로는 *Azure Entra ID*). 자격 증명을 생성하려면 다음을 수행해야 합니다:

1. 이미 없다면 리소스 그룹을 생성하세요.  [여기에 설명된 단계를 따르세요](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/manage-resource-groups-portal).
2. 이미 없다면 스토리지 계정을 생성하세요. [여기서 단계를 따라 할 수 있습니다.](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview)
3. 데이터가 저장될 스토리지 컨테이너를 생성하세요. [여기 단계를 따르세요](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-portal).
4. 앱을 등록하여 Azure Active Directory를 통해 서비스 사용자를 생성하세요. [이를 수행하는 가이드는 여기입니다](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app).
   1. 앱이 등록되면 액세스할 자격 증명을 생성할 수 있습니다. 스토리지 데이터에 액세스하려면 다음 토큰들이 필요하므로 다음 단계에서 사용할 수 있도록 준비해 두세요.
      1. client-id
      2. client-secret
      3. tenant-id\ <br>

         <div data-full-width="true"><figure><img src="/files/458a8f289bdac2356b09134651b33b57ba29c23c" alt=""><figcaption></figcaption></figure></div>
5. 해당 버킷에 대한 액세스가 포함된 역할 기반 액세스 정책을 사용자에게 할당하세요. 다양한 방법에 대해 더 알아볼 수 있습니다 [여기에서 할 수 있습니다](https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal?tabs=delegate-condition). 예를 들어 컨테이너 수준에서 액세스를 부여하려면:
   1. 스토리지 컨테이너로 이동하세요
   2. 왼쪽 사이드바에서 IAM 섹션으로 이동하세요
   3. 역할 할당 추가를 클릭하세요
   4. 역할을 추가하세요 *Storage Blob Data Reader* 및 위에서 생성한 애플리케이션

### CORS 설정

브라우저가 클라우드 스토리지에서 파일을 직접 가져올 수 있도록 버킷에 올바른 CORS 정책을 설정해야 브라우저가 파일 로드를 차단하지 않습니다. Azure의 컨테이너에 대해 설정하는 방법은 다음과 같습니다.

<figure><img src="/files/3fa1115bc912c7de8cf66e1e0d178d4583411142" alt=""><figcaption></figcaption></figure>

1. 컨테이너 페이지로 이동하세요
2. 왼쪽 사이드바의 설정 섹션에서 CORS 페이지로 이동하세요
3. 다음 값을 설정하세요
   1. 허용된 출처 : `app.mindkosh.com`
   2. 허용된 메서드: `GET`
   3. 허용된 헤더: `*`
   4. 노출된 헤더: `content-length`
   5. 최대 유효 시간: `120`

## Mindkosh에 자격 증명 추가

{% hint style="danger" %}
조직 관리자만 Mindkosh에 클라우드 스토리지 자격 증명을 추가할 수 있습니다&#x20;
{% endhint %}

권한 설정이 완료되면 자격 증명을 Mindkosh에 추가할 준비가 된 것입니다. 클라우드 스토리지 자격 증명을 추가하려면 Mindkosh 왼쪽 사이드바에서 조직(Organization) 페이지로 이동하세요.&#x20;

<figure><img src="/files/3fcd10520705775185f9fef74039f17549ef3a1f" alt=""><figcaption></figcaption></figure>

MS Azure 섹션에서 키 관리(Manage Keys) 버튼을 클릭하고 적절한 상자에 다음 키들을 입력하세요:

1. `client-id`
2. `client-secret`
3. `tenant-id`&#x20;

자격 증명이 설정되면 스토리지에서 데이터를 추가하기 위해 데이터셋을 생성할 수 있습니다. [이를 수행하는 단계는 여기에서 확인하세요.](/ko/management/datasets/uploading-data.md#adding-data-from-ms-azure)


---

# 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.mindkosh.com/ko/management/datasets/azure.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.
