View a markdown version of this page

Cross-service 混乱的副手预防 AWS - Amazon Connect Customer

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

Cross-service 混乱的副手预防 AWS

混淆代理问题是一个安全性问题,即不具有某操作执行权限的实体可能会迫使具有更高权限的实体执行该操作。在中 AWS,跨服务模仿可能会导致混乱的副手问题。 Cross-service当一个服务(调用服务)调用另一个服务(调用的服务)时,可能会发生模仿行为。可以操纵调用服务以使用其权限对另一个客户的资源进行操作,否则该服务不应有访问权限。为了防止这种情况,我们 AWS 提供了一些工具,帮助您保护所有服务的数据,这些服务委托人已被授予对您账户中资源的访问权限。

我们建议在资源策略中使用aws:SourceArnaws:SourceAccount全局条件上下文密钥来限制 Connect Customer 向该资源提供的其他服务的权限。如果使用两个全局条件上下文键,在同一策略语句中使用时,aws:SourceAccount 值和 aws:SourceArn 值中的账户必须使用相同的账户 ID。

防止混淆座席问题的有效方法是使用要允许的资源的确切 Amazon 资源名称 (ARN)。如果不知道资源的完整 ARN,或者正在指定多个资源,请针对 ARN 未知部分使用带有通配符(*)的 aws:SourceArn 全局上下文条件键。例如 arn:aws:servicename::region-name::your AWS account ID:*

Connect 客户档案跨服务混淆副手预防

以下示例显示了适用于将其他人设置为 Connect 客户档案管理员的情形的政策。使用这些策略可防范混淆座席问题。

用于创建客户资料域的 Connect 客户档案策略示例

用于创建客户档案对象类型的 Connect 客户档案策略示例

JSON
{ "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:us-east-1:111122223333:key/KeyId" ], "Condition": { "ArnEquals": { "aws:SourceArn": "arn:aws:profile:us-east-1:111122223333:domains/CustomerProfilesDomainName/objects/YourObjectType" }, "StringEquals": { "aws:SourceAccount": "111122223333" } } } }

用于创建和更新死信队列的 Connect 客户档案策略示例

JSON
{ "Version":"2012-10-17", "Statement": [ { "Sid": "Allow Customer Profiles to publish messages to your queue", "Effect": "Allow", "Principal": { "Service": "profile.amazonaws.com" }, "Action": "sqs:SendMessage", "Resource": "arn:aws:sqs:us-east-1:111122223333:YourDeadLetterQueueName", "Condition": { "StringEquals": { "aws:SourceAccount": "111122223333", "aws:SourceArn": "arn:aws:profile:us-east-1:111122223333:domains/CustomerProfileDomainName" } } } ] }

示例 Connect 客户档案政策,用于保护身份解析流程中使用的 Amazon S3 存储桶

{ "Sid": "Allow Connect Customer 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/*" } } }

Connect 客户语音 ID 跨服务混淆副手预防

以下 Voice ID 示例显示了要应用的资源策略,以防范混淆座席问题。

JSON
{ "Version":"2012-10-17", "Statement": { "Sid": "ConfusedDeputyPreventionExamplePolicy", "Effect": "Allow", "Principal": { "Service": "voiceid.amazonaws.com" }, "Action": "sts:AssumeRole", "Condition": { "ArnEquals": { "aws:SourceArn": "arn:aws:voiceid:us-east-1:111122223333:domain/YourVoiceIDDomain" }, "StringEquals": { "aws:SourceAccount": "111122223333" } } } }

Connect 客户聊天消息流式传输跨服务混乱副手预防

以下 Connect Customer 示例显示了为防止混淆副手问题而应用的资源策略。

JSON
{ "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Principal":{ "Service":"connect.amazonaws.com" }, "Action":"sns:Publish", "Resource":"arn:aws:sns:us-east-1:111122223333:TopicName", "Condition":{ "StringEquals":{ "aws:SourceAccount":"111122223333" }, "ArnEquals":{ "aws:SourceArn":"arn:aws:connect:us-east-1:111122223333:instance/InstanceId" } } } ] }