本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
中的跨服務混淆代理預防 AWS
混淆代理人問題屬於安全性議題,其中沒有執行動作許可的實體可以強制具有更多許可的實體執行該動作。在 中 AWS,跨服務模擬可能會導致混淆代理問題。在某個服務 (呼叫服務) 呼叫另一個服務 (被呼叫服務) 時,可能會發生跨服務模擬。可以操縱呼叫服務來使用其許可,以其不應有存取許可的方式對其他客戶的資源採取動作。為了防止這種情況, AWS 提供工具,協助您使用已授予您帳戶中資源存取權的服務主體來保護所有 服務的資料。
若要限制 Amazon Connect 為資源提供另一項服務的許可,我們建議在資源政策中使用 aws:SourceArn
和 aws:SourceAccount
全域條件內容索引鍵。如果同時使用全域條件內容索引鍵,則在相同政策陳述式中使用 aws:SourceAccount
值和 aws:SourceArn
值中的帳戶時,必須使用相同的帳戶 ID。
防止混淆代理問題的最有效方法是使用您想要允許之資源的確切 Amazon Resource Name (ARN)。如果您不知道完整ARN資源,或要指定多個資源,請將aws:SourceArn
全域內容條件索引鍵與萬用字元 (*
) 搭配使用,以用於 的未知部分ARN。例如:arn:aws:
。servicename
::region-name
::your AWS account ID
:*
Amazon Connect Customer Profiles 跨服務混淆代理人預防
下列範例顯示適用於將其他人設定為 Amazon Connect Customer Profiles 管理員情況的政策。請使用這些政策,以預防混淆代理人問題。
用於建立 Customer Profile 網域的 Amazon Connect Customer Profiles 政策範例
{ "Version": "2012-10-17", "Statement": { "Sid": "ConfusedDeputyPreventionExamplePolicy", "Effect": "Allow", "Principal": { "Service": "profile.amazonaws.com" }, "Action": ["kms:GenerateDataKey", "kms:CreateGrant", "kms:Decrypt"], "Resource": [ "arn:aws:kms:
your region-name
:your AWS account ID
:key/your key ARN
" ], "Condition": { "ArnEquals": { "aws:SourceArn": "arn:aws:profile:your region name
:your AWS account ID
:domains/your Customer Profiles domain name
" }, "StringEquals": { "aws:SourceAccount": "your AWS account ID
" } } } }
用於建立 Customer Profiles 物件類型的 Amazon Connect Customer Profiles 政策範例
{ "Version": "2012-10-17", "Statement": { "Sid": "ConfusedDeputyPreventionExamplePolicy", "Effect": "Allow", "Principal": { "Service": "profile.amazonaws.com" }, "Action": ["kms:GenerateDataKey", "kms:CreateGrant", "kms:Decrypt"], "Resource": [ "arn:aws:kms:
your Region
:your AWS account ID
:key/your key ARN
" ], "Condition": { " ArnEquals": { "aws:SourceArn": "arn:aws:profile:your region name
:your AWS account ID
:domains/your Customer Profiles domain name
/objects/your object type
" }, "StringEquals": { "aws:SourceAccount": "your AWS account ID
" } } } }
用於建立和更新無效字母佇列的 Amazon Connect Customer Profiles 政策範例
{ "Version": "2012-10-17", "Statement": [ { "Sid": "Allow Amazon Connect Customer Profiles to publish messages to your queue", "Effect": "Allow", "Principal": { "Service": "profile.amazonaws.com" }, "Action": "sqs:SendMessage", "Resource": "
your dead-letter queue ARN
", "Condition": { "StringEquals": { "aws:SourceAccount": "your AWS account ID
", "aws:SourceArn": "arn:aws:profile:your region name
:your AWS account ID
:domains/your Customer Profiles domain name
" } } } ] }
用於保護 Amazon S3 儲存貯體,作為身分解析程序一部分使用的 Amazon Connect Customer Profiles 政策範例
{ "Sid": "Allow Amazon Connect Customer Profiles to put S3 objects to your bucket", "Effect": "Allow", "Principal": { "Service": "profile.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::
amzn-s3-demo-bucket
/*", "Condition": { "StringEquals": { "aws:SourceAccount": "your AWS account ID
" }, "ArnEquals": { "aws:SourceArn": "arn:aws:profile:your region name
:your AWS account ID
:domains/*" } } }
Amazon Connect Voice ID 跨服務混淆代理預防
下列 Voice ID 範例顯示要套用的資源策略,以避免混淆代理的問題。
{ "Version": "2012-10-17", "Statement": { "Sid": "ConfusedDeputyPreventionExamplePolicy", "Effect": "Allow", "Principal": { "Service": "voiceid.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "ArnEquals": { "aws:SourceArn": "arn:aws:voiceid:
your region name
:your AWS account ID
:domain/your Voice ID domain name
" }, "StringEquals": { "aws:SourceAccount": "your AWS account ID
" } } } }
Amazon Connect 聊天訊息串流跨服務混淆代理預防
下列 Amazon Connect 範例顯示要套用的資源策略,以避免混淆代理的問題。
{ "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Principal":{ "Service":"connect.amazonaws.com" }, "Action":"sns:Publish", "Resource":"
your SNS topic ARN
", "Condition":{ "StringEquals":{ "aws:SourceAccount":"your AWS account ID
" }, "ArnEquals":{ "aws:SourceArn":"your Amazon Connect instance ARN
" } } } ] }