AWS AmazonRDS: Add Region-specific service principal guidance for RDS Windows Auth trust policy
Summary
Adds guidance and an example trust policy showing that some Regions require a Region-specific, engine-specific service principal (directoryservice-sqlserver.rds.<region>.amazonaws.com) instead of rds.amazonaws.com, and lists the affected Regions.
Security assessment
The change documents how to scope an IAM role trust policy for Windows Authentication, including the aws:SourceArn condition and the correct service principal per Region. Trust policy principals and SourceArn conditions are authorization controls that limit which resources can assume the role, so this is security-relevant IAM guidance, though it addresses configuration correctness rather than a specific disclosed vulnerability.
Evidence
For some AWS Regions, Directory Service requires a Region-specific, engine-specific service principal in the trust policy instead of the default `rds.amazonaws.com` principal. For these Regions, use `directoryservice-sqlserver.rds.`region-code`.amazonaws.com`.
Diff
diff --git a/AmazonRDS/latest/UserGuide/USER_SQLServerWinAuth.SettingUp.md b/AmazonRDS/latest/UserGuide/USER_SQLServerWinAuth.SettingUp.md index 13ba4b9..351f89d 100644 --- a//AmazonRDS/latest/UserGuide/USER_SQLServerWinAuth.SettingUp.md +++ b//AmazonRDS/latest/UserGuide/USER_SQLServerWinAuth.SettingUp.md @@ -188 +188 @@ You might use both global condition context keys and have the `aws:SourceArn` va -In the trust relationship, make sure to use the `aws:SourceArn` global condition context key with the full Amazon Resource Name (ARN) of the resources accessing the role. For Windows Authentication, make sure to include the DB instances, as shown in the following example. +In the trust relationship, make sure to use the `aws:SourceArn` global condition context key with the full Amazon Resource Name (ARN) of the resources accessing the role. For Windows Authentication, make sure to include the DB instances. In most AWS Regions, use the default service principal `rds.amazonaws.com` in the trust policy, as shown in the following example. @@ -219,0 +220,49 @@ JSON +For some AWS Regions, Directory Service requires a Region-specific, engine-specific service principal in the trust policy instead of the default `rds.amazonaws.com` principal. For these Regions, use `directoryservice-sqlserver.rds.`region-code`.amazonaws.com`. This requirement applies to the Regions in the following table, and to AWS Regions launched after these. For more information about opt-in Regions (Regions that are disabled by default), see [Managing AWS Regions](https://docs.aws.amazon.com/general/latest/gr/rande-manage.html). + +The following table lists the Regions that require a Region-specific service principal. + +Region name | Region code +---|--- +Asia Pacific (Taipei) | ap-east-2 +Asia Pacific (Malaysia) | ap-southeast-5 +Asia Pacific (New Zealand) | ap-southeast-6 +Asia Pacific (Thailand) | ap-southeast-7 +Canada West (Calgary) | ca-west-1 +Mexico (Central) | mx-central-1 + +The following JSON example shows a trust policy that uses a Region-specific service principal. Replace the Region code, account ID, and DB instance identifier with your own values. + +###### Example Region-specific service principal trust policy for Windows Authentication + + + { + "Version":"2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": "directoryservice-sqlserver.rds.aa-example-1.amazonaws.com" + }, + "Action": "sts:AssumeRole", + "Condition": { + "StringEquals": { + "aws:SourceArn": [ + "arn:aws:rds:aa-example-1:111122223333:db:db_instance_identifier" + ] + } + } + } + ] + } + +In the preceding example, replace the following values: + + * `aa-example-1` – The Region code of the Region where your DB instance is located, for example `ca-west-1`. + + * `111122223333` – Your AWS account ID. + + * `db_instance_identifier` – The identifier of your DB instance. + + + +