fix(emr-serverless): check EMR Serverless's requests under IAM enforcement (#8143)

Under IAM enforcement no EMR Serverless request was checked: its model
was not among the vendored REST routes and its namespace's request
resources were not read, so no request was mapped to an action and the
filter let it through. A caller with no permissions could create, read,
update and delete applications and start and cancel job runs. A request
sent straight to /_emrserverless, the prefix its route filter moves
requests onto, reached the controller too, whatever it was signed for.

EmrServerlessRouteFilter now goes through SignedServiceRoute, as the
other filters that move a service's routes do: a request signed for
EMR Serverless is moved onto /_emrserverless, one sent to the prefix
signed for another service is refused, and the prefix it records lets
IAM match the vendored routes at the model's paths. EMR Serverless's
routes are vendored and its requests read, so an application call is
checked on the application its path names. Its namespace also leaves
the exclusions of regen_iam_tag_on_create.py and regen_iam_passed_roles.py:
tags a create sends are checked as emr-serverless:TagResource, and
StartJobRun and StartSession check iam:PassRole on the execution role.

Co-authored-by: mrfelek <17274927+mrfelek@users.noreply.github.com>
This commit is contained in:
mrfelekandmrfelek authored and GitHub committed 2026-11-12 16:46:38 -04:00
1 parent f3c6d8e809
commit 0b6a6003b0
13 files changed
+242 -52

No files matched your search

@@ -1,51 +1,38 @@
package io.floci.aws.services.emrserverless;
import io.floci.aws.core.common.RequestHost;
import io.floci.aws.core.common.ResolvedServiceCatalog;
import io.floci.aws.core.common.SignedServiceRoute;
import jakarta.annotation.Priority;
import jakarta.inject.Inject;
import jakarta.ws.rs.container.ContainerRequestContext;
import jakarta.ws.rs.container.ContainerRequestFilter;
import jakarta.ws.rs.container.PreMatching;
import jakarta.ws.rs.core.UriInfo;
import jakarta.ws.rs.ext.Provider;
import java.net.URI;
/**
* Pre-matching filter that disambiguates REST JSON routes for EMR Serverless.
* EMR Serverless and AppConfig both use `/applications` in their REST API, which
* causes a JAX-RS routing collision. This filter rewrites EMR Serverless requests
* to an internal path.
* Rewrites EMR Serverless requests to an internal prefix before JAX-RS route matching. EMR
* Serverless and AppConfig both serve {@code /applications}, so registered directly the two would
* collide. Only a request signed for EMR Serverless is rewritten; anything else keeps its path and
* reaches AppConfig.
*/
@Provider
@PreMatching
@Priority(5000)
public class EmrServerlessRouteFilter implements ContainerRequestFilter {
static final String INTERNAL_PATH = "/_emrserverless/applications";
static final String INTERNAL_PREFIX = "/_emrserverless";
static final String APPLICATIONS_PATH = "/applications";
private final SignedServiceRoute route;
@Inject
public EmrServerlessRouteFilter(ResolvedServiceCatalog catalog) {
this.route = new SignedServiceRoute(catalog, "emr-serverless", INTERNAL_PREFIX,
SignedServiceRoute.under(APPLICATIONS_PATH));
}
@Override
public void filter(ContainerRequestContext ctx) {
UriInfo uriInfo = ctx.getUriInfo();
String path = uriInfo.getPath();
if (path.startsWith("/")) {
path = path.substring(1);
}
if (!path.startsWith("applications")) {
return;
}
String host = RequestHost.of(ctx);
boolean isEmrServerlessHost = host != null && host.startsWith("emr-serverless.");
String auth = ctx.getHeaderString("Authorization");
boolean isEmrServerlessAuth = auth != null && auth.contains("/emr-serverless/aws4_request");
if (isEmrServerlessHost || isEmrServerlessAuth) {
URI rewritten = uriInfo.getRequestUriBuilder()
.replacePath(INTERNAL_PATH + (path.length() > 12 ? path.substring(12) : ""))
.build();
ctx.setRequestUri(rewritten);
}
route.apply(ctx);
}
}
@@ -63,7 +63,7 @@ public class S3VirtualHostFilter implements ContainerRequestFilter {
"execute-api", // ApiGatewayExecuteApiHostFilter: <api-id>.execute-api[.<region>].<host>
"lambda-url", // LambdaUrlRoutingFilter: <url-id>.lambda-url.<region>.<host>
"lambda-web", // LambdaWebDataPlane: <id>.<shard>.lambda-web.<region>.<host>, <id>.lambda-web.global.<host>
"emr-serverless", // EmrServerlessRouteFilter: emr-serverless.<host>
"emr-serverless", // emr-serverless.<host>, an EMR Serverless endpoint, never a bucket
"cloudfront"); // CloudFrontDistributionFilter: <dist-id>.cloudfront.net
/**
@@ -2,7 +2,7 @@
"_source": {
"generator": "tools/aws/regen_iam_authorized_actions.py",
"reference": "https://servicereference.us-east-1.amazonaws.com/",
"retrieved": "2026-11-11",
"retrieved": "2026-11-12",
"note": "make iam-authorized-actions-verify checks every entry against AWS."
},
"authorizedActions": {
@@ -495,6 +495,10 @@
"ListEksAnywhereSubscriptions",
"RegisterCluster"
],
"emr-serverless": [
"CreateApplication",
"ListApplications"
],
"es": [
"AcceptInboundConnection",
"AcceptInboundCrossClusterSearchConnection",
+9 -3
View File
@@ -1,7 +1,7 @@
{
"_source": {"generator": "tools/aws/regen_iam_passed_roles.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (local/aws/botocore)", "retrieved": "2026-11-12", "note": "make iam-passed-roles-check re-derives every member from botocore; make iam-passed-roles-verify checks every operation against AWS."},
"namespaces": {"application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "autoscaling": ["autoscaling"], "budgets": ["budgets"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codebuild": ["codebuild"], "codedeploy": ["codedeploy"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticmapreduce": ["emr"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "glue": ["glue"], "iam": ["iam"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "pipes": ["pipes"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-groups": ["resource-groups"], "s3": ["s3", "s3control"], "sagemaker": ["sagemaker"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "servicecatalog": ["servicecatalog"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "sns": ["sns"], "ssm": ["ssm"], "states": ["stepfunctions"], "swf": ["swf"], "textract": ["textract"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"]},
"notCovered": {"access-analyzer": "REST routes no rule maps yet", "airflow": "REST routes no rule maps yet", "apigateway": "authorized by HTTP method, so no request is checked as one of these operations", "appconfig": "REST routes no rule maps yet", "appsync": "REST routes no rule maps yet", "aps": "REST routes no rule maps yet", "aws-marketplace": "REST routes no rule maps yet", "backup": "REST routes no rule maps yet", "batch": "REST routes no rule maps yet", "bedrock": "REST routes no rule maps yet", "bedrock-agentcore": "REST routes no rule maps yet", "cloudfront": "REST routes no rule maps yet", "dlm": "REST routes no rule maps yet", "elasticfilesystem": "REST routes no rule maps yet", "emr-serverless": "REST routes no rule maps yet", "es": "REST routes no rule maps yet", "fis": "REST routes no rule maps yet", "guardduty": "REST routes no rule maps yet", "iot": "REST routes no rule maps yet", "kafka": "REST routes no rule maps yet", "macie2": "REST routes no rule maps yet", "mq": "REST routes no rule maps yet", "quicksight": "metadata-only REST subset; role passing and iam:PassRole checks are not implemented", "rum": "REST routes no rule maps yet", "s3tables": "REST routes no rule maps yet"},
"_source": {"generator": "tools/aws/regen_iam_passed_roles.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-12", "note": "make iam-passed-roles-check re-derives every member from botocore; make iam-passed-roles-verify checks every operation against AWS."},
"namespaces": {"application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "autoscaling": ["autoscaling"], "budgets": ["budgets"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codebuild": ["codebuild"], "codedeploy": ["codedeploy"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticmapreduce": ["emr"], "emr-serverless": ["emr-serverless"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "glue": ["glue"], "iam": ["iam"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "pipes": ["pipes"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-groups": ["resource-groups"], "s3": ["s3", "s3control"], "sagemaker": ["sagemaker"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "servicecatalog": ["servicecatalog"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "sns": ["sns"], "ssm": ["ssm"], "states": ["stepfunctions"], "swf": ["swf"], "textract": ["textract"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"]},
"notCovered": {"access-analyzer": "REST routes no rule maps yet", "airflow": "REST routes no rule maps yet", "apigateway": "authorized by HTTP method, so no request is checked as one of these operations", "appconfig": "REST routes no rule maps yet", "appsync": "REST routes no rule maps yet", "aps": "REST routes no rule maps yet", "aws-marketplace": "REST routes no rule maps yet", "backup": "REST routes no rule maps yet", "batch": "REST routes no rule maps yet", "bedrock": "REST routes no rule maps yet", "bedrock-agentcore": "REST routes no rule maps yet", "cloudfront": "REST routes no rule maps yet", "dlm": "REST routes no rule maps yet", "elasticfilesystem": "REST routes no rule maps yet", "es": "REST routes no rule maps yet", "fis": "REST routes no rule maps yet", "guardduty": "REST routes no rule maps yet", "iot": "REST routes no rule maps yet", "kafka": "REST routes no rule maps yet", "macie2": "REST routes no rule maps yet", "mq": "REST routes no rule maps yet", "quicksight": "metadata-only REST subset; role passing and iam:PassRole checks are not implemented", "rum": "REST routes no rule maps yet", "s3tables": "REST routes no rule maps yet"},
"otherNamespaces": ["agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "aoss", "appflow", "appmesh", "apprunner", "appstream", "arc-region-switch", "backup-gateway", "backup-search", "bcm-dashboards", "braket", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "codeconnections", "codestar-connections", "cognito-sync", "comprehendmedical", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "elemental-inference", "emr-containers", "entityresolution", "fms", "forecast", "frauddetector", "gamelift", "gameliftstreams", "geo", "grafana", "greengrass", "groundstation", "health-agent", "healthlake", "imagebuilder", "iotdeviceadvisor", "iotfleetwise", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "kafkaconnect", "kendra", "lex", "lookoutequipment", "m2", "machinelearning", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "medical-imaging", "mobiletargeting", "neptune-graph", "observabilityadmin", "odb", "omics", "opensearch", "osis", "partnercentral", "pcs", "personalize", "profile", "proton", "qbusiness", "repostspace", "resiliencehub", "rolesanywhere", "s3files", "sagemaker-geospatial", "securityagent", "securitylake", "shield", "sms-voice", "snowball", "social-messaging", "ssm-incidents", "ssm-quicksetup", "storagegateway", "supportapp", "synthetics", "timestream", "voiceid", "wellarchitected", "wisdom", "workmail", "workspaces"],
"operations": {
"application-autoscaling:RegisterScalableTarget": {"passedTo": ["application-autoscaling"], "byHand": "the scalable target's role"},
@@ -417,6 +417,12 @@
{"member": "ExecutionRoleArn", "passedTo": "managed-compute.elasticmapreduce"}
]},
"elasticmapreduce:UpdateStudio": {"passedTo": [], "notRead": "no member of the request names a role"},
"emr-serverless:StartJobRun": {"passedTo": ["emr-serverless"], "roles": [
{"member": "executionRoleArn", "passedTo": "emr-serverless"}
]},
"emr-serverless:StartSession": {"passedTo": ["emr-serverless"], "roles": [
{"member": "executionRoleArn", "passedTo": "emr-serverless"}
]},
"events:CreateEndpoint": {"passedTo": ["events"], "roles": [
{"member": "RoleArn", "passedTo": "events"}
]},
@@ -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-11", "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"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "globalaccelerator": ["globalaccelerator"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesisanalytics": ["kinesisanalyticsv2"], "logs": ["logs"], "macie2": ["macie2"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"_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-12", "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"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "globalaccelerator": ["globalaccelerator"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesisanalytics": ["kinesisanalyticsv2"], "logs": ["logs"], "macie2": ["macie2"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"clientsNotRead": {"kinesisanalytics": "Kinesis Data Analytics v1, SQL applications on the KinesisAnalytics_20150814 target, which Floci does not serve (it serves v2, kinesisanalyticsv2); its operations share v2's names and name their resources by other members"},
"handBuilt": ["apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kinesis", "kms", "lambda", "logs", "pipes", "resource-groups", "s3", "scheduler", "secretsmanager", "sns", "sqs", "ssm", "sts"],
"notCovered": {"account": "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", "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", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rule does not fill a name from, so nearly every operation needs a correction", "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", "controlcatalog": "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 itsLine truncated
"notCovered": {"account": "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", "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", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rule does not fill a name from, so nearly every operation needs a correction", "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", "controlcatalog": "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 itsLine truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "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", "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", "emr-containers", "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", "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}"}, "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}"}, "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:${Partition}:cloudfront::${Account}:response-headers-policy/${Id}", "streaming-distribution": "arn:${Partition}:cloudfront::${Account}:streaming-distribution/${DistributionId}", "trust-store": "arn:${Partition}:cloudfront::${Account}:trust-store/${Id}", "vpcorigin": "arn:${Partition}:cloudfront::${Account}:vpcorigin/${Id}"}, "cloudfront-keyvaluestore": {"key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${ResourceId}"}, "cloudtrail": {"channel": "arn:${Partition}:cloudtrail:${Region}:${Account}:channel/${ChannelId}", "dashboard": "arn:${Partition}:cloudtrail:${Region}:${Account}:dashboard/${DashboardName}", "eventdatastore": "arn:${Partition}:cloudtrail:${Region}:${Account}:eventdatastore/${EventDataStoreId}", "trail": "arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}"}, "codebuild": {"build": "arn:${Partition}:codebuild:${Region}:${Account}:build/${BuildId}", "build-batch": "arn:${Partition}:codebuild:${Region}:${Account}: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}"}, "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}"}, "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:${Partition}:cloudfront::${Account}:response-headers-policy/${Id}", "streaming-distribution": "arn:${Partition}:cloudfront::${Account}:streaming-distribution/${DistributionId}", "trust-store": "arn:${Partition}:cloudfront::${Account}:trust-store/${Id}", "vpcorigin": "arn:${Partition}:cloudfront::${Account}:vpcorigin/${Id}"}, "cloudfront-keyvaluestore": {"key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${ResourceId}"}, "cloudtrail": {"channel": "arn:${Partition}:cloudtrail:${Region}:${Account}:channel/${ChannelId}", "dashboard": "arn:${Partition}:cloudtrail:${Region}:${Account}:dashboard/${DashboardName}", "eventdatastore": "arn:${Partition}:cloudtrail:${Region}:${Account}:eventdatastore/${EventDataStoreId}", "trail": "arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}"}, "codebuild": {"build": "arn:${Partition}:codebuild:${Region}:${Account}:build/${BuildId}", "build-batch": "arn:${Partition}:codebuild:${Region}:${Account}:Line truncated
"unqualified": {"states": ["statemachine"]},
"mintedIds": {"events": ["api-destination", "connection"]},
"operations": {
@@ -1888,6 +1888,28 @@
"elasticmapreduce:TerminateSession": {"action": "elasticmapreduce:TerminateSession", "types": ["session"], "resources": [{"type": "session", "fill": {"ClusterId": "ClusterId", "SessionId": "SessionId"}}]},
"elasticmapreduce:UpdateStudio": {"action": "elasticmapreduce:UpdateStudio", "types": ["studio"], "resources": [{"types": ["studio"], "arn": "EncryptionKeyArn"}, {"type": "studio", "fill": {"StudioId": "StudioId"}}]},
"elasticmapreduce:UpdateStudioSessionMapping": {"action": "elasticmapreduce:UpdateStudioSessionMapping", "types": ["studio"], "resources": [{"types": ["studio"], "arn": "SessionPolicyArn"}, {"type": "studio", "fill": {"StudioId": "StudioId"}}]},
"emr-serverless:CancelJobRun": {"action": "emr-serverless:CancelJobRun", "types": ["jobRun"], "resources": [{"type": "jobRun", "fill": {"ApplicationId": "applicationId", "JobRunId": "jobRunId"}}], "located": {"applicationId": "{applicationId}", "jobRunId": "{jobRunId}"}},
"emr-serverless:CreateApplication": {"action": "emr-serverless:CreateApplication", "types": [], "resources": []},
"emr-serverless:DeleteApplication": {"action": "emr-serverless:DeleteApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:GetApplication": {"action": "emr-serverless:GetApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:GetDashboardForJobRun": {"action": "emr-serverless:GetDashboardForJobRun", "types": ["jobRun"], "resources": [{"type": "jobRun", "fill": {"ApplicationId": "applicationId", "JobRunId": "jobRunId"}}], "located": {"applicationId": "{applicationId}", "jobRunId": "{jobRunId}"}},
"emr-serverless:GetJobRun": {"action": "emr-serverless:GetJobRun", "types": ["jobRun"], "resources": [{"type": "jobRun", "fill": {"ApplicationId": "applicationId", "JobRunId": "jobRunId"}}], "located": {"applicationId": "{applicationId}", "jobRunId": "{jobRunId}"}},
"emr-serverless:GetResourceDashboard": {"action": "emr-serverless:GetResourceDashboard", "types": ["session"], "resources": [{"type": "session", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:GetSession": {"action": "emr-serverless:GetSession", "types": ["session"], "resources": [{"type": "session", "fill": {"ApplicationId": "applicationId", "SessionId": "sessionId"}}], "located": {"applicationId": "{applicationId}", "sessionId": "{sessionId}"}},
"emr-serverless:GetSessionEndpoint": {"action": "emr-serverless:GetSessionEndpoint", "types": ["session"], "resources": [{"type": "session", "fill": {"ApplicationId": "applicationId", "SessionId": "sessionId"}}], "located": {"applicationId": "{applicationId}", "sessionId": "{sessionId}"}},
"emr-serverless:ListApplications": {"action": "emr-serverless:ListApplications", "types": [], "resources": []},
"emr-serverless:ListJobRunAttempts": {"action": "emr-serverless:ListJobRunAttempts", "types": ["jobRun"], "resources": [{"type": "jobRun", "fill": {"ApplicationId": "applicationId", "JobRunId": "jobRunId"}}], "located": {"applicationId": "{applicationId}", "jobRunId": "{jobRunId}"}},
"emr-serverless:ListJobRuns": {"action": "emr-serverless:ListJobRuns", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:ListSessions": {"action": "emr-serverless:ListSessions", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:ListTagsForResource": {"action": "emr-serverless:ListTagsForResource", "types": ["application", "jobRun", "session"], "resources": [{"types": ["application", "jobRun", "session"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}},
"emr-serverless:StartApplication": {"action": "emr-serverless:StartApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:StartJobRun": {"action": "emr-serverless:StartJobRun", "types": ["application"], "resources": [{"types": ["application"], "arn": "executionIamPolicy.policyArns[]"}, {"types": ["application"], "arn": "executionRoleArn"}, {"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:StartSession": {"action": "emr-serverless:StartSession", "types": ["application"], "resources": [{"types": ["application"], "arn": "executionRoleArn"}, {"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:StopApplication": {"action": "emr-serverless:StopApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"emr-serverless:TagResource": {"action": "emr-serverless:TagResource", "types": ["application", "jobRun", "session"], "resources": [{"types": ["application", "jobRun", "session"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}},
"emr-serverless:TerminateSession": {"action": "emr-serverless:TerminateSession", "types": ["session"], "resources": [{"type": "session", "fill": {"ApplicationId": "applicationId", "SessionId": "sessionId"}}], "located": {"applicationId": "{applicationId}", "sessionId": "{sessionId}"}},
"emr-serverless:UntagResource": {"action": "emr-serverless:UntagResource", "types": ["application", "jobRun", "session"], "resources": [{"types": ["application", "jobRun", "session"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}},
"emr-serverless:UpdateApplication": {"action": "emr-serverless:UpdateApplication", "types": ["application"], "resources": [{"types": ["application"], "arn": "diskEncryptionConfiguration.encryptionKeyArn"}, {"types": ["application"], "arn": "identityCenterConfiguration.identityCenterInstanceArn"}, {"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}},
"es:AcceptInboundConnection": {"action": "es:AcceptInboundConnection", "types": [], "resources": []},
"es:AcceptInboundCrossClusterSearchConnection": {"action": "es:AcceptInboundCrossClusterSearchConnection", "types": [], "resources": []},
"es:AddDataSource": {"action": "es:AddDataSource", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}},
@@ -1,7 +1,7 @@
{
"_source": {"generator": "tools/aws/regen_iam_tag_on_create.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-11", "note": "make iam-tag-on-create-check re-derives every member from botocore; make iam-tag-on-create-verify checks every operation against AWS."},
"namespaces": {"access-analyzer": ["accessanalyzer"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "autoscaling": ["autoscaling"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudformation"], "cloudhsm": ["cloudhsmv2"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codedeploy": ["codedeploy"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticache": ["elasticache"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "iam": ["iam"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "lightsail": ["lightsail"], "logs": ["logs"], "macie2": ["macie2"], "memorydb": ["memorydb"], "network-firewall": ["network-firewall"], "organizations": ["organizations"], "payment-cryptography": ["payment-cryptography"], "pipes": ["pipes"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-groups": ["resource-groups"], "route53resolver": ["route53resolver"], "sagemaker": ["sagemaker"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "signer": ["signer"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "swf": ["swf"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"], "wafv2": ["wafv2"], "xray": ["xray"]},
"notCovered": {"airflow": "REST routes no rule maps yet", "app-integrations": "REST routes no rule maps yet", "appconfig": "REST routes no rule maps yet", "appsync": "REST routes no rule maps yet", "aps": "REST routes no rule maps yet", "aws-marketplace": "REST routes no rule maps yet", "backup": "REST routes no rule maps yet", "batch": "REST routes no rule maps yet", "bedrock": "REST routes no rule maps yet", "bedrock-agentcore": "REST routes no rule maps yet", "cloudfront": "its creation tags are a Tags structure holding Items, which this file does not read yet", "codeguru-reviewer": "REST routes no rule maps yet", "connect": "REST routes no rule maps yet", "detective": "REST routes no rule maps yet", "dlm": "REST routes no rule maps yet", "elasticfilesystem": "REST routes no rule maps yet", "emr-serverless": "REST routes no rule maps yet", "fis": "REST routes no rule maps yet", "inspector2": "REST routes no rule maps yet", "iot": "REST routes no rule maps yet", "kafka": "REST routes no rule maps yet", "mq": "REST routes no rule maps yet", "oam": "REST routes no rule maps yet", "quicksight": "metadata-only REST subset; creation-tag IAM authorization is not implemented", "ram": "REST routes no rule maps yet", "resource-explorer-2": "REST routes no rule maps yet", "rum": "REST routes no rule maps yet", "s3": "authorized by route; S3 checks s3:PutObjectTagging for an object it creates with tags itself", "s3tables": "REST routes no rule maps yet", "servicecatalog": "its operations that tag are AppRegistry's, whose REST routes no rule maps yet"},
"_source": {"generator": "tools/aws/regen_iam_tag_on_create.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-12", "note": "make iam-tag-on-create-check re-derives every member from botocore; make iam-tag-on-create-verify checks every operation against AWS."},
"namespaces": {"access-analyzer": ["accessanalyzer"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "autoscaling": ["autoscaling"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudformation"], "cloudhsm": ["cloudhsmv2"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codedeploy": ["codedeploy"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticache": ["elasticache"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "iam": ["iam"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "lightsail": ["lightsail"], "logs": ["logs"], "macie2": ["macie2"], "memorydb": ["memorydb"], "network-firewall": ["network-firewall"], "organizations": ["organizations"], "payment-cryptography": ["payment-cryptography"], "pipes": ["pipes"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-groups": ["resource-groups"], "route53resolver": ["route53resolver"], "sagemaker": ["sagemaker"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "signer": ["signer"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "swf": ["swf"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"], "wafv2": ["wafv2"], "xray": ["xray"]},
"notCovered": {"airflow": "REST routes no rule maps yet", "app-integrations": "REST routes no rule maps yet", "appconfig": "REST routes no rule maps yet", "appsync": "REST routes no rule maps yet", "aps": "REST routes no rule maps yet", "aws-marketplace": "REST routes no rule maps yet", "backup": "REST routes no rule maps yet", "batch": "REST routes no rule maps yet", "bedrock": "REST routes no rule maps yet", "bedrock-agentcore": "REST routes no rule maps yet", "cloudfront": "its creation tags are a Tags structure holding Items, which this file does not read yet", "codeguru-reviewer": "REST routes no rule maps yet", "connect": "REST routes no rule maps yet", "detective": "REST routes no rule maps yet", "dlm": "REST routes no rule maps yet", "elasticfilesystem": "REST routes no rule maps yet", "fis": "REST routes no rule maps yet", "inspector2": "REST routes no rule maps yet", "iot": "REST routes no rule maps yet", "kafka": "REST routes no rule maps yet", "mq": "REST routes no rule maps yet", "oam": "REST routes no rule maps yet", "quicksight": "metadata-only REST subset; creation-tag IAM authorization is not implemented", "ram": "REST routes no rule maps yet", "resource-explorer-2": "REST routes no rule maps yet", "rum": "REST routes no rule maps yet", "s3": "authorized by route; S3 checks s3:PutObjectTagging for an object it creates with tags itself", "s3tables": "REST routes no rule maps yet", "servicecatalog": "its operations that tag are AppRegistry's, whose REST routes no rule maps yet"},
"otherNamespaces": ["account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifyuibuilder", "aoss", "appfabric", "appflow", "application-signals", "applicationinsights", "appmesh", "apprunner", "appstream", "arc-region-switch", "artifact", "auditmanager", "b2bi", "backup-gateway", "backup-search", "bcm-dashboards", "billing", "billingconductor", "braket", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "connect-campaigns", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "directconnect", "docdb-elastic", "drs", "ds", "ebs", "ecr-public", "elemental-inference", "emr-containers", "entityresolution", "evs", "fms", "forecast", "frauddetector", "fsx", "gamelift", "gameliftstreams", "geo", "grafana", "greengrass", "groundstation", "health-agent", "healthlake", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotdeviceadvisor", "iotfleetwise", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "ivs", "ivschat", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "m2", "managedblockchain", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgn", "migrationhub-orchestrator", "mobiletargeting", "mpa", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "notifications", "notifications-contacts", "observabilityadmin", "odb", "omics", "opensearch", "osis", "outposts", "partnercentral", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "profile", "proton", "qbusiness", "rbin", "refactor-spaces", "repostspace", "resiliencehub", "rolesanywhere", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3files", "sagemaker-geospatial", "savingsplans", "schemas", "scn", "security-ir", "securityagent", "securitylake", "shield", "sms-voice", "snow-device-management", "social-messaging", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "voiceid", "vpc-lattice", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workspaces", "workspaces-instances", "workspaces-web"],
"resourceArns": {"ec2": {"application-status-check": "arn:${Partition}:ec2:${Region}:${Account}:application-status-check/*", "capacity-block": "arn:${Partition}:ec2:${Region}:${Account}:capacity-block/*", "capacity-manager-data-export": "arn:${Partition}:ec2:${Region}:${Account}:capacity-manager-data-export/*", "capacity-reservation": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation/*", "capacity-reservation-cancellation-quote": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-cancellation-quote/*", "capacity-reservation-fleet": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-fleet/*", "capacity-reservation-modification-quote": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-modification-quote/*", "carrier-gateway": "arn:${Partition}:ec2:${Region}:${Account}:carrier-gateway/*", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/*", "client-vpn-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:client-vpn-endpoint/*", "coip-pool": "arn:${Partition}:ec2:${Region}:${Account}:coip-pool/*", "customer-gateway": "arn:${Partition}:ec2:${Region}:${Account}:customer-gateway/*", "declarative-policies-report": "arn:${Partition}:ec2:${Region}:${Account}:declarative-policies-report/*", "dedicated-host": "arn:${Partition}:ec2:${Region}:${Account}:dedicated-host/*", "dhcp-options": "arn:${Partition}:ec2:${Region}:${Account}:dhcp-options/*", "egress-only-internet-gateway": "arn:${Partition}:ec2:${Region}:${Account}:egress-only-internet-gateway/*", "elastic-gpu": "arn:${Partition}:ec2:${Region}:${Account}:elastic-gpu/*", "elastic-inference": "arn:${Partition}:elastic-inference:${Region}:${Account}:elastic-inference-accelerator/*", "elastic-ip": "arn:${Partition}:ec2:${Region}:${Account}:elastic-ip/*", "export-image-task": "arn:${Partition}:ec2:${Region}:${Account}:export-image-task/*", "export-instance-task": "arn:${Partition}:ec2:${Region}:${Account}:export-instance-task/*", "fleet": "arn:${Partition}:ec2:${Region}:${Account}:fleet/*", "fpga-image": "arn:${Partition}:ec2:${Region}:${Account}:fpga-image/*", "group": "arn:${Partition}:resource-groups:${Region}:${Account}:group/*", "host-reservation": "arn:${Partition}:ec2:${Region}:${Account}:host-reservation/*", "image": "arn:${Partition}:ec2:${Region}::image/*", "image-usage-report": "arn:${Partition}:ec2:${Region}:${Account}:image-usage-report/*", "import-image-task": "arn:${Partition}:ec2:${Region}:${Account}:import-image-task/*", "import-snapshot-task": "arn:${Partition}:ec2:${Region}:${Account}:import-snapshot-task/*", "instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/*", "instance-connect-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:instance-connect-endpoint/*", "instance-event-window": "arn:${Partition}:ec2:${Region}:${Account}:instance-event-window/*", "internet-gateway": "arn:${Partition}:ec2:${Region}:${Account}:internet-gateway/*", "ipam": "arn:${Partition}:ec2::${Account}:ipam/*", "ipam-external-resource-verification-token": "arn:${Partition}:ec2::${Account}:ipam-external-resource-verification-token/*", "ipam-internet-registry-association": "arn:${Partition}:ec2::${Account}:ipam-internet-registry-association/*", "ipam-policy": "arn:${Partition}:ec2::${Account}:ipam-policy/*", "ipam-pool": "arn:${Partition}:ec2::${Account}:ipam-pool/*", "ipam-pool-allocation": "arn:${Partition}:ec2:${Region}:${Account}:ipam-pool-allocation/*", "ipam-prefix-list-resolver": "arn:${Partition}:ec2::${Account}:ipam-prefix-list-resolver/*", "ipam-prefix-list-resolver-target": "arn:${Partition}:ec2::${Account}:ipam-prefix-list-resolver-target/*", "ipam-resource-discovery": "arn:${Partition}:ec2::${Account}:ipam-resource-discovery/*", "ipam-resource-discovery-association": "arn:${Partition}:ec2::${Account}:ipam-resource-discovery-association/*", "ipam-scope": "arn:${Partition}:ec2::${Account}:ipam-scope/*", "ipv4pool-ec2": "arn:${Partition}:ec2:${Region}:${Account}:ipv4pool-ec2/*", "ipv6pool-ec2": "arn:${Partition}:ec2:${Region}:${Account}:ipv6pool-ec2/*", "key-pair": "arn:${Partition}:ec2:${Region}:${Account}:key-pair/*", "launch-template": "arn:${Partition}:ec2:${Region}:${Account}:launch-template/*", "license-configuration": "arn:${Partition}:license-manager:${Region}:${Account}:license-configuration:*", "local-gateway": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway/*", "local-gateway-route-table": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table/*", "local-gateway-route-table-virtual-interface-group-association": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table-virtual-interface-group-association/*", "local-gateway-route-table-vpc-association": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table-vpc-association/*", "local-gateway-virtual-interface": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-virtual-interface/*", "local-gateway-virtual-interface-group": "arn:${Partition}:ec2:${Region}:${Account}:Line truncated
"operations": {
@@ -281,6 +281,9 @@
"elasticmapreduce:RunJobFlow": {"tagging": ["elasticmapreduce:AddTags"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]},
"elasticmapreduce:StartNotebookExecution": {"tagging": ["elasticmapreduce:AddTags"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]},
"elasticmapreduce:StartSession": {"tagging": ["elasticmapreduce:AddTags"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]},
"emr-serverless:CreateApplication": {"tagging": ["emr-serverless:TagResource"], "requestTags": true, "tags": [{"member": "tags{}"}]},
"emr-serverless:StartJobRun": {"tagging": ["emr-serverless:TagResource"], "requestTags": true, "tags": [{"member": "tags{}"}]},
"emr-serverless:StartSession": {"tagging": ["emr-serverless:TagResource"], "requestTags": true, "tags": [{"member": "tags{}"}]},
"es:CreateDomain": {"tagging": ["es:AddTags"], "requestTags": true, "tags": [{"member": "TagList[]", "key": "Key", "value": "Value"}]},
"es:CreateElasticsearchDomain": {"tagging": ["es:AddTags"], "requestTags": true, "tags": [{"member": "TagList[]", "key": "Key", "value": "Value"}]},
"events:CreateEventBus": {"tagging": ["events:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}, {"member": "Tags{}"}]},
+28
View File
@@ -612,6 +612,34 @@
"UpdatePodIdentityAssociation": {"method": "POST", "requestUri": "/clusters/{name}/pod-identity-associations/{associationId}"}
}
},
"emr-serverless": {
"credentialScope": "emr-serverless",
"apiVersion": "2021-07-13",
"operations": {
"CancelJobRun": {"method": "DELETE", "requestUri": "/applications/{applicationId}/jobruns/{jobRunId}"},
"CreateApplication": {"method": "POST", "requestUri": "/applications"},
"DeleteApplication": {"method": "DELETE", "requestUri": "/applications/{applicationId}"},
"GetApplication": {"method": "GET", "requestUri": "/applications/{applicationId}"},
"GetDashboardForJobRun": {"method": "GET", "requestUri": "/applications/{applicationId}/jobruns/{jobRunId}/dashboard"},
"GetJobRun": {"method": "GET", "requestUri": "/applications/{applicationId}/jobruns/{jobRunId}"},
"GetResourceDashboard": {"method": "GET", "requestUri": "/applications/{applicationId}/dashboard"},
"GetSession": {"method": "GET", "requestUri": "/applications/{applicationId}/sessions/{sessionId}"},
"GetSessionEndpoint": {"method": "GET", "requestUri": "/applications/{applicationId}/sessions/{sessionId}/endpoint"},
"ListApplications": {"method": "GET", "requestUri": "/applications"},
"ListJobRunAttempts": {"method": "GET", "requestUri": "/applications/{applicationId}/jobruns/{jobRunId}/attempts"},
"ListJobRuns": {"method": "GET", "requestUri": "/applications/{applicationId}/jobruns"},
"ListSessions": {"method": "GET", "requestUri": "/applications/{applicationId}/sessions"},
"ListTagsForResource": {"method": "GET", "requestUri": "/tags/{resourceArn}"},
"StartApplication": {"method": "POST", "requestUri": "/applications/{applicationId}/start"},
"StartJobRun": {"method": "POST", "requestUri": "/applications/{applicationId}/jobruns"},
"StartSession": {"method": "POST", "requestUri": "/applications/{applicationId}/sessions"},
"StopApplication": {"method": "POST", "requestUri": "/applications/{applicationId}/stop"},
"TagResource": {"method": "POST", "requestUri": "/tags/{resourceArn}"},
"TerminateSession": {"method": "DELETE", "requestUri": "/applications/{applicationId}/sessions/{sessionId}"},
"UntagResource": {"method": "DELETE", "requestUri": "/tags/{resourceArn}"},
"UpdateApplication": {"method": "PATCH", "requestUri": "/applications/{applicationId}"}
}
},
"es": {
"credentialScope": "es",
"apiVersion": "2015-01-01",
@@ -11,8 +11,8 @@ import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
/**
* The services whose REST routes another controller also claims (DLM, GuardDuty Malware
* Protection plans and Resource Explorer 2) are reached through {@link SignedServiceRoute}: by the
* The services whose REST routes another controller also claims (DLM, EMR Serverless, GuardDuty
* Malware Protection plans and Resource Explorer 2) are reached through {@link SignedServiceRoute}: by the
* signing service, from the header or the query string, and never by calling the internal prefix
* the routes are registered under.
*/
@@ -24,7 +24,8 @@ class SignedServiceRouteIntegrationTest {
+ "/20260215/us-east-1/s3/aws4_request";
@ParameterizedTest
@ValueSource(strings = {"/_guardduty/malware-protection-plan", "/_dlm/policies", "/_re2/CreateIndex"})
@ValueSource(strings = {"/_guardduty/malware-protection-plan", "/_dlm/policies", "/_re2/CreateIndex",
"/_emrserverless/applications"})
void aRequestStraightToAnInternalPrefixIsRefusedAsAnInvalidBucket(String path) {
given().header("Authorization", S3_AUTH)
.when().get(path)
@@ -0,0 +1,140 @@
package io.floci.aws.services.emrserverless;
import io.floci.aws.testing.SignedIamEnforcementProfile;
import io.floci.aws.testing.SignedIamUsers;
import io.floci.aws.testutil.AwsRequestSigner;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
import io.restassured.response.Response;
import io.restassured.specification.RequestSpecification;
import org.junit.jupiter.api.Test;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.UUID;
import static io.restassured.RestAssured.given;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
/**
* EMR Serverless requests are checked against the caller's policies through its generated routes, at the model's
* paths, although its route filter moves them onto an internal prefix: as the action of the operation each route
* names, on the application its path names ({@code arn:aws:emr-serverless:<region>:<account>:/applications/<id>}). A
* request sent to the prefix itself is checked as the same route.
*/
@QuarkusTest
@TestProfile(SignedIamEnforcementProfile.class)
class EmrServerlessIamIntegrationTest {
private final AwsRequestSigner admin = AwsRequestSigner.signedAs("test", "test", "emr-serverless");
@TestHTTPResource("/")
URI endpoint;
@Test
void callerWithoutPermissionsIsRefusedBeforeAnApplicationIsCreated() throws Exception {
String name = "iam-none-" + UUID.randomUUID().toString().substring(0, 8);
try (SignedIamUsers.User user = SignedIamUsers.createUser(endpoint, "emrs-iam-")) {
denied(send(user.signer("emr-serverless"), "POST", "/applications", application(name)),
"emr-serverless:CreateApplication");
denied(send(user.signer("emr-serverless"), "GET", "/applications", null),
"emr-serverless:ListApplications");
}
send(admin, "GET", "/applications", null).then().statusCode(200).body(not(containsString(name)));
}
@Test
void anApplicationScopedAllowReadsThatApplicationAndRefusesAnother() throws Exception {
String allowed = createApplication();
String other = createApplication();
try (SignedIamUsers.User user = SignedIamUsers.createUser(endpoint, "emrs-iam-", "access",
allow("\"emr-serverless:GetApplication\"", applicationArn(allowed)))) {
send(user.signer("emr-serverless"), "GET", "/applications/" + allowed, null).then().statusCode(200)
.body("application.applicationId", equalTo(allowed));
denied(send(user.signer("emr-serverless"), "GET", "/applications/" + other, null),
"emr-serverless:GetApplication");
denied(send(user.signer("emr-serverless"), "DELETE", "/applications/" + allowed, null),
"emr-serverless:DeleteApplication");
send(user.signer("emr-serverless"), "GET", "/_emrserverless/applications/" + allowed, null).then()
.statusCode(200).body("application.applicationId", equalTo(allowed));
denied(send(user.signer("emr-serverless"), "GET", "/_emrserverless/applications/" + other, null),
"emr-serverless:GetApplication");
} finally {
send(admin, "DELETE", "/applications/" + allowed, null).then().statusCode(200);
send(admin, "DELETE", "/applications/" + other, null).then().statusCode(200);
}
}
/** Tags a create sends are checked as {@code emr-serverless:TagResource} too, as AWS checks them. */
@Test
void tagsOnACreateNeedTagResourceToo() throws Exception {
String name = "iam-tags-" + UUID.randomUUID().toString().substring(0, 8);
String tagged = application(name).replace("\"type\":\"SPARK\"", "\"type\":\"SPARK\",\"tags\":{\"team\":\"data\"}");
try (SignedIamUsers.User user = SignedIamUsers.createUser(endpoint, "emrs-iam-", "create", allow(
"\"emr-serverless:CreateApplication\"", "*"))) {
denied(send(user.signer("emr-serverless"), "POST", "/applications", tagged), "emr-serverless:TagResource");
}
send(admin, "GET", "/applications", null).then().statusCode(200).body(not(containsString(name)));
try (SignedIamUsers.User user = SignedIamUsers.createUser(endpoint, "emrs-iam-", "create", allow(
"[\"emr-serverless:CreateApplication\",\"emr-serverless:TagResource\"]", "*"))) {
String id = send(user.signer("emr-serverless"), "POST", "/applications", tagged).then().statusCode(200)
.extract().path("applicationId");
send(admin, "DELETE", "/applications/" + id, null).then().statusCode(200);
}
}
/** A job run's execution role is checked as {@code iam:PassRole} before the run starts. */
@Test
void aJobRunsExecutionRoleNeedsPassRole() throws Exception {
String application = createApplication();
String role = "arn:aws:iam::000000000000:role/emrs-job-" + UUID.randomUUID().toString().substring(0, 8);
String run = "{\"clientToken\":\"" + UUID.randomUUID() + "\",\"executionRoleArn\":\"" + role
+ "\",\"jobDriver\":{\"sparkSubmit\":{\"entryPoint\":\"s3://bucket/job.py\"}}}";
try (SignedIamUsers.User user = SignedIamUsers.createUser(endpoint, "emrs-iam-", "run", allow(
"\"emr-serverless:StartJobRun\"", applicationArn(application)))) {
denied(send(user.signer("emr-serverless"), "POST", "/applications/" + application + "/jobruns", run),
"iam:PassRole");
} finally {
send(admin, "DELETE", "/applications/" + application, null).then().statusCode(200);
}
}
private static String allow(String actions, String resource) {
return "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":" + actions
+ ",\"Resource\":\"" + resource + "\"}]}";
}
private String createApplication() throws Exception {
String name = "iam-" + UUID.randomUUID().toString().substring(0, 8);
return send(admin, "POST", "/applications", application(name)).then().statusCode(200)
.extract().path("applicationId");
}
private static String application(String name) {
return "{\"name\":\"" + name + "\",\"releaseLabel\":\"emr-6.6.0\",\"type\":\"SPARK\",\"clientToken\":\""
+ UUID.randomUUID() + "\"}";
}
private static String applicationArn(String id) {
return "arn:aws:emr-serverless:us-east-1:000000000000:/applications/" + id;
}
private Response send(AwsRequestSigner signer, String method, String path, String body) throws Exception {
URI uri = endpoint.resolve(path);
byte[] bytes = body == null ? new byte[0] : body.getBytes(StandardCharsets.UTF_8);
RequestSpecification request = given().urlEncodingEnabled(false)
.headers(signer.headersFor(method, uri, Map.of(), bytes));
if (body != null) {
request = request.contentType("application/json").body(bytes);
}
return request.request(method, uri);
}
private static void denied(Response response, String action) {
response.then().statusCode(403).body(containsString("not authorized to perform: " + action));
}
}
+1 -2
View File
@@ -81,7 +81,7 @@ NAMESPACES = (
"application-autoscaling", "athena", "autoscaling", "budgets", "cloudformation", "cloudtrail",
"cloudwatch", "codebuild", "codedeploy", "codepipeline", "cognito-identity", "cognito-idp",
"comprehend", "config", "datasync", "dms", "dsql", "ec2", "ecr", "ecs", "eks", "elasticmapreduce",
"events", "firehose", "glue", "iam", "kinesis", "kinesisanalytics", "lambda", "logs", "pipes",
"emr-serverless", "events", "firehose", "glue", "iam", "kinesis", "kinesisanalytics", "lambda", "logs", "pipes",
"rds", "redshift", "redshift-serverless", "rekognition", "resource-groups", "s3", "sagemaker", "scheduler",
"secretsmanager", "servicecatalog", "ses", "sns", "ssm", "states", "swf", "textract",
"transcribe", "transfer", "translate",
@@ -104,7 +104,6 @@ NOT_COVERED = {
"cloudfront": "REST routes no rule maps yet",
"dlm": "REST routes no rule maps yet",
"elasticfilesystem": "REST routes no rule maps yet",
"emr-serverless": "REST routes no rule maps yet",
"es": "REST routes no rule maps yet",
"fis": "REST routes no rule maps yet",
"guardduty": "REST routes no rule maps yet",
+1 -2
View File
@@ -172,7 +172,7 @@ OUTPUT = REPO_ROOT / "src/main/resources/aws/iam-request-resources.json"
# are the ones its handlers mint.
NAMESPACES = ("access-analyzer", "acm", "application-autoscaling", "athena", "bcm-data-exports",
"bcm-pricing-calculator", "budgets", "ce", "cloudfront", "cloudfront-keyvaluestore", "cloudtrail", "codebuild", "codepipeline", "cognito-identity",
"cognito-idp", "controltower", "cur", "datasync", "ec2", "ecr", "elasticloadbalancing", "elasticmapreduce", "es", "events",
"cognito-idp", "controltower", "cur", "datasync", "ec2", "ecr", "elasticloadbalancing", "elasticmapreduce", "emr-serverless", "es", "events",
"firehose", "globalaccelerator", "inspector2", "kinesisanalytics", "macie2", "payment-cryptography",
"quicksight", "redshift", "redshift-data", "redshift-serverless", "rekognition", "servicediscovery",
"servicequotas", "sso", "states", "textract", "timestream-influxdb", "translate", "signer", "xray",
@@ -256,7 +256,6 @@ NOT_COVERED: dict[str, str] = {
"`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,
"emr-serverless": _REST,
"execute-api": _REST,
"fis": _REST,
"glue": _LATER,
+2 -2
View File
@@ -109,7 +109,7 @@ NAMESPACES = (
"bcm-pricing-calculator", "budgets", "ce", "cloudformation", "cloudhsm", "cloudtrail", "cloudwatch",
"codedeploy", "codepipeline", "cognito-identity", "cognito-idp", "comprehend", "config", "controltower", "cur",
"datasync", "dms", "dsql", "dynamodb", "ec2", "ecr", "ecs", "eks", "elasticache", "elasticloadbalancing",
"elasticmapreduce", "es", "events", "firehose", "globalaccelerator", "glue", "guardduty", "iam", "kinesis",
"elasticmapreduce", "emr-serverless", "es", "events", "firehose", "globalaccelerator", "glue", "guardduty", "iam", "kinesis",
"kinesisanalytics", "kms", "lambda", "lightsail", "logs", "macie2", "memorydb", "network-firewall",
"organizations", "payment-cryptography", "pipes", "rds", "redshift", "redshift-serverless", "rekognition",
"resource-groups", "route53resolver", "sagemaker", "scheduler", "secretsmanager", "securityhub",
@@ -127,7 +127,7 @@ NOT_COVERED = {
"cloudfront": "its creation tags are a Tags structure holding Items, which this file does not read yet",
"codeguru-reviewer": _NO_ROUTES, "connect": _NO_ROUTES,
"detective": _NO_ROUTES, "dlm": _NO_ROUTES,
"elasticfilesystem": _NO_ROUTES, "emr-serverless": _NO_ROUTES, "fis": _NO_ROUTES,
"elasticfilesystem": _NO_ROUTES, "fis": _NO_ROUTES,
"inspector2": _NO_ROUTES, "iot": _NO_ROUTES, "kafka": _NO_ROUTES,
"mq": _NO_ROUTES, "oam": _NO_ROUTES,
"quicksight": "metadata-only REST subset; creation-tag IAM authorization is not implemented",
+1
View File
@@ -56,6 +56,7 @@ MODELS: dict[str, str] = {
"controltower": "controltower",
"dsql": "dsql",
"eks": "eks",
"emr-serverless": "emr-serverless",
"guardduty": "guardduty",
"es": "es",
"inspector2": "inspector2",