fix(iam): check RDS Data and Resource Groups by their generated routes, the last hand rules gone (#9636)

IamActionRegistry kept 12 hand route rules: six for RDS Data, five for Resource Groups and a catch-all for Kinesis. RDS Data and Resource Groups now have their botocore routes vendored, and RDS Data joins the namespaces whose request resources are read, its model being what kept it out. Resource Groups' requests were already read, and the routes match them on the model's own path, without the /_rg prefix its route filter moves them under.

RDS Data's rules gave the action alone, so a statement was checked on every resource and a grant scoped to a cluster refused it even on that cluster. It is checked on the cluster its resourceArn names now, as AWS does. A secret's ARN is no cluster's, and a commit, a rollback and a statement inside a transaction now read their request's secret as every other call already did, refusing one Secrets Manager cannot read (SecretsErrorException, which AWS models on them), so a cluster's ARN given as the secret cannot stand in for the database the call runs on. A statement on a DB instance, which Floci serves and AWS's Data API does not, names no resource the check reads, so it is checked on *.

The authorized actions list RDS Data and Resource Groups among the routed scopes.

The Kinesis rule checked any POST with no X-Amz-Target as kinesis:*, an action no policy grants by name. Kinesis serves no such request, so it goes, as the rule machinery does, no rule being left.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-27 22:08:21 -04:00
1 parent d87aa9de1c
commit 489a6ffc7d
15 files changed
+211 -137

No files matched your search

@@ -403,7 +403,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
return;
}
// Normalise signing aliases (s3express → s3) before anything keyed by scope runs:
// action rules, ARN building and condition keys all match the canonical name, so an
// action routes, ARN building and condition keys all match the canonical name, so an
// alias would resolve to no action and be allowed through without any policy check.
String claimedScope = catalog.canonicalCredentialScope(rawScope);
ResolvedOperation resolvedOperation = operationResolver.resolve(auth, claimedScope, ctx, resourceInfo);
@@ -422,7 +422,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
return;
}
if (!isRpcCall(ctx)) {
return; // REST route no rule maps → ALLOW, as an unsigned REST request is
return; // REST route that maps no action → ALLOW, as an unsigned REST request is
}
}
@@ -109,7 +109,7 @@ public class RequestOperationResolver {
/**
* The action a REST request's matched route maps to, read from the route alone. Null for any
* other request, and for a route no rule maps.
* other request, and for a route that maps no action.
*/
ResolvedOperation restRoute(ContainerRequestContext ctx, ResourceInfo resourceInfo) {
if (!(ctx.getProperty(AwsProtocolClaimFilter.CLAIM_PROPERTY) instanceof ProtocolClaim claim)
@@ -128,8 +128,8 @@ public class RequestOperationResolver {
/**
* A shared tagging route hands the request to the service its ARN names, so it is checked as that
* service whatever scope it is signed with. A service with no rule for the route leaves it unchecked, as
* any route no rule maps; an ARN naming no service Floci serves, which the controller refuses, is left
* service whatever scope it is signed with. A service whose routes map no action for it leaves it unchecked,
* as any route that maps none; an ARN naming no service Floci serves, which the controller refuses, is left
* to the signing scope.
*/
private ResolvedOperation taggedServiceOperation(ContainerRequestContext ctx, ResourceInfo resourceInfo) {
@@ -219,7 +219,7 @@ public class RequestOperationResolver {
* The scope and action a request is authorized as, and the operation it calls as
* {@code <namespace>:<Operation>}, which differs from the action for one AWS authorizes under another name.
* A modeled REST route retains its operation when AWS authorizes it under another action name. The action is
* {@code null} when no rule maps the request, and so is the operation when nothing names one.
* {@code null} when nothing maps the request, and so is the operation when nothing names one.
*/
public record ResolvedOperation(String credentialScope, String action, String operation) {
ResolvedOperation(String credentialScope, String action) {
@@ -26,7 +26,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Pattern;
/**
* Maps (credentialScope, httpMethod, requestPath) → IAM action string.
@@ -35,9 +34,8 @@ import java.util.regex.Pattern;
* parameter, or the controller's Operation fallback, is mapped directly to
* {@code <service>:<Action>}.
*
* For REST-JSON services the first matching rule wins (specific before wildcard), and a request no
* rule matches is the operation whose route in botocore's model it matches ({@link IamRestRoutes}),
* when Floci can check that operation as AWS does.
* For REST-JSON services a request is the operation whose route in botocore's model it matches
* ({@link IamRestRoutes}), when Floci can check that operation as AWS does.
*/
@ApplicationScoped
public class IamActionRegistry {
@@ -54,55 +52,6 @@ public class IamActionRegistry {
this.restRoutes = restRoutes;
}
/**
* A route and the action it is checked as. A rule naming a query parameter matches only a request
* carrying it with that value, as {@code GET /layers?find=LayerVersion} is GetLayerVersionByArn
* where {@code GET /layers} is ListLayers.
*/
private record ActionRule(String service, String method, Pattern pathPattern, String queryParameter,
String queryValue, String action) {
boolean matches(String scope, String requestMethod, String path, ContainerRequestContext ctx) {
return service.equals(scope) && method.equals(requestMethod) && pathPattern.matcher(path).find()
&& (queryParameter == null
|| queryValue.equals(ctx.getUriInfo().getQueryParameters().getFirst(queryParameter)));
}
}
/** The routes the registry checks as an action of its own, each a rule of the scope it serves. */
private static final List<ActionRule> RULES = List.of(
// ── DynamoDB (JSON 1.1, action from X-Amz-Target handled separately) ──
// Handled via Query-style action extraction in the filter
// ── RDS Data API ───────────────────────────────────────────────────────
rule("rds-data", "POST", "^/Execute/?$", "rds-data:ExecuteStatement"),
rule("rds-data", "POST", "^/ExecuteSql/?$", "rds-data:ExecuteSql"),
rule("rds-data", "POST", "^/BatchExecute/?$", "rds-data:BatchExecuteStatement"),
rule("rds-data", "POST", "^/BeginTransaction/?$", "rds-data:BeginTransaction"),
rule("rds-data", "POST", "^/CommitTransaction/?$", "rds-data:CommitTransaction"),
rule("rds-data", "POST", "^/RollbackTransaction/?$", "rds-data:RollbackTransaction"),
// ── Resource Groups ─────────────────────────────────────────────────────
rule("resource-groups", "POST", "^/_rg/groups/?$", "resource-groups:CreateGroup"),
rule("resource-groups", "POST", "^/_rg/get-group/?$", "resource-groups:GetGroup"),
rule("resource-groups", "POST", "^/_rg/delete-group/?$", "resource-groups:DeleteGroup"),
rule("resource-groups", "POST", "^/_rg/group-resources/?$", "resource-groups:GroupResources"),
rule("resource-groups", "POST", "^/_rg/list-group-resources/?$", "resource-groups:ListGroupResources"),
// ── Kinesis ────────────────────────────────────────────────────────────
rule("kinesis", "POST", ".*", "kinesis:*")
);
private static ActionRule rule(String service, String method, String path, String action) {
return rule(service, method, path, null, null, action);
}
private static ActionRule rule(String service, String method, String path, String queryParameter,
String queryValue, String action) {
return new ActionRule(service, method, Pattern.compile(path, Pattern.CASE_INSENSITIVE), queryParameter,
queryValue, action);
}
/**
* Whether the request is an S3 Control one: the route it matches is the {@code s3control} model's. A denial then
* answers in S3 Control's own REST-XML envelope, the only one the s3control SDK deserializers read (issue #557),
@@ -128,13 +77,13 @@ public class IamActionRegistry {
* For JSON 1.1 protocol the action comes from {@code X-Amz-Target}
* (e.g. {@code DynamoDB_20120810.PutItem} → {@code dynamodb:PutItem}).
*
* For REST-JSON services the action is derived from the path rule table, or else from the
* operation whose botocore route the request matches.
* For REST-JSON services the action is that of the operation whose botocore route the request
* matches.
*
* Returns {@code null} when the action is unknown (caller treats this as ALLOW).
*/
public String resolve(String credentialScope, ContainerRequestContext ctx) {
// REST requests with Action or Operation fields still use their method and path rules.
// REST requests with Action or Operation fields are still checked by their method and path.
if (isQueryRequest(ctx)) {
String queryAction = queryAction(ctx);
if (queryAction != null && !queryAction.isBlank()) {
@@ -177,16 +126,25 @@ public class IamActionRegistry {
return IamAuthorizedActions.actionFor(iamOperation.namespace(), iamOperation.operation());
}
/**
* The scope a request Floci serves under {@code credentialScope} is checked under: the signing name AWS signs its
* model's requests with, where the scope is a vendored model's own name the routes file does not route
* ({@link IamRestRoutes#signedScope}), and the scope itself otherwise.
*/
public String routedScope(String credentialScope) {
return restRoutes.signedScope(credentialScope);
}
/**
* The action of a REST request, from its method and path alone. A REST request is the operation
* whose route it reached, so neither an {@code X-Amz-Target} header nor a Query {@code Action}
* field may name another one: a caller could attach either to have the call checked as an
* action they hold. The path is matched as sent, still percent-encoded, which is the form the
* router matched: decoded, an encoded {@code /} inside a parameter splits it into two segments,
* so the route's rule would not match and the call would pass as an unknown action. It is read
* so its route would not match and the call would pass as an unknown action. It is read
* from the request URI because RESTEasy Reactive does not serve {@code UriInfo.getPath(false)}.
*
* <p>A request no rule matches is the operation whose route, in botocore's model of its service, it
* <p>The request is the operation whose route, in botocore's model of its service, it
* matches, and is checked as that operation's action for the request's method
* ({@link IamAuthorizedActions#actionFor(String, String, String)}): the one a request naming the operation
* is checked as, or, for an operation AWS authorizes by method as it does API Gateway's management API,
@@ -196,27 +154,12 @@ public class IamActionRegistry {
* path without the prefix ({@link #withoutInternalPrefix}), the path the model gives it. Returns {@code null}
* when nothing maps the request (caller treats this as ALLOW).
*/
/**
* The scope a request Floci serves under {@code credentialScope} is checked under: the signing name AWS signs its
* model's requests with, where the scope is a vendored model's own name the routes file does not route
* ({@link IamRestRoutes#signedScope}), and the scope itself otherwise.
*/
public String routedScope(String credentialScope) {
return restRoutes.signedScope(credentialScope);
}
public String resolveRoute(String credentialScope, ContainerRequestContext ctx) {
String method = ctx.getMethod().toUpperCase();
// Matched on the path the router dispatched on, as every scope is: S3 too, whose key of slashes alone
// S3SlashOnlyKeyFilter rewrites escaped (PUT /bucket// writes the key "/"), and whose own reading of a key,
// which keeps the slashes it was sent with, names the object (RequestPathLabels).
String path = routedPath(ctx);
for (ActionRule rule : RULES) {
if (rule.matches(credentialScope, method, path, ctx)) {
return rule.action();
}
}
MultivaluedMap<String, String> query = ctx.getUriInfo() == null ? null : ctx.getUriInfo().getQueryParameters();
Optional<IamRestRoutes.Match> match = restRoutes.match(credentialScope, method, withoutInternalPrefix(ctx, path),
query, movedUnderPrefix(ctx), ctx.getHeaders(), routedLabels(ctx));
@@ -396,7 +339,7 @@ public class IamActionRegistry {
/**
* {@link #rawPath} without a trailing slash: the router matches {@code /clusters/} as {@code /clusters},
* so a rule ending at the route's last segment has to match it too, or the request would pass as an
* so a route ending at its last segment has to match it too, or the request would pass as an
* unknown action.
*/
static String routedPath(ContainerRequestContext ctx) {
@@ -25,8 +25,8 @@ import java.util.regex.Pattern;
/**
* The routes of the REST operations botocore models, read once from the vendored {@code aws/rest-routes.json}:
* the operation a REST request is, from its method, its path and the query its route requires, for a request
* {@link IamActionRegistry}'s rules give no action.
* the operation a REST request is, from its method, its path and the query its route requires, which
* {@link IamActionRegistry} checks it as.
*
* <p>A route is its operation's {@code requestUri}: literal segments, a {@code {label}} taking one segment, and a
* greedy {@code {label+}} taking the rest of the path, and a query it names ({@code ?tagging},
@@ -262,9 +262,10 @@ public class RdsDataService implements Resettable {
public ObjectNode commitTransaction(JsonNode request, String region) {
String transactionId = requiredText(request, "transactionId");
String resourceArn = requiredText(request, "resourceArn");
requiredText(request, "secretArn");
String secretArn = requiredText(request, "secretArn");
TransactionContext tx = transaction(transactionId);
validateTransactionResource(tx, resourceArn, region);
secretCredentials(secretArn, region);
acquireTransaction(tx);
try {
requireActiveTransaction(transactionId, tx);
@@ -289,9 +290,10 @@ public class RdsDataService implements Resettable {
public ObjectNode rollbackTransaction(JsonNode request, String region) {
String transactionId = requiredText(request, "transactionId");
String resourceArn = requiredText(request, "resourceArn");
requiredText(request, "secretArn");
String secretArn = requiredText(request, "secretArn");
TransactionContext tx = transaction(transactionId);
validateTransactionResource(tx, resourceArn, region);
secretCredentials(secretArn, region);
acquireTransaction(tx);
try {
requireActiveTransaction(transactionId, tx);
@@ -316,12 +318,13 @@ public class RdsDataService implements Resettable {
private ObjectNode onTargetConnection(JsonNode request, String region, ConnectionWork work)
throws SQLException {
String resourceArn = requiredText(request, "resourceArn");
requiredText(request, "secretArn");
String secretArn = requiredText(request, "secretArn");
String transactionId = textOrNull(request, "transactionId");
if (transactionId != null && !transactionId.isBlank()) {
TransactionContext tx = transaction(transactionId);
validateTransactionIdentity(tx, request, region);
secretCredentials(secretArn, region);
acquireTransaction(tx);
try {
requireActiveTransaction(transactionId, tx);
@@ -667,23 +670,32 @@ public class RdsDataService implements Resettable {
private DatabaseSecretCredentials credentials(JsonNode request, RdsDataResourceResolver.DatabaseTarget target, String region) {
String secretArn = textOrNull(request, "secretArn");
if (secretArn != null && !secretArn.isBlank()) {
SecretVersion secret;
try {
secret = secretsManagerService.getSecretValue(secretArn, null, null, region);
} catch (AwsException e) {
throw new AwsException("SecretsErrorException", e.getMessage(), 400);
}
DatabaseSecretCredentials fromSecret = parseSecretCredentials(secret.getSecretString());
if (fromSecret != null) {
return fromSecret;
}
throw new AwsException("InvalidSecretException",
"The secret must contain username and password fields.", 400);
return secretCredentials(secretArn, region);
}
String username = target.username() != null && !target.username().isBlank() ? target.username() : "root";
return new DatabaseSecretCredentials(username, target.password());
}
/**
* The credentials the secret holds. Every call reads its request's secret, a commit, a rollback and a statement
* inside a transaction too, which run on the connection the transaction opened: one Secrets Manager cannot read
* is refused ({@code SecretsErrorException}), as is one holding no username and password.
*/
private DatabaseSecretCredentials secretCredentials(String secretArn, String region) {
SecretVersion secret;
try {
secret = secretsManagerService.getSecretValue(secretArn, null, null, region);
} catch (AwsException e) {
throw new AwsException("SecretsErrorException", e.getMessage(), 400);
}
DatabaseSecretCredentials fromSecret = parseSecretCredentials(secret.getSecretString());
if (fromSecret != null) {
return fromSecret;
}
throw new AwsException("InvalidSecretException",
"The secret must contain username and password fields.", 400);
}
private DatabaseSecretCredentials parseSecretCredentials(String secretString) {
if (secretString == null || secretString.isBlank()) {
return null;
@@ -2,7 +2,7 @@
"_source": {
"generator": "tools/aws/regen_iam_authorized_actions.py",
"reference": "https://servicereference.us-east-1.amazonaws.com/",
"retrieved": "2026-11-26",
"retrieved": "2026-11-28",
"note": "make iam-authorized-actions-verify checks every entry against AWS."
},
"authorizedActions": {
@@ -1210,6 +1210,7 @@
"ListResources",
"ListSourceAssociations"
],
"rds-data": [],
"resource-explorer-2": [
"AssociateDefaultView",
"BatchGetView",
@@ -1236,6 +1237,14 @@
"ListSupportedResourceTypes",
"ListViews"
],
"resource-groups": [
"CreateGroup",
"GetAccountSettings",
"ListGroups",
"ListResourceTypes",
"SearchResources",
"UpdateAccountSettings"
],
"route53": [
"CreateCidrCollection",
"CreateHealthCheck",
@@ -1,11 +1,11 @@
{
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.44.9 (installed package)", "retrieved": "2026-11-27", "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"], "apigateway": ["apigateway", "apigatewayv2"], "appconfig": ["appconfig", "appconfigdata"], "application-autoscaling": ["application-autoscaling"], "aps": ["amp"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "bedrock": ["bedrock", "bedrock-agent", "bedrock-agent-runtime", "bedrock-data-automation", "bedrock-data-automation-runtime", "bedrock-runtime"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codeartifact": ["codeartifact"], "codebuild": ["codebuild"], "codeguru-reviewer": ["codeguru-reviewer"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "dynamodb": ["dynamodb", "dynamodbstreams"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticache": ["elasticache"], "elasticfilesystem": ["efs"], "elasticloadbalancing": ["elb", "elb-proxy", "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"], "iam": ["iam", "iam-toolbox"], "identitystore": ["identitystore"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "memorydb": ["memorydb"], "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"], "resource-groups": ["resource-groups"], "route53": ["route53"], "route53resolver": ["route53resolver"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "sagemaker": ["sagemaker", "sagemaker-a2i-runtime", "sagemaker-edge", "sagemaker-featurestore-runtime", "sagemaker-gateway-runtime", "sagemaker-inference-router-runtime", "sagemaker-metrics", "sagemaker-runtime", "sagemakerjobruntime", "sagemakertrainingsessionruntime"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"], "xray": ["xray"]},
"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", "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", "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", "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", "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", "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", "execute-api": "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", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "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", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "mq": "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", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rds-data": "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", "rum": "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", "servicecatalog": "not read yet: CreatePortfolioShare, UpdatePortfolioShare and DeletePortfolioShare give in AccountId the account a portfolio is shared with, which the rule reads asLine truncated
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.44.9 (installed package)", "retrieved": "2026-11-28", "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"], "apigateway": ["apigateway", "apigatewayv2"], "appconfig": ["appconfig", "appconfigdata"], "application-autoscaling": ["application-autoscaling"], "aps": ["amp"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "bedrock": ["bedrock", "bedrock-agent", "bedrock-agent-runtime", "bedrock-data-automation", "bedrock-data-automation-runtime", "bedrock-runtime"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codeartifact": ["codeartifact"], "codebuild": ["codebuild"], "codeguru-reviewer": ["codeguru-reviewer"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "dynamodb": ["dynamodb", "dynamodbstreams"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticache": ["elasticache"], "elasticfilesystem": ["efs"], "elasticloadbalancing": ["elb", "elb-proxy", "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"], "iam": ["iam", "iam-toolbox"], "identitystore": ["identitystore"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "memorydb": ["memorydb"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "rds-data": ["rds-data"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "route53resolver": ["route53resolver"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "sagemaker": ["sagemaker", "sagemaker-a2i-runtime", "sagemaker-edge", "sagemaker-featurestore-runtime", "sagemaker-gateway-runtime", "sagemaker-inference-router-runtime", "sagemaker-metrics", "sagemaker-runtime", "sagemakerjobruntime", "sagemakertrainingsessionruntime"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"], "xray": ["xray"]},
"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", "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", "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", "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", "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", "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", "execute-api": "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", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "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", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "mq": "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", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rum": "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", "servicecatalog": "not read yet: CreatePortfolioShare, UpdatePortfolioShare and DeletePortfolioShare give in AccountId the account a portfolio is shared with, which the rule reads as the portfolio's; a portfolio or product imported from another account keeps its owner's account in its ARN while requests name it by its id alone; and AppRegistry's applications and attribute groups are named in the pLine truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifygen3", "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", "finops-agent", "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", "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}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/$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}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/$Line truncated
"pathFormats": {"apigateway": {"/restapis/{restapi_id}/models/{model_name}/default_template (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/models/${ModelName}/default_template", "/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/authorizers", "/restapis/{restapi_id}/stages/{stage_name}/cache/data (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/data", "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/exports/${ExportType}", "/sdktypes (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes", "/sdktypes/{sdktype_id} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes/${SdktypeId}", "/usageplans/{usageplanId}/keys/{keyId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/keys/${KeyId}/usage", "/usageplans/{usageplanId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/usage", "Authorizer (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers/${Id}", "Authorizers (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers", "Deployment (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments/${Id}", "Deployments (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments", "Integration (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration", "IntegrationResponse (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration/responses/${StatusCode}", "Model (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models/${ModelName}", "Models (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models", "Stage (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages/${StageName}", "Stages (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages"}},
"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/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "appconfig": {"application": ["aws:ResourceTag/"], "configuration": ["aws:ResourceTag/"], "configurationprofile": ["aws:ResourceTag/"], "deployment": ["aws:ResourceTag/"], "deploymentstrategy": ["aws:ResourceTag/"], "environment": ["aws:ResourceTag/"], "experimentdefinition": ["aws:ResourceTag/"], "experimentrun": ["aws:ResourceTag/"], "extension": ["aws:ResourceTag/"], "extensionassociation": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["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-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResourceTag/"], "async-invoke": ["aws:ResourceTag/"], "automated-reasoning-policy": ["aws:ResourceTag/"], "automated-reasoning-policy-version": ["aws:ResourceTag/"], "blueprint": ["aws:ResourceTag/"], "blueprint-optimization-invocation": ["aws:ResourceTag/"], "custom-model": ["aws:ResourceTag/"], "custom-model-deployment": ["aws:ResourceTag/"], "data-automation-invocation-job": ["aws:ResourceTag/"], "data-automation-library": ["aws:ResourceTag/"], "data-automation-library-ingestion-job": ["aws:ResourceTag/"], "data-automation-project": ["aws:ResourceTag/"], "evaluation-job": ["aws:ResourceTag/"], "flow": ["aws:ResourceTag/"], "flow-alias": ["aws:ResourceTag/"], "guardrail": ["aws:ResourceTag/"], "imported-model": ["aws:ResourceTag/"], "knowledge-base": ["aws:ResourceTag/"], "model-copy-job": ["aws:ResourceTag/"], "model-customization-job": ["aws:ResourceTag/"], "model-evaluation-job"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/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "appconfig": {"application": ["aws:ResourceTag/"], "configuration": ["aws:ResourceTag/"], "configurationprofile": ["aws:ResourceTag/"], "deployment": ["aws:ResourceTag/"], "deploymentstrategy": ["aws:ResourceTag/"], "environment": ["aws:ResourceTag/"], "experimentdefinition": ["aws:ResourceTag/"], "experimentrun": ["aws:ResourceTag/"], "extension": ["aws:ResourceTag/"], "extensionassociation": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["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-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResourceTag/"], "async-invoke": ["aws:ResourceTag/"], "automated-reasoning-policy": ["aws:ResourceTag/"], "automated-reasoning-policy-version": ["aws:ResourceTag/"], "blueprint": ["aws:ResourceTag/"], "blueprint-optimization-invocation": ["aws:ResourceTag/"], "custom-model": ["aws:ResourceTag/"], "custom-model-deployment": ["aws:ResourceTag/"], "data-automation-invocation-job": ["aws:ResourceTag/"], "data-automation-library": ["aws:ResourceTag/"], "data-automation-library-ingestion-job": ["aws:ResourceTag/"], "data-automation-project": ["aws:ResourceTag/"], "evaluation-job": ["aws:ResourceTag/"], "flow": ["aws:ResourceTag/"], "flow-alias": ["aws:ResourceTag/"], "guardrail": ["aws:ResourceTag/"], "imported-model": ["aws:ResourceTag/"], "knowledge-base": ["aws:ResourceTag/"], "model-copy-job": ["aws:ResourceTag/"], "model-customization-job": ["aws:ResourceTag/"], "model-evaluation-job"Line 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"]},
@@ -5517,6 +5517,12 @@
"ram:UntagResource": {"action": "ram:UntagResource", "types": ["customer-managed-permission", "resource-share"], "resources": [{"types": ["customer-managed-permission", "resource-share"], "arn": "resourceArn", "apis": ["rest-json/2018-01-04"]}, {"types": ["customer-managed-permission", "resource-share"], "arn": "resourceShareArn", "apis": ["rest-json/2018-01-04"]}, {"type": "resource-share", "fill": {}, "when": {"resourceShareArn": [null]}, "default": true, "apis": ["rest-json/2018-01-04"]}]},
"ram:UpdatePermission": {"action": "ram:UpdatePermission", "types": ["customer-managed-permission"], "resources": [{"types": ["customer-managed-permission"], "arn": "permissionArn", "apis": ["rest-json/2018-01-04"]}]},
"ram:UpdateResourceShare": {"action": "ram:UpdateResourceShare", "types": ["resource-share"], "resources": [{"types": ["resource-share"], "arn": "resourceShareArn", "apis": ["rest-json/2018-01-04"]}]},
"rds-data:BatchExecuteStatement": {"action": "rds-data:BatchExecuteStatement", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "resourceArn", "apis": ["rest-json/2018-08-01"]}, {"types": ["cluster"], "arn": "secretArn", "apis": ["rest-json/2018-08-01"]}]},
"rds-data:BeginTransaction": {"action": "rds-data:BeginTransaction", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "resourceArn", "apis": ["rest-json/2018-08-01"]}, {"types": ["cluster"], "arn": "secretArn", "apis": ["rest-json/2018-08-01"]}]},
"rds-data:CommitTransaction": {"action": "rds-data:CommitTransaction", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "resourceArn", "apis": ["rest-json/2018-08-01"]}, {"types": ["cluster"], "arn": "secretArn", "apis": ["rest-json/2018-08-01"]}]},
"rds-data:ExecuteSql": {"action": "rds-data:ExecuteSql", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "awsSecretStoreArn", "apis": ["rest-json/2018-08-01"]}, {"types": ["cluster"], "arn": "dbClusterOrInstanceArn", "apis": ["rest-json/2018-08-01"]}]},
"rds-data:ExecuteStatement": {"action": "rds-data:ExecuteStatement", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "resourceArn", "apis": ["rest-json/2018-08-01"]}, {"types": ["cluster"], "arn": "secretArn", "apis": ["rest-json/2018-08-01"]}]},
"rds-data:RollbackTransaction": {"action": "rds-data:RollbackTransaction", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "resourceArn", "apis": ["rest-json/2018-08-01"]}, {"types": ["cluster"], "arn": "secretArn", "apis": ["rest-json/2018-08-01"]}]},
"rds:AddRoleToDBCluster": {"action": "rds:AddRoleToDBCluster", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "RoleArn", "apis": ["query/2014-10-31"]}, {"type": "cluster", "fill": {"DbClusterInstanceName": "DBClusterIdentifier"}, "apis": ["query/2014-10-31"]}]},
"rds:AddRoleToDBInstance": {"action": "rds:AddRoleToDBInstance", "types": ["db"], "resources": [{"types": ["db"], "arn": "RoleArn", "apis": ["query/2014-10-31"]}, {"type": "db", "fill": {"DbInstanceName": "DBInstanceIdentifier"}, "apis": ["query/2014-10-31"]}]},
"rds:AddSourceIdentifierToSubscription": {"action": "rds:AddSourceIdentifierToSubscription", "types": ["es"], "resources": [{"type": "es", "fill": {"SubscriptionName": "SubscriptionName"}, "apis": ["query/2014-10-31"]}]},
+42
View File
@@ -2442,6 +2442,19 @@
"UpdateResourceShare": {"method": "POST", "requestUri": "/updateresourceshare"}
}
},
"rds-data": {
"credentialScope": "rds-data",
"apiVersion": "2018-08-01",
"accessDeniedStatus": 403,
"operations": {
"BatchExecuteStatement": {"method": "POST", "requestUri": "/BatchExecute"},
"BeginTransaction": {"method": "POST", "requestUri": "/BeginTransaction"},
"CommitTransaction": {"method": "POST", "requestUri": "/CommitTransaction"},
"ExecuteSql": {"method": "POST", "requestUri": "/ExecuteSql"},
"ExecuteStatement": {"method": "POST", "requestUri": "/Execute"},
"RollbackTransaction": {"method": "POST", "requestUri": "/RollbackTransaction"}
}
},
"resource-explorer-2": {
"credentialScope": "resource-explorer-2",
"apiVersion": "2022-07-28",
@@ -2481,6 +2494,35 @@
"UpdateView": {"method": "POST", "requestUri": "/UpdateView"}
}
},
"resource-groups": {
"credentialScope": "resource-groups",
"apiVersion": "2017-11-27",
"operations": {
"CancelTagSyncTask": {"method": "POST", "requestUri": "/cancel-tag-sync-task"},
"CreateGroup": {"method": "POST", "requestUri": "/groups"},
"DeleteGroup": {"method": "POST", "requestUri": "/delete-group"},
"GetAccountSettings": {"method": "POST", "requestUri": "/get-account-settings"},
"GetGroup": {"method": "POST", "requestUri": "/get-group"},
"GetGroupConfiguration": {"method": "POST", "requestUri": "/get-group-configuration"},
"GetGroupQuery": {"method": "POST", "requestUri": "/get-group-query"},
"GetTagSyncTask": {"method": "POST", "requestUri": "/get-tag-sync-task"},
"GetTags": {"method": "GET", "requestUri": "/resources/{Arn}/tags"},
"GroupResources": {"method": "POST", "requestUri": "/group-resources"},
"ListGroupResources": {"method": "POST", "requestUri": "/list-group-resources"},
"ListGroupingStatuses": {"method": "POST", "requestUri": "/list-grouping-statuses"},
"ListGroups": {"method": "POST", "requestUri": "/groups-list"},
"ListTagSyncTasks": {"method": "POST", "requestUri": "/list-tag-sync-tasks"},
"PutGroupConfiguration": {"method": "POST", "requestUri": "/put-group-configuration"},
"SearchResources": {"method": "POST", "requestUri": "/resources/search"},
"StartTagSyncTask": {"method": "POST", "requestUri": "/start-tag-sync-task"},
"Tag": {"method": "PUT", "requestUri": "/resources/{Arn}/tags"},
"UngroupResources": {"method": "POST", "requestUri": "/ungroup-resources"},
"Untag": {"method": "PATCH", "requestUri": "/resources/{Arn}/tags"},
"UpdateAccountSettings": {"method": "POST", "requestUri": "/update-account-settings"},
"UpdateGroup": {"method": "POST", "requestUri": "/update-group"},
"UpdateGroupQuery": {"method": "POST", "requestUri": "/update-group-query"}
}
},
"route53": {
"credentialScope": "route53",
"apiVersion": "2013-04-01",
@@ -2,6 +2,7 @@ package io.floci.aws.services.iam;
import io.floci.aws.core.common.AwsProtocolClaimFilter;
import io.floci.aws.core.common.ProtocolClaim;
import io.floci.aws.core.common.SignedServiceRoute;
import io.floci.aws.core.common.WireProtocol;
import io.floci.aws.testing.ParallelLocks;
import jakarta.ws.rs.container.ContainerRequestContext;
@@ -45,15 +46,15 @@ class IamActionRegistryTest {
private final IamActionRegistry registry = new IamActionRegistry();
/**
* A REST request no rule maps is checked as the operation whose vendored route it matches, as that operation's
* A REST request is checked as the operation whose vendored route it matches, as that operation's
* action, when Floci checks it on the resources AWS does: built by hand for its namespace ({@code Invoke} as
* {@code lambda:InvokeFunction}), read by the vendored request resources ({@code DescribeRepositories}, and
* {@code DescribeDomain} and {@code GetAnalyzer} from their paths), or none, AWS authorizing its action on no
* resource type ({@code ListDomainNames}). One AWS checks on a resource Floci does not read stays unmapped
* ({@code GetBackupPlan}), as does a request matching no route, and a rule still decides a route it maps.
* ({@code GetBackupPlan}), as does a request matching no route.
*/
@Test
void aRouteNoRuleMapsIsCheckedAsItsOperationWhenFlociChecksItAsAwsDoes() throws IOException {
void aRouteIsCheckedAsItsOperationWhenFlociChecksItAsAwsDoes() throws IOException {
IamRestRoutes routes = IamRestRoutes.parse(new ByteArrayInputStream("""
{"models": {
"opensearch": {"credentialScope": "es", "operations": {
@@ -71,9 +72,6 @@ class IamActionRegistryTest {
}},
"lambda": {"credentialScope": "lambda", "operations": {
"Invoke": {"method": "POST", "requestUri": "/unmapped/{FunctionName}/invocations"}
}},
"rds-data": {"credentialScope": "rds-data", "operations": {
"ExecuteSql": {"method": "POST", "requestUri": "/Execute"}
}}
}}""".getBytes(StandardCharsets.UTF_8)));
IamActionRegistry routed = new IamActionRegistry(routes);
@@ -89,8 +87,6 @@ class IamActionRegistryTest {
mockCtx("POST", "/unmapped/fn/invocations", none, null, "")));
assertEquals("ecr:DescribeRepositories", routed.resolveRoute("ecr",
mockCtx("GET", "/unmapped/repositories", none, null, "")));
assertEquals("rds-data:ExecuteStatement", routed.resolveRoute("rds-data",
mockCtx("POST", "/Execute", none, null, "")));
}
/**
@@ -280,13 +276,19 @@ class IamActionRegistryTest {
@CsvSource({"groups,CreateGroup", "get-group,GetGroup", "delete-group,DeleteGroup",
"group-resources,GroupResources", "list-group-resources,ListGroupResources"})
void resourceGroupsManagementRoutesResolveTheirOwnActions(String path, String operation) {
ContainerRequestContext ctx = mockCtx("POST", "/_rg/" + path,
new MultivaluedHashMap<>(), MediaType.APPLICATION_JSON_TYPE, "{}");
// ResourceGroupsRouteFilter moves the requests under /_rg, and IAM matches them on the model's own path.
ContainerRequestContext ctx = movedToResourceGroups(mockCtx("POST", "/_rg/" + path,
new MultivaluedHashMap<>(), MediaType.APPLICATION_JSON_TYPE, "{}"));
assertEquals("resource-groups:" + operation, registry.resolveRoute("resource-groups", ctx));
assertNull(registry.resolveRoute("resource-groups", mockCtx("GET", "/_rg/" + path,
new MultivaluedHashMap<>(), null, "")));
assertNull(registry.resolveRoute("resource-groups", mockCtx("POST", "/_rg/" + path + "/extra",
new MultivaluedHashMap<>(), MediaType.APPLICATION_JSON_TYPE, "{}")));
assertNull(registry.resolveRoute("resource-groups", movedToResourceGroups(mockCtx("GET", "/_rg/" + path,
new MultivaluedHashMap<>(), null, ""))));
assertNull(registry.resolveRoute("resource-groups", movedToResourceGroups(mockCtx("POST",
"/_rg/" + path + "/extra", new MultivaluedHashMap<>(), MediaType.APPLICATION_JSON_TYPE, "{}"))));
}
private static ContainerRequestContext movedToResourceGroups(ContainerRequestContext ctx) {
when(ctx.getProperty(SignedServiceRoute.INTERNAL_PREFIX_PROPERTY)).thenReturn("/_rg");
return ctx;
}
@ParameterizedTest
@@ -514,7 +516,7 @@ class IamActionRegistryTest {
}
@Test
void aRuleNamingAQueryParameterMatchesOnlyARequestCarryingItWithItsValue() {
void aRouteNamingAQueryParameterMatchesOnlyARequestCarryingItWithItsValue() {
// GET /layers?find=LayerVersion is GetLayerVersionByArn, while GET /layers is ListLayers.
MultivaluedHashMap<String, String> byArn = new MultivaluedHashMap<>();
byArn.putSingle("find", "LayerVersion");
@@ -674,7 +676,7 @@ class IamActionRegistryTest {
@Test
void aTrailingSlashIsCheckedAsTheRouteWithoutIt() {
// The router matches /clusters/ as /clusters, so the rule ending at the route's last segment covers it.
// The router matches /clusters/ as /clusters, so the route ending at its last segment covers it.
// An S3 key may end in a slash, and one of slashes alone arrives as S3SlashOnlyKeyFilter rewrites it,
// escaped.
String[][] routes = {
@@ -787,7 +789,7 @@ class IamActionRegistryTest {
registry.resolve("s3", mockCtx("PUT", "/bucket", accelerate, null, "")));
assertEquals("s3:GetAccelerateConfiguration",
registry.resolve("s3", mockCtx("GET", "/bucket", accelerate, null, "")));
// AWS defines no DELETE for the subresource, so it stays on the rule table.
// AWS defines no DELETE for the subresource, so it is the bucket's own DELETE route.
assertEquals("s3:DeleteBucket",
registry.resolve("s3", mockCtx("DELETE", "/bucket", accelerate, null, "")));
}
@@ -811,7 +813,7 @@ class IamActionRegistryTest {
assertEquals("s3:RestoreObject", s3Action("POST", "/bucket/key", "restore"));
assertEquals("s3:GetObject", s3Action("POST", "/bucket/key", "select", "select-type=2"));
// No bucket-level multipart POST is checked: S3VirtualHostFilter moves a virtual-hosted
// upload's bucket into the path before IAM sees it, so the upload reaches the object rules.
// upload's bucket into the path before IAM sees it, so the upload reaches the object routes.
assertNull(s3Action("POST", "/key", "uploads"));
assertNull(s3Action("POST", "/key", "uploadId=u1"));
// DeleteObjects and a browser-form PostObject are checked per key in S3Controller.
@@ -909,7 +911,7 @@ class IamActionRegistryTest {
}
@Test
void s3ControlRulesClaimOnlyTheRoutesTheControllerServes() {
void s3ControlClaimsOnlyTheRoutesTheControllerServes() {
// PUT is no S3 Control tagging route, so a bucket actually named v20180820
// keeps its data-plane actions: the resource stays its own bucket and key.
assertEquals("s3:PutObject", s3Action("PUT", "/v20180820/tags/key.txt"));
@@ -32,8 +32,7 @@ import static org.mockito.Mockito.when;
/**
* A REST request is authorized by its route, so an operation is checked as the IAM action AWS checks
* for it only if a rule in {@link IamActionRegistry} maps its route to that action, or, for an action AWS
* authorizes on no resource type, the vendored route it matches is its own. This builds a request on each
* for it only if the vendored route it matches in {@link IamActionRegistry} is its own. This builds a request on each
* operation's route, as botocore's model gives it ({@code rest-routes.json}, from
* {@code tools/aws/regen_rest_routes.py}), and compares the action the registry resolves with the one
* {@code iam-authorized-actions.json} names for the operation, or its route's method names for an operation it
@@ -123,7 +122,7 @@ class IamRestRouteCoverageTest {
}
/**
* Every operation of a scope the vendored routes do not leave to the rules alone resolves to its action when
* Every operation of a vendored model resolves to its action when
* Floci can check it as AWS does: its resources read by the vendored request resources, or none, AWS authorizing
* its action on no resource type. Any other operation stays unmapped, unchecked rather than checked on {@code *},
* until the resources in its path are read. An operation the authorized actions list as authorized by method is
@@ -164,7 +163,7 @@ class IamRestRouteCoverageTest {
}
/**
* Every route of a scope the vendored routes do not leave to the rules alone is, by those routes alone, an
* Every route of a vendored model is, by those routes alone, an
* operation checked as its own operation's action: the most specific route a request on it matches is its own,
* or a sibling model's of the same scope and action (Lambda's and Lambda MicroVMs' tagging routes).
*/
@@ -40,7 +40,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
/**
* REST requests whose route no rule mapped to an IAM action were let through under enforcement
* REST requests whose route mapped to no IAM action were let through under enforcement
* unchecked. These routes are mapped now, and a caller needs the action AWS checks for them.
*/
@QuarkusTest
@@ -278,13 +278,13 @@ class IamRestRouteEnforcementIntegrationTest {
void sharedTaggingIsCheckedAsTheServiceItsArnNames() {
// The shared tagging routes hand the request to the service its ARN names, whatever scope it is
// signed with: a Pipes grant does not let the caller tag a schedule group, and a scope with no
// tagging rule does not let the request through unchecked.
// tagging route does not let the request through unchecked.
String user = user("route-tags-scope");
String group = scheduleGroup("route-group-" + suffix());
String queue = "arn:aws:batch:us-east-1:" + ACCOUNT + ":job-queue/route-queue-" + suffix();
String tags = "{\"Tags\":[{\"Key\":\"team\",\"Value\":\"a\"}]}";
// Nor is an ARN of a service with no tagging rule checked as the signing scope's action.
// Nor is an ARN of a service with no tagging route checked as the signing scope's action.
as(user, "pipes").body(tagBody(queue)).post("/tags").then().body(not(containsString("pipes:TagResource")));
policy(user, allow("pipes:TagResource", "*"));
refused(as(user, "pipes").urlEncodingEnabled(false).body(tags).post("/tags/" + encoded(group)).then(),
@@ -774,7 +774,7 @@ class IamRestRouteEnforcementIntegrationTest {
}
/**
* A route no rule maps is checked as the operation of its vendored route when AWS authorizes that operation's
* A route is checked as the operation of its vendored route when AWS authorizes that operation's
* action on no resource type, in both OpenSearch API versions and for Access Analyzer.
*/
@Test
@@ -794,7 +794,7 @@ class IamRestRouteEnforcementIntegrationTest {
/**
* A route of Lake Formation, Macie or Inspector that AWS authorizes on no resource type is checked as its vendored
* route's operation, with no hand rule, Macie's on the paths it shares with other services among them: refused
* route's operation, Macie's on the paths it shares with other services among them: refused
* without its action, past the check with it.
*/
@Test
@@ -1566,7 +1566,7 @@ class IamRestRouteEnforcementIntegrationTest {
/**
* A segment ending in a matrix parameter, which the router ignores, is checked as the route it reaches, on the
* resource its path names: the routed path carries no matrix parameter, so the rule matches and the ARN is the
* resource its path names: the routed path carries no matrix parameter, so the route matches and the ARN is the
* named resource's, and a grant scoped to it lets the request through while a caller with none is refused.
*/
@Test
@@ -2174,6 +2174,31 @@ class IamRestRouteEnforcementIntegrationTest {
+ ":web-function/route-app", null, "lambda:ListTags");
}
/**
* An RDS Data statement is checked on the cluster its {@code resourceArn} names, which the generated request
* resources read: a grant on one cluster lets the caller run a statement against it and not against another, and
* the secret the request names is no cluster. Floci also runs statements on a DB instance, which AWS's Data API
* does not serve and gives no resource type: one names no resource the check reads, so it is checked on
* {@code *}, and a grant on a cluster does not cover it.
*/
@Test
void anRdsDataStatementIsCheckedOnTheClusterItsBodyNames() {
String user = user("route-rds-data");
String allowed = "arn:aws:rds:us-east-1:" + ACCOUNT + ":cluster:route-allowed-" + suffix();
String other = "arn:aws:rds:us-east-1:" + ACCOUNT + ":cluster:route-other-" + suffix();
String secret = "arn:aws:secretsmanager:us-east-1:" + ACCOUNT + ":secret:route-db-AbCdEf";
String statement = "{\"resourceArn\":\"%s\",\"secretArn\":\"" + secret + "\",\"sql\":\"select 1\"}";
policy(user, allow("rds-data:ExecuteStatement", allowed) + ","
+ allow("secretsmanager:GetSecretValue", secret));
refused(as(user, "rds-data").body(statement.formatted(other)).post("/Execute").then(),
"rds-data:ExecuteStatement");
refused(as(user, "rds-data").body(statement.formatted("arn:aws:rds:us-east-1:" + ACCOUNT + ":db:route-db"))
.post("/Execute").then(), "rds-data:ExecuteStatement");
as(user, "rds-data").body(statement.formatted(allowed)).post("/Execute").then()
.body(not(containsString("rds-data:ExecuteStatement")));
}
private void checkedAs(String user, String service, String method, String path, String body, String action) {
refused(request(user, service, method, path, body), action);
policy(user, allow(action, "*"));
@@ -38,6 +38,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
@@ -862,6 +863,31 @@ class RdsDataServiceTest {
assertEquals(1L, harness.countById("deleted-resource"));
}
@Test
void aCallInsideATransactionReadsItsSecretAsEveryOtherCallDoes() throws Exception {
// A commit, a rollback and a statement inside a transaction run on the connection the transaction opened, and
// still read their request's secret: one Secrets Manager cannot read, a cluster's ARN given in its place among
// them, is refused, and the transaction is left open.
TestHarness harness = new TestHarness(onlySecret(SECRET_ARN));
harness.createTables();
String tx = harness.service.beginTransaction(harness.beginRequest(), REGION).get("transactionId").asText();
ObjectNode commit = harness.transactionRequest(tx);
commit.put("secretArn", OTHER_RESOURCE_ARN);
ObjectNode rollback = commit.deepCopy();
ObjectNode statement = harness.request("select 1");
statement.put("transactionId", tx);
statement.put("secretArn", OTHER_RESOURCE_ARN);
assertEquals("SecretsErrorException", assertThrows(AwsException.class,
() -> harness.service.commitTransaction(commit, REGION)).getErrorCode());
assertEquals("SecretsErrorException", assertThrows(AwsException.class,
() -> harness.service.rollbackTransaction(rollback, REGION)).getErrorCode());
assertEquals("SecretsErrorException", assertThrows(AwsException.class,
() -> harness.service.executeStatement(statement, REGION)).getErrorCode());
assertEquals("Transaction Committed", harness.service.commitTransaction(harness.transactionRequest(tx), REGION)
.get("transactionStatus").asText());
}
@Test
void validatesRequiredAwsFieldsForDataApiRequests() throws Exception {
TestHarness harness = new TestHarness();
@@ -1197,6 +1223,15 @@ class RdsDataServiceTest {
return secrets;
}
/** Secrets Manager holding the one secret, and refusing every other name as one it cannot find. */
private static SecretsManagerService onlySecret(String secretArn) {
SecretsManagerService secrets = missingSecrets();
SecretVersion version = new SecretVersion();
version.setSecretString("{\"username\":\"sa\",\"password\":\"\"}");
doReturn(version).when(secrets).getSecretValue(eq(secretArn), any(), any(), any());
return secrets;
}
private static SecretsManagerService missingSecrets() {
SecretsManagerService secrets = mock(SecretsManagerService.class);
when(secrets.getSecretValue(any(), any(), any(), any()))
+1 -1
View File
@@ -67,7 +67,7 @@ is the namesake client's (`namesake_by_model`: S3's GetBucketLifecycleConfigurat
with its link.
The file also lists, for each credential scope whose REST routes `rest-routes.json` reads, the actions
of that namespace the reference gives no resource type, from its `Actions`. A REST request no rule of
of that namespace the reference gives no resource type, from its `Actions`. A REST request
`IamActionRegistry` maps is checked as the operation whose route it matches only when that operation's
action is one of them. Floci checks a REST request on `*` until it reads the resources in its path, and
AWS authorizes such an action on `*` too, so the check is the one AWS makes. An action AWS authorizes on
+1 -2
View File
@@ -383,7 +383,7 @@ NAMESPACES = ("access-analyzer", "account", "acm", "appconfig", "application-aut
"sqs", "sns", "kinesis", "pipes", "dsql", "sts", "eks", "resource-groups", "logs", "ses", "cloudwatch",
"comprehend", "config", "dms", "elasticache", "identitystore", "memorydb", "route53resolver",
"sagemaker", "transcribe", "transfer", "ec2-instance-connect", "s3", "bedrock", "apigateway", "kms",
"dynamodb", "iam")
"dynamodb", "iam", "rds-data")
# ---------------------------------------------------------------------------------------------------------------------
# MEASURED: what AWS was measured to check where neither botocore nor the Service Reference says it.
@@ -673,7 +673,6 @@ NOT_COVERED: dict[str, str] = {
"mq": _REST,
"network-firewall": _LATER,
"organizations": _LATER,
"rds-data": _REST,
"rum": _REST,
"servicecatalog": "not read yet: CreatePortfolioShare, UpdatePortfolioShare and DeletePortfolioShare give in "
"AccountId the account a portfolio is shared with, which the rule reads as the portfolio's; a "
+4 -2
View File
@@ -2,10 +2,10 @@
"""Regenerate src/main/resources/aws/rest-routes.json from botocore's models.
A REST request is authorized by its route: `IamActionRegistry` maps the HTTP method and path to the
IAM action, by its rules first and then by these routes, and a route neither maps is left unchecked.
IAM action by these routes, and a route they do not map is left unchecked.
This vendors, for each operation of the models below, its HTTP method and request URI exactly as the
SDKs send them, plus the explicit access-denied HTTP status of each model when it declares one.
A request no rule maps is the operation whose route it matches, checked as the action
A request is the operation whose route it matches, checked as the action
`iam-authorized-actions.json` names for it, or as its own; `IamRestRouteCoverageTest` builds a
request on each route and compares the action the registry gives with that one.
@@ -99,7 +99,9 @@ MODELS: dict[str, str] = {
"pipes": "pipes",
"quicksight": "quicksight",
"ram": "ram",
"rds-data": "rds-data",
"resource-explorer-2": "resource-explorer-2",
"resource-groups": "resource-groups",
"route53": "route53",
"s3": "s3",
"s3control": "s3",