fix(iam): check Aurora DSQL requests on the clusters they name, from the generated table (#9011)

Aurora DSQL was built by hand: ResourceArnBuilder read a cluster or
stream from its path, or a tagging route's ARN, IamEnforcementFilter
sent DSQL requests there without their operation, the request resources
table held no DSQL operation, and nothing gave a policy condition a
cluster's tags. dsql moves from HAND_BUILT to NAMESPACES, so the table
gives each operation the cluster or stream its path names, or the ARN
its modeled /tags/{resourceArn} carries, from botocore's REST model;
ListClusters, for which the Service Reference lists no resource type, is
checked on cluster/* from a MEASURED entry citing the AccessDenied
message AWS returned in #6328. ResourceArnBuilder's DSQL branch, with
the path and tagged-ARN helpers only it still used, and the filter's
DSQL case go, and the shared tags controller now serves DSQL's
tagging on its modeled route only, refusing the bare /tags. Only DSQL's
operations change in the table. DsqlStoredResourceArns answers a
cluster's stored tags; TagResource and UntagResource give the cluster a
new map under its lock, and its tags field is volatile.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-19 13:31:17 -04:00
1 parent ede9601b82
commit 66dbdd2935
12 files changed
+185 -94

No files matched your search

+7 -6
View File
@@ -2332,7 +2332,7 @@ requests retain HTTP 403 XML `AccessDenied` responses, except SNS's, which retur
action is denied. The routed protocol determines the status, not just the request's content type.
A request is checked against the resources it names. Floci builds their ARNs itself for S3,
DynamoDB, SSM, KMS, IAM, Resource Groups, Aurora DSQL, EKS, API Gateway, CloudWatch Logs
DynamoDB, SSM, KMS, IAM, Resource Groups, EKS, API Gateway, CloudWatch Logs
and STS. For Secrets Manager, Elastic Load Balancing, ECR,
Step Functions, EventBridge, EventBridge Scheduler, Amazon Cognito user pools and identity pools, Amazon Data Firehose, Cloud
Map, ACM, CodePipeline, CodeBuild, Amazon Managed Service for Apache Flink (Kinesis Data Analytics v2),
@@ -2341,7 +2341,7 @@ AWS Data Exports, AWS Pricing Calculator, Cost Explorer, CloudTrail, Global Acce
Timestream for InfluxDB, Amazon Redshift, the Amazon Redshift Data API, AWS Payment Cryptography, AWS DataSync, Amazon EMR,
Amazon Rekognition, IAM Identity Center, Amazon Inspector, Amazon Macie, AWS Fault Injection Service, AWS Resource
Access Manager, CloudWatch Observability Access Manager, AWS Resource Explorer, AWS Account Management, AWS Control
Catalog, Amazon OpenSearch Service, IAM Access Analyzer, AWS Security Hub, Amazon GuardDuty, Lambda, AWS Glue, Amazon SQS, Amazon SNS, Amazon Kinesis Data Streams and Amazon EventBridge Pipes they come from a table generated from AWS's Service Reference and botocore, `src/main/resources/aws/iam-request-resources.json`, which gives each
Catalog, Amazon OpenSearch Service, IAM Access Analyzer, AWS Security Hub, Amazon GuardDuty, Lambda, AWS Glue, Amazon SQS, Amazon SNS, Amazon Kinesis Data Streams, Amazon EventBridge Pipes and Aurora DSQL they come from a table generated from AWS's Service Reference and botocore, `src/main/resources/aws/iam-request-resources.json`, which gives each
operation's action, the resource types that action acts on with their ARN formats, and the request
members that name them: a member holding a resource's ARN, which counts when it matches the format
of a type the action acts on, or members filling the variables of a type's format. Nothing in it is
@@ -2532,8 +2532,9 @@ A Scheduler request is checked against `schedule/<group>/<name>`, the group from
names one, as botocore documents ("If you omit this, the default schedule group is used"), or
`schedule-group/<name>`, all from the generated table. Its tagging is checked on the group its modeled
`/tags/{ResourceArn}` carries, the ARN encoded as an SDK sends it. A Pipes request is checked against `pipe/<name>`, from the generated table. A DSQL request
is checked against `cluster/<id>`, `cluster/<id>/stream/<id>` for a stream, or the ARN a tagging
route names; `CreateCluster` and `ListClusters` against `cluster/*`, as DSQL checks them. A Lambda request
is checked against `cluster/<id>`, `cluster/<id>/stream/<id>` for a stream, or the ARN its modeled
`/tags/{resourceArn}` carries, from the generated table; `CreateCluster` and `ListClusters` against
`cluster/*`, as DSQL checks them, `ListClusters` from a measured entry. A Lambda request
is checked on what the table reads from it, as for the other services it reads. A function named by its
name, its ARN, a partial ARN (`123456789012:function:my-function`, its Region optional) or its resource
part (`function:my-function`) is the function of that name, an ARN keeping its account and Region beside
@@ -3536,8 +3537,8 @@ floci populates:
subscriptions, Security Hub for its hubs and configuration policies, Control Tower for its landing zones and enabled
controls, GuardDuty for its detectors and Malware Protection plans, Cloud Map for its namespaces and services, Elastic
Load Balancing for its load balancers, target groups, listeners and rules and its Classic Load Balancers, SQS for its
queues, SNS for its topics, Kinesis Data Streams for its streams and consumers and EventBridge Pipes for its pipes.
Tag keys differing only in case are one condition key holding every value.
queues, SNS for its topics, Kinesis Data Streams for its streams and consumers, EventBridge Pipes for its pipes and
Aurora DSQL for its clusters. Tag keys differing only in case are one condition key holding every value.
- EC2 resource keys such as a network interface's `ec2:Vpc`, `ec2:Subnet`, `ec2:AvailabilityZone` and
`ec2:NetworkInterfaceID`: for every action on a resource EC2 holds, the members of the resource the
key names, an ARN for a key the Service Reference types as one. `resourceKeys` in
@@ -1802,11 +1802,9 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
/**
* Logs, Secrets Manager and KMS targets depend on the serving operation and the request's partition, STS
* targets on the serving operation;
* DSQL targets on the request's partition, which that service mints its ARNs in, as are
* API Gateway's path ARNs; and the
* targets of a namespace the table of request resources reads on {@code operation}, the one the request is
* dispatched as (see {@link RequestResources}).
* targets on the serving operation; API Gateway's path ARNs on the request's partition, which that service mints
* them in; and the targets of a namespace the table of request resources reads on {@code operation}, the one the
* request is dispatched as (see {@link RequestResources}).
*/
private List<String> targetResources(String credentialScope, String action, String operation,
ContainerRequestContext ctx, String region, String accountId) {
@@ -1819,7 +1817,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
if ("sts".equals(credentialScope)) {
return arnBuilder.buildStsResources(action, ctx);
}
if ("dsql".equals(credentialScope) || "apigateway".equals(credentialScope)) {
if ("apigateway".equals(credentialScope)) {
return arnBuilder.buildResources(credentialScope, ctx, region, accountId, requestPartition());
}
// ARNs the table renders take the request's partition, which a Region Floci does not know cannot be mapped to.
@@ -59,10 +59,10 @@ import java.util.Optional;
* of a landing zone or an enabled control; GuardDuty, for the tags of a detector or a Malware Protection plan; Cloud
* Map, for the tags of a namespace or a service; Elastic Load Balancing, for the tags of a load balancer, a target
* group, a listener, a rule or a Classic Load Balancer; SQS, for the tags of a queue; SNS, for the tags of a topic;
* Kinesis Data Streams, for the tags of a stream or a consumer; EventBridge Pipes, for the tags of a pipe); looked up
* lazily by {@code ResourceArnBuilder} and {@code IamConditionContextResolver} through
* {@code Instance<StoredResourceArns>} for the namespace a request or an ARN is of, so IAM never depends on that
* service directly.</p>
* Kinesis Data Streams, for the tags of a stream or a consumer; EventBridge Pipes, for the tags of a pipe; Aurora DSQL,
* for the tags of a cluster); looked up lazily by {@code ResourceArnBuilder} and {@code IamConditionContextResolver}
* through {@code Instance<StoredResourceArns>} for the namespace a request or an ARN is of, so IAM never depends on
* that service directly.</p>
*
* <p>Each answer is a lookup of what the service holds, asked for by an entry of the generated table ({@code find},
* {@code through}, a default, {@code forwarded}, a type's {@code resourceTagKeys}): never a fact about what an operation acts on, which the table alone
@@ -350,22 +350,43 @@ public class DsqlService implements Resettable {
}
}
/**
* Gives the cluster a new map holding its tags and {@code tags}, under its lock, so a lookup that takes no lock
* reads one whole set.
*/
public void tagResource(String region, String arn, Map<String, String> tags) {
DsqlCluster cluster = clusterForArn(region, arn, "TagResource");
synchronized (lockFor(cluster.getArn())) {
cluster.getTags().putAll(tags == null ? Map.of() : tags);
Map<String, String> merged = new LinkedHashMap<>(cluster.getTags());
merged.putAll(tags == null ? Map.of() : tags);
cluster.setTags(merged);
clusters.put(key(cluster.getRegion(), cluster.getIdentifier()), cluster);
}
}
/** Gives the cluster a new map without {@code tagKeys}, under its lock, as {@link #tagResource}. */
public void untagResource(String region, String arn, List<String> tagKeys) {
DsqlCluster cluster = clusterForArn(region, arn, "UntagResource");
synchronized (lockFor(cluster.getArn())) {
(tagKeys == null ? List.<String>of() : tagKeys).forEach(cluster.getTags()::remove);
Map<String, String> remaining = new LinkedHashMap<>(cluster.getTags());
(tagKeys == null ? List.<String>of() : tagKeys).forEach(remaining::remove);
cluster.setTags(remaining);
clusters.put(key(cluster.getRegion(), cluster.getIdentifier()), cluster);
}
}
/**
* The tags of the cluster whose ARN is {@code arn} in {@code account}, read in place under the key the handlers
* read, its identifier in the ARN's Region, and matched on the whole ARN it records; none when there is no such
* cluster.
*/
Map<String, String> clusterTagsInAccount(String account, String arn, String identifier) {
return AccountAwareStorageBackend.readInAccount(clusters, account,
key(AwsArnUtils.parse(arn).region(), identifier))
.filter(cluster -> arn.equals(cluster.getArn()))
.map(DsqlCluster::getTags).orElse(Map.of());
}
/**
* Brings every cluster's database back when Floci starts with clusters in its storage, and
* finishes a deletion that a stop interrupted.
@@ -0,0 +1,61 @@
package io.floci.aws.services.dsql;
import io.floci.aws.core.common.AwsArnUtils;
import io.floci.aws.core.common.RegionResolver;
import io.floci.aws.core.common.StoredResourceArns;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/** IAM's lookup of the tags Aurora DSQL holds on a cluster, for the {@code dsql} namespace. */
@ApplicationScoped
public class DsqlStoredResourceArns implements StoredResourceArns {
private static final String NAMESPACE = "dsql";
private static final String CLUSTER = "cluster/";
private final DsqlService dsql;
private final RegionResolver regionResolver;
@Inject
public DsqlStoredResourceArns(DsqlService dsql, RegionResolver regionResolver) {
this.dsql = dsql;
this.regionResolver = regionResolver;
}
@Override
public String namespace() {
return NAMESPACE;
}
/** A request names a cluster by the identifier in its path, or by its ARN: nothing to find. */
@Override
public Optional<String> find(String type, List<String> names, String region) {
return Optional.empty();
}
/**
* The tags of the cluster whose ARN is {@code arn}, in the request's account, where the tag handlers read: an ARN
* of another account names none, and neither does a stream's, Floci holding no stream of its own. The cluster is
* read in place by its identifier, in the ARN's Region, and matched on the whole ARN it records. A tag without a
* value reads as an empty one. Tag calls give the cluster a new map, so the read is of one whole set.
*/
@Override
public Map<String, String> storedTags(String arn) {
if (!AwsArnUtils.isArnFor(arn, NAMESPACE)) {
return Map.of();
}
AwsArnUtils.Arn parsed = AwsArnUtils.parse(arn);
String account = regionResolver.getAccountId();
String resource = parsed.resource();
if (!parsed.accountId().equals(account) || !resource.startsWith(CLUSTER)
|| resource.indexOf('/', CLUSTER.length()) >= 0) {
return Map.of();
}
return StoredResourceArns.withEmptyValues(
dsql.clusterTagsInAccount(account, arn, resource.substring(CLUSTER.length())));
}
}
@@ -22,7 +22,7 @@ public class DsqlCluster {
private String status;
private Instant creationTime;
private boolean deletionProtectionEnabled;
private Map<String, String> tags = new LinkedHashMap<>();
private volatile Map<String, String> tags = new LinkedHashMap<>();
private String kmsEncryptionKey;
private String endpoint;
private String clientToken;
@@ -159,7 +159,7 @@ public class ResourceArnBuilder {
}
/**
* The resources a request is checked against. DSQL ARNs are minted in {@code partition}, the request's, as
* The resources a request is checked against. API Gateway ARNs are minted in {@code partition}, the request's, as
* that service mints its own, so a Region no partition publishes gets the deployment's partition rather than
* {@code aws}.
*/
@@ -188,7 +188,6 @@ public class ResourceArnBuilder {
case "dynamodb" -> buildDynamoDbArns(ctx, region, accountId);
case "iam" -> buildIamArns(ctx, region, accountId);
case "resource-groups" -> List.of(buildResourceGroupArn(ctx, region, accountId));
case "dsql" -> List.of(buildDsqlArn(path, ctx, region, accountId, partition));
case "eks" -> List.of(buildEksArn(path, ctx, region, accountId));
case "apigateway" -> List.of(buildApiGatewayArn(ctx, region, partition));
case "bedrock" -> List.of(buildBedrockArn(path, ctx));
@@ -934,29 +933,6 @@ public class ResourceArnBuilder {
}
}
/**
* The resource of an Aurora DSQL route, as the Service Authorization Reference names it: the cluster
* a cluster route names, the stream a stream route names (its cluster, to create or list streams), or
* the ARN a tagging route names. CreateCluster and ListClusters are checked against
* {@code cluster/*}, as DSQL checks them (measured).
*/
private String buildDsqlArn(String path, ContainerRequestContext ctx, String region, String accountId,
String partition) {
String cluster = "/cluster".equals(path) ? "*" : segmentAfterPrefix(path, "/cluster/");
if (cluster == null) {
cluster = segmentAfterPrefix(path, "/clusters/");
}
String streamCluster = segmentAfterPrefix(path, "/stream/");
if (streamCluster != null) {
String stream = segmentAfterPrefix(path, "/stream/" + streamCluster + "/");
cluster = stream == null ? streamCluster : streamCluster + "/stream/" + stream;
}
if (cluster != null) {
return new AwsArnUtils.Arn(partition, "dsql", region, accountId, "cluster/" + cluster).toString();
}
return taggedResource(ctx);
}
/**
* API Gateway authorizes a management call as its HTTP method on the path it names, in the Region serving
* it and with no account: {@code GET /restapis/abc/stages} acts on
@@ -1117,12 +1093,6 @@ public class ResourceArnBuilder {
.filter(arn -> region.equals(AwsArnUtils.regionOrDefault(arn, null)));
}
/** The ARN a shared tagging route names, or {@code *} for any other route. */
private String taggedResource(ContainerRequestContext ctx) {
String arn = taggedArn(ctx);
return AwsArnUtils.looksLikeArn(arn) ? arn : "*";
}
/**
* The ARN a shared tagging route acts on, read where its controller reads it: after {@code /tags/} or
* {@code /v1/tags/} in the path; on {@code POST /tags}, the body's {@code resourceArn}; and on the other
@@ -1158,17 +1128,6 @@ public class ResourceArnBuilder {
}
}
/** The path segment right after {@code prefix}, or null when the path doesn't start with it or names none. */
private static String segmentAfterPrefix(String path, String prefix) {
if (!path.startsWith(prefix)) {
return null;
}
String rest = path.substring(prefix.length());
int slash = rest.indexOf('/');
String segment = slash < 0 ? rest : rest.substring(0, slash);
return segment.isEmpty() ? null : segment;
}
// ── Bedrock ──────────────────────────────────────────────────────────────────
/**
@@ -1,11 +1,11 @@
{
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-19", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "route53": ["route53"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"handBuilt": ["apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kms", "logs", "resource-groups", "s3", "sts"],
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dsql": ["dsql"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "route53": ["route53"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"handBuilt": ["apigateway", "bedrock", "dynamodb", "eks", "iam", "kms", "logs", "resource-groups", "s3", "sts"],
"notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appsync": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "aps": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup:<id>:autoScalingGroupName/<name>`, while Floci mints `autoScalingGroup:<name>`, which other services (ECS capacity providers) read back; the mint is fixed first", "aws-marketplace": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "backup": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "batch": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "cloudwatch": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeartifact": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "codedeploy": "not read yet: the Service Reference gives an on-premises instance's ARN as `instance:${InstanceName}`, while the CodeDeploy permissions reference gives arn:aws:codedeploy:region:account-id:instance/instance-ID and AWS's GetOnPremisesInstance example answers instance/<name>_<id>, an id the service mints after the name; reading it needs that format corrected", "codeguru-reviewer": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "comprehend": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2-instance-connect": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticache": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticbeanstalk": "not read yet: an environment's ARN carries its application's name, `environment/<application>/<name>`, while most of its requests name it by EnvironmentName or EnvironmentId alone, so reading it needs the stored environment those find", "elasticfilesystem": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST rLine truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "ssmmessages", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"],
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:$Line truncated
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver-target": ["aws:ResourceTag/", "ec2:Line truncated
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:$Line truncated
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dsql": {"Cluster": ["aws:ResourceTag/"], "Stream": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver": ["aws:ResourceTag/", "ec2:ResLine truncated
"resourceKeys": {"ec2": {"capacity-reservation": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:CapacityReservationFleet": {"member": "CapacityReservationFleetId", "arn": "capacity-reservation-fleet"}, "ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:EndDateType": {"member": "EndDateType"}, "ec2:EphemeralStorage": {"member": "EphemeralStorage"}, "ec2:InstanceMatchCriteria": {"member": "InstanceMatchCriteria"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:Tenancy": {"member": "Tenancy"}}, "carrier-gateway": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "dhcp-options": {"ec2:DhcpOptionsID": {"member": "DhcpOptionsId"}}, "fpga-image": {"ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}}, "image": {"ec2:ImageID": {"member": "ImageId"}, "ec2:ImageType": {"member": "ImageType"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "instance": {"ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:InstanceID": {"member": "InstanceId"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "internet-gateway": {"ec2:InternetGatewayID": {"member": "InternetGatewayId"}}, "launch-template": {"ec2:LaunchTemplate": {"member": "LaunchTemplateId", "arn": "launch-template"}}, "network-acl": {"ec2:NetworkAclID": {"member": "NetworkAclId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "network-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:NetworkInterfaceID": {"member": "NetworkInterfaceId"}, "ec2:Subnet": {"member": "SubnetId", "arn": "subnet"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "reserved-instances": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:InstanceType": {"member": "InstanceType"}}, "route-table": {"ec2:RouteTableID": {"member": "RouteTableId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "secondary-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}}, "security-group": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "snapshot": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:SnapshotID": {"member": "SnapshotId"}, "ec2:VolumeSize": {"member": "VolumeSize"}}, "subnet": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:SubnetID": {"member": "SubnetId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "transit-gateway": {"ec2:transitGatewayId": {"member": "TransitGatewayId"}}, "transit-gateway-attachment": {"ec2:transitGatewayAttachmentId": {"member": "TransitGatewayAttachmentId"}}, "transit-gateway-connect-peer": {"ec2:transitGatewayConnectPeerId": {"member": "TransitGatewayConnectPeerId"}}, "transit-gateway-metering-policy": {"ec2:transitGatewayMeteringPolicyId": {"member": "TransitGatewayMeteringPolicyId"}}, "transit-gateway-multicast-domain": {"ec2:transitGatewayMulticastDomainId": {"member": "TransitGatewayMulticastDomainId"}}, "transit-gateway-policy-table": {"ec2:transitGatewayPolicyTableId": {"member": "TransitGatewayPolicyTableId"}}, "transit-gateway-route-table": {"ec2:transitGatewayRouteTableId": {"member": "TransitGatewayRouteTableId"}}, "transit-gateway-route-table-announcement": {"ec2:transitGatewayRouteTableAnnouncementId": {"member": "TransitGatewayRouteTableAnnouncementId"}}, "volume": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:KmsKeyId": {"member": "KmsKeyId"}, "ec2:VolumeID": {"member": "VolumeId"}, "ec2:VolumeInitializationRate": {"member": "VolumeInitializationRate"}, "ec2:VolumeType": {"member": "VolumeType"}}, "vpc": {"ec2:VpcID": {"member": "VpcId"}}, "vpc-peering-connection": {"ec2:VpcPeeringConnectionID": {"member": "VpcPeeringConnectionId"}}}},
"unqualified": {"ssm": ["parameter"], "states": ["statemachine"]},
"mintedIds": {"events": ["api-destination", "connection"]},
@@ -1022,6 +1022,22 @@
"datasync:UpdateLocationSmb": {"action": "datasync:UpdateLocationSmb", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"types": ["agent", "location"], "arn": "LocationArn"}]},
"datasync:UpdateTask": {"action": "datasync:UpdateTask", "types": ["task"], "resources": [{"types": ["task"], "arn": "TaskArn"}]},
"datasync:UpdateTaskExecution": {"action": "datasync:UpdateTaskExecution", "types": ["taskexecution"], "resources": [{"types": ["taskexecution"], "arn": "TaskExecutionArn"}]},
"dsql:CreateCluster": {"action": "dsql:CreateCluster", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {}}]},
"dsql:CreateStream": {"action": "dsql:CreateStream", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "clusterIdentifier"}}], "located": {"clusterIdentifier": "{clusterIdentifier}"}},
"dsql:DeleteCluster": {"action": "dsql:DeleteCluster", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "identifier"}}], "located": {"identifier": "{identifier}"}},
"dsql:DeleteClusterPolicy": {"action": "dsql:DeleteClusterPolicy", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "identifier"}}], "located": {"identifier": "{identifier}"}},
"dsql:DeleteStream": {"action": "dsql:DeleteStream", "types": ["Stream"], "resources": [{"type": "Stream", "fill": {"ClusterId": "clusterIdentifier", "StreamId": "streamIdentifier"}}], "located": {"clusterIdentifier": "{clusterIdentifier}", "streamIdentifier": "{streamIdentifier}"}},
"dsql:GetCluster": {"action": "dsql:GetCluster", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "identifier"}}], "located": {"identifier": "{identifier}"}},
"dsql:GetClusterPolicy": {"action": "dsql:GetClusterPolicy", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "identifier"}}], "located": {"identifier": "{identifier}"}},
"dsql:GetStream": {"action": "dsql:GetStream", "types": ["Stream"], "resources": [{"type": "Stream", "fill": {"ClusterId": "clusterIdentifier", "StreamId": "streamIdentifier"}}], "located": {"clusterIdentifier": "{clusterIdentifier}", "streamIdentifier": "{streamIdentifier}"}},
"dsql:GetVpcEndpointServiceName": {"action": "dsql:GetVpcEndpointServiceName", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "identifier"}}], "located": {"identifier": "{identifier}"}},
"dsql:ListClusters": {"action": "dsql:ListClusters", "types": [], "resources": [{"type": "Cluster", "fill": {}}]},
"dsql:ListStreams": {"action": "dsql:ListStreams", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "clusterIdentifier"}}], "located": {"clusterIdentifier": "{clusterIdentifier}"}},
"dsql:ListTagsForResource": {"action": "dsql:ListTagsForResource", "types": ["Cluster", "Stream"], "resources": [{"types": ["Cluster", "Stream"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}},
"dsql:PutClusterPolicy": {"action": "dsql:PutClusterPolicy", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "identifier"}}], "located": {"identifier": "{identifier}"}},
"dsql:TagResource": {"action": "dsql:TagResource", "types": ["Cluster", "Stream"], "resources": [{"types": ["Cluster", "Stream"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}},
"dsql:UntagResource": {"action": "dsql:UntagResource", "types": ["Cluster", "Stream"], "resources": [{"types": ["Cluster", "Stream"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}},
"dsql:UpdateCluster": {"action": "dsql:UpdateCluster", "types": ["Cluster"], "resources": [{"type": "Cluster", "fill": {"Identifier": "identifier"}}], "located": {"identifier": "{identifier}"}},
"dynamodb:ListTables": {"action": "dynamodb:ListTables", "types": [], "resources": [{"type": "table", "fill": {}}]},
"ec2:AcceptAddressTransfer": {"action": "ec2:AcceptAddressTransfer", "types": ["elastic-ip"], "resources": []},
"ec2:AcceptCapacityReservationBillingOwnership": {"action": "ec2:AcceptCapacityReservationBillingOwnership", "types": ["capacity-reservation"], "resources": [{"type": "capacity-reservation", "fill": {"CapacityReservationId": "CapacityReservationId"}}]},
@@ -148,12 +148,13 @@ class DsqlClusterPolicyIntegrationTest {
as(user).urlEncodingEnabled(false).body(Map.of("tags", Map.of("team", "data"))).post(tagsPath)
.then().statusCode(403);
as(user).urlEncodingEnabled(false).get(tagsPath).then().statusCode(403);
// The same tagging is served at /tags, naming the ARN in the query or the body.
// The bare /tags is no route of DSQL's model, as AWS gives it none: it is refused as an ARN that path does
// not serve, naming the ARN in the query or the body.
as(user).body(Map.of("resourceArn", cluster.arn(), "tags", Map.of("team", "data"))).post("/tags")
.then().statusCode(403);
as(user).queryParam("resourceArn", cluster.arn()).get("/tags").then().statusCode(403);
.then().statusCode(400).body("message", equalTo("Invalid resource ARN: " + cluster.arn()));
as(user).queryParam("resourceArn", cluster.arn()).get("/tags").then().statusCode(400);
as(user).queryParam("resourceArn", cluster.arn()).queryParam("tagKeys", "team").delete("/tags")
.then().statusCode(403);
.then().statusCode(400);
as(user).get(vpcEndpointPath).then().statusCode(403);
// The calls the policy does not name answer.
as(user).get(clusterPath + "/policy").then().statusCode(200);
@@ -134,6 +134,28 @@ class DsqlServiceTest {
assertEquals(0, service.listClusters(REGION, null, null).clusters().size());
}
@Test
void iamReadsTheTagsTheClusterItsArnNamesHoldsInTheRequestsAccount() {
DsqlStoredResourceArns stored = new DsqlStoredResourceArns(service, new RegionResolver(REGION, ACCOUNT));
DsqlCluster cluster = service.createCluster(REGION, false, null, Map.of("team", "data"), null, null, null,
null, false);
String arn = cluster.getArn();
assertEquals(Map.of("team", "data"), stored.storedTags(arn));
service.tagResource(REGION, arn, Map.of("env", "test"));
service.untagResource(REGION, arn, List.of("team"));
assertEquals(Map.of("env", "test"), stored.storedTags(arn));
// Another account's cluster, another Region's, a stream of the cluster or a cluster Floci does not hold
// names no tags Floci holds.
String id = cluster.getIdentifier();
assertEquals(Map.of(), stored.storedTags("arn:aws:dsql:" + REGION + ":444455556666:cluster/" + id));
assertEquals(Map.of(), stored.storedTags("arn:aws:dsql:eu-west-2:" + ACCOUNT + ":cluster/" + id));
assertEquals(Map.of(), stored.storedTags(arn + "/stream/s1"));
assertEquals(Map.of(), stored.storedTags("arn:aws:dsql:" + REGION + ":" + ACCOUNT
+ ":cluster/aaaaaaaaaaaaaaaaaaaaaaaaaa"));
assertEquals(Map.of(), stored.storedTags("arn:aws:sqs:" + REGION + ":" + ACCOUNT + ":cluster/" + id));
}
@Test
void aTagCallRefusesWhatIsNoClusterOfTheRegion() {
DsqlCluster cluster = cluster();
@@ -2358,35 +2358,41 @@ class ResourceArnBuilderTest {
AwsRegions.partitionFor(region)).getFirst();
}
/**
* An Aurora DSQL route is checked on the cluster or stream its path names, or the ARN its tagging route names,
* from the table; CreateCluster and ListClusters on every cluster, as DSQL checks them (measured).
*/
@Test
void dsqlRoutesResolveTheClusterTheTaggedArnOrNone() {
void dsqlRoutesResolveTheClusterTheStreamOrTheTaggedArn() {
String cluster = "arn:aws:dsql:eu-west-1:000000000000:cluster/abcdefghijklmnopqrstuvwxyz";
for (String path : List.of("/cluster/abcdefghijklmnopqrstuvwxyz", "/cluster/abcdefghijklmnopqrstuvwxyz/policy",
"/clusters/abcdefghijklmnopqrstuvwxyz/vpc-endpoint-service-name", "/tags/" + cluster)) {
when(uriInfo.getPath()).thenReturn(path);
assertEquals(List.of(cluster), builder.buildResources("dsql", ctx, "eu-west-1", "000000000000"), path);
}
// The same tagging is served at /tags, the ARN in the resourceArn query parameter or body field.
when(uriInfo.getPath()).thenReturn("/tags");
queryParams.putSingle("resourceArn", cluster);
assertEquals(List.of(cluster), builder.buildResources("dsql", ctx, "eu-west-1", "000000000000"));
queryParams.clear();
when(ctx.getMethod()).thenReturn("POST");
setJsonBody("{\"resourceArn\":\"" + cluster + "\",\"tags\":{}}");
assertEquals(List.of(cluster), builder.buildResources("dsql", ctx, "eu-west-1", "000000000000"));
when(ctx.getMethod()).thenReturn("GET");
request("/cluster/abcdefghijklmnopqrstuvwxyz");
assertEquals(List.of(cluster), dsql("dsql:GetCluster", "eu-west-1", "aws"));
request("/cluster/abcdefghijklmnopqrstuvwxyz/policy");
assertEquals(List.of(cluster), dsql("dsql:GetClusterPolicy", "eu-west-1", "aws"));
request("/clusters/abcdefghijklmnopqrstuvwxyz/vpc-endpoint-service-name");
assertEquals(List.of(cluster), dsql("dsql:GetVpcEndpointServiceName", "eu-west-1", "aws"));
request("/tags/" + cluster.replace(":", "%3A").replace("/", "%2F"));
assertEquals(List.of(cluster), dsql("dsql:ListTagsForResource", "eu-west-1", "aws"));
// A stream route names the stream, or its cluster to create or list streams.
when(uriInfo.getPath()).thenReturn("/stream/abcdefghijklmnopqrstuvwxyz");
assertEquals(List.of(cluster), builder.buildResources("dsql", ctx, "eu-west-1", "000000000000"));
when(uriInfo.getPath()).thenReturn("/stream/abcdefghijklmnopqrstuvwxyz/s1");
assertEquals(List.of(cluster + "/stream/s1"), builder.buildResources("dsql", ctx, "eu-west-1", "000000000000"));
// CreateCluster and ListClusters are checked against every cluster, as DSQL checks them (measured).
when(uriInfo.getPath()).thenReturn("/cluster");
request("/stream/abcdefghijklmnopqrstuvwxyz");
assertEquals(List.of(cluster), dsql("dsql:ListStreams", "eu-west-1", "aws"));
request("/stream/abcdefghijklmnopqrstuvwxyz/s1");
assertEquals(List.of(cluster + "/stream/s1"), dsql("dsql:GetStream", "eu-west-1", "aws"));
request("/cluster");
assertEquals(List.of("arn:aws:dsql:eu-west-1:000000000000:cluster/*"),
builder.buildResources("dsql", ctx, "eu-west-1", "000000000000"));
when(uriInfo.getPath()).thenReturn("/cluster/abcdefghijklmnopqrstuvwxyz");
dsql("dsql:ListClusters", "eu-west-1", "aws"));
when(ctx.getMethod()).thenReturn("POST");
assertEquals(List.of("arn:aws:dsql:eu-west-1:000000000000:cluster/*"),
dsql("dsql:CreateCluster", "eu-west-1", "aws"));
when(ctx.getMethod()).thenReturn("GET");
request("/cluster/abcdefghijklmnopqrstuvwxyz");
assertEquals(List.of("arn:aws-cn:dsql:polygondwanaland-west-1:000000000000:cluster/abcdefghijklmnopqrstuvwxyz"),
builder.buildResources("dsql", ctx, "polygondwanaland-west-1", "000000000000", "aws-cn"));
dsql("dsql:GetCluster", "polygondwanaland-west-1", "aws-cn"));
}
private List<String> dsql(String operation, String region, String partition) {
return builder.buildResources("dsql", operation, ctx, region, "000000000000", partition);
}
@Test
+8 -2
View File
@@ -294,10 +294,10 @@ NAMESPACES = ("access-analyzer", "account", "acm", "application-autoscaling", "a
"rekognition", "resource-explorer-2", "route53", "s3tables", "s3vectors", "servicediscovery",
"servicequotas", "ssm", "sso", "states", "textract", "timestream-influxdb", "translate", "signer", "xray",
"securityhub", "guardduty", "secretsmanager", "scheduler", "lambda", "cloudformation", "glue",
"sqs", "sns", "kinesis", "pipes")
"sqs", "sns", "kinesis", "pipes", "dsql")
# The namespaces whose resources ResourceArnBuilder builds itself.
HAND_BUILT = ("apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kms", "logs", "resource-groups",
HAND_BUILT = ("apigateway", "bedrock", "dynamodb", "eks", "iam", "kms", "logs", "resource-groups",
"s3", "sts")
# Operations of a namespace in `HAND_BUILT` read from the reference all the same, each with its reason.
@@ -367,6 +367,12 @@ _SNAPSHOT_KEY_EVIDENCE = (
"customer managed key, a user must have permission to call the following operations on the customer managed key', "
"kms:Decrypt among them; the Service Reference lists no KMS action for either restore")
MEASURED: dict[str, tuple[list[dict], str]] = {
"dsql:ListClusters": (
[{"type": "Cluster", "fill": {}}],
"AWS's AccessDenied message recorded verbatim in https://github.com/floci-io/floci/pull/6328 (Aurora DSQL, "
"eu-west-1, 2026-10-23): a session policy denying dsql:CreateCluster and dsql:ListClusters refused both "
"'... on resource: arn:aws:dsql:eu-west-1:<account>:cluster/* with an explicit deny in a session policy'; the "
"Service Reference lists no resource type for ListClusters"),
"dynamodb:ListTables": (
[{"type": "table", "fill": {}}],
"real AWS probes in https://github.com/floci-io/floci/pull/7336 (27 policy cases with real AWS STS role "