

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 選擇 Amazon EMR Studio 的身分驗證模式
<a name="emr-studio-authentication"></a>

EMR Studio 支援兩種身分驗證模式：IAM 身分驗證模式和 IAM Identity Center 身分驗證模式。IAM 模式使用 AWS Identity and Access Management (IAM)，而 IAM Identity Center 模式使用 AWS IAM Identity Center。建立 EMR Studio 時，可以為該 Studio 的所有使用者選擇身分驗證模式。如需有關不同身分驗證模式的詳細資訊，請參閱 [身分驗證和使用者登入](how-emr-studio-works.md#emr-studio-login)。

使用下表選擇 EMR Studio 的身分驗證模式。


****  

| 如果您是... | 建議... | 
| --- | --- | 
| 已熟悉或先前已設定 IAM 身分驗證或聯合 | [IAM 身分驗證模式](#emr-studio-iam-authentication)，它具有以下好處：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/emr/latest/ManagementGuide/emr-studio-authentication.html) | 
| 新手 AWS 或 Amazon EMR | [IAM Identity Center 身分驗證模式](#emr-studio-enable-sso)，它可提供以下功能：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/emr/latest/ManagementGuide/emr-studio-authentication.html) | 

## 設定 Amazon EMR Studio 的 IAM 身分驗證模式
<a name="emr-studio-iam-authentication"></a>

使用 IAM 身分驗證模式，您可以使用 IAM 身分驗證或 IAM 聯合。IAM *身分驗證*可讓您管理 IAM 身分，例如 IAM 中的使用者、群組和角色。可以使用 IAM 許可政策和[屬性型存取控制 (ABAC)](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_attribute-based-access-control.html) 授予使用者對 Studio 的存取權。IAM *聯合*可讓您在第三方身分提供者 (IdP) 和 之間建立信任， AWS 以便您可以透過 IdP 管理使用者身分。

**注意**  
如果您已經使用 IAM 控制對 AWS 資源的存取，或者如果您已經為 IAM 設定身分提供者 (IdP)，請參閱 [IAM 身分驗證模式的使用者許可](how-emr-studio-works.md#emr-studio-iam-authorization) 以在 EMR Studio 使用 IAM 身分驗證模式時設定使用者許可。

### 針對 Amazon EMR Studio 使用 IAM 聯合
<a name="emr-studio-iam-federation"></a>

若要使用 EMR Studio 的 IAM 聯合身分，您可以在 AWS 帳戶 與身分提供者 (IdP) 之間建立信任關係，並讓聯合身分使用者存取 AWS 管理主控台。建立此信任關係所採取的步驟會因 IdP 的聯合標準而有所不同。

一般而言，需要完成下列任務來設定與外部 IdP 的聯合。如需完整指示，請參閱《AWS Identity and Access Management 使用者指南》**中的[啟用 SAML 2.0 聯合身分使用者來存取 AWS 管理主控台](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-saml.html)和[啟用自訂身分經紀人來存取 AWS 管理主控台](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)。

1. 從您的 IdP 中收集資訊。這通常表示會產生中繼資料文件以驗證來自 IdP 的 SAML 身分驗證請求。

1. 建立身分提供者 IAM 實體以儲存 IdP 的相關資訊。如需指示，請參閱[建立 IAM 身分提供者](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create.html)。

1. 為您的 IdP 建立一個或多個 IAM 角色。當使用者登入時，EMR Studio 會將角色指派給聯合身分使用者。該角色允許您的 IdP 請求暫時性安全憑證以存取 AWS。如需指示，請參閱[針對第三方身分提供者建立角色 (聯合)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp.html)。您指派給該角色的許可政策決定聯合身分使用者可在 EMR Studio 中 AWS 和 EMR Studio 中執行的操作。如需詳細資訊，請參閱[IAM 身分驗證模式的使用者許可](how-emr-studio-works.md#emr-studio-iam-authorization)。

1. （適用於 SAML 提供者） 使用您希望聯合身分使用者擔任的 AWS 和 角色的相關資訊來設定 IdP，以完成 SAML 信任。此組態程序會在 IdP 和 之間建立*依賴方信任* AWS。如需詳細資訊，請參閱[使用依賴方信任設定您的 SAML 2.0 IdP 並新增宣告](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html)。

**在 IdP 入口網站中將 EMR Studio 設定為 SAML 應用程式**

可以使用 Studio 的深層連結，將特定 EMR Studio 設定為 SAML 應用程式。這樣做可讓使用者登入您的 IdP 入口網站並啟動特定的 Studio，而不是透過 Amazon EMR 主控台進行導覽。
+ 在 SAML 聲明驗證之後，使用下列格式將 EMR Studio 的深層連結設定為登入 URL。

  ```
  https://console.aws.amazon.com/emr/home?region={{<aws-region>}}#studio/{{<your-studio-id>}}/start
  ```

## 設定 Amazon EMR Studio 的 IAM Identity Center 身分驗證模式
<a name="emr-studio-enable-sso"></a>

若要 AWS IAM Identity Center 準備 EMR Studio，您必須設定身分來源並佈建使用者和群組。佈建是將使用者和群組資訊提供給 IAM Identity Center 以及使用 IAM Identity Center 的應用程式使用的程序。如需詳細資訊，請參閱[使用者和群組佈建](https://docs.aws.amazon.com/singlesignon/latest/userguide/users-groups-provisioning.html#user-group-provision)。

EMR Studio 支援將下列身分提供者用於 IAM Identity Center：
+ **AWS Managed Microsoft AD 和自我管理 Active Directory** – 如需詳細資訊，請參閱[連線至 Microsoft AD 目錄](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-identity-source-ad.html)。
+ **基於 SAML 的提供者** – 如需完整清單，請參閱[支援的身分提供者](https://docs.aws.amazon.com/singlesignon/latest/userguide/supported-idps.html)。
+ **IAM Identity Center 目錄** – 如需詳細資訊，請參閱[在 IAM Identity Center 中管理身分](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-identity-source-sso.html)。

**若要為 EMR Studio 設定 IAM Identity Center**

1. 若要為 EMR Studio 設定 IAM Identity Center，您需要下列各項：
   + 如果您在 AWS 組織中使用多個帳戶，則為組織中的管理帳戶。
**注意**  
您應該只使用管理帳戶來啟用 IAM Identity Center 並*佈建*使用者和群組。設定 IAM Identity Center 後，請使用成員帳戶建立 EMR Studio 並*指派*使用者和群組。若要進一步了解 AWS 術語，請參閱[AWS Organizations 術語和概念](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html)。
   + 如果您在 2019 年 11 月 25 日之前啟用 IAM Identity Center，您可能需要為 AWS 組織中的帳戶啟用使用 IAM Identity Center 的應用程式。如需詳細資訊，請參閱[在 AWS 帳戶中啟用 IAM Identity Center 整合的應用程式](https://docs.aws.amazon.com/singlesignon/latest/userguide/app-enablement.html#enable-app-enablement)。
   + 確定您具有 [IAM Identity Center 必要條件](https://docs.aws.amazon.com/singlesignon/latest/userguide/prereqs.html)頁面中列出的先決條件。

1. 請遵循[啟用 IAM Identity Center](https://docs.aws.amazon.com/singlesignon/latest/userguide/step1.html) 中的指示，在 AWS 區域 您要建立 EMR Studio 的 中啟用 IAM Identity Center。

1. 將 IAM Identity Center 連接至身分提供者，並佈建您要指派給 Studio 的使用者和群組。  
****    
[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/emr/latest/ManagementGuide/emr-studio-authentication.html)

現在可以將身分存放區中的使用者和群組指派給 EMR Studio。如需說明，請參閱[將使用者或群組指派給 EMR Studio](emr-studio-manage-users.md#emr-studio-assign-users-groups)。