AWS machine-learning high security documentation change
Summary
Updated IAM policy example with proper JSON formatting, corrected policy version to 2012-10-17, and added explicit source account/ARN conditions
Security assessment
The change enforces IAM policy best practices for cross-service confused deputy prevention by explicitly validating aws:SourceAccount and aws:SourceArn. This directly addresses authorization risks by restricting access to specific resources.
Diff
diff --git a/machine-learning/latest/dg/cross-service-confused-deputy-prevention.md b/machine-learning/latest/dg/cross-service-confused-deputy-prevention.md index c81a9dbb5..5523f34f9 100644 --- a//machine-learning/latest/dg/cross-service-confused-deputy-prevention.md +++ b//machine-learning/latest/dg/cross-service-confused-deputy-prevention.md @@ -16,0 +17,6 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA +JSON + + +**** + + @@ -19 +25 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA - "Version": "2008-10-17", + "Version":"2012-10-17", @@ -23 +29,3 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA - "Principal": { "Service": "machinelearning.amazonaws.com" }, + "Principal": { + "Service": "machinelearning.amazonaws.com" + }, @@ -25 +33 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA - "Resource": "arn:aws:s3:::examplebucket/exampleprefix/*" + "Resource": "arn:aws:s3:::examplebucket/exampleprefix/*", @@ -27,2 +35,6 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA - "StringEquals": { "aws:SourceAccount": "123456789012" } - "ArnLike": { "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" } + "StringEquals": { + "aws:SourceAccount": "123456789012" + }, + "ArnLike": { + "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" + } @@ -33 +45,3 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA - "Principal": {"Service": "machinelearning.amazonaws.com"}, + "Principal": { + "Service": "machinelearning.amazonaws.com" + }, @@ -37,3 +51,8 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA - "StringLike": { "s3:prefix": "exampleprefix/*" } - "StringEquals": { "aws:SourceAccount": "123456789012" } - "ArnLike": { "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" } + "StringLike": { + "s3:prefix": "exampleprefix/*" + }, + "StringEquals": { + "aws:SourceAccount": "123456789012" + }, + "ArnLike": { + "aws:SourceArn": "arn:aws:machinelearning:us-east-1:123456789012:*" @@ -41 +59,0 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA - }] @@ -42,0 +61,4 @@ The following example shows how you can use the `aws:SourceArn` and `aws:SourceA + } + ] + } +