ExitConfused Deputy Problem: source-bound resource policies1 / 9
Explanation

Trust the service—and check its origin

How supported aws:SourceArn and aws:SourceAccount conditions bind an AWS service principal’s resource access to the intended origin rather than trusting the intermediary’s identity alone. · associate

An AWS service can legitimately access your resource on someone else's behalf. The confused deputy problem arises when that service uses its trusted access for an unintended caller or source. The service can be correctly authenticated while the request is still associated with the wrong origin.

A service principal identifies the intermediary, such as s3.amazonaws.com. A destination's resource policy should also restrict the request's origin using supported source conditions. The diagram follows S3 event notifications through an SNS topic to an SQS queue; the bucket and topic are in the same Region.

Approved source account: 111111111111
Destination account: 222222222222
Event notificationNotification delivery
Amazon S3 bucketlesson-origin-events bucket; us-east-1
Amazon Simple Notification Service (Amazon SNS)origin-events topic; policy binds S3 bucket ARN and owner
Amazon Simple Queue Service (Amazon SQS)event-work queue; policy binds SNS topic ARN

1 / 4 The approved S3 bucket belongs to account 111111111111. Its event notification configuration selects the destination for notifications.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.