fix(iam): check Kinesis Data Streams requests on the resources they name, from the generated table (#8989)

Kinesis was built by hand: ResourceArnBuilder read a request's
StreamARN, StreamName or ResourceARN into one ARN and checked everything
else on stream/*, the request resources table held no Kinesis operation,
and nothing gave a policy condition a stream's tags. kinesis moves from
HAND_BUILT to NAMESPACES, so the table gives each operation the
resources botocore's members name as the Service Reference types them:
the stream by StreamARN or StreamName, a consumer by ConsumerARN, a
tagged resource by ResourceARN, and the KMS key StartStreamEncryption
and StopStreamEncryption name. Its ResourceArnBuilder branch goes. Only
Kinesis's operations change in the table. KinesisStoredResourceArns
answers a stream's or a consumer's stored tags; the tag calls give the
resource a new map under their lock, and the tags fields are volatile.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-19 10:04:27 -04:00
1 parent ad0e47910f
commit 43d6ea4961
11 files changed
+237 -61

No files matched your search

+5 -4
View File
@@ -2332,7 +2332,7 @@ requests retain HTTP 403 XML `AccessDenied` responses, except SNS's, which retur
action is denied. The routed protocol determines the status, not just the request's content type.
A request is checked against the resources it names. Floci builds their ARNs itself for S3,
DynamoDB, Kinesis, SSM, KMS, IAM, Resource Groups, EventBridge
DynamoDB, SSM, KMS, IAM, Resource Groups, EventBridge
Pipes, Aurora DSQL, EKS, API Gateway, CloudWatch Logs and STS. For Secrets Manager, Elastic Load Balancing, ECR,
Step Functions, EventBridge, EventBridge Scheduler, Amazon Cognito user pools and identity pools, Amazon Data Firehose, Cloud
Map, ACM, CodePipeline, CodeBuild, Amazon Managed Service for Apache Flink (Kinesis Data Analytics v2),
@@ -2341,7 +2341,7 @@ AWS Data Exports, AWS Pricing Calculator, Cost Explorer, CloudTrail, Global Acce
Timestream for InfluxDB, Amazon Redshift, the Amazon Redshift Data API, AWS Payment Cryptography, AWS DataSync, Amazon EMR,
Amazon Rekognition, IAM Identity Center, Amazon Inspector, Amazon Macie, AWS Fault Injection Service, AWS Resource
Access Manager, CloudWatch Observability Access Manager, AWS Resource Explorer, AWS Account Management, AWS Control
Catalog, Amazon OpenSearch Service, IAM Access Analyzer, AWS Security Hub, Amazon GuardDuty, Lambda, AWS Glue, Amazon SQS and Amazon SNS they come from a table generated from AWS's Service Reference and botocore, `src/main/resources/aws/iam-request-resources.json`, which gives each
Catalog, Amazon OpenSearch Service, IAM Access Analyzer, AWS Security Hub, Amazon GuardDuty, Lambda, AWS Glue, Amazon SQS, Amazon SNS and Amazon Kinesis Data Streams they come from a table generated from AWS's Service Reference and botocore, `src/main/resources/aws/iam-request-resources.json`, which gives each
operation's action, the resource types that action acts on with their ARN formats, and the request
members that name them: a member holding a resource's ARN, which counts when it matches the format
of a type the action acts on, or members filling the variables of a type's format. Nothing in it is
@@ -3177,7 +3177,7 @@ so a denied request gets `AccessDenied` even for a cluster that does not exist.
that `DbName` needs is not checked.
**IAM's own resources are named.** When enforcement evaluates a request, the target resource comes
from `ResourceArnBuilder`, which builds an ARN for S3, Lambda, DynamoDB, Kinesis, Secrets
from `ResourceArnBuilder`, which builds an ARN for S3, Lambda, DynamoDB, Secrets
Manager, SSM, KMS and IAM. Within IAM the resource type each action is evaluated against is the one
the Service Authorization Reference gives it, so a statement naming a specific user, role, group,
instance profile, managed policy, MFA device, identity provider or server certificate constrains
@@ -3536,7 +3536,8 @@ floci populates:
subscriptions, Security Hub for its hubs and configuration policies, Control Tower for its landing zones and enabled
controls, GuardDuty for its detectors and Malware Protection plans, Cloud Map for its namespaces and services, Elastic
Load Balancing for its load balancers, target groups, listeners and rules and its Classic Load Balancers, SQS for its
queues and SNS for its topics. Tag keys differing only in case are one condition key holding every value.
queues, SNS for its topics and Kinesis Data Streams for its streams and consumers. Tag keys differing only in case
are one condition key holding every value.
- EC2 resource keys such as a network interface's `ec2:Vpc`, `ec2:Subnet`, `ec2:AvailabilityZone` and
`ec2:NetworkInterfaceID`: for every action on a resource EC2 holds, the members of the resource the
key names, an ARN for a key the Service Reference types as one. `resourceKeys` in
@@ -58,10 +58,10 @@ import java.util.Optional;
* monitor or subscription; Security Hub, for the tags of a hub or a configuration policy; Control Tower, for the tags
* of a landing zone or an enabled control; GuardDuty, for the tags of a detector or a Malware Protection plan; Cloud
* Map, for the tags of a namespace or a service; Elastic Load Balancing, for the tags of a load balancer, a target
* group, a listener, a rule or a Classic Load Balancer; SQS, for the tags of a queue; SNS, for the tags of a topic);
* looked up lazily by {@code ResourceArnBuilder} and {@code IamConditionContextResolver} through
* {@code Instance<StoredResourceArns>} for the namespace a request or an ARN is of, so IAM never depends on that
* service directly.</p>
* group, a listener, a rule or a Classic Load Balancer; SQS, for the tags of a queue; SNS, for the tags of a topic;
* Kinesis Data Streams, for the tags of a stream or a consumer); looked up lazily by {@code ResourceArnBuilder} and
* {@code IamConditionContextResolver} through {@code Instance<StoredResourceArns>} for the namespace a request or an
* ARN is of, so IAM never depends on that service directly.</p>
*
* <p>Each answer is a lookup of what the service holds, asked for by an entry of the generated table ({@code find},
* {@code through}, a default, {@code forwarded}, a type's {@code resourceTagKeys}): never a fact about what an operation acts on, which the table alone
@@ -186,7 +186,6 @@ public class ResourceArnBuilder {
return switch (credentialScope) {
case "s3" -> buildS3Resources(operation, path, ctx, region);
case "dynamodb" -> buildDynamoDbArns(ctx, region, accountId);
case "kinesis" -> List.of(buildKinesisArn(ctx, region, accountId));
case "iam" -> buildIamArns(ctx, region, accountId);
case "resource-groups" -> List.of(buildResourceGroupArn(ctx, region, accountId));
case "pipes" -> List.of(buildPipesArn(path, ctx, region, accountId, partition));
@@ -1360,35 +1359,6 @@ public class ResourceArnBuilder {
return AwsArnUtils.Arn.of("dynamodb", region, accountId, "table/" + tableName).toString();
}
// ── Kinesis ──────────────────────────────────────────────────────────────────
private String buildKinesisArn(ContainerRequestContext ctx, String region, String accountId) {
JsonNode json = readJsonBody(ctx);
if (json != null && json.isObject()) {
if (json.hasNonNull("StreamARN")) {
String streamArn = json.get("StreamARN").asText().trim();
if (!streamArn.isEmpty()) {
return streamArn;
}
}
if (json.hasNonNull("StreamName")) {
String streamName = json.get("StreamName").asText().trim();
if (!streamName.isEmpty()) {
if (AwsArnUtils.isArnFor(streamName, "kinesis")) {
return streamName;
}
return AwsArnUtils.Arn.of("kinesis", region, accountId, "stream/" + streamName).toString();
}
}
if (json.hasNonNull("ResourceARN")) {
String resourceArn = json.get("ResourceARN").asText().trim();
if (!resourceArn.isEmpty()) {
return resourceArn;
}
}
}
return AwsArnUtils.Arn.of("kinesis", region, accountId, "stream/*").toString();
}
// ── KMS ──────────────────────────────────────────────────────────────────────
/**
@@ -371,7 +371,7 @@ public class KinesisService implements ResourceProvider {
KinesisStream stream = resolveStream(streamName, region);
requireActive(stream);
validateTagCapacity(stream.getTags(), tags);
stream.getTags().putAll(tags);
stream.setTags(withTags(stream.getTags(), tags));
store.put(key, stream);
}
}
@@ -381,7 +381,7 @@ public class KinesisService implements ResourceProvider {
synchronized (lockFor(key)) {
KinesisStream stream = resolveStream(streamName, region);
requireActive(stream);
tagKeys.forEach(stream.getTags()::remove);
stream.setTags(withoutTags(stream.getTags(), tagKeys));
store.put(key, stream);
}
}
@@ -396,7 +396,7 @@ public class KinesisService implements ResourceProvider {
synchronized (consumerStore) {
KinesisConsumer consumer = resolveConsumerForTags(key);
validateResourceTagLimit(consumer.getTags(), tags);
consumer.getTags().putAll(tags);
consumer.setTags(withTags(consumer.getTags(), tags));
consumerStore.put(key, consumer);
}
return;
@@ -407,7 +407,7 @@ public class KinesisService implements ResourceProvider {
KinesisStream stream = describeStreamByArn(resourceArn, region);
requireActive(stream);
validateResourceTagLimit(stream.getTags(), tags);
stream.getTags().putAll(tags);
stream.setTags(withTags(stream.getTags(), tags));
store.put(key, stream);
}
}
@@ -417,7 +417,7 @@ public class KinesisService implements ResourceProvider {
String key = regionKey(region, resourceArn);
synchronized (consumerStore) {
KinesisConsumer consumer = resolveConsumerForTags(key);
tagKeys.forEach(consumer.getTags()::remove);
consumer.setTags(withoutTags(consumer.getTags(), tagKeys));
consumerStore.put(key, consumer);
}
return;
@@ -427,11 +427,50 @@ public class KinesisService implements ResourceProvider {
synchronized (lockFor(key)) {
KinesisStream stream = describeStreamByArn(resourceArn, region);
requireActive(stream);
tagKeys.forEach(stream.getTags()::remove);
stream.setTags(withoutTags(stream.getTags(), tagKeys));
store.put(key, stream);
}
}
/**
* A new map holding {@code tags} and {@code added}: a tag call gives the resource a new map, under its lock, so a
* lookup reads one whole set.
*/
private static Map<String, String> withTags(Map<String, String> tags, Map<String, String> added) {
Map<String, String> merged = new HashMap<>(tags);
merged.putAll(added);
return merged;
}
/** A new map holding {@code tags} without {@code removed}, as {@link #withTags}. */
private static Map<String, String> withoutTags(Map<String, String> tags, List<String> removed) {
Map<String, String> remaining = new HashMap<>(tags);
removed.forEach(remaining::remove);
return remaining;
}
/**
* The tags of the stream whose ARN is {@code streamArn} in {@code account}, read in place under the key the
* handlers read, the stream's name in the ARN's Region, and matched on the whole ARN it records; none when there
* is no such stream.
*/
Map<String, String> streamTagsInAccount(String account, String streamArn, String streamName) {
return AccountAwareStorageBackend.readInAccount(store, account,
regionKey(AwsArnUtils.parse(streamArn).region(), streamName))
.filter(stream -> streamArn.equals(stream.getStreamArn()))
.map(KinesisStream::getTags).orElse(Map.of());
}
/**
* The tags of the consumer whose ARN is {@code consumerArn} in {@code account}, read in place under the key the
* handlers read, the ARN in its Region; none when there is no such consumer.
*/
Map<String, String> consumerTagsInAccount(String account, String consumerArn) {
return AccountAwareStorageBackend.readInAccount(consumerStore, account,
regionKey(AwsArnUtils.parse(consumerArn).region(), consumerArn))
.map(KinesisConsumer::getTags).orElse(Map.of());
}
public Map<String, String> listTagsForResource(String resourceArn, String region) {
if (isConsumerTagResource(resourceArn, region)) {
synchronized (consumerStore) {
@@ -0,0 +1,64 @@
package io.floci.aws.services.kinesis;
import io.floci.aws.core.common.AwsArnUtils;
import io.floci.aws.core.common.RegionResolver;
import io.floci.aws.core.common.StoredResourceArns;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/** IAM's lookup of the tags Kinesis Data Streams holds on a stream or a consumer, for the {@code kinesis} namespace. */
@ApplicationScoped
public class KinesisStoredResourceArns implements StoredResourceArns {
private static final String NAMESPACE = "kinesis";
private static final String STREAM = "stream/";
private static final String CONSUMER = "/consumer/";
private final KinesisService kinesis;
private final RegionResolver regionResolver;
@Inject
public KinesisStoredResourceArns(KinesisService kinesis, RegionResolver regionResolver) {
this.kinesis = kinesis;
this.regionResolver = regionResolver;
}
@Override
public String namespace() {
return NAMESPACE;
}
/** A request names a stream by its name or ARN and a consumer by its ARN: nothing to find. */
@Override
public Optional<String> find(String type, List<String> names, String region) {
return Optional.empty();
}
/**
* The tags of the stream or the consumer whose ARN is {@code arn}, in the request's account, where the tag
* handlers read: an ARN of another account names none. A consumer's ARN, a stream's with {@code /consumer/} and
* the consumer after it, reads the consumer held under that ARN; a stream's reads the stream of its name, matched
* on the whole ARN it records. A tag without a value reads as an empty one. Tag calls give the resource a new map,
* so the read is of one whole set.
*/
@Override
public Map<String, String> storedTags(String arn) {
if (!AwsArnUtils.isArnFor(arn, NAMESPACE)) {
return Map.of();
}
AwsArnUtils.Arn parsed = AwsArnUtils.parse(arn);
String account = regionResolver.getAccountId();
String resource = parsed.resource();
if (!parsed.accountId().equals(account) || !resource.startsWith(STREAM)) {
return Map.of();
}
Map<String, String> tags = resource.contains(CONSUMER)
? kinesis.consumerTagsInAccount(account, arn)
: kinesis.streamTagsInAccount(account, arn, resource.substring(STREAM.length()));
return StoredResourceArns.withEmptyValues(tags);
}
}
@@ -15,7 +15,7 @@ public class KinesisConsumer {
private String consumerStatus;
private Instant consumerCreationTimestamp;
private String streamArn;
private Map<String, String> tags = new HashMap<>();
private volatile Map<String, String> tags = new HashMap<>();
public KinesisConsumer() {}
@@ -26,7 +26,7 @@ public class KinesisStream {
private volatile List<KinesisShard> shards = new CopyOnWriteArrayList<>();
private int retentionPeriodHours = 24;
private Instant streamCreationTimestamp;
private Map<String, String> tags = new HashMap<>();
private volatile Map<String, String> tags = new HashMap<>();
private String encryptionType = "NONE";
private String keyId;
private String streamMode = "PROVISIONED";
@@ -1,11 +1,11 @@
{
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-19", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "route53": ["route53"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"handBuilt": ["apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kinesis", "kms", "logs", "pipes", "resource-groups", "s3", "sts"],
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "route53": ["route53"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"handBuilt": ["apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kms", "logs", "pipes", "resource-groups", "s3", "sts"],
"notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appsync": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "aps": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup:<id>:autoScalingGroupName/<name>`, while Floci mints `autoScalingGroup:<name>`, which other services (ECS capacity providers) read back; the mint is fixed first", "aws-marketplace": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "backup": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "batch": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "cloudwatch": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeartifact": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "codedeploy": "not read yet: the Service Reference gives an on-premises instance's ARN as `instance:${InstanceName}`, while the CodeDeploy permissions reference gives arn:aws:codedeploy:region:account-id:instance/instance-ID and AWS's GetOnPremisesInstance example answers instance/<name>_<id>, an id the service mints after the name; reading it needs that format corrected", "codeguru-reviewer": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "comprehend": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2-instance-connect": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticache": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticbeanstalk": "not read yet: an environment's ARN carries its application's name, `environment/<application>/<name>`, while most of its requests name it by EnvironmentName or EnvironmentId alone, so reading it needs the stored environment those find", "elasticfilesystem": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST rLine truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "ssmmessages", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"],
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:$Line truncated
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver-target": ["aws:ResourceTag/", "ec2:Line truncated
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:$Line truncated
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver-target": ["aws:ResourceTag/", "ec2:Line truncated
"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"]},
@@ -2973,6 +2973,63 @@
"inspector2:UpdateFilter": {"action": "inspector2:UpdateFilter", "types": ["Filter"], "resources": [{"types": ["Filter"], "arn": "filterArn"}]},
"inspector2:UpdateOrgEc2DeepInspectionConfiguration": {"action": "inspector2:UpdateOrgEc2DeepInspectionConfiguration", "types": [], "resources": []},
"inspector2:UpdateOrganizationConfiguration": {"action": "inspector2:UpdateOrganizationConfiguration", "types": [], "resources": []},
"kinesis:AcknowledgeDeadLetterQueueRecords": {"action": "kinesis:AcknowledgeDeadLetterQueueRecords", "types": ["queue"], "resources": []},
"kinesis:AcknowledgeQueueRecords": {"action": "kinesis:AcknowledgeQueueRecords", "types": ["queue"], "resources": []},
"kinesis:AddTagsToStream": {"action": "kinesis:AddTagsToStream", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:CreateChannel": {"action": "kinesis:CreateChannel", "types": ["channel"], "resources": [{"types": ["channel"], "arn": "StreamConfigurationList[].StreamARN"}, {"type": "channel", "fill": {}, "find": ["ChannelName"]}]},
"kinesis:CreateQueue": {"action": "kinesis:CreateQueue", "types": ["queue"], "resources": [{"type": "queue", "fill": {}}]},
"kinesis:CreateStream": {"action": "kinesis:CreateStream", "types": ["stream"], "resources": [{"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:DecreaseStreamRetentionPeriod": {"action": "kinesis:DecreaseStreamRetentionPeriod", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:DeleteChannel": {"action": "kinesis:DeleteChannel", "types": ["channel"], "resources": [{"types": ["channel"], "arn": "ChannelARN"}]},
"kinesis:DeleteQueue": {"action": "kinesis:DeleteQueue", "types": ["queue"], "resources": []},
"kinesis:DeleteResourcePolicy": {"action": "kinesis:DeleteResourcePolicy", "types": ["consumer", "queue", "stream"], "resources": [{"types": ["consumer", "queue", "stream"], "arn": "ResourceARN"}]},
"kinesis:DeleteStream": {"action": "kinesis:DeleteStream", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:DeregisterStreamConsumer": {"action": "kinesis:DeregisterStreamConsumer", "types": ["consumer"], "resources": [{"types": ["consumer"], "arn": "ConsumerARN"}, {"types": ["consumer"], "arn": "StreamARN"}, {"type": "consumer", "fill": {"ConsumerName": "ConsumerName"}}]},
"kinesis:DescribeAccountSettings": {"action": "kinesis:DescribeAccountSettings", "types": [], "resources": []},
"kinesis:DescribeChannel": {"action": "kinesis:DescribeChannel", "types": ["channel"], "resources": [{"types": ["channel"], "arn": "ChannelARN"}]},
"kinesis:DescribeLimits": {"action": "kinesis:DescribeLimits", "types": [], "resources": []},
"kinesis:DescribeQueue": {"action": "kinesis:DescribeQueue", "types": ["queue"], "resources": []},
"kinesis:DescribeStream": {"action": "kinesis:DescribeStream", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:DescribeStreamConsumer": {"action": "kinesis:DescribeStreamConsumer", "types": ["consumer"], "resources": [{"types": ["consumer"], "arn": "ConsumerARN"}, {"types": ["consumer"], "arn": "StreamARN"}, {"type": "consumer", "fill": {"ConsumerName": "ConsumerName"}}]},
"kinesis:DescribeStreamSummary": {"action": "kinesis:DescribeStreamSummary", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:DisableEnhancedMonitoring": {"action": "kinesis:DisableEnhancedMonitoring", "types": [], "resources": []},
"kinesis:EnableEnhancedMonitoring": {"action": "kinesis:EnableEnhancedMonitoring", "types": [], "resources": []},
"kinesis:GetRecords": {"action": "kinesis:GetRecords", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {}, "when": {"StreamARN": [null]}, "default": true}]},
"kinesis:GetResourcePolicy": {"action": "kinesis:GetResourcePolicy", "types": ["consumer", "queue", "stream"], "resources": [{"types": ["consumer", "queue", "stream"], "arn": "ResourceARN"}]},
"kinesis:GetShardIterator": {"action": "kinesis:GetShardIterator", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:IncreaseStreamRetentionPeriod": {"action": "kinesis:IncreaseStreamRetentionPeriod", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:ListChannels": {"action": "kinesis:ListChannels", "types": [], "resources": []},
"kinesis:ListQueues": {"action": "kinesis:ListQueues", "types": [], "resources": []},
"kinesis:ListShards": {"action": "kinesis:ListShards", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:ListStreamConsumers": {"action": "kinesis:ListStreamConsumers", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}]},
"kinesis:ListStreams": {"action": "kinesis:ListStreams", "types": [], "resources": []},
"kinesis:ListTagsForResource": {"action": "kinesis:ListTagsForResource", "types": ["channel", "consumer", "queue", "stream"], "resources": [{"types": ["channel", "consumer", "queue", "stream"], "arn": "ResourceARN"}]},
"kinesis:ListTagsForStream": {"action": "kinesis:ListTagsForStream", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:MergeShards": {"action": "kinesis:MergeShards", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:PutRecord": {"action": "kinesis:PutRecord", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:PutRecords": {"action": "kinesis:PutRecords", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:PutResourcePolicy": {"action": "kinesis:PutResourcePolicy", "types": ["consumer", "queue", "stream"], "resources": [{"types": ["consumer", "queue", "stream"], "arn": "ResourceARN"}]},
"kinesis:ReceiveDeadLetterQueueRecords": {"action": "kinesis:ReceiveDeadLetterQueueRecords", "types": ["queue"], "resources": []},
"kinesis:ReceiveQueueRecords": {"action": "kinesis:ReceiveQueueRecords", "types": ["queue"], "resources": []},
"kinesis:RegisterStreamConsumer": {"action": "kinesis:RegisterStreamConsumer", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}]},
"kinesis:RemoveTagsFromStream": {"action": "kinesis:RemoveTagsFromStream", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:RestoreDeadLetterQueueRecords": {"action": "kinesis:RestoreDeadLetterQueueRecords", "types": ["queue"], "resources": []},
"kinesis:SplitShard": {"action": "kinesis:SplitShard", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:StartStreamEncryption": {"action": "kinesis:StartStreamEncryption", "types": ["kmsKey", "stream"], "resources": [{"types": ["kmsKey", "stream"], "arn": "StreamARN"}, {"type": "kmsKey", "fill": {"KeyId": "KeyId"}}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:StopStreamEncryption": {"action": "kinesis:StopStreamEncryption", "types": ["kmsKey", "stream"], "resources": [{"types": ["kmsKey", "stream"], "arn": "StreamARN"}, {"type": "kmsKey", "fill": {"KeyId": "KeyId"}}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesis:SubscribeToShard": {"action": "kinesis:SubscribeToShard", "types": ["consumer"], "resources": [{"types": ["consumer"], "arn": "ConsumerARN"}]},
"kinesis:TagResource": {"action": "kinesis:TagResource", "types": ["channel", "consumer", "queue", "stream"], "resources": [{"types": ["channel", "consumer", "queue", "stream"], "arn": "ResourceARN"}]},
"kinesis:UntagResource": {"action": "kinesis:UntagResource", "types": ["channel", "consumer", "queue", "stream"], "resources": [{"types": ["channel", "consumer", "queue", "stream"], "arn": "ResourceARN"}]},
"kinesis:UpdateAccountSettings": {"action": "kinesis:UpdateAccountSettings", "types": [], "resources": []},
"kinesis:UpdateChannel": {"action": "kinesis:UpdateChannel", "types": ["channel"], "resources": [{"types": ["channel"], "arn": "ChannelARN"}]},
"kinesis:UpdateDeadLetterQueueRecordsVisibility": {"action": "kinesis:UpdateDeadLetterQueueRecordsVisibility", "types": ["queue"], "resources": []},
"kinesis:UpdateMaxRecordSize": {"action": "kinesis:UpdateMaxRecordSize", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {}, "when": {"StreamARN": [null]}, "default": true}]},
"kinesis:UpdateQueue": {"action": "kinesis:UpdateQueue", "types": ["queue"], "resources": []},
"kinesis:UpdateQueueRecordsVisibility": {"action": "kinesis:UpdateQueueRecordsVisibility", "types": ["queue"], "resources": []},
"kinesis:UpdateShardCount": {"action": "kinesis:UpdateShardCount", "types": [], "resources": []},
"kinesis:UpdateStreamMode": {"action": "kinesis:UpdateStreamMode", "types": [], "resources": []},
"kinesis:UpdateStreamRecordDistributionStrategy": {"action": "kinesis:UpdateStreamRecordDistributionStrategy", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}]},
"kinesis:UpdateStreamWarmThroughput": {"action": "kinesis:UpdateStreamWarmThroughput", "types": ["stream"], "resources": [{"types": ["stream"], "arn": "StreamARN"}, {"type": "stream", "fill": {"StreamName": "StreamName"}}]},
"kinesisanalytics:AddApplicationCloudWatchLoggingOption": {"action": "kinesisanalytics:AddApplicationCloudWatchLoggingOption", "types": ["application"], "resources": [{"types": ["application"], "arn": "CloudWatchLoggingOption.LogStreamARN"}, {"type": "application", "fill": {"ApplicationName": "ApplicationName"}}]},
"kinesisanalytics:AddApplicationInput": {"action": "kinesisanalytics:AddApplicationInput", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationName": "ApplicationName"}}]},
"kinesisanalytics:AddApplicationInputProcessingConfiguration": {"action": "kinesisanalytics:AddApplicationInputProcessingConfiguration", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationName": "ApplicationName"}}]},
@@ -1041,6 +1041,42 @@ class IamRequestResourceEnforcementIntegrationTest {
return arn;
}
/**
* A Kinesis request is checked on the stream its StreamName or StreamARN names, from the generated table, so a
* grant on one stream does not reach another; and an {@code aws:ResourceTag} condition reads the tags Kinesis
* holds on that stream, as AddTagsToStream leaves them.
*/
@Test
void aKinesisRequestIsCheckedOnTheStreamItNamesWithItsTags() {
String tagged = kinesisStream("res-stream-" + suffix());
String other = kinesisStream("res-stream-" + suffix());
adminJson("kinesis", "Kinesis_20131202.AddTagsToStream").body("{\"StreamName\":\"" + tagged
+ "\",\"Tags\":{\"team\":\"data\"}}").post("/").then().statusCode(200);
String streams = "arn:aws:kinesis:" + REGION + ":" + ACCOUNT + ":stream/";
User user = user("res-stream");
user.policy(allowOn("kinesis:DescribeStreamSummary", streams + tagged) + ",{\"Effect\":\"Allow\","
+ "\"Action\":\"kinesis:ListShards\",\"Resource\":\"*\",\"Condition\":{\"StringEquals\":"
+ "{\"aws:ResourceTag/team\":\"data\"}}}");
send(user, "kinesis", "Kinesis_20131202.DescribeStreamSummary", "1.1", "{\"StreamName\":\"" + tagged + "\"}")
.statusCode(200);
refusedJson(send(user, "kinesis", "Kinesis_20131202.DescribeStreamSummary", "1.1",
"{\"StreamARN\":\"" + streams + other + "\"}"), "kinesis:DescribeStreamSummary");
send(user, "kinesis", "Kinesis_20131202.ListShards", "1.1", "{\"StreamName\":\"" + tagged + "\"}")
.statusCode(200);
refusedJson(send(user, "kinesis", "Kinesis_20131202.ListShards", "1.1", "{\"StreamName\":\"" + other + "\"}"),
"kinesis:ListShards");
}
/** A Kinesis stream of one shard an administrator creates, deleted after the test; its name. */
private String kinesisStream(String name) {
adminJson("kinesis", "Kinesis_20131202.CreateStream").body("{\"StreamName\":\"" + name
+ "\",\"ShardCount\":1}").post("/").then().statusCode(200);
cleanup.register(() -> adminJson("kinesis", "Kinesis_20131202.DeleteStream").body("{\"StreamName\":\""
+ name + "\"}").post("/").then().statusCode(200));
return name;
}
@Test
void aCloudMapNamespaceAndServiceAreCheckedOnTheArnsTheirIdsGive() {
String namespaceId = cloudMapNamespace("res-ns-" + suffix());
@@ -1304,19 +1304,28 @@ class ResourceArnBuilderTest {
// ── Kinesis ──────────────────────────────────────────────────────────────────
/** A Kinesis request is checked on the stream its StreamName or StreamARN names, read from the generated table. */
@Test
void kinesisBuildsArnFromStreamName() {
void kinesisChecksTheStreamItsNameOrArnNames() {
setJsonBody("{\"StreamName\":\"order-events\"}");
String arn = builder.build("kinesis", ctx, "us-east-1", "000000000000");
assertEquals("arn:aws:kinesis:us-east-1:000000000000:stream/order-events", arn);
}
@Test
void kinesisBuildsArnFromStreamArn() {
assertEquals(List.of("arn:aws:kinesis:us-east-1:000000000000:stream/order-events"),
builder.buildResources("kinesis", "kinesis:PutRecord", ctx, "us-east-1", ACCOUNT, "aws"));
String fullArn = "arn:aws:kinesis:us-east-1:000000000000:stream/order-events";
setJsonBody("{\"StreamARN\":\"" + fullArn + "\"}");
String arn = builder.build("kinesis", ctx, "us-east-1", "000000000000");
assertEquals(fullArn, arn);
assertEquals(List.of(fullArn),
builder.buildResources("kinesis", "kinesis:DescribeStreamSummary", ctx, "us-east-1", ACCOUNT, "aws"));
}
/** A consumer is checked on its ARN, and a tag call on the resource its ResourceARN names. */
@Test
void kinesisChecksAConsumerAndATaggedResourceOnTheirArns() {
String consumer = "arn:aws:kinesis:us-east-1:000000000000:stream/order-events/consumer/reader:1700000000";
setJsonBody("{\"ConsumerARN\":\"" + consumer + "\"}");
assertEquals(List.of(consumer),
builder.buildResources("kinesis", "kinesis:DescribeStreamConsumer", ctx, "us-east-1", ACCOUNT, "aws"));
setJsonBody("{\"ResourceARN\":\"" + consumer + "\",\"Tags\":{}}");
assertEquals(List.of(consumer),
builder.buildResources("kinesis", "kinesis:TagResource", ctx, "us-east-1", ACCOUNT, "aws"));
}
// ── Secrets Manager ──────────────────────────────────────────────────────────
+2 -2
View File
@@ -294,10 +294,10 @@ NAMESPACES = ("access-analyzer", "account", "acm", "application-autoscaling", "a
"rekognition", "resource-explorer-2", "route53", "s3tables", "s3vectors", "servicediscovery",
"servicequotas", "ssm", "sso", "states", "textract", "timestream-influxdb", "translate", "signer", "xray",
"securityhub", "guardduty", "secretsmanager", "scheduler", "lambda", "cloudformation", "glue",
"sqs", "sns")
"sqs", "sns", "kinesis")
# The namespaces whose resources ResourceArnBuilder builds itself.
HAND_BUILT = ("apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kinesis", "kms", "logs", "pipes",
HAND_BUILT = ("apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kms", "logs", "pipes",
"resource-groups", "s3", "sts")
# Operations of a namespace in `HAND_BUILT` read from the reference all the same, each with its reason.