Cross-service confused deputy prevention
The confused deputy problem is a security issue where an entity that doesn’t have permission to perform an action can coerce a more-privileged entity to perform the action. In AWS, cross-service impersonation can result in the confused deputy problem. Cross-service impersonation can occur when one service (the calling service) calls another service (the called service). The calling service can be manipulated to use its permissions to act on another customer’s resources in a way it shouldn't otherwise have permission to access. To prevent this, AWS provides tools that help you protect your data for all services with service principals that have been given access to resources in your account.
We recommend using the aws:SourceArn
and aws:SourceAccount
global
condition context keys in resource policies to limit the permissions that Identity and Access
Management (IAM) gives Amazon Nimble Studio to access your resources. If you use both global condition
context keys, the aws:SourceAccount
value and the account in the
aws:SourceArn
value must use the same account id when used in the same policy
statement.
The value of aws:SourceArn
must be the studio’s ARN and
aws:SourceAccount
must be your account id. You won’t know what the studio id is
until the studio is created because it's generated by Nimble Studio. Once your studio is created, you
can update the trust policy with the final studio id set as the
aws:SourceArn
.
The most effective way to protect against the confused deputy problem is to use the
aws:SourceArn
global condition context key with the full ARN of the resource. If
you don’t know the full ARN of the resource or if you're specifying multiple resources, use the
aws:SourceArn
global context condition key with wildcards (*) for the unknown
portions of the ARN. For example, arn:aws:nimble::123456789012:*
.
Your end users assume your studio role when they sign in to the Nimble Studio portal. When you
create your studio, AWS configures the role and evaluates the policy. AWS evaluates the
policy every subsequent time one of your users logs in to the Nimble Studio portal. When you create a
studio, you can’t modify the aws:SourceArn
. After you finish creating your studio,
you can use your studioArn for the aws:SourceArn
.
The following example is an assume role policy that shows how you can use the
aws:SourceArn
and aws:SourceAccount
global condition context keys in
Nimble Studio to prevent the confused deputy problem.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "identity.nimble.amazonaws.com" }, "Action": [ "sts:AssumeRole", "sts:TagSession" ], "Condition": { "StringEquals": { "aws:SourceAccount": "123456789012" }, "StringLike": { "aws:SourceArn": "arn:aws:nimble:us-west-2:123456789012:studio/*" } } } ] }