AWS aurora-dsql: Correct Aurora DSQL resource policy examples (Deny + StringNotEquals, Resource *)
Summary
Adds a note that cluster policies must use "Resource": "*", replaces hardcoded cluster ARNs with "*", adds the dsql:DbConnectAdmin action alongside dsql:DbConnect, and rewrites the multi-Region example so the second Region uses Effect: Deny with a StringNotEquals condition on aws:SourceVpc instead of an Allow with StringEquals/Null. Also clarifies that a StringNotEquals condition on aws:SourceVpc blocks non-VPC (public internet) connections.
Security assessment
The prior multi-Region sample used Effect: Allow with StringEquals aws:SourceVpc, a pattern that could be copied into a real cluster policy and fail to actually restrict connections to a VPC; the change to Deny + StringNotEquals (which also matches requests lacking aws:SourceVpc, i.e. public internet) makes the documented network-access control correct. The Resource ARN to "*" and added DbConnectAdmin action affect IAM authorization scoping in the examples. This is a documentation-correctness fix, not evidence of a specific disclosed vulnerability or incident.
Evidence
+ "StringNotEquals": {
Diff
diff --git a/aurora-dsql/latest/userguide/rbp-examples.md b/aurora-dsql/latest/userguide/rbp-examples.md index 4d33637..daf0404 100644 --- a//aurora-dsql/latest/userguide/rbp-examples.md +++ b//aurora-dsql/latest/userguide/rbp-examples.md @@ -12,0 +13,4 @@ These examples show common patterns for controlling access to your Aurora DSQL c +###### Note + +Use `"Resource": "*"` in cluster policies. In a cluster policy, `*` means the cluster that has the policy. If a statement names a different cluster's ARN, such as one copied from a peered cluster in another AWS Region, the statement doesn't apply. When you create a cluster with a policy, you also can't name the cluster's ARN, because the cluster doesn't have one yet. + @@ -15 +19 @@ These examples show common patterns for controlling access to your Aurora DSQL c -This policy blocks connections to your Aurora DSQL clusters from the public internet (non-VPC). The policy doesn't specify which VPC customers can connect from—only that they must connect from a VPC. To limit access to a specific VPC, use `aws:SourceVpc` with the `StringEquals` condition operator. +This policy blocks connections to your Aurora DSQL clusters from the public internet (non-VPC). The policy doesn't restrict which VPC your connections come from, only that they come from a VPC. To limit access to a specific VPC, use a `StringNotEquals` condition on `aws:SourceVpc` instead, as in Multi-Region cluster policies. This condition also blocks connections from the public internet, because they don't include `aws:SourceVpc`. @@ -93 +97 @@ This policy restricts access to principals within an AWS Organization: - "Resource": "arn:aws:dsql:us-east-1:123456789012:cluster/mydsqlclusterid0123456789a", + "Resource": "*", @@ -117 +121,2 @@ This policy restricts access to principals within a specific Organizational Unit - "dsql:DbConnect" + "dsql:DbConnect", + "dsql:DbConnectAdmin" @@ -119 +124 @@ This policy restricts access to principals within a specific Organizational Unit - "Resource": "arn:aws:dsql:us-east-1:123456789012:cluster/mydsqlclusterid0123456789a", + "Resource": "*", @@ -131 +136 @@ This policy restricts access to principals within a specific Organizational Unit -For multi-Region clusters, each regional cluster maintains its own resource policy, allowing for Region-specific controls. Here's an example with different policies per region: +For multi-Region clusters, each regional cluster maintains its own resource policy, allowing for Region-specific controls. In the following example, each policy denies connections that don't come from a specific VPC in its Region: @@ -146 +151,2 @@ _us-east-1 policy:_ - "dsql:DbConnect" + "dsql:DbConnect", + "dsql:DbConnectAdmin" @@ -151,3 +156,0 @@ _us-east-1 policy:_ - }, - "Null": { - "aws:SourceVpc": "true" @@ -167 +170 @@ _us-east-2 policy:_ - "Effect": "Allow", + "Effect": "Deny", @@ -173 +176,2 @@ _us-east-2 policy:_ - "dsql:DbConnect" + "dsql:DbConnect", + "dsql:DbConnectAdmin" @@ -176 +180 @@ _us-east-2 policy:_ - "StringEquals": { + "StringNotEquals": {