本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
進階 KMS 金鑰政策陳述式
注意
客戶受管的 KMS AWS IAM Identity Center 金鑰目前可在特定 AWS 區域中使用。
使用進階 KMS 金鑰政策陳述式,為您的客戶受管 KMS 金鑰實作更精細的存取控制。透過新增加密內容條件和服務特定限制基準 KMS 金鑰和 IAM 政策陳述式,這些政策以 為基礎。在決定是否使用進階 KMS 金鑰政策陳述式之前,請務必檢閱相關考量事項。
使用加密內容來限制存取
您可以將加密內容條件新增至金鑰政策陳述式,將 KMS 金鑰用量限制為特定 IAM Identity Center 執行個體。此條件使用 IAM Identity Center 執行個體 ARN 和 Identity Store ARN,以確保金鑰僅適用於您的預期執行個體。將此條件新增至任何基準政策陳述式:
身分中心
"StringLike": { "kms:EncryptionContext:aws:sso:instance-arn": "${identity_center_arn}" }
身分存放區
"StringLike": { "kms:EncryptionContext:aws:identitystore:identitystore-arn": "${identity_store_arn}" }
將範例 ARNs為您實際的 ARN 值。如果您需要尋找這些識別符的協助,請參閱 尋找所需的識別符。
實作加密內容條件的考量
在實作加密內容條件之前,請檢閱下列要求:
-
DescribeKey 動作。加密內容無法套用至「kms:DescribeKey」動作,IAM Identity Center 管理員可以使用。設定 KMS 金鑰政策時,請排除此特定動作的加密內容,以確保 IAM Identity Center 執行個體能正常運作。
-
新的執行個體設定。如果您要使用客戶受管 KMS 金鑰啟用新的 IAM Identity Center 執行個體,請參閱 客戶受管 KMS 金鑰和進階 KMS 金鑰政策的考量。
-
身分來源變更。將您的身分來源變更為 Active Directory 或從 Active Directory 變更時,加密內容需要特別注意。請參閱 變更身分來源的考量事項。
政策範本
根據您的安全需求,從這些進階政策範本中進行選擇。平衡精細存取控制及其帶來的管理開銷。
此處涵蓋的主題:
-
使用特定 IAM Identity Center 執行個體的 KMS 金鑰政策陳述式。 本節示範如何使用加密內容來使用 IAM Identity Center,而不將其套用至「kms:DescribeKey」動作。對於其他使用案例,您可以將加密內容條件新增至基準 KMS 政策陳述式,如上所述。
-
特定 IAM Identity Center 執行個體的唯讀使用的 KMS 政策陳述式。 本節示範使用加密內容進行 IAM Identity Center 的唯讀存取。
-
精簡 KMS 金鑰政策陳述式以使用 AWS 受管應用程式。 本節示範如何使用加密內容和應用程式資訊來精簡 AWS 受管應用程式的 KMS 金鑰政策,例如應用程式服務主體、應用程式 ARN 和 AWS 帳戶 ID。
使用特定 IAM Identity Center 執行個體的 KMS 金鑰政策陳述式
這些政策陳述式允許特定 IAM Identity Center 執行個體的管理員使用 KMS 金鑰,同時限制只能存取該執行個體。
注意
目前,您只能將客戶受管 KMS 金鑰與 IAM Identity Center 的組織執行個體搭配使用。客戶受管金鑰必須位於 AWS 組織的管理帳戶中,這有助於確保金鑰與單一 IAM Identity Center 執行個體搭配使用。不過,加密內容機制提供單一執行個體使用的獨立技術保護措施。
管理員存取政策
下列政策陳述式範本允許 IAM Identity Center 及其相關聯 Identity Store 特定執行個體的管理員使用 KMS 金鑰。
若要使用此政策:
將範例管理員 IAM 主體取代為您的實際管理員 IAM 主體
將範例 IAM Identity Center 執行個體 ARN 取代為您的實際執行個體 ARN
將範例 Identity Store ARN 取代為您實際的 Identity Store ARN
如果您需要協助尋找這些識別符的值,請參閱 尋找所需的識別符。
使用值更新範本後,請返回 步驟 2:準備 KMS 金鑰政策陳述式 以視需要準備其他 KMS 金鑰政策陳述式。
{ "Version": "2012-10-17", "Statement": [{ "Sid": "AllowSpecificIAMIdentityCenterAdminToUseTheKMSKeyViaIdentityCenter", "Effect": "Allow", "Principal": { "AWS": "${Admin_IAM_principal}" }, "Action": [ "kms:Decrypt", "kms:Encrypt", "kms:GenerateDataKeyWithoutPlaintext" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:aws:sso:instance-arn": "${identity_center_arn}", "kms:ViaService": "sso.*.amazonaws.com" } } }, { "Sid": "AllowSpecificIAMIdentityCenterAdminToUseTheKMSKeyViaIdentityStore", "Effect": "Allow", "Principal": { "AWS": "${Admin_IAM_principal}" }, "Action": [ "kms:Decrypt", "kms:Encrypt", "kms:GenerateDataKeyWithoutPlaintext" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:aws:identitystore:identitystore-arn": "${identity_store_arn}", "kms:ViaService": "identitystore.*.amazonaws.com" } } }, { "Sid": "AllowIAMIdentityCenterAdminToDescribeTheKMSKey", "Effect": "Allow", "Principal": { "AWS": "${Admin_IAM_principal}" }, "Action": "kms:DescribeKey", "Resource": "*" } ] }
服務存取政策
下列政策陳述式範本允許 IAM Identity Center 的特定執行個體及其相關聯的 Identity Store 使用 KMS 金鑰。
若要使用此政策:
將範例 IAM Identity Center 執行個體 ARN 取代為您的實際執行個體 ARN
將範例 Identity Store ARN 取代為您實際的 Identity Store ARN
如果您需要協助尋找這些識別符的值,請參閱 尋找所需的識別符。
使用值更新範本後,請返回 步驟 2:準備 KMS 金鑰政策陳述式 以視需要準備其他 KMS 金鑰政策陳述式。
{ "Version": "2012-10-17", "Statement": [{ "Sid": "AllowSpecificIAMIdentityCenterToUseTheKMSKey", "Effect": "Allow", "Principal": { "Service": "sso.amazonaws.com" }, "Action": [ "kms:Decrypt", "kms:ReEncryptTo", "kms:ReEncryptFrom", "kms:GenerateDataKeyWithoutPlaintext" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:aws:sso:instance-arn": "${identity_center_arn}" } } }, { "Sid": "AllowSpecificIAMIdentityStoreToUseTheKMSKey", "Effect": "Allow", "Principal": { "Service": "identitystore.amazonaws.com" }, "Action": [ "kms:Decrypt", "kms:ReEncryptTo", "kms:ReEncryptFrom", "kms:GenerateDataKeyWithoutPlaintext" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:aws:identitystore:identitystore-arn": "${identity_store_arn}" } } }, { "Sid": "AllowIAMIdentityCenterAndIdentityStoreToDescribeKMSKey", "Effect": "Allow", "Principal": { "Service": [ "identitystore.amazonaws.com", "sso.amazonaws.com" ] }, "Action": "kms:DescribeKey", "Resource": "*" } ] }
特定 IAM Identity Center 執行個體的唯讀使用的 KMS 政策陳述式
此政策允許安全稽核人員和其他只需要讀取 IAM Identity Center 存取權的人員使用 KMS 金鑰。
若要使用此政策:
將範例唯讀管理員 IAM 主體取代為您的實際管理員 IAM 主體
將範例 IAM Identity Center 執行個體 ARN 取代為您的實際執行個體 ARN
將範例 Identity Store ARN 取代為您實際的 Identity Store ARN
如果使用委派的管理,請參閱 步驟 4:設定跨帳戶使用 KMS 金鑰的 IAM 政策
如果您需要協助尋找這些識別符的值,請參閱 尋找所需的識別符。
使用值更新範本後,請返回 步驟 2:準備 KMS 金鑰政策陳述式 以視需要準備其他 KMS 金鑰政策陳述式。
{ "Version": "2012-10-17", "Statement": [{ "Sid": "AllowReadOnlyAccessToIdentityCenterAPI", "Effect": "Allow", "Principal": { "AWS": "${Admin_IAM_principal}" }, "Action": "kms:Decrypt", "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:aws:sso:instance-arn": "${identity_center_arn}", "kms:ViaService": "sso.*.amazonaws.com" } } }, { "Sid": "AllowReadOnlyAccessToIdentityStoreAPI", "Effect": "Allow", "Principal": { "AWS": "${Admin_IAM_principal}" }, "Action": "kms:Decrypt", "Resource": "*", "Condition": { "StringLike": { "kms:ViaService": "identitystore.*.amazonaws.com", "kms:EncryptionContext:aws:identitystore:identitystore-arn": "${identity_store_arn}" } } } ] }
精簡 KMS 金鑰政策陳述式以使用 AWS 受管應用程式
這些政策範本可讓您更精細地控制哪些 AWS 受管應用程式可以使用 KMS 金鑰。
注意
某些 AWS 受管應用程式無法與以客戶受管 KMS 金鑰設定的 IAM Identity Center 搭配使用。請參閱AWS 可與 IAM Identity Center 搭配使用的受管應用程式。
使用 AWS 受管應用程式的基準 KMS 金鑰和 IAM 政策陳述式 允許來自相同 AWS 組織中任何帳戶的 AWS 受管應用程式使用 KMS 金鑰。使用這些精簡政策來限制存取:
應用程式服務主體
應用程式執行個體 ARNs
AWS 帳戶 IDs
特定 IAM Identity Center 執行個體的加密內容
注意
服務委託人是 AWS 服務的唯一識別符,通常格式化為 servicename.amazonaws.com (例如,Amazon EMR 的 elasticmapreduce.amazonaws.com)。
依帳戶限制
此 KMS 金鑰政策陳述式範本允許特定 AWS 帳戶中的 AWS 受管應用程式使用特定 IAM Identity Center 執行個體來使用 KMS 金鑰。
若要使用此政策:
將範例服務主體取代為您實際的應用程式服務主體
將範例帳戶 IDs 取代為您的實際帳戶 IDs
將範例 Identity Store ARN 取代為您實際的 Identity Store ARN
將範例 IAM Identity Center 執行個體 ARN 取代為您的實際執行個體 ARN
{ "Version": "2012-10-17", "Statement": [{ "Sid": "AllowServiceInSpecificAccountsToUseTheKMSKeyViaIdentityCenter", "Effect": "Allow", "Principal": { "Service": "${app_SPN_IAM_principal}" }, "Action": "kms:Decrypt", "Resource": "*", "Condition": { "StringEquals": { "aws:sourceAccount": [ "${account_id_1}", "${account_id_2}" ] }, "StringLike": { "kms:ViaService": "sso.*.amazonaws.com", "kms:EncryptionContext:aws:sso:instance-arn": "${identity_center_arn}" }, "Bool": { "aws:PrincipalIsAWSService": "true" } } }, { "Sid": "AllowServiceInSpecificAccountsToUseTheKMSKeyViaIdentityStore", "Effect": "Allow", "Principal": { "Service": "${app_SPN_IAM_principal}" }, "Action": "kms:Decrypt", "Resource": "*", "Condition": { "StringEquals": { "aws:sourceAccount": [ "${account_id_1}", "${account_id_2}" ] }, "StringLike": { "kms:ViaService": "identitystore.*.amazonaws.com", "kms:EncryptionContext:aws:identitystore:identitystore-arn": "${identity_store_arn}" }, "Bool": { "aws:PrincipalIsAWSService": "true" } } } ] }
依應用程式執行個體限制
此 KMS 金鑰政策陳述式範本允許特定 AWS 受管應用程式執行個體使用特定 IAM Identity Center 執行個體來使用 KMS 金鑰。
若要使用此政策:
將範例服務主體取代為您實際的應用程式服務主體
將範例應用程式 ARN 取代為您實際的應用程式執行個體 ARN
將範例 Identity Store ARN 取代為您實際的 Identity Store ARN
將範例 IAM Identity Center 執行個體 ARN 取代為您的實際執行個體 ARN
{ "Version": "2012-10-17", "Statement": [{ "Sid": "AllowSpecificAppInstanceToUseTheKMSKeyViaIdentityCenter", "Effect": "Allow", "Principal": { "Service": "${app_SPN_IAM_principal}" }, "Action": "kms:Decrypt", "Resource": "*", "Condition": { "StringEquals": { "aws:SourceARN": "${app_arn}" }, "StringLike": { "kms:ViaService": "sso.*.amazonaws.com", "kms:EncryptionContext:aws:sso:instance-arn": "${identity_center_arn}" }, "Bool": { "aws:PrincipalIsAWSService": "true" } } }, { "Sid": "AllowSpecificAppInstanceToUseTheKMSKeyViaIdentityStore", "Effect": "Allow", "Principal": { "Service": "${app_SPN_IAM_principal}" }, "Action": "kms:Decrypt", "Resource": "*", "Condition": { "StringEquals": { "aws:SourceARN": "${app_arn}" }, "StringLike": { "kms:ViaService": "identitystore.*.amazonaws.com", "kms:EncryptionContext:aws:identitystore:identitystore-arn": "${identity_store_arn}" }, "Bool": { "aws:PrincipalIsAWSService": "true" } } } ] }