

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

# 使用 Terraform 動態管理 AWS 許可集
<a name="manage-aws-permission-sets-dynamically-by-using-terraform"></a>

*Vinicius Elias 和 Marcos Vinicius Pinto Jordao，Amazon Web Services*

## 摘要
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-summary"></a>

AWS IAM Identity Center enhances AWS Identity and Access Management (IAM) 提供集中式中樞，用於管理 AWS 帳戶 和雲端應用程式的單一登入存取。不過，隨著組織的成長，手動管理 IAM Identity Center [許可集](https://docs.aws.amazon.com/singlesignon/latest/userguide/permissionsetsconcept.html)可能會變得越來越複雜且容易出錯。這種複雜性可能會導致潛在的安全漏洞和管理開銷。

此解決方案可讓您使用以原生建置的持續整合和持續交付 (CI/CD) 管道，透過基礎設施將許可集管理為程式碼 (IaC) AWS 服務。它可讓許可集指派機制與 AWS Control Tower 生命週期事件或 [Account Factory for Terraform (AFT)](https://docs.aws.amazon.com/controltower/latest/userguide/aft-overview.html) 環境無縫整合。此方法為新的和現有的 提供動態身分組態 AWS 帳戶。

Amazon EventBridge 規則會監控 AWS 帳戶 建立和更新，這有助於您的身分組態與您的組織結構保持同步。在 或 AFT 中建立 AWS Control Tower 或更新帳戶之後，就會觸發管道。它使用許可集定義和指派規則來評估一組 JSON 檔案。然後，管道會套用並同步所有帳戶的設定。

此方法提供下列優勢：
+ **一致性** – 消除整個 AWS 組織的手動組態偏離
+ 可**稽核性** – 維護所有身分管理變更的完整歷史記錄
+ **可擴展性** – 隨著 AWS 環境的成長，自動套用組態
+ **安全性** – 減少許可指派中的人為錯誤
+ **合規** – 透過記錄的變更和指派規則，協助滿足法規要求

## 先決條件和限制
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-prereqs"></a>
+ 具有 AWS Control Tower 和 AWS Organizations 設定的多帳戶環境。或者，您可以搭配 使用 AFT AWS Control Tower。
+  AWS 帳戶 接收解決方案的 IAM Identity Center 委派管理員。如需詳細資訊，請參閱 IAM Identity Center 文件中的[委派管理](https://docs.aws.amazon.com/singlesignon/latest/userguide/delegated-admin.html)。
+ 處理主要程式碼的版本控制系統 (VCS) 儲存庫。如需範例，請參閱解決方案的 GitHub [儲存庫](https://github.com/aws-samples/sample-terraform-aws-permission-sets-pipeline/tree/main/samples/basic)。
+ Terraform 後端管理的必要 AWS 資源，例如 Amazon Simple Storage Service (Amazon S3) 儲存貯體和 Amazon DynamoDB 資料表。

**限制**
+ 管道使用 AWS 原生資源和開放原始碼 Terraform。管道尚未準備好呼叫第三方生態系統。
+ 有些 AWS 服務 不適用於所有 AWS 區域。如需區域可用性，請參閱[AWS 依區域的服務](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/)。如需特定端點，請參閱[服務端點和配額](https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html)，然後選擇服務的連結。

## Architecture
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-architecture"></a>

下圖顯示此模式的元件和工作流程。

![\[使用 Terraform 管理 AWS 許可集的元件和工作流程。\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/69dc79c7-b4cd-4ad0-b0d2-d58cf0c7adaa/images/649e299c-1142-405a-8982-4a6b2e595d53.png)


**AWS Control Tower 事件流程**

解決方案從整合來自 AWS Control Tower 或 AFT 的事件開始。在實作時間，會透過變數定義，選擇一項或另一項服務。無論使用何種方法，只要建立或更新帳戶，就會觸發管道。管道會協調存放在許可集管理儲存庫中的政策。

以下是 AWS Control Tower 生命週期事件：
+ `CreateManagedAccount` – 建立新帳戶時
+ `UpdateManagedAccount` – 更新現有帳戶時

**事件路由**

EventBridge 做為中央事件處理服務，擷取 AWS Control Tower 帳戶中產生的事件。事件發生時，EventBridge 會以智慧方式將事件路由到解決方案帳戶中的集中式事件匯流排。 AWS Control Tower 生命週期事件遵循不同的路由模式。如果 AFT 定義為事件來源，則 AFT 管理帳戶會處理事件，而不是 AWS Control Tower 帳戶。此事件驅動型架構可自動回應組織變更，無需手動介入。

**AFT 整合程序**

當 AWS Control Tower 生命週期事件到達 AFT 管理帳戶時，它們會自動觸發多個 AFT 內部的下游程序。AFT 帳戶自訂工作流程完成後，它會將訊息發佈至專用 `aft-notifications` Amazon Simple Notification Service (Amazon SNS) 主題。該主題會觸發此解決方案實作的 `aft-new-account-forward-event` AWS Lambda 函數。Lambda 函數會將事件傳送至解決方案帳戶事件匯流排，用於啟動管道。

**基礎設施即程式碼管道**

解決方案管道以全自動化的部署機制運作。 AWS CodePipeline 服務會持續監控儲存庫的變更。偵測到新的遞交時，會自動啟動部署工作流程，並啟動包含驗證和執行階段的循序程序。系統會執行 Terraform `plan`操作來識別提議的變更，接著執行 Terraform `apply`命令以在 AWS 環境中實作這些變更。值得注意的是，管道在沒有任何手動核准閘道的情況下執行。此方法可讓您快速部署基礎設施變更，同時透過管道日誌和 Terraform 狀態檔案維持可稽核性。

管道會利用 AWS CodeBuild ，在具有適當許可的受控環境中執行 Terraform 操作。透過此 IaC 方法，管道可以執行全面的許可管理操作，包括：
+ 建立新的許可集。
+ 更新現有的許可集。
+ 移除不必要的許可集。
+ 管理組織中帳戶和群組之間這些許可的指派 AWS 。

為了維持基礎設施一致性並防止發生衝突的變更，解決方案會使用 Amazon S3 儲存貯體和專用 Amazon DynamoDB 資料表實作 Terraform 後端狀態管理系統。此方法為 Terraform 狀態檔案和狀態鎖定機制提供持久性儲存位置，以防止同時修改相同的資源。

主要 Terraform 程式碼使用官方 AWS `permission-sets` Terraform 模組。此模組可以根據許可集範本，在 IAM Identity Center 中動態管理許可集。

**來源控制管理**

許可集範本 (JSON 檔案） 位於外部版本控制系統中，例如 GitHub，為身分管理組態提供集中式儲存庫。此方法為許可集定義建立單一事實來源，同時透過標準程式碼檢閱實務進行協作開發。授權使用者可以在組織變更管理程序之後，將變更遞交至這些範本。這些遞交可做為自動化部署管道的主要觸發條件，啟動基礎設施更新程序。

如需如何使用儲存庫中的 JSON 檔案設定許可集的範例，請參閱[其他資訊](#manage-aws-permission-sets-dynamically-by-using-terraform-additional)。

## 工具
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-tools"></a>

**AWS 服務**
+ [AWS CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/welcome.html) 是一種全受管建置服務，可協助您編譯原始程式碼、執行單元測試，並產生準備好部署的成品。
+ [AWS CodeConnections](https://docs.aws.amazon.com/dtconsole/latest/userguide/welcome-connections.html) 可讓 CodePipeline 等 AWS 資源和服務連線至外部程式碼儲存庫，例如 GitHub。
+ [AWS CodePipeline](https://docs.aws.amazon.com/codepipeline/latest/userguide/welcome.html) 可協助您快速建模和設定軟體版本的不同階段，並自動化持續發行軟體變更所需的步驟。
+ [AWS Command Line Interface (AWS CLI)](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) 是一種開放原始碼工具，可協助您 AWS 服務 透過命令列 Shell 中的命令與 互動。
+ [AWS Control Tower](https://docs.aws.amazon.com/controltower/latest/userguide/what-is-control-tower.html) 可協助您設定和管理 AWS 多帳戶環境，並遵循規範最佳實務。
+ [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html) 是一項全受管 NoSQL 資料庫服務，可提供快速、可預期且可擴展的效能。
+ [Amazon EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) 是一種無伺服器事件匯流排服務，可協助您將應用程式與來自各種來源的即時資料連線。例如， AWS Lambda 函數、使用 API 目的地的 HTTP 調用端點，或其他事件匯流排 AWS 帳戶。
+ [AWS Identity and Access Management (IAM)](https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html) 透過控制已驗證並獲授權使用的人員，協助您安全地管理對 AWS 資源的存取。
+ [AWS IAM Identity Center](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) 可協助您集中管理所有 AWS 帳戶 和雲端應用程式的單一登入 (SSO) 存取。
+ [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) 是一項運算服務，可協助您執行程式碼，無需佈建或管理伺服器。它只會在需要時執行程式碼並自動擴展，因此您只需按使用的運算時間付費。
+ [AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) 是一種帳戶管理服務，可協助您將多個 合併 AWS 帳戶 到您建立並集中管理的組織。
+ [Amazon Simple Notification Service (Amazon SNS)](https://docs.aws.amazon.com/sns/latest/dg/welcome.html) 可協助您協調和管理發佈者和用戶端之間的訊息交換，包括 Web 伺服器和電子郵件地址。它可啟用帳戶管理事件的推播通知，確保相關各方知道系統中的重要變更或動作。
+ [Amazon Simple Storage Service (Amazon S3)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) 是一種雲端型物件儲存服務，可協助您儲存、保護和擷取任何數量的資料。

**其他工具**
+ [Terraform](https://www.terraform.io/) 是 HashiCorp 的基礎設施即程式碼 (IaC) 工具，可協助您建立和管理雲端和內部部署資源。

**程式碼儲存庫**

此模式的程式碼可在 AWS sample[sample-terraform-aws-permission-sets-pipeline](https://github.com/aws-samples/sample-terraform-aws-permission-sets-pipeline)儲存庫的 GitHub 上的 Samples 組織中取得。

## 最佳實務
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-best-practices"></a>
+ 一律鎖定用於在生產環境中執行程式碼的 Terraform 模組和提供者版本。
+ 使用靜態程式碼分析工具，例如 [Checkov](https://www.checkov.io/)，掃描您的程式碼，然後解決安全問題。
+ 遵循最低權限原則，並授予執行任務所需的最低許可。如需詳細資訊，請參閱 IAM 文件中的[授予最低權限](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#grant-least-priv)和[安全最佳實務](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)。

## 史詩
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-epics"></a>

### 建立先決條件 （選用）
<a name="create-the-prerequisites-optional"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 建立 Terraform 後端資源。 | 如果您尚未建立 Terraform 後端 AWS 資源，請使用下列步驟來建立 Amazon S3 儲存貯體 (`s3-tf-backend-{ACCOUNT_ID}`) 和 DynamoDB 資料表 ()`ddb-tf-backend`。[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html)<pre>aws s3api create-bucket --bucket s3-tf-backend-{ACCOUNT_ID}<br />aws s3api put-bucket-versioning --bucket s3-tf-backend-{ACCOUNT_ID} --versioning-configuration Status=Enabled<br />aws dynamodb create-table --table-name ddb-tf-backend --attribute-definitions AttributeName=LockID,AttributeType=S --key-schema AttributeName=LockID,KeyType=HASH --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1</pre> | AWS 管理員 | 
| 建立跨帳戶角色。 | 您必須在 `event-source-account` Terraform AWS 提供者組態中提供跨帳戶 IAM 角色。如果您尚未建立此角色，請使用下列步驟來建立角色：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html)<pre>aws iam create-role \<br />    --role-name CrossAccountRole \<br />    --assume-role-policy-document '{<br />        "Version": "2012-10-17",		 	 	 <br />        "Statement": [<br />            {<br />                "Effect": "Allow",<br />                "Principal": {<br />                    "AWS": "arn:aws:iam::{ACCOUNT_ID}:root"<br />                },<br />                "Action": "sts:AssumeRole"<br />            }<br />        ]<br />    }'</pre>[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html)<pre>aws iam attach-role-policy \<br />    --role-name CrossAccountRole \<br />    --policy-arn arn:aws:iam::aws:policy/AdministratorAccess</pre>此範例使用 AWS 受管 IAM 政策 [AdministratorAccess](https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AdministratorAccess.html)。如果您願意，可以使用更具體的政策。 | AWS 管理員 | 

### 準備許可集儲存庫
<a name="prepare-the-permission-set-repository"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 建立專用儲存庫。 | 此任務假設您使用的是 GitHub。建立專用儲存庫來存放主要 Terraform 程式碼和許可集範本 JSON 檔案。 | DevOps 工程師 | 
| 準備許可集程式碼。 | 如需如何建構下列檔案的資訊，請參閱解決方案儲存庫上的[範例程式碼](https://github.com/aws-samples/sample-terraform-aws-permission-sets-pipeline/tree/main/samples/basic)：├ – main.tf：//├ – outputs.tf：//├ – provider.jinja└ — 範本複製內容、保留`providers.jinja`值，並對其他檔案進行必要的調整。例如，將許可集範本檔案新增至 檔案，`templates`或將`aws-ia/permission-sets/aws`模組版本釘選在 `main.tf` 檔案中。 | DevOps 工程師 | 
| 遞交您的變更。 | 遞交變更並推送至您先前建立的儲存庫。儲存儲存庫名稱及其 GitHub 組織，例如 `myorg/aws-ps-pipeline`。 | DevOps 工程師 | 

### 準備部署程式碼
<a name="prepare-the-deployment-code"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 下載內容。 | 從解決方案[儲存庫](https://github.com/aws-samples/sample-terraform-aws-permission-sets-pipeline)下載 （複製） 內容。 | DevOps 工程師 | 
| 履行變數。 | 建立`terraform.tfvars`檔案並新增下列必要變數：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html)<pre>repository_name                 = "myorg/aws-ps-pipeline"<br />branch_name                     = "main"<br />vcs_provider                    = "github"<br />account_lifecycle_events_source = "CT"</pre>如需其他變數選項的詳細資訊，請參閱此模式的 GitHub 儲存庫中的 [variables.tf](https://github.com/aws-samples/sample-terraform-aws-permission-sets-pipeline/blob/main/variables.tf) 檔案。 | DevOps 工程師 | 
| 調整 Terraform 後端組態。 | 在 `backend.tf` 檔案中，將預留位置取代為您自己的值。使用 AWS Control Tower 首頁 AWS 區域，並提供先前建立的 Amazon S3 儲存貯體和 DynamoDB 資料表的名稱。<pre>terraform {<br />  required_version = ">=1.6"<br />  backend "s3" {<br />    region         = "{region}"<br />    bucket         = "{bucket_name}"<br />    key            = "terraform.tfstate"<br />    dynamodb_table = "{table_name}"<br />    encrypt        = "true"<br />  }<br />}</pre>如果您願意，可以使用自己的 Terraform 後端組態。 | DevOps 工程師 | 
| 調整 Terraform 提供者組態。 | 在 `providers.tf` 檔案中，將預留位置取代為您自己的資訊。使用 AWS Control Tower 主區域，並提供先前為`event-source-account`提供者建立的跨帳戶 IAM 角色的 ARN。<pre>provider "aws" {<br />  region = "{region}"<br />}<br /><br />provider "aws" {<br />  alias  = "event-source-account"<br />  region = "{region}"<br />  assume_role {<br />    role_arn = "{role_arn}"<br />  }<br />}<br /></pre> | DevOps 工程師 | 

### 手動部署解決方案
<a name="deploy-the-solution-manually"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 選取 AWS 帳戶。 | 我們建議您在 IAM Identity Center 委派管理員帳戶中部署解決方案。不過，您也可以在 AWS Organizations 管理帳戶中部署它。若要登入與 IAM Identity Center 執行個體位於相同區域中的所選帳戶，請使用 AWS CLI。請確定您使用的 IAM 角色具有許可，可擔任先前步驟中為`event-source-account`提供者指定的角色。此外，此角色必須能夠存取 Terraform 後端組態中使用的 AWS 資源。 | AWS 管理員 | 
| 手動執行 Terraform。 | 若要初始化、規劃和套用組態，請依所示順序執行下列 Terraform 命令：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html) | DevOps 工程師 | 
| 檢查部署結果。 | 在 IAM Identity Center 委派管理員帳戶中，檢查`aws-ps-pipeline`管道是否已建立。同時檢查是否有處於**待定**狀態的 AWS CodeConnections 連線。 | AWS DevOps | 
| 完成 CodeConnections 組態。 | 若要完成 CodeConnections 組態，請使用下列步驟：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html)管道現在應該可以存取許可集儲存庫。如需詳細說明，請參閱開發人員工具主控台文件中的[更新待定連線](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-update.html)。 | AWS DevOps | 

### 選擇管道執行流程以測試解決方案
<a name="choose-a-pipeline-execution-flow-to-test-the-solution"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 依 AWS Control Tower 或 AFT 更新執行管道。 | 使用 AWS Control Tower 或 AFT 建立或變更帳戶後 （取決於您選擇的生命週期事件類型），管道就會啟動。 | AWS 管理員 | 
| 變更程式碼以執行管道。 | 在您變更程式碼並將其遞交至`main`分支之後，管道就會啟動。 | AWS DevOps | 
| 手動執行管道。 | 若要手動啟動管道，請使用 中的[發行變更](https://docs.aws.amazon.com/codepipeline/latest/userguide/pipelines-rerun-manually.html)功能 AWS CodePipeline。 | AWS DevOps | 

## 疑難排解
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-troubleshooting"></a>


| 問題 | 解決方案 | 
| --- | --- | 
| 存取遭拒 | 確認您具有部署解決方案所需的許可。 | 
| CodeConnections 問題 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html) | 
| 管道執行問題 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html) | 
| 許可集部署問題 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/manage-aws-permission-sets-dynamically-by-using-terraform.html) | 

## 相關資源
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-resources"></a>

**AWS 服務 文件**
+ [AWS IAM Identity Center 使用者指南](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html)
+ [AWS 帳戶 使用許可集管理](https://docs.aws.amazon.com/singlesignon/latest/userguide/permissionsetsconcept.html) (IAM Identity Center 文件）

**其他資源**
+ [AWS 許可集模組 ](https://registry.terraform.io/modules/aws-ia/permission-sets/aws/latest)(Terraform)

## 其他資訊
<a name="manage-aws-permission-sets-dynamically-by-using-terraform-additional"></a>

**具有範例許可集的 JSON 檔案**

下列範例示範如何使用儲存庫中的 JSON 檔案來設定許可集：

```
{
  "Name": "ps-billing", // Permission set identifier
  "Comment": "Sample permission set for billing access", // Comment to document the purpose of the permission set
  "Description": "Billing access in AWS", // Detailed description
  "SessionDuration": "PT4H", // Session duration = 4 hours (ISO 8601 format)
  "ManagedPolicies": [ // List of AWS IAM managed policies
    "arn:aws:iam::aws:policy/job-function/Billing",
    "arn:aws:iam::aws:policy/job-function/SupportUser",
    "arn:aws:iam::aws:policy/AWSSupportAccess",
    "arn:aws:iam::aws:policy/job-function/ViewOnlyAccess"
  ],
  "CustomerPolicies": [], // References to IAM policies previously created
  "CustomPolicy": {}, // Inline IAM policy defined directly in the permission set
  "PermissionBoundary": {  // AWS or customer managed IAM policy to be used as boundary
    "ManagedPolicy": "",
    "CustomerPolicy": ""
  },
  "Assignments": [ // Define the assignment rules
    {
      "all_accounts": true, // Apply to ALL active AWS accounts in organization
      "principal": "G_BILLING_USERS", // Group/user name in Identity Center
      "type": "GROUP", // Can be "GROUP" or "USER"
      "account_id": [], // List of AWS account ID (empty since all_accounts=true)
      "account_ou": [], // List of AWS Organizational Unit IDs with target AWS accounts
      "account_tag": [] // List of tags (key:value) to match AWS Organization accounts tags
    }
  ]
}
```

如需詳細資訊，請參閱 Terraform 網站上的[AWS 許可集模組](https://registry.terraform.io/modules/aws-ia/permission-sets/aws/latest#json-file-templates)文件中的 JSON 結構描述。

**提示**
+ 您可以使用 Terraform [匯入區塊](https://developer.hashicorp.com/terraform/language/import)，將現有的許可集匯入解決方案。
+ 您可以使用 AFT 在委派帳戶中實作 AWS 許可集管道。如需詳細資訊，請參閱 [AFT 藍圖](https://awslabs.github.io/aft-blueprints/index.html)。