mirror of
https://github.com/floci-io/floci.git
synced 2026-12-04 18:48:00 -05:00
fix(iam): check five more services on the resources their requests name (#6810)
Under IAM enforcement, Amazon Data Firehose, Cognito identity pools,
Cloud Map, ACM and CodePipeline requests were checked on `*`, so a
grant scoped to a delivery stream, an identity pool, a namespace or a
service, a certificate, a pipeline or a webhook was refused, and a deny
scoped to one never applied.
The generated table of the resources requests name now reads them, 149
operations, from AWS's Service Reference and botocore as it reads the
first batch: their namespaces move from the generator's NOT_COVERED to
NAMESPACES, and the table is regenerated, nothing in it edited by hand.
Each resource type's ARN format is the one Floci's handler mints, which
the tests check against the ARN each create returns:
- `deliverystream/<name>`, `identitypool/<id>`, `namespace/<id>`,
`service/<id>`, `certificate/<id>` and a pipeline's bare name.
- A CodePipeline webhook: AWS's is `webhook:<name>` (the Service
Reference's format, and the CodePipeline User Guide's
"arn:aws:codepipeline:eu-central-1:ACCOUNT_ID:webhook:my-webhook"),
where Floci minted `webhook/<name>`; it now mints AWS's.
Corrections, each with its reason:
- StartPipelineExecution and GetPipelineState name their pipeline by a
bare `name` ("The name of the pipeline to start"), which the rule
reads only for an operation named after the type, as Step Functions'
StartExecution names its execution, not its state machine, by `name`.
- CreatePipeline and UpdatePipeline name it by `pipeline.name`, and
PutWebhook the webhook by `webhook.name` and the pipeline it connects
to by `webhook.targetPipeline`. `pipeline.roleArn` holds the role
CodePipeline assumes, an IAM role's ARN by botocore's pattern, and
names no pipeline: read as one, a pipeline-shaped value there was the
only resource an UpdatePipeline was checked on, so a grant on one
pipeline let a request change another.
- CreateCustomActionType and DeleteCustomActionType are checked on
`actiontype:Custom/<category>/<provider>/<version>`: a custom action
type's owner is Custom, which the request does not give, and AWS's
CreateCustomActionType example answers "owner": "Custom".
- Cloud Map's CreateService names its namespace by NamespaceId or,
when it gives none or a JSON null, by DnsConfig.NamespaceId, which
botocore keeps ("Use NamespaceId in Service instead") and the handler
reads then; read by NamespaceId alone, a deny on the namespace did
not hold for a request giving it in DnsConfig. A member given a JSON
null now counts as absent in a resource's `when` and `unless`, as a
handler reading it with asText(null) takes it, unless the table reads
it as a value through `absent` (EventBridge's bus, `default`).
For those, the table may fill a variable from a structure's field
(`pipeline.name`), and give a variable no member gives the one value
its handler uses (`fixed`), in the generator, the loader and the
reader.
A create that names another resource beside the one it makes has its
tags checked on the one it makes alone, which the table marks `made`:
the resource of the type, or with an ARN format's leading resource
word, related to the operation's name past its verb. PutWebhook's tags
go on the webhook, not the pipeline it connects to, and CreateService's
on `service/*`, not the namespace; no other operation in the table is
marked.
Application Auto Scaling stays unread, its reason in NOT_COVERED: a
scalable target's ARN ends in an id the service mints, while requests
name the target by ServiceNamespace, ResourceId and ScalableDimension,
and read as a member ResourceId would fill that id.
RequestResourceMembersTest's test of every resource in the table now
expects, with the resource a request names, the resources of its
operation that every request names: Cloud Map's CreateService names
the service it creates with every variable open.
This commit is contained in:
1 parent
3d4fdfe7ca
commit
096d336fab
12 files changed
+746
-65
No files matched your search
@@ -1020,8 +1020,8 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
|
||||
/**
|
||||
* A request that tags what it creates also needs the service's tagging action (see {@link TagOnCreate}),
|
||||
* checked as the caller for each set of tags, under any spelling a handler might read: on the resource a
|
||||
* tag specification names, else on the resource a create makes under a parent its action acts on, else on the
|
||||
* resources the operation is checked on, with the set's tags as {@code aws:RequestTag/<key>} and
|
||||
* tag specification names, else on the resource a create makes, under a parent its action acts on or of the type
|
||||
* it is named after where it names others too, else on the resources the operation is checked on, with the set's tags as {@code aws:RequestTag/<key>} and
|
||||
* {@code aws:TagKeys}, the operation as the namespace's {@code CreateAction} key where the tagging action
|
||||
* takes one, and the keys that say who is calling. Returns true when the request was aborted.
|
||||
*/
|
||||
@@ -1030,7 +1030,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
|
||||
String operation, TagOnCreate.Tagging tagging,
|
||||
String credentialScope, List<String> resources,
|
||||
String region, String accountId, String akid) {
|
||||
// A create of a resource under a parent its action acts on tags the new one (see RequestResources).
|
||||
// A create tags the resource it makes, not the parent it makes it in (see RequestResources.created).
|
||||
List<String> created = RequestResources.created(operation, ctx, AwsRegions.partitionFor(region), region,
|
||||
accountId);
|
||||
List<String> made = created.isEmpty() ? resources : created;
|
||||
|
||||
@@ -34,8 +34,12 @@ final class RequestResourceMembers {
|
||||
private static final Pattern MEMBER = Pattern.compile("[A-Za-z][A-Za-z0-9_]*(\\[])?");
|
||||
/** A member holding an ARN may also be one level inside a structure or each of a list's structures. */
|
||||
private static final Pattern ARN_MEMBER = Pattern.compile("[A-Za-z][A-Za-z0-9_]*(\\[])?(\\.[A-Za-z][A-Za-z0-9_]*(\\[])?)?");
|
||||
/** A member filling a variable may also be a field of each of a list's structures, one value for each. */
|
||||
private static final Pattern FILL_MEMBER = Pattern.compile("[A-Za-z][A-Za-z0-9_]*(\\[]|\\[]\\.[A-Za-z][A-Za-z0-9_]*)?");
|
||||
/**
|
||||
* A member filling a variable may also be a field of a structure, or of each of a list's structures, one value
|
||||
* for each.
|
||||
*/
|
||||
private static final Pattern FILL_MEMBER = Pattern.compile(
|
||||
"[A-Za-z][A-Za-z0-9_]*(\\[]|\\[]\\.[A-Za-z][A-Za-z0-9_]*|\\.[A-Za-z][A-Za-z0-9_]*)?");
|
||||
/** An ARN format's leading resource type word, and the rest of its resource. */
|
||||
private static final Pattern RESOURCE_PART = Pattern.compile(
|
||||
"^arn:\\$\\{Partition}:[^:]*:[^:]*:[^:]*:([A-Za-z][A-Za-z0-9-]*)(.*)$");
|
||||
@@ -106,7 +110,7 @@ final class RequestResourceMembers {
|
||||
* A resource a request names: by a member holding its ARN, which names a resource of one of {@code types} when
|
||||
* it matches the type's format, or by members filling the variables of one type's format, the others open,
|
||||
* only {@code when} each member named has one of its values and {@code unless} it has one of those, an empty
|
||||
* one for the member absent, in the account an {@code account} member gives (ECR's {@code registryId}), or else
|
||||
* one for the member absent or given a JSON null it is not read as a value for, in the account an {@code account} member gives (ECR's {@code registryId}), or else
|
||||
* the request's. A member {@code absent} from the request, or given a JSON null, is read as the value given for
|
||||
* it (an EventBridge request naming no event bus names {@code default}), and one in {@code arnOf} may give an
|
||||
* ARN of the type named for it instead of its name, read as that type's one variable, the resource then in the
|
||||
@@ -114,12 +118,15 @@ final class RequestResourceMembers {
|
||||
* a variable may be a field of each of a list's structures ({@code Entries[].EventBusName}), which names one
|
||||
* resource for each structure, read as {@code absent} gives for one that lacks it and in the account and Region
|
||||
* of the ARN that structure gives, if any. Such a member is in {@code absent} or {@code arnOf} only when it
|
||||
* fills a variable. An ARN member's value is read up to the character {@code before}, when there is one, as its
|
||||
* handler drops the rest.
|
||||
* fills a variable. A member filling a variable may also be a field of a structure ({@code pipeline.name}). A
|
||||
* variable no member gives may be {@code fixed} to the one value its handler uses (a CodePipeline custom action
|
||||
* type's owner, {@code Custom}). An ARN member's value is read up to the character {@code before}, when there
|
||||
* is one, as its handler drops the rest. A create naming other resources beside the one it makes marks that one
|
||||
* {@code made}, where its tags go (a webhook, not the pipeline it connects to).
|
||||
*/
|
||||
record Resource(List<String> types, Member arn, Map<String, Member> fill, Map<String, List<String>> when,
|
||||
Map<String, List<String>> unless, Map<String, String> absent, Map<String, String> arnOf,
|
||||
Member account, String before) {
|
||||
Member account, String before, Map<String, String> fixed, boolean made) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -222,6 +229,11 @@ final class RequestResourceMembers {
|
||||
}
|
||||
|
||||
private static Resource resource(String operation, JsonNode resource, Map<String, ArnFormat> formats) {
|
||||
if (resource.has("made") && !(resource.path("made").isBoolean() && resource.path("made").booleanValue())) {
|
||||
throw new IllegalStateException(RESOURCE_NAME + " marks a resource of " + operation + " made by "
|
||||
+ resource.path("made") + ", which is not true");
|
||||
}
|
||||
boolean made = resource.has("made");
|
||||
if (resource.has("arn")) {
|
||||
List<String> types = resource.path("types").valueStream().map(JsonNode::asText).toList();
|
||||
if (types.isEmpty() || !formats.keySet().containsAll(types)) {
|
||||
@@ -234,7 +246,7 @@ final class RequestResourceMembers {
|
||||
+ " before " + before + ", no one character");
|
||||
}
|
||||
return new Resource(types, arnMember(operation, resource.path("arn").asText("")), Map.of(), Map.of(),
|
||||
Map.of(), Map.of(), Map.of(), null, before);
|
||||
Map.of(), Map.of(), Map.of(), null, before, Map.of(), made);
|
||||
}
|
||||
String type = resource.path("type").asText("");
|
||||
ArnFormat format = formats.get(type);
|
||||
@@ -251,6 +263,15 @@ final class RequestResourceMembers {
|
||||
}
|
||||
fill.put(variable.getKey(), fillMember(operation, variable.getValue().asText("")));
|
||||
});
|
||||
Map<String, String> fixed = new LinkedHashMap<>();
|
||||
resource.path("fixed").properties().forEach(variable -> {
|
||||
if (!variables.contains(variable.getKey()) || fill.containsKey(variable.getKey())
|
||||
|| !variable.getValue().isTextual() || variable.getValue().asText().isEmpty()) {
|
||||
throw new IllegalStateException(RESOURCE_NAME + " fixes " + variable.getKey() + " for " + operation
|
||||
+ ", no variable of " + type + "'s format that no member fills, or to no value");
|
||||
}
|
||||
fixed.put(variable.getKey(), variable.getValue().asText());
|
||||
});
|
||||
if (fill.values().stream().filter(Member::list).count() > 1) {
|
||||
throw new IllegalStateException(RESOURCE_NAME + " fills " + type + " for " + operation
|
||||
+ " from more than one list");
|
||||
@@ -283,7 +304,7 @@ final class RequestResourceMembers {
|
||||
+ " from " + account.name() + ", no member of one account or a type of none");
|
||||
}
|
||||
return new Resource(List.of(type), null, Map.copyOf(fill), when, unless, Map.copyOf(absent), Map.copyOf(arnOf),
|
||||
account, null);
|
||||
account, null, Map.copyOf(fixed), made);
|
||||
}
|
||||
|
||||
/** The values each member named in {@code when} or {@code unless} may have, an empty one for the member absent. */
|
||||
@@ -324,8 +345,8 @@ final class RequestResourceMembers {
|
||||
}
|
||||
|
||||
/**
|
||||
* A member filling a variable: {@code Name}, {@code Name[]}, or a field of each of a list's structures,
|
||||
* {@code Name[].Field}.
|
||||
* A member filling a variable: {@code Name}, {@code Name[]}, or a field of a structure, {@code Name.Field}, or of
|
||||
* each of a list's structures, {@code Name[].Field}.
|
||||
*/
|
||||
private static Member fillMember(String operation, String path) {
|
||||
if (!FILL_MEMBER.matcher(path).matches()) {
|
||||
@@ -335,12 +356,15 @@ final class RequestResourceMembers {
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a member gives one value as it is read: a top-level one that is no list, or a field of each of a
|
||||
* list's structures that fills a variable, one value for each structure.
|
||||
* Whether a member gives one value as it is read: one that is no list, top-level or a field of a structure, or a
|
||||
* field of each of a list's structures that fills a variable, one value for each structure.
|
||||
*/
|
||||
private static boolean readAsOne(String operation, String path, Set<String> filled) {
|
||||
return FILL_MEMBER.matcher(path).matches() && path.contains("[].") ? filled.contains(path)
|
||||
: !member(operation, path).list();
|
||||
if (FILL_MEMBER.matcher(path).matches() && path.contains("[].")) {
|
||||
return filled.contains(path);
|
||||
}
|
||||
Member member = path.contains(".") ? fillMember(operation, path) : member(operation, path);
|
||||
return !member.list() && (member.field() == null || !member.field().list());
|
||||
}
|
||||
|
||||
/** A member holding an ARN: {@code Name}, {@code Name[]}, or a field of it, {@code Name.Field} or {@code Name[].Field}. */
|
||||
|
||||
@@ -73,7 +73,14 @@ public final class RequestResources {
|
||||
}
|
||||
Map<String, String> form = IamConditionContextResolver.formParameters(ctx);
|
||||
JsonNode body = form.isEmpty() ? PassedRoles.jsonBody(ctx) : null;
|
||||
Map<String, RequestResourceMembers.ArnFormat> formats = formats(table, operation);
|
||||
return named(resources, formats(table, operation), form, body, partition, region, accountId, stored);
|
||||
}
|
||||
|
||||
/** The ARNs of the resources the request names, as {@link #of} reads them. */
|
||||
private static List<String> named(List<RequestResourceMembers.Resource> resources,
|
||||
Map<String, RequestResourceMembers.ArnFormat> formats, Map<String, String> form,
|
||||
JsonNode body, String partition, String region, String accountId,
|
||||
StoredResourceArns stored) {
|
||||
Set<String> arns = new LinkedHashSet<>();
|
||||
for (RequestResourceMembers.Resource resource : resources) {
|
||||
if (!applies(resource, form, body, formats)) {
|
||||
@@ -95,20 +102,28 @@ public final class RequestResources {
|
||||
|
||||
/**
|
||||
* The ARNs of the resources a create makes under a parent its action acts on, from the parent's ARN in the
|
||||
* request, read as the operation's own resource reads that member, their ids open; empty when it makes none,
|
||||
* so its tags go where the operation is checked. The operation is the one the request is dispatched as, as for
|
||||
* {@link #of}.
|
||||
* request, read as the operation's own resource reads that member, their ids open; for a create making none
|
||||
* that way, the ones its request names that the table marks {@code made}, beside others it names (a webhook,
|
||||
* not the pipeline it connects to; Cloud Map's {@code service/*}, not the namespace it is created in); empty
|
||||
* when it makes neither, so its tags go where the operation is checked. The operation is the one the request
|
||||
* is dispatched as, as for {@link #of}.
|
||||
*/
|
||||
public static List<String> created(String operation, ContainerRequestContext ctx, String partition, String region,
|
||||
String accountId) {
|
||||
RequestResourceMembers.Table table = RequestResourceMembers.table();
|
||||
List<RequestResourceMembers.Created> creates = operation == null ? null : table.creates().get(operation);
|
||||
if (creates == null) {
|
||||
List<RequestResourceMembers.Resource> made = operation == null || creates != null ? List.of()
|
||||
: table.operations().getOrDefault(operation, List.of()).stream()
|
||||
.filter(RequestResourceMembers.Resource::made).toList();
|
||||
if (creates == null && made.isEmpty()) {
|
||||
return List.of();
|
||||
}
|
||||
Map<String, String> form = IamConditionContextResolver.formParameters(ctx);
|
||||
JsonNode body = form.isEmpty() ? PassedRoles.jsonBody(ctx) : null;
|
||||
Map<String, RequestResourceMembers.ArnFormat> formats = formats(table, operation);
|
||||
if (creates == null) {
|
||||
return named(made, formats, form, body, partition, region, accountId, null);
|
||||
}
|
||||
Set<String> arns = new LinkedHashSet<>();
|
||||
for (RequestResourceMembers.Created created : creates) {
|
||||
String separator = table.operations().getOrDefault(operation, List.of()).stream()
|
||||
@@ -138,7 +153,8 @@ public final class RequestResources {
|
||||
|
||||
/**
|
||||
* Whether each member the resource is named {@code when} has one of its values and no member it is named
|
||||
* {@code unless} has one of those, an empty one for absent.
|
||||
* {@code unless} has one of those, an empty one for absent, or given a JSON null that the resource reads as no
|
||||
* value of its own, as a handler reading it with {@code asText(null)} does (Cloud Map's {@code NamespaceId}).
|
||||
*/
|
||||
private static boolean applies(RequestResourceMembers.Resource resource, Map<String, String> form, JsonNode body,
|
||||
Map<String, RequestResourceMembers.ArnFormat> formats) {
|
||||
@@ -157,7 +173,11 @@ public final class RequestResources {
|
||||
|
||||
private static String first(RequestResourceMembers.Resource resource, Map<String, String> form, JsonNode body,
|
||||
String member, Map<String, RequestResourceMembers.ArnFormat> formats) {
|
||||
List<String> given = given(resource, form, body, new RequestResourceMembers.Member(member, false), formats);
|
||||
RequestResourceMembers.Member read = new RequestResourceMembers.Member(member, false);
|
||||
if (!resource.absent().containsKey(member) && isNull(body, read)) {
|
||||
return "";
|
||||
}
|
||||
List<String> given = given(resource, form, body, read, formats);
|
||||
return given.isEmpty() ? "" : given.getFirst();
|
||||
}
|
||||
|
||||
@@ -253,12 +273,14 @@ public final class RequestResources {
|
||||
account = given.isEmpty() ? accountId : given.getFirst();
|
||||
}
|
||||
AwsArnUtils.Arn fromRequest = arnGiven(resource, form, body, formats);
|
||||
List<Filling> fillings = new ArrayList<>(List.of(new Filling(Map.of(), fromRequest)));
|
||||
List<Filling> fillings = new ArrayList<>(List.of(new Filling(resource.fixed(), fromRequest)));
|
||||
boolean given = false;
|
||||
for (Map.Entry<String, RequestResourceMembers.Member> variable : resource.fill().entrySet()) {
|
||||
List<String> values = read(resource, form, body, variable.getValue());
|
||||
if (values.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
given = true;
|
||||
RequestResourceMembers.ArnFormat named = arnOf(resource, variable.getValue().path(), formats);
|
||||
if (resource.fill().size() == 1 && fromRequest == null && values.stream().allMatch(value ->
|
||||
!isArnOf(named, value) && format.pattern().matcher(value).matches())) {
|
||||
@@ -275,7 +297,7 @@ public final class RequestResources {
|
||||
}
|
||||
fillings = next;
|
||||
}
|
||||
if (!resource.fill().isEmpty() && fillings.getFirst().variables().isEmpty()) {
|
||||
if (!resource.fill().isEmpty() && !given) {
|
||||
return;
|
||||
}
|
||||
for (Filling filling : fillings) {
|
||||
|
||||
+1
-1
@@ -1437,7 +1437,7 @@ public class CodePipelineService {
|
||||
ObjectNode item = mapper.createObjectNode();
|
||||
item.set("definition", webhook.deepCopy());
|
||||
item.put("url", "http://localhost:4566/codepipeline/webhooks/" + name);
|
||||
item.put("arn", AwsArnUtils.Arn.of("codepipeline", region, account, "webhook/" + name).toString());
|
||||
item.put("arn", AwsArnUtils.Arn.of("codepipeline", region, account, "webhook:" + name).toString());
|
||||
if (request.path("tags").isArray() && !request.path("tags").isEmpty()) {
|
||||
item.set("tags", request.path("tags").deepCopy());
|
||||
}
|
||||
|
||||
@@ -1,14 +1,121 @@
|
||||
{
|
||||
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.113 (installed package)", "retrieved": "2026-10-27", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
|
||||
"namespaces": {"cognito-idp": ["cognito-idp"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "events": ["events"], "states": ["stepfunctions"]},
|
||||
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.113 (installed package)", "retrieved": "2026-10-28", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
|
||||
"namespaces": {"acm": ["acm"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "events": ["events"], "firehose": ["firehose"], "servicediscovery": ["servicediscovery"], "states": ["stepfunctions"]},
|
||||
"clientsNotRead": {"eventbridgev2": "EventBridge V2, the AWSEventsV2 target over Smithy RPC v2 CBOR on the eventsv2 endpoint, which Floci does not serve; its operations share EventBridge's names and name their resources by other members"},
|
||||
"handBuilt": ["dsql", "dynamodb", "eks", "iam", "kinesis", "kms", "lambda", "logs", "pipes", "resource-groups", "s3", "scheduler", "secretsmanager", "sns", "sqs", "ssm", "sts"],
|
||||
"notCovered": {"access-analyzer": "REST: its requests name their resources in the path, which RequestResources does not read yet", "account": "REST: its requests name their resources in the path, which RequestResources does not read yet", "acm": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "airflow": "REST: its requests name their resources in the path, which RequestResources does not read yet", "apigateway": "REST: its requests name their resources in the path, which RequestResources does not read yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources does not read yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources does not read yet", "application-autoscaling": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "appsync": "REST: its requests name their resources in the path, which RequestResources does not read yet", "aps": "REST: its requests name their resources in the path, which RequestResources does not read yet", "athena": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "autoscaling": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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 does not read yet", "batch": "REST: its requests name their resources in the path, which RequestResources does not read yet", "bcm-data-exports": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "bcm-pricing-calculator": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "bedrock": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources does not read yet", "budgets": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ce": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudfront": "REST: its requests name their resources in the path, which RequestResources does not read yet", "cloudhsm": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudtrail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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 does not read yet", "codebuild": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codedeploy": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeguru-reviewer": "REST: its requests name their resources in the path, which RequestResources does not read yet", "codepipeline": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cognito-identity": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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 does not read yet", "controlcatalog": "REST: its requests name their resources in the path, which RequestResources does not read yet", "controltower": "REST: its requests name their resources in the path, which RequestResources does not read yet", "cur": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "datasync": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "detective": "REST: its requests name their resources in the path, which RequestResources does not read yet", "dlm": "REST: its requests name their resources in the path, which RequestResources does not read yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ecs": "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", "elLine truncated
|
||||
"notCovered": {"access-analyzer": "REST: its requests name their resources in the path, which RequestResources does not read yet", "account": "REST: its requests name their resources in the path, which RequestResources does not read yet", "airflow": "REST: its requests name their resources in the path, which RequestResources does not read yet", "apigateway": "REST: its requests name their resources in the path, which RequestResources does not read yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources does not read yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources does not read yet", "application-autoscaling": "not read yet: a scalable target's ARN ends in an id the service mints, `scalable-target/<id>`, while its requests name the target by ServiceNamespace, ResourceId and ScalableDimension, so its resource is the stored ARN those three find, which RequestResources has no lookup for yet; read as a member, ResourceId would fill that id", "appsync": "REST: its requests name their resources in the path, which RequestResources does not read yet", "aps": "REST: its requests name their resources in the path, which RequestResources does not read yet", "athena": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "autoscaling": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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 does not read yet", "batch": "REST: its requests name their resources in the path, which RequestResources does not read yet", "bcm-data-exports": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "bcm-pricing-calculator": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "bedrock": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources does not read yet", "budgets": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ce": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudfront": "REST: its requests name their resources in the path, which RequestResources does not read yet", "cloudhsm": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudtrail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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 does not read yet", "codebuild": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codedeploy": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeguru-reviewer": "REST: its requests name their resources in the path, which RequestResources does not read 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 does not read yet", "controlcatalog": "REST: its requests name their resources in the path, which RequestResources does not read yet", "controltower": "REST: its requests name their resources in the path, which RequestResources does not read yet", "cur": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "datasync": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "detective": "REST: its requests name their resources in the path, which RequestResources does not read yet", "dlm": "REST: its requests name their resources in the path, which RequestResources does not read yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ecs": "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: 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", "cloudfront-keyvaluestore", "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", "ec2-instance-connect", "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", "payment-cryptography", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "quicksight", "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", "signer", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web", "xray"],
|
||||
"arnFormats": {"cognito-idp": {"userpool": "arn:${Partition}:cognito-idp:${Region}:${Account}:userpool/${UserPoolId}", "webacl": "arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}"}, "ecr": {"repository": "arn:${Partition}:ecr:${Region}:${Account}:repository/${RepositoryName}"}, "elasticloadbalancing": {"listener-rule/app": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener-rule/app/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}/${ListenerRuleId}", "listener-rule/net": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener-rule/net/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}/${ListenerRuleId}", "listener/app": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/app/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "listener/gwy": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/gwy/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "listener/net": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/net/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "loadbalancer": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/${LoadBalancerName}", "loadbalancer/app/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/app/${LoadBalancerName}/${LoadBalancerId}", "loadbalancer/gwy/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/gwy/${LoadBalancerName}/${LoadBalancerId}", "loadbalancer/net/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/net/${LoadBalancerName}/${LoadBalancerId}", "targetgroup": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:targetgroup/${TargetGroupName}/${TargetGroupId}", "truststore": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:truststore/${TrustStoreName}/${TrustStoreId}"}, "events": {"alias": "arn:${Partition}:kms:${Region}:${Account}:alias/${Alias}", "api-destination": "arn:${Partition}:events:${Region}:${Account}:api-destination/${ApiDestinationName}", "archive": "arn:${Partition}:events:${Region}:${Account}:archive/${ArchiveName}", "connection": "arn:${Partition}:events:${Region}:${Account}:connection/${ConnectionName}", "create-snapshot": "arn:${Partition}:events:${Region}:${Account}:target/create-snapshot", "endpoint": "arn:${Partition}:events:${Region}:${Account}:endpoint/${EndpointName}", "event-bus": "arn:${Partition}:events:${Region}:${Account}:event-bus/${EventBusName}", "event-busv2": "arn:${Partition}:events:${Region}:${Account}:event-busv2/${EventBusName}/${OpaqueId}", "event-source": "arn:${Partition}:events:${Region}::event-source/${EventSourceName}", "event-sourcev2": "arn:${Partition}:events:${Region}:${Account}:event-sourcev2/${SourceType}/${EventSourceName}/${OpaqueId}", "key": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}", "reboot-instance": "arn:${Partition}:events:${Region}:${Account}:target/reboot-instance", "replay": "arn:${Partition}:events:${Region}:${Account}:replay/${ReplayName}", "rule-on-custom-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${EventBusName}/${RuleName}", "rule-on-default-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${RuleName}", "stop-instance": "arn:${Partition}:events:${Region}:${Account}:target/stop-instance", "subscriber": "arn:${Partition}:events:${Region}:${Account}:subscriber/${SubscriberName}/${OpaqueId}", "terminate-instance": "arn:${Partition}:events:${Region}:${Account}:target/terminate-instance"}, "states": {"activity": "arn:${Partition}:states:${Region}:${Account}:activity:${ActivityName}", "execution": "arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}:${ExecutionId}", "express": "arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}:${ExecutionId}:${ExpressId}", "labelled execution": "arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}/${MapRunLabel}:${ExecutionId}", "labelled express": "arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}/${MapRunLabel}:${ExecutionId}:${ExpressId}", "maprun": "arn:${Partition}:states:${Region}:${Account}:mapRun:${StateMachineName}/${MapRunLabel}:${MapRunId}", "statemachine": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}", "statemachinealias": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineAliasName}", "statemachineversion": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineVersionId}"}},
|
||||
"arnFormats": {"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}"}, "codepipeline": {"action": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}/${ActionName}", "actiontype": "arn:${Partition}:codepipeline:${Region}:${Account}:actiontype:${Owner}/${Category}/${Provider}/${Version}", "pipeline": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}", "stage": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}", "webhook": "arn:${Partition}:codepipeline:${Region}:${Account}:webhook:${WebhookName}"}, "cognito-identity": {"identitypool": "arn:${Partition}:cognito-identity:${Region}:${Account}:identitypool/${IdentityPoolId}"}, "cognito-idp": {"userpool": "arn:${Partition}:cognito-idp:${Region}:${Account}:userpool/${UserPoolId}", "webacl": "arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}"}, "ecr": {"repository": "arn:${Partition}:ecr:${Region}:${Account}:repository/${RepositoryName}"}, "elasticloadbalancing": {"listener-rule/app": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener-rule/app/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}/${ListenerRuleId}", "listener-rule/net": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener-rule/net/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}/${ListenerRuleId}", "listener/app": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/app/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "listener/gwy": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/gwy/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "listener/net": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/net/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "loadbalancer": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/${LoadBalancerName}", "loadbalancer/app/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/app/${LoadBalancerName}/${LoadBalancerId}", "loadbalancer/gwy/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/gwy/${LoadBalancerName}/${LoadBalancerId}", "loadbalancer/net/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/net/${LoadBalancerName}/${LoadBalancerId}", "targetgroup": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:targetgroup/${TargetGroupName}/${TargetGroupId}", "truststore": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:truststore/${TrustStoreName}/${TrustStoreId}"}, "events": {"alias": "arn:${Partition}:kms:${Region}:${Account}:alias/${Alias}", "api-destination": "arn:${Partition}:events:${Region}:${Account}:api-destination/${ApiDestinationName}", "archive": "arn:${Partition}:events:${Region}:${Account}:archive/${ArchiveName}", "connection": "arn:${Partition}:events:${Region}:${Account}:connection/${ConnectionName}", "create-snapshot": "arn:${Partition}:events:${Region}:${Account}:target/create-snapshot", "endpoint": "arn:${Partition}:events:${Region}:${Account}:endpoint/${EndpointName}", "event-bus": "arn:${Partition}:events:${Region}:${Account}:event-bus/${EventBusName}", "event-busv2": "arn:${Partition}:events:${Region}:${Account}:event-busv2/${EventBusName}/${OpaqueId}", "event-source": "arn:${Partition}:events:${Region}::event-source/${EventSourceName}", "event-sourcev2": "arn:${Partition}:events:${Region}:${Account}:event-sourcev2/${SourceType}/${EventSourceName}/${OpaqueId}", "key": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}", "reboot-instance": "arn:${Partition}:events:${Region}:${Account}:target/reboot-instance", "replay": "arn:${Partition}:events:${Region}:${Account}:replay/${ReplayName}", "rule-on-custom-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${EventBusName}/${RuleName}", "rule-on-default-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${RuleName}", "stop-instance": "arn:${Partition}:events:${Region}:${Account}:target/stop-instance", "subscriber": "arn:${Partition}:events:${Region}:${Account}:subscriber/${SubscriberName}/${OpaqueId}", "terminate-instance": "arn:${Partition}:events:${Region}:${Account}:target/terminate-instance"}, "firehose": {"deliverystream": "arn:${Partition}:firehose:${Region}:${Account}:deliverystream/${DeliveryStreamName}"}, "servicediscovery": {"namespace": "arn:${Partition}:servicediscovery:${Region}:${Account}:namespace/${NamespaceId}", "service": "arn:${Partition}:servicediscovery:${Region}:${Account}:service/${ServiLine truncated
|
||||
"unqualified": {"states": ["statemachine"]},
|
||||
"mintedIds": {"events": ["api-destination", "connection"]},
|
||||
"operations": {
|
||||
"acm:AddTagsToCertificate": {"action": "acm:AddTagsToCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:CreateAcmeDomainValidation": {"action": "acm:CreateAcmeDomainValidation", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:CreateAcmeEndpoint": {"action": "acm:CreateAcmeEndpoint", "types": [], "resources": []},
|
||||
"acm:CreateAcmeExternalAccountBinding": {"action": "acm:CreateAcmeExternalAccountBinding", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}, {"types": ["acme-endpoint"], "arn": "RoleArn"}]},
|
||||
"acm:DeleteAcmeDomainValidation": {"action": "acm:DeleteAcmeDomainValidation", "types": ["acme-domain-validation"], "resources": [{"types": ["acme-domain-validation"], "arn": "AcmeDomainValidationArn"}]},
|
||||
"acm:DeleteAcmeEndpoint": {"action": "acm:DeleteAcmeEndpoint", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:DeleteAcmeExternalAccountBinding": {"action": "acm:DeleteAcmeExternalAccountBinding", "types": ["acme-external-account-binding"], "resources": [{"types": ["acme-external-account-binding"], "arn": "AcmeExternalAccountBindingArn"}]},
|
||||
"acm:DeleteCertificate": {"action": "acm:DeleteCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:DescribeAcmeAccount": {"action": "acm:DescribeAcmeAccount", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:DescribeAcmeDomainValidation": {"action": "acm:DescribeAcmeDomainValidation", "types": ["acme-domain-validation"], "resources": [{"types": ["acme-domain-validation"], "arn": "AcmeDomainValidationArn"}]},
|
||||
"acm:DescribeAcmeEndpoint": {"action": "acm:DescribeAcmeEndpoint", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:DescribeAcmeExternalAccountBinding": {"action": "acm:DescribeAcmeExternalAccountBinding", "types": ["acme-external-account-binding"], "resources": [{"types": ["acme-external-account-binding"], "arn": "AcmeExternalAccountBindingArn"}]},
|
||||
"acm:DescribeCertificate": {"action": "acm:DescribeCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:ExportCertificate": {"action": "acm:ExportCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:GetAccountConfiguration": {"action": "acm:GetAccountConfiguration", "types": [], "resources": []},
|
||||
"acm:GetAcmeExternalAccountBindingCredentials": {"action": "acm:GetAcmeExternalAccountBindingCredentials", "types": ["acme-external-account-binding"], "resources": [{"types": ["acme-external-account-binding"], "arn": "AcmeExternalAccountBindingArn"}]},
|
||||
"acm:GetCertificate": {"action": "acm:GetCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:ImportCertificate": {"action": "acm:ImportCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:ListAcmeAccounts": {"action": "acm:ListAcmeAccounts", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:ListAcmeDomainValidations": {"action": "acm:ListAcmeDomainValidations", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:ListAcmeEndpoints": {"action": "acm:ListAcmeEndpoints", "types": [], "resources": []},
|
||||
"acm:ListAcmeExternalAccountBindings": {"action": "acm:ListAcmeExternalAccountBindings", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:ListCertificateDomainValidations": {"action": "acm:ListCertificateDomainValidations", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:ListCertificates": {"action": "acm:ListCertificates", "types": [], "resources": []},
|
||||
"acm:ListTagsForCertificate": {"action": "acm:ListTagsForCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:ListTagsForResource": {"action": "acm:ListTagsForResource", "types": ["acme-domain-validation", "acme-endpoint", "acme-external-account-binding"], "resources": [{"types": ["acme-domain-validation", "acme-endpoint", "acme-external-account-binding"], "arn": "ResourceArn"}]},
|
||||
"acm:PutAccountConfiguration": {"action": "acm:PutAccountConfiguration", "types": [], "resources": []},
|
||||
"acm:RemoveTagsFromCertificate": {"action": "acm:RemoveTagsFromCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:RenewCertificate": {"action": "acm:RenewCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:RequestCertificate": {"action": "acm:RequestCertificate", "types": [], "resources": []},
|
||||
"acm:ResendValidationEmail": {"action": "acm:ResendValidationEmail", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:RevokeAcmeAccount": {"action": "acm:RevokeAcmeAccount", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:RevokeAcmeExternalAccountBinding": {"action": "acm:RevokeAcmeExternalAccountBinding", "types": ["acme-external-account-binding"], "resources": [{"types": ["acme-external-account-binding"], "arn": "AcmeExternalAccountBindingArn"}]},
|
||||
"acm:RevokeCertificate": {"action": "acm:RevokeCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"acm:SearchCertificates": {"action": "acm:SearchCertificates", "types": [], "resources": []},
|
||||
"acm:TagResource": {"action": "acm:TagResource", "types": ["acme-domain-validation", "acme-endpoint", "acme-external-account-binding"], "resources": [{"types": ["acme-domain-validation", "acme-endpoint", "acme-external-account-binding"], "arn": "ResourceArn"}]},
|
||||
"acm:UntagResource": {"action": "acm:UntagResource", "types": ["acme-domain-validation", "acme-endpoint", "acme-external-account-binding"], "resources": [{"types": ["acme-domain-validation", "acme-endpoint", "acme-external-account-binding"], "arn": "ResourceArn"}]},
|
||||
"acm:UpdateAcmeDomainValidation": {"action": "acm:UpdateAcmeDomainValidation", "types": ["acme-domain-validation"], "resources": [{"types": ["acme-domain-validation"], "arn": "AcmeDomainValidationArn"}]},
|
||||
"acm:UpdateAcmeEndpoint": {"action": "acm:UpdateAcmeEndpoint", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]},
|
||||
"acm:UpdateCertificateOptions": {"action": "acm:UpdateCertificateOptions", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]},
|
||||
"codepipeline:AcknowledgeJob": {"action": "codepipeline:AcknowledgeJob", "types": [], "resources": []},
|
||||
"codepipeline:AcknowledgeThirdPartyJob": {"action": "codepipeline:AcknowledgeThirdPartyJob", "types": [], "resources": []},
|
||||
"codepipeline:CreateCustomActionType": {"action": "codepipeline:CreateCustomActionType", "types": ["actiontype"], "resources": [{"type": "actiontype", "fill": {"Category": "category", "Provider": "provider", "Version": "version"}, "fixed": {"Owner": "Custom"}}]},
|
||||
"codepipeline:CreatePipeline": {"action": "codepipeline:CreatePipeline", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "pipeline.name"}}]},
|
||||
"codepipeline:DeleteCustomActionType": {"action": "codepipeline:DeleteCustomActionType", "types": ["actiontype"], "resources": [{"type": "actiontype", "fill": {"Category": "category", "Provider": "provider", "Version": "version"}, "fixed": {"Owner": "Custom"}}]},
|
||||
"codepipeline:DeletePipeline": {"action": "codepipeline:DeletePipeline", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "name"}}]},
|
||||
"codepipeline:DeleteWebhook": {"action": "codepipeline:DeleteWebhook", "types": ["webhook"], "resources": [{"type": "webhook", "fill": {"WebhookName": "name"}}]},
|
||||
"codepipeline:DeregisterWebhookWithThirdParty": {"action": "codepipeline:DeregisterWebhookWithThirdParty", "types": ["webhook"], "resources": [{"type": "webhook", "fill": {"WebhookName": "webhookName"}}]},
|
||||
"codepipeline:DisableStageTransition": {"action": "codepipeline:DisableStageTransition", "types": ["stage"], "resources": [{"type": "stage", "fill": {"PipelineName": "pipelineName", "StageName": "stageName"}}]},
|
||||
"codepipeline:EnableStageTransition": {"action": "codepipeline:EnableStageTransition", "types": ["stage"], "resources": [{"type": "stage", "fill": {"PipelineName": "pipelineName", "StageName": "stageName"}}]},
|
||||
"codepipeline:GetActionType": {"action": "codepipeline:GetActionType", "types": [], "resources": []},
|
||||
"codepipeline:GetJobDetails": {"action": "codepipeline:GetJobDetails", "types": [], "resources": []},
|
||||
"codepipeline:GetPipeline": {"action": "codepipeline:GetPipeline", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "name"}}]},
|
||||
"codepipeline:GetPipelineExecution": {"action": "codepipeline:GetPipelineExecution", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "pipelineName"}}]},
|
||||
"codepipeline:GetPipelineState": {"action": "codepipeline:GetPipelineState", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "name"}}]},
|
||||
"codepipeline:GetThirdPartyJobDetails": {"action": "codepipeline:GetThirdPartyJobDetails", "types": [], "resources": []},
|
||||
"codepipeline:ListActionExecutions": {"action": "codepipeline:ListActionExecutions", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "pipelineName"}}]},
|
||||
"codepipeline:ListActionTypes": {"action": "codepipeline:ListActionTypes", "types": [], "resources": []},
|
||||
"codepipeline:ListDeployActionExecutionTargets": {"action": "codepipeline:ListDeployActionExecutionTargets", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "pipelineName"}}]},
|
||||
"codepipeline:ListPipelineExecutions": {"action": "codepipeline:ListPipelineExecutions", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "pipelineName"}}]},
|
||||
"codepipeline:ListPipelines": {"action": "codepipeline:ListPipelines", "types": [], "resources": []},
|
||||
"codepipeline:ListRuleExecutions": {"action": "codepipeline:ListRuleExecutions", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "pipelineName"}}]},
|
||||
"codepipeline:ListRuleTypes": {"action": "codepipeline:ListRuleTypes", "types": [], "resources": []},
|
||||
"codepipeline:ListTagsForResource": {"action": "codepipeline:ListTagsForResource", "types": ["actiontype", "pipeline", "webhook"], "resources": [{"types": ["actiontype", "pipeline", "webhook"], "arn": "resourceArn"}]},
|
||||
"codepipeline:ListWebhooks": {"action": "codepipeline:ListWebhooks", "types": ["webhook"], "resources": []},
|
||||
"codepipeline:OverrideStageCondition": {"action": "codepipeline:OverrideStageCondition", "types": ["stage"], "resources": [{"type": "stage", "fill": {"PipelineName": "pipelineName", "StageName": "stageName"}}]},
|
||||
"codepipeline:PollForJobs": {"action": "codepipeline:PollForJobs", "types": ["actiontype"], "resources": []},
|
||||
"codepipeline:PollForThirdPartyJobs": {"action": "codepipeline:PollForThirdPartyJobs", "types": [], "resources": []},
|
||||
"codepipeline:PutActionRevision": {"action": "codepipeline:PutActionRevision", "types": ["action"], "resources": [{"type": "action", "fill": {"ActionName": "actionName", "PipelineName": "pipelineName", "StageName": "stageName"}}]},
|
||||
"codepipeline:PutApprovalResult": {"action": "codepipeline:PutApprovalResult", "types": ["action"], "resources": [{"type": "action", "fill": {"ActionName": "actionName", "PipelineName": "pipelineName", "StageName": "stageName"}}]},
|
||||
"codepipeline:PutJobFailureResult": {"action": "codepipeline:PutJobFailureResult", "types": [], "resources": []},
|
||||
"codepipeline:PutJobSuccessResult": {"action": "codepipeline:PutJobSuccessResult", "types": [], "resources": []},
|
||||
"codepipeline:PutThirdPartyJobFailureResult": {"action": "codepipeline:PutThirdPartyJobFailureResult", "types": [], "resources": []},
|
||||
"codepipeline:PutThirdPartyJobSuccessResult": {"action": "codepipeline:PutThirdPartyJobSuccessResult", "types": [], "resources": []},
|
||||
"codepipeline:PutWebhook": {"action": "codepipeline:PutWebhook", "types": ["pipeline", "webhook"], "resources": [{"type": "webhook", "fill": {"WebhookName": "webhook.name"}, "made": true}, {"type": "pipeline", "fill": {"PipelineName": "webhook.targetPipeline"}}]},
|
||||
"codepipeline:RegisterWebhookWithThirdParty": {"action": "codepipeline:RegisterWebhookWithThirdParty", "types": ["webhook"], "resources": [{"type": "webhook", "fill": {"WebhookName": "webhookName"}}]},
|
||||
"codepipeline:RetryStageExecution": {"action": "codepipeline:RetryStageExecution", "types": ["stage"], "resources": [{"type": "stage", "fill": {"PipelineName": "pipelineName", "StageName": "stageName"}}]},
|
||||
"codepipeline:RollbackStage": {"action": "codepipeline:RollbackStage", "types": ["stage"], "resources": [{"type": "stage", "fill": {"PipelineName": "pipelineName", "StageName": "stageName"}}]},
|
||||
"codepipeline:StartPipelineExecution": {"action": "codepipeline:StartPipelineExecution", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "name"}}]},
|
||||
"codepipeline:StopPipelineExecution": {"action": "codepipeline:StopPipelineExecution", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "pipelineName"}}]},
|
||||
"codepipeline:TagResource": {"action": "codepipeline:TagResource", "types": ["actiontype", "pipeline", "webhook"], "resources": [{"types": ["actiontype", "pipeline", "webhook"], "arn": "resourceArn"}]},
|
||||
"codepipeline:UntagResource": {"action": "codepipeline:UntagResource", "types": ["actiontype", "pipeline", "webhook"], "resources": [{"types": ["actiontype", "pipeline", "webhook"], "arn": "resourceArn"}]},
|
||||
"codepipeline:UpdateActionType": {"action": "codepipeline:UpdateActionType", "types": ["actiontype"], "resources": []},
|
||||
"codepipeline:UpdatePipeline": {"action": "codepipeline:UpdatePipeline", "types": ["pipeline"], "resources": [{"type": "pipeline", "fill": {"PipelineName": "pipeline.name"}}]},
|
||||
"cognito-identity:CreateIdentityPool": {"action": "cognito-identity:CreateIdentityPool", "types": [], "resources": []},
|
||||
"cognito-identity:DeleteIdentities": {"action": "cognito-identity:DeleteIdentities", "types": [], "resources": []},
|
||||
"cognito-identity:DeleteIdentityPool": {"action": "cognito-identity:DeleteIdentityPool", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:DescribeIdentity": {"action": "cognito-identity:DescribeIdentity", "types": [], "resources": []},
|
||||
"cognito-identity:DescribeIdentityPool": {"action": "cognito-identity:DescribeIdentityPool", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:GetCredentialsForIdentity": {"action": "cognito-identity:GetCredentialsForIdentity", "types": [], "resources": []},
|
||||
"cognito-identity:GetId": {"action": "cognito-identity:GetId", "types": [], "resources": []},
|
||||
"cognito-identity:GetIdentityPoolRoles": {"action": "cognito-identity:GetIdentityPoolRoles", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:GetOpenIdToken": {"action": "cognito-identity:GetOpenIdToken", "types": [], "resources": []},
|
||||
"cognito-identity:GetOpenIdTokenForDeveloperIdentity": {"action": "cognito-identity:GetOpenIdTokenForDeveloperIdentity", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:GetPrincipalTagAttributeMap": {"action": "cognito-identity:GetPrincipalTagAttributeMap", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:ListIdentities": {"action": "cognito-identity:ListIdentities", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:ListIdentityPools": {"action": "cognito-identity:ListIdentityPools", "types": [], "resources": []},
|
||||
"cognito-identity:ListTagsForResource": {"action": "cognito-identity:ListTagsForResource", "types": ["identitypool"], "resources": [{"types": ["identitypool"], "arn": "ResourceArn"}]},
|
||||
"cognito-identity:LookupDeveloperIdentity": {"action": "cognito-identity:LookupDeveloperIdentity", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:MergeDeveloperIdentities": {"action": "cognito-identity:MergeDeveloperIdentities", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:SetIdentityPoolRoles": {"action": "cognito-identity:SetIdentityPoolRoles", "types": [], "resources": []},
|
||||
"cognito-identity:SetPrincipalTagAttributeMap": {"action": "cognito-identity:SetPrincipalTagAttributeMap", "types": [], "resources": []},
|
||||
"cognito-identity:TagResource": {"action": "cognito-identity:TagResource", "types": ["identitypool"], "resources": [{"types": ["identitypool"], "arn": "ResourceArn"}]},
|
||||
"cognito-identity:UnlinkDeveloperIdentity": {"action": "cognito-identity:UnlinkDeveloperIdentity", "types": ["identitypool"], "resources": [{"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-identity:UnlinkIdentity": {"action": "cognito-identity:UnlinkIdentity", "types": [], "resources": []},
|
||||
"cognito-identity:UntagResource": {"action": "cognito-identity:UntagResource", "types": ["identitypool"], "resources": [{"types": ["identitypool"], "arn": "ResourceArn"}]},
|
||||
"cognito-identity:UpdateIdentityPool": {"action": "cognito-identity:UpdateIdentityPool", "types": ["identitypool"], "resources": [{"types": ["identitypool"], "arn": "OpenIdConnectProviderARNs[]"}, {"types": ["identitypool"], "arn": "SamlProviderARNs[]"}, {"type": "identitypool", "fill": {"IdentityPoolId": "IdentityPoolId"}}]},
|
||||
"cognito-idp:AddCustomAttributes": {"action": "cognito-idp:AddCustomAttributes", "types": ["userpool"], "resources": [{"type": "userpool", "fill": {"UserPoolId": "UserPoolId"}}]},
|
||||
"cognito-idp:AddUserPoolClientSecret": {"action": "cognito-idp:AddUserPoolClientSecret", "types": ["userpool"], "resources": [{"type": "userpool", "fill": {"UserPoolId": "UserPoolId"}}]},
|
||||
"cognito-idp:AdminAddUserToGroup": {"action": "cognito-idp:AdminAddUserToGroup", "types": ["userpool"], "resources": [{"type": "userpool", "fill": {"UserPoolId": "UserPoolId"}}]},
|
||||
@@ -345,6 +452,48 @@
|
||||
"events:UpdateEventBus": {"action": "events:UpdateEventBus", "types": ["event-bus", "event-busv2"], "resources": [{"types": ["event-bus", "event-busv2"], "arn": "DeadLetterConfig.Arn"}, {"type": "event-bus", "fill": {"EventBusName": "Name"}}]},
|
||||
"events:UpdateEventSource": {"action": "events:UpdateEventSource", "types": ["event-busv2", "event-sourcev2"], "resources": []},
|
||||
"events:UpdateSubscriber": {"action": "events:UpdateSubscriber", "types": ["event-busv2", "subscriber"], "resources": []},
|
||||
"firehose:CreateDeliveryStream": {"action": "firehose:CreateDeliveryStream", "types": ["deliverystream"], "resources": [{"types": ["deliverystream"], "arn": "AmazonOpenSearchServerlessDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "AmazonopensearchserviceDestinationConfiguration.DomainARN"}, {"types": ["deliverystream"], "arn": "AmazonopensearchserviceDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "DeliveryStreamEncryptionConfigurationInput.KeyARN"}, {"types": ["deliverystream"], "arn": "ElasticsearchDestinationConfiguration.DomainARN"}, {"types": ["deliverystream"], "arn": "ElasticsearchDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "ExtendedS3DestinationConfiguration.BucketARN"}, {"types": ["deliverystream"], "arn": "ExtendedS3DestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "HttpEndpointDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "IcebergDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "KinesisStreamSourceConfiguration.KinesisStreamARN"}, {"types": ["deliverystream"], "arn": "KinesisStreamSourceConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "MSKSourceConfiguration.MSKClusterARN"}, {"types": ["deliverystream"], "arn": "RedshiftDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "S3DestinationConfiguration.BucketARN"}, {"types": ["deliverystream"], "arn": "S3DestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "SnowflakeDestinationConfiguration.RoleARN"}, {"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:DeleteDeliveryStream": {"action": "firehose:DeleteDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:DescribeDeliveryStream": {"action": "firehose:DescribeDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:ListDeliveryStreams": {"action": "firehose:ListDeliveryStreams", "types": [], "resources": []},
|
||||
"firehose:ListTagsForDeliveryStream": {"action": "firehose:ListTagsForDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:PutRecord": {"action": "firehose:PutRecord", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:PutRecordBatch": {"action": "firehose:PutRecordBatch", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:StartDeliveryStreamEncryption": {"action": "firehose:StartDeliveryStreamEncryption", "types": ["deliverystream"], "resources": [{"types": ["deliverystream"], "arn": "DeliveryStreamEncryptionConfigurationInput.KeyARN"}, {"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:StopDeliveryStreamEncryption": {"action": "firehose:StopDeliveryStreamEncryption", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:TagDeliveryStream": {"action": "firehose:TagDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:UntagDeliveryStream": {"action": "firehose:UntagDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"firehose:UpdateDestination": {"action": "firehose:UpdateDestination", "types": ["deliverystream"], "resources": [{"types": ["deliverystream"], "arn": "AmazonOpenSearchServerlessDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "AmazonopensearchserviceDestinationUpdate.DomainARN"}, {"types": ["deliverystream"], "arn": "AmazonopensearchserviceDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "ElasticsearchDestinationUpdate.DomainARN"}, {"types": ["deliverystream"], "arn": "ElasticsearchDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "ExtendedS3DestinationUpdate.BucketARN"}, {"types": ["deliverystream"], "arn": "ExtendedS3DestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "HttpEndpointDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "IcebergDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "RedshiftDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "S3DestinationUpdate.BucketARN"}, {"types": ["deliverystream"], "arn": "S3DestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "SnowflakeDestinationUpdate.RoleARN"}, {"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]},
|
||||
"servicediscovery:CreateHttpNamespace": {"action": "servicediscovery:CreateHttpNamespace", "types": [], "resources": []},
|
||||
"servicediscovery:CreatePrivateDnsNamespace": {"action": "servicediscovery:CreatePrivateDnsNamespace", "types": [], "resources": []},
|
||||
"servicediscovery:CreatePublicDnsNamespace": {"action": "servicediscovery:CreatePublicDnsNamespace", "types": [], "resources": []},
|
||||
"servicediscovery:CreateService": {"action": "servicediscovery:CreateService", "types": ["namespace", "service"], "resources": [{"type": "namespace", "fill": {"NamespaceId": "NamespaceId"}, "unless": {"NamespaceId": [null]}}, {"type": "namespace", "fill": {"NamespaceId": "DnsConfig.NamespaceId"}, "when": {"NamespaceId": [null]}}, {"type": "service", "fill": {}, "made": true}]},
|
||||
"servicediscovery:DeleteNamespace": {"action": "servicediscovery:DeleteNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {"NamespaceId": "Id"}}]},
|
||||
"servicediscovery:DeleteService": {"action": "servicediscovery:DeleteService", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "Id"}}]},
|
||||
"servicediscovery:DeleteServiceAttributes": {"action": "servicediscovery:DeleteServiceAttributes", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"servicediscovery:DeregisterInstance": {"action": "servicediscovery:DeregisterInstance", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"servicediscovery:DiscoverInstances": {"action": "servicediscovery:DiscoverInstances", "types": ["namespace", "service"], "resources": []},
|
||||
"servicediscovery:DiscoverInstancesRevision": {"action": "servicediscovery:DiscoverInstancesRevision", "types": ["namespace", "service"], "resources": []},
|
||||
"servicediscovery:GetInstance": {"action": "servicediscovery:GetInstance", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"servicediscovery:GetInstancesHealthStatus": {"action": "servicediscovery:GetInstancesHealthStatus", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"servicediscovery:GetNamespace": {"action": "servicediscovery:GetNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {"NamespaceId": "Id"}}]},
|
||||
"servicediscovery:GetOperation": {"action": "servicediscovery:GetOperation", "types": ["namespace", "service"], "resources": []},
|
||||
"servicediscovery:GetService": {"action": "servicediscovery:GetService", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "Id"}}]},
|
||||
"servicediscovery:GetServiceAttributes": {"action": "servicediscovery:GetServiceAttributes", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"servicediscovery:ListInstances": {"action": "servicediscovery:ListInstances", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"servicediscovery:ListNamespaces": {"action": "servicediscovery:ListNamespaces", "types": [], "resources": []},
|
||||
"servicediscovery:ListOperations": {"action": "servicediscovery:ListOperations", "types": [], "resources": []},
|
||||
"servicediscovery:ListServices": {"action": "servicediscovery:ListServices", "types": [], "resources": []},
|
||||
"servicediscovery:ListTagsForResource": {"action": "servicediscovery:ListTagsForResource", "types": [], "resources": []},
|
||||
"servicediscovery:RegisterInstance": {"action": "servicediscovery:RegisterInstance", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"servicediscovery:TagResource": {"action": "servicediscovery:TagResource", "types": [], "resources": []},
|
||||
"servicediscovery:UntagResource": {"action": "servicediscovery:UntagResource", "types": [], "resources": []},
|
||||
"servicediscovery:UpdateHttpNamespace": {"action": "servicediscovery:UpdateHttpNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {"NamespaceId": "Id"}}]},
|
||||
"servicediscovery:UpdateInstanceCustomHealthStatus": {"action": "servicediscovery:UpdateInstanceCustomHealthStatus", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"servicediscovery:UpdatePrivateDnsNamespace": {"action": "servicediscovery:UpdatePrivateDnsNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {"NamespaceId": "Id"}}]},
|
||||
"servicediscovery:UpdatePublicDnsNamespace": {"action": "servicediscovery:UpdatePublicDnsNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {"NamespaceId": "Id"}}]},
|
||||
"servicediscovery:UpdateService": {"action": "servicediscovery:UpdateService", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "Id"}}]},
|
||||
"servicediscovery:UpdateServiceAttributes": {"action": "servicediscovery:UpdateServiceAttributes", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]},
|
||||
"states:CreateActivity": {"action": "states:CreateActivity", "types": ["activity"], "resources": [{"type": "activity", "fill": {"ActivityName": "name"}}]},
|
||||
"states:CreateStateMachine": {"action": "states:CreateStateMachine", "types": ["statemachine"], "resources": [{"types": ["statemachine"], "arn": "roleArn"}, {"type": "statemachine", "fill": {"StateMachineName": "name"}}]},
|
||||
"states:CreateStateMachineAlias": {"action": "states:CreateStateMachineAlias", "types": ["statemachine"], "resources": [{"types": ["statemachine"], "arn": "routingConfiguration[].stateMachineVersionArn"}]},
|
||||
|
||||
+54
-9
@@ -100,9 +100,9 @@ class RequestResourceMembersTest {
|
||||
+ "{\"resources\":[],\"creates\":[{\"type\":\"part\",\"parent\":\"thing\",\"arn\":\"ThingArn\"}]}}}"),
|
||||
part);
|
||||
}
|
||||
// A member past one structure, or filling a variable from a lone structure's member or a list in a list.
|
||||
// A member past one structure, or filling a variable from a list in a list.
|
||||
assertThrows(IllegalStateException.class, () -> parse(document(formats, "{\"types\":[\"thing\"],\"arn\":\"A[].B.ThingArn\"}")));
|
||||
for (String bad : List.of("A.Name", "A[].Names[]", "A[].B.Name")) {
|
||||
for (String bad : List.of("A.Names[]", "A[].Names[]", "A[].B.Name")) {
|
||||
assertThrows(IllegalStateException.class, () -> parse(document(formats,
|
||||
"{\"type\":\"thing\",\"fill\":{\"ThingName\":\"" + bad + "\"}}")), bad);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ class RequestResourceMembersTest {
|
||||
// only a member filling a variable is.
|
||||
Member each = new Member("A", true, new Member("Name", false));
|
||||
assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", each), Map.of(), Map.of(),
|
||||
Map.of("A[].Name", "default"), Map.of("A[].Name", "thing"), null, null)),
|
||||
Map.of("A[].Name", "default"), Map.of("A[].Name", "thing"), null, null, Map.of(), false)),
|
||||
parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"A[].Name\"},"
|
||||
+ "\"absent\":{\"A[].Name\":\"default\"},\"arnOf\":{\"A[].Name\":\"thing\"}}"))
|
||||
.operations().get("a:Op"));
|
||||
@@ -119,8 +119,36 @@ class RequestResourceMembersTest {
|
||||
assertThrows(IllegalStateException.class, () -> parse(document(formats,
|
||||
"{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"}," + bad + "}")), bad);
|
||||
}
|
||||
// A field of a structure fills a variable, as one value.
|
||||
Member field = new Member("A", false, new Member("Name", false));
|
||||
assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", field), Map.of(), Map.of(),
|
||||
Map.of("A.Name", "default"), Map.of(), null, null, Map.of(), false)),
|
||||
parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"A.Name\"},"
|
||||
+ "\"absent\":{\"A.Name\":\"default\"}}")).operations().get("a:Op"));
|
||||
assertEquals("A.Name", field.path());
|
||||
// A variable fixed to the one value its handler uses, and one fixed that is no variable, that a member fills,
|
||||
// or to no value.
|
||||
String owned = "\"arnFormats\":{\"a\":{\"thing\":\"arn:${Partition}:a:${Region}:${Account}:thing/${Owner}/${ThingName}\"}}";
|
||||
assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", new Member("Name", false)), Map.of(),
|
||||
Map.of(), Map.of(), Map.of(), null, null, Map.of("Owner", "Custom"), false)),
|
||||
parseUnchecked(document(owned, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"},"
|
||||
+ "\"fixed\":{\"Owner\":\"Custom\"}}")).operations().get("a:Op"));
|
||||
for (String bad : List.of("{\"Other\":\"Custom\"}", "{\"ThingName\":\"Custom\"}", "{\"Owner\":\"\"}",
|
||||
"{\"Owner\":1}")) {
|
||||
assertThrows(IllegalStateException.class, () -> parse(document(owned,
|
||||
"{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"},\"fixed\":" + bad + "}")), bad);
|
||||
}
|
||||
// The resource a create makes, beside others it names, marked made, and a mark that is not true.
|
||||
assertTrue(parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"},"
|
||||
+ "\"made\":true}")).operations().get("a:Op").getFirst().made());
|
||||
assertTrue(parseUnchecked(document(formats, "{\"types\":[\"thing\"],\"arn\":\"ThingArn\",\"made\":true}"))
|
||||
.operations().get("a:Op").getFirst().made());
|
||||
for (String bad : List.of("false", "\"true\"", "1")) {
|
||||
assertThrows(IllegalStateException.class, () -> parse(document(formats,
|
||||
"{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"},\"made\":" + bad + "}")), bad);
|
||||
}
|
||||
assertEquals(List.of(new Resource(List.of("thing"), new Member("A", true, new Member("ThingArns", true)), Map.of(),
|
||||
Map.of(), Map.of(), Map.of(), Map.of(), null, null)), parseUnchecked(document(formats, "{\"types\":[\"thing\"],\"arn\":\"A[].ThingArns[]\"}"))
|
||||
Map.of(), Map.of(), Map.of(), Map.of(), null, null, Map.of(), false)), parseUnchecked(document(formats, "{\"types\":[\"thing\"],\"arn\":\"A[].ThingArns[]\"}"))
|
||||
.operations().get("a:Op"));
|
||||
// An ARN read before more than one character.
|
||||
assertThrows(IllegalStateException.class, () -> parse(document(formats,
|
||||
@@ -154,19 +182,21 @@ class RequestResourceMembersTest {
|
||||
"{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"}," + bad + "}")), bad);
|
||||
}
|
||||
assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", new Member("Name", false)),
|
||||
Map.of(), Map.of("Bus", List.of("default")), Map.of("Bus", "default"), Map.of("Bus", "thing"), null, null)),
|
||||
Map.of(), Map.of("Bus", List.of("default")), Map.of("Bus", "default"), Map.of("Bus", "thing"), null, null,
|
||||
Map.of(), false)),
|
||||
parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"},"
|
||||
+ "\"unless\":{\"Bus\":[\"default\"]},\"absent\":{\"Bus\":\"default\"},"
|
||||
+ "\"arnOf\":{\"Bus\":\"thing\"}}")).operations().get("a:Op"));
|
||||
assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", new Member("Names", true)), Map.of(),
|
||||
Map.of(), Map.of(), Map.of(), new Member("registryId", false), null)),
|
||||
Map.of(), Map.of(), Map.of(), new Member("registryId", false), null, Map.of(), false)),
|
||||
parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Names[]\"},"
|
||||
+ "\"account\":\"registryId\"}")).operations().get("a:Op"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Each resource alone, from a request naming it and nothing else, gives exactly its ARN, in the account its
|
||||
* account member names when it has one.
|
||||
* account member names when it has one, with those of the operation's resources every request names, a create's
|
||||
* new resource no member names (Cloud Map's {@code CreateService}).
|
||||
*/
|
||||
@TestFactory
|
||||
Stream<DynamicTest> everyResourceOfTheTableIsReadFromAJsonBodyAndAForm() {
|
||||
@@ -197,9 +227,15 @@ class RequestResourceMembersTest {
|
||||
put(body, member, value);
|
||||
form.append('&').append(parameter(member)).append('=').append(encoded(value));
|
||||
});
|
||||
assertEquals(List.of(expected), RequestResources.of(operation.getKey(), json(body.toString()),
|
||||
List<String> named = operation.getValue().stream()
|
||||
.filter(other -> other == resource || named(other))
|
||||
.map(other -> other == resource ? expected : expected(
|
||||
table.formats().get(namespace).get(other.types().getFirst()).format(), other,
|
||||
"000000000000"))
|
||||
.distinct().toList();
|
||||
assertEquals(named, RequestResources.of(operation.getKey(), json(body.toString()),
|
||||
"aws", "us-east-1", "000000000000"), body.toString());
|
||||
assertEquals(List.of(expected), RequestResources.of(operation.getKey(), form(form.toString()),
|
||||
assertEquals(named, RequestResources.of(operation.getKey(), form(form.toString()),
|
||||
"aws", "us-east-1", "000000000000"), form.toString());
|
||||
})));
|
||||
}
|
||||
@@ -230,6 +266,12 @@ class RequestResourceMembersTest {
|
||||
})));
|
||||
}
|
||||
|
||||
/** Whether every request of its operation names the resource: no member names it and no member's value selects it. */
|
||||
private static boolean named(Resource resource) {
|
||||
return resource.arn() == null && resource.fill().isEmpty() && resource.when().isEmpty()
|
||||
&& resource.unless().isEmpty();
|
||||
}
|
||||
|
||||
/** The value at the member's path in a body: in its list's first element, and in its field's structure. */
|
||||
private static void put(ObjectNode body, Member member, String value) {
|
||||
if (member.field() == null) {
|
||||
@@ -262,6 +304,9 @@ class RequestResourceMembersTest {
|
||||
for (String variable : resource.fill().keySet()) {
|
||||
arn = arn.replace("${" + variable + "}", "x");
|
||||
}
|
||||
for (Map.Entry<String, String> variable : resource.fixed().entrySet()) {
|
||||
arn = arn.replace("${" + variable.getKey() + "}", variable.getValue());
|
||||
}
|
||||
return arn.replaceAll("\\$\\{\\w+}", "*");
|
||||
}
|
||||
|
||||
|
||||
@@ -364,6 +364,60 @@ class RequestResourcesTest {
|
||||
"{\"repositoryNames\":[\"${Account}\"]}")));
|
||||
}
|
||||
|
||||
/**
|
||||
* A pipeline is the one its request's {@code pipeline.name} names; its {@code roleArn}, the role CodePipeline
|
||||
* assumes, names none, even when it holds a pipeline's ARN. A webhook is the one {@code webhook.name} names, on
|
||||
* the pipeline {@code webhook.targetPipeline} names, and its tags go on the webhook alone.
|
||||
*/
|
||||
@Test
|
||||
void aPipelineIsTheOneItsStructuresNameNames() {
|
||||
String codePipeline = "arn:aws:codepipeline:us-east-1:000000000000:";
|
||||
assertEquals(List.of(codePipeline + "b"), of("codepipeline:UpdatePipeline",
|
||||
json("{\"pipeline\":{\"name\":\"b\",\"roleArn\":\"" + codePipeline + "a\"}}")));
|
||||
assertEquals(List.of(codePipeline + "b"), of("codepipeline:CreatePipeline", form("Action=CreatePipeline"
|
||||
+ "&pipeline.name=b&pipeline.roleArn=" + codePipeline + "a")));
|
||||
assertEquals(List.of(), of("codepipeline:UpdatePipeline", json("{\"pipeline\":{\"roleArn\":\"" + codePipeline
|
||||
+ "a\"}}")));
|
||||
assertEquals(List.of(codePipeline + "webhook:w", codePipeline + "p"), of("codepipeline:PutWebhook",
|
||||
json("{\"webhook\":{\"name\":\"w\",\"targetPipeline\":\"p\"}}")));
|
||||
// A webhook's tags go on the webhook, not on the pipeline it connects to.
|
||||
assertEquals(List.of(codePipeline + "webhook:w"), created("codepipeline:PutWebhook",
|
||||
json("{\"webhook\":{\"name\":\"w\",\"targetPipeline\":\"p\"}}")));
|
||||
}
|
||||
|
||||
/** A custom action type is {@code Custom}'s, the owner CodePipeline gives every one, which its request does not. */
|
||||
@Test
|
||||
void aCustomActionTypeIsCustoms() {
|
||||
assertEquals(List.of("arn:aws:codepipeline:us-east-1:000000000000:actiontype:Custom/Build/MyProvider/1"),
|
||||
of("codepipeline:CreateCustomActionType",
|
||||
json("{\"category\":\"Build\",\"provider\":\"MyProvider\",\"version\":\"1\"}")));
|
||||
assertEquals(List.of("arn:aws:codepipeline:us-east-1:000000000000:actiontype:Custom/Build/MyProvider/1"),
|
||||
of("codepipeline:DeleteCustomActionType",
|
||||
json("{\"category\":\"Build\",\"provider\":\"MyProvider\",\"version\":\"1\"}")));
|
||||
assertEquals(List.of(), of("codepipeline:DeleteCustomActionType", json("{}")));
|
||||
}
|
||||
|
||||
/**
|
||||
* A Cloud Map service is created in the namespace {@code NamespaceId} names, or {@code DnsConfig.NamespaceId}
|
||||
* when it names none or gives a JSON null, as the handler reads them, and tags go on the service it creates,
|
||||
* not on the namespace.
|
||||
*/
|
||||
@Test
|
||||
void aServiceIsCreatedInTheNamespaceItsHandlerReads() {
|
||||
String cloudMap = "arn:aws:servicediscovery:us-east-1:000000000000:";
|
||||
assertEquals(List.of(cloudMap + "namespace/ns-a", cloudMap + "service/*"), of("servicediscovery:CreateService",
|
||||
json("{\"Name\":\"s\",\"NamespaceId\":\"ns-a\"}")));
|
||||
assertEquals(List.of(cloudMap + "namespace/ns-b", cloudMap + "service/*"), of("servicediscovery:CreateService",
|
||||
json("{\"Name\":\"s\",\"DnsConfig\":{\"NamespaceId\":\"ns-b\"}}")));
|
||||
assertEquals(List.of(cloudMap + "namespace/ns-a", cloudMap + "service/*"), of("servicediscovery:CreateService",
|
||||
json("{\"Name\":\"s\",\"NamespaceId\":\"ns-a\",\"DnsConfig\":{\"NamespaceId\":\"ns-b\"}}")));
|
||||
// A JSON null is no namespace, as the handler reads it, which then takes DnsConfig's.
|
||||
assertEquals(List.of(cloudMap + "namespace/ns-b", cloudMap + "service/*"), of("servicediscovery:CreateService",
|
||||
json("{\"Name\":\"s\",\"NamespaceId\":null,\"DnsConfig\":{\"NamespaceId\":\"ns-b\"}}")));
|
||||
assertEquals(List.of(cloudMap + "service/*"), created("servicediscovery:CreateService",
|
||||
json("{\"Name\":\"s\",\"NamespaceId\":\"ns-a\"}")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void aRequestNamingNoResourceOrOfANamespaceTheTableDoesNotReadIsCheckedOnStar() {
|
||||
assertEquals(List.of(), of("ecr:DescribeRepositories", json("{}")));
|
||||
|
||||
+273
@@ -18,7 +18,9 @@ import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import static io.github.hectorvent.floci.testing.EnforcementFixtures.auth;
|
||||
import static io.restassured.RestAssured.given;
|
||||
@@ -489,6 +491,277 @@ class IamRequestResourceEnforcementIntegrationTest {
|
||||
+ "\",\"tags\":[{\"Key\":\"a\",\"Value\":\"b\"}]}").post("/").then(), "ecr:TagResource");
|
||||
}
|
||||
|
||||
@Test
|
||||
void aDeliveryStreamIsCheckedOnTheArnItsNameGives() {
|
||||
String name = "res-stream-" + suffix();
|
||||
String arn = adminJson("firehose", "Firehose_20150804.CreateDeliveryStream")
|
||||
.body("{\"DeliveryStreamName\":\"" + name + "\"}").post("/").then().statusCode(200)
|
||||
.extract().path("DeliveryStreamARN");
|
||||
cleanup.register(() -> adminJson("firehose", "Firehose_20150804.DeleteDeliveryStream")
|
||||
.body("{\"DeliveryStreamName\":\"" + name + "\"}").post("/"));
|
||||
assertEquals("arn:aws:firehose:" + REGION + ":" + ACCOUNT + ":deliverystream/" + name, arn);
|
||||
|
||||
User user = user("res-stream");
|
||||
user.policy(allowOn("firehose:DescribeDeliveryStream", arn));
|
||||
describeDeliveryStream(user, name).statusCode(200);
|
||||
refusedJson(describeDeliveryStream(user, name + "-other"), "firehose:DescribeDeliveryStream");
|
||||
}
|
||||
|
||||
/** An identity pool is checked on the ARN its id gives, the one Cognito tags it under. */
|
||||
@Test
|
||||
void anIdentityPoolIsCheckedOnTheArnItsIdGives() {
|
||||
String id = adminJson("cognito-identity", "AWSCognitoIdentityService.CreateIdentityPool")
|
||||
.body("{\"IdentityPoolName\":\"res pool " + suffix() + "\",\"AllowUnauthenticatedIdentities\":false}")
|
||||
.post("/").then().statusCode(200).extract().path("IdentityPoolId");
|
||||
cleanup.register(() -> adminJson("cognito-identity", "AWSCognitoIdentityService.DeleteIdentityPool")
|
||||
.body("{\"IdentityPoolId\":\"" + id + "\"}").post("/"));
|
||||
String arn = "arn:aws:cognito-identity:" + REGION + ":" + ACCOUNT + ":identitypool/" + id;
|
||||
adminJson("cognito-identity", "AWSCognitoIdentityService.TagResource")
|
||||
.body("{\"ResourceArn\":\"" + arn + "\",\"Tags\":{\"a\":\"b\"}}").post("/").then().statusCode(200);
|
||||
|
||||
User user = user("res-identity-pool");
|
||||
user.policy(allowOn("cognito-identity:DescribeIdentityPool", arn));
|
||||
describeIdentityPool(user, id).statusCode(200);
|
||||
refusedJson(describeIdentityPool(user, REGION + ":" + UUID.randomUUID()), "cognito-identity:DescribeIdentityPool");
|
||||
}
|
||||
|
||||
@Test
|
||||
void aCloudMapNamespaceAndServiceAreCheckedOnTheArnsTheirIdsGive() {
|
||||
String namespaceId = cloudMapNamespace("res-ns-" + suffix());
|
||||
String namespaceArn = adminJson("servicediscovery", "Route53AutoNaming_v20170314.GetNamespace")
|
||||
.body("{\"Id\":\"" + namespaceId + "\"}").post("/").then().statusCode(200).extract().path("Namespace.Arn");
|
||||
assertEquals("arn:aws:servicediscovery:" + REGION + ":" + ACCOUNT + ":namespace/" + namespaceId, namespaceArn);
|
||||
Map<String, String> service = adminJson("servicediscovery", "Route53AutoNaming_v20170314.CreateService")
|
||||
.body("{\"Name\":\"res-svc\",\"NamespaceId\":\"" + namespaceId + "\"}").post("/").then().statusCode(200)
|
||||
.extract().path("Service");
|
||||
cleanup.register(() -> adminJson("servicediscovery", "Route53AutoNaming_v20170314.DeleteService")
|
||||
.body("{\"Id\":\"" + service.get("Id") + "\"}").post("/"));
|
||||
assertEquals("arn:aws:servicediscovery:" + REGION + ":" + ACCOUNT + ":service/" + service.get("Id"),
|
||||
service.get("Arn"));
|
||||
|
||||
User user = user("res-cloud-map");
|
||||
user.policy(allowOn("servicediscovery:GetNamespace", namespaceArn) + ","
|
||||
+ allowOn("servicediscovery:GetService", service.get("Arn")));
|
||||
cloudMap(user, "GetNamespace", namespaceId).statusCode(200);
|
||||
refusedJson(cloudMap(user, "GetNamespace", "ns-" + suffix()), "servicediscovery:GetNamespace");
|
||||
cloudMap(user, "GetService", service.get("Id")).statusCode(200);
|
||||
refusedJson(cloudMap(user, "GetService", "srv-" + suffix()), "servicediscovery:GetService");
|
||||
}
|
||||
|
||||
@Test
|
||||
void aCertificateIsCheckedOnItsArn() {
|
||||
String arn = adminJson("acm", "CertificateManager.RequestCertificate")
|
||||
.body("{\"DomainName\":\"res-" + suffix() + ".example.com\"}").post("/").then().statusCode(200)
|
||||
.extract().path("CertificateArn");
|
||||
cleanup.register(() -> adminJson("acm", "CertificateManager.DeleteCertificate")
|
||||
.body("{\"CertificateArn\":\"" + arn + "\"}").post("/"));
|
||||
assertTrue(arn.startsWith("arn:aws:acm:" + REGION + ":" + ACCOUNT + ":certificate/"), arn);
|
||||
|
||||
User user = user("res-certificate");
|
||||
user.policy(allowOn("acm:DescribeCertificate", arn));
|
||||
describeCertificate(user, arn).statusCode(200);
|
||||
refusedJson(describeCertificate(user, "arn:aws:acm:" + REGION + ":" + ACCOUNT + ":certificate/" + UUID.randomUUID()),
|
||||
"acm:DescribeCertificate");
|
||||
}
|
||||
|
||||
/**
|
||||
* A pipeline is checked on the ARN its name gives, a request naming it by a bare {@code name} too, and a webhook
|
||||
* on {@code webhook:<name>}, the ARN CodePipeline gives it.
|
||||
*/
|
||||
@Test
|
||||
void aPipelineAndAWebhookAreCheckedOnTheArnsTheirNamesGive() {
|
||||
String name = "res-pipeline-" + suffix();
|
||||
adminJson("codepipeline", "CodePipeline_20150709.CreatePipeline").body(pipeline(name)).post("/")
|
||||
.then().statusCode(200);
|
||||
cleanup.register(() -> adminJson("codepipeline", "CodePipeline_20150709.DeletePipeline")
|
||||
.body("{\"name\":\"" + name + "\"}").post("/"));
|
||||
String pipelineArn = adminJson("codepipeline", "CodePipeline_20150709.GetPipeline")
|
||||
.body("{\"name\":\"" + name + "\"}").post("/").then().statusCode(200).extract().path("metadata.pipelineArn");
|
||||
assertEquals("arn:aws:codepipeline:" + REGION + ":" + ACCOUNT + ":" + name, pipelineArn);
|
||||
|
||||
User user = user("res-pipeline");
|
||||
user.policy(allowOn("codepipeline:GetPipeline", pipelineArn) + ","
|
||||
+ allowOn("codepipeline:GetPipelineState", pipelineArn));
|
||||
codePipeline(user, "GetPipeline", "{\"name\":\"" + name + "\"}").statusCode(200);
|
||||
codePipeline(user, "GetPipelineState", "{\"name\":\"" + name + "\"}").statusCode(200);
|
||||
refusedJson(codePipeline(user, "GetPipelineState", "{\"name\":\"" + name + "-other\"}"),
|
||||
"codepipeline:GetPipelineState");
|
||||
|
||||
String hook = "res-hook-" + suffix();
|
||||
String hookArn = adminJson("codepipeline", "CodePipeline_20150709.PutWebhook").body("{\"webhook\":{\"name\":\""
|
||||
+ hook + "\",\"targetPipeline\":\"" + name + "\",\"targetAction\":\"SourceAction\",\"filters\":"
|
||||
+ "[{\"jsonPath\":\"$.ref\",\"matchEquals\":\"refs/heads/main\"}],\"authentication\":\"UNAUTHENTICATED\"}}")
|
||||
.post("/").then().statusCode(200).extract().path("webhook.arn");
|
||||
assertEquals("arn:aws:codepipeline:" + REGION + ":" + ACCOUNT + ":webhook:" + hook, hookArn);
|
||||
user.policy(allowOn("codepipeline:DeleteWebhook", hookArn));
|
||||
refusedJson(codePipeline(user, "DeleteWebhook", "{\"name\":\"" + hook + "-other\"}"), "codepipeline:DeleteWebhook");
|
||||
codePipeline(user, "DeleteWebhook", "{\"name\":\"" + hook + "\"}").statusCode(200);
|
||||
}
|
||||
|
||||
/** {@code StartPipelineExecution} names its pipeline by a bare {@code name}, on which it is checked. */
|
||||
@Test
|
||||
void aPipelineExecutionIsCheckedOnThePipelineItsNameGives() {
|
||||
String name = "res-pipeline-" + suffix();
|
||||
User user = user("res-pipeline-start");
|
||||
user.policy(allowOn("codepipeline:StartPipelineExecution",
|
||||
"arn:aws:codepipeline:" + REGION + ":" + ACCOUNT + ":" + name));
|
||||
codePipeline(user, "StartPipelineExecution", "{\"name\":\"" + name + "\"}").statusCode(400)
|
||||
.body(containsString("PipelineNotFoundException"));
|
||||
refusedJson(codePipeline(user, "StartPipelineExecution", "{\"name\":\"" + name + "-other\"}"),
|
||||
"codepipeline:StartPipelineExecution");
|
||||
}
|
||||
|
||||
/**
|
||||
* An update is checked on the pipeline its {@code pipeline.name} names, which it changes, not on one its
|
||||
* {@code roleArn} holds: a grant on one pipeline does not let a request naming another through by giving the
|
||||
* first's ARN as its role.
|
||||
*/
|
||||
@Test
|
||||
void anUpdateIsCheckedOnThePipelineItNamesNotOneItsRoleHolds() {
|
||||
String allowed = "res-pipeline-" + suffix();
|
||||
String other = allowed + "-other";
|
||||
for (String name : List.of(allowed, other)) {
|
||||
adminJson("codepipeline", "CodePipeline_20150709.CreatePipeline").body(pipeline(name)).post("/")
|
||||
.then().statusCode(200);
|
||||
cleanup.register(() -> adminJson("codepipeline", "CodePipeline_20150709.DeletePipeline")
|
||||
.body("{\"name\":\"" + name + "\"}").post("/"));
|
||||
}
|
||||
String allowedArn = "arn:aws:codepipeline:" + REGION + ":" + ACCOUNT + ":" + allowed;
|
||||
User user = user("res-pipeline-update");
|
||||
user.policy(allowOn("codepipeline:UpdatePipeline", allowedArn) + ","
|
||||
+ allowOn("iam:PassRole", "arn:aws:iam::" + ACCOUNT + ":role/codepipeline-role"));
|
||||
refusedJson(codePipeline(user, "UpdatePipeline", pipeline(other).replace(
|
||||
"arn:aws:iam::" + ACCOUNT + ":role/codepipeline-role", allowedArn)), "codepipeline:UpdatePipeline");
|
||||
codePipeline(user, "UpdatePipeline", pipeline(allowed)).statusCode(200);
|
||||
}
|
||||
|
||||
/** A webhook's tags are checked on the webhook, not on the pipeline it connects to, which they do not go on. */
|
||||
@Test
|
||||
void aWebhooksTagsAreCheckedOnTheWebhookNotItsPipeline() {
|
||||
String name = "res-pipeline-" + suffix();
|
||||
adminJson("codepipeline", "CodePipeline_20150709.CreatePipeline").body(pipeline(name)).post("/")
|
||||
.then().statusCode(200);
|
||||
cleanup.register(() -> adminJson("codepipeline", "CodePipeline_20150709.DeletePipeline")
|
||||
.body("{\"name\":\"" + name + "\"}").post("/"));
|
||||
String hook = "res-hook-" + suffix();
|
||||
String codePipeline = "arn:aws:codepipeline:" + REGION + ":" + ACCOUNT + ":";
|
||||
User user = user("res-webhook-tags");
|
||||
user.policy(allowOn("codepipeline:PutWebhook", codePipeline + "webhook:" + hook) + ","
|
||||
+ allowOn("codepipeline:PutWebhook", codePipeline + name) + ","
|
||||
+ allowOn("codepipeline:TagResource", codePipeline + "webhook:*"));
|
||||
codePipeline(user, "PutWebhook", "{\"webhook\":{\"name\":\"" + hook + "\",\"targetPipeline\":\"" + name
|
||||
+ "\",\"targetAction\":\"SourceAction\",\"filters\":[{\"jsonPath\":\"$.ref\",\"matchEquals\":"
|
||||
+ "\"refs/heads/main\"}],\"authentication\":\"UNAUTHENTICATED\"},\"tags\":[{\"key\":\"a\",\"value\":\"b\"}]}")
|
||||
.statusCode(200);
|
||||
cleanup.register(() -> adminJson("codepipeline", "CodePipeline_20150709.DeleteWebhook")
|
||||
.body("{\"name\":\"" + hook + "\"}").post("/"));
|
||||
}
|
||||
|
||||
/**
|
||||
* A service is created in the namespace its {@code DnsConfig.NamespaceId} names when the request gives no
|
||||
* {@code NamespaceId}, or a JSON null for it, as Cloud Map reads it, so a deny on that namespace holds.
|
||||
*/
|
||||
@Test
|
||||
void aServiceIsCheckedOnTheNamespaceItsDnsConfigNames() {
|
||||
String namespaceId = cloudMapNamespace("res-ns-dns-" + suffix());
|
||||
User user = user("res-cloud-map-dns");
|
||||
user.policy(allowOn("servicediscovery:CreateService", "*") + ",{\"Effect\":\"Deny\",\"Action\":"
|
||||
+ "\"servicediscovery:CreateService\",\"Resource\":\"arn:aws:servicediscovery:" + REGION + ":" + ACCOUNT
|
||||
+ ":namespace/" + namespaceId + "\"}");
|
||||
String dnsConfig = "\"DnsConfig\":{\"NamespaceId\":\"" + namespaceId + "\",\"DnsRecords\":"
|
||||
+ "[{\"Type\":\"A\",\"TTL\":60}]}";
|
||||
refusedJson(user.json("servicediscovery", "Route53AutoNaming_v20170314.CreateService", "1.1")
|
||||
.body("{\"Name\":\"res-svc\"," + dnsConfig + "}").post("/").then(), "servicediscovery:CreateService");
|
||||
refusedJson(user.json("servicediscovery", "Route53AutoNaming_v20170314.CreateService", "1.1")
|
||||
.body("{\"Name\":\"res-svc\",\"NamespaceId\":null," + dnsConfig + "}").post("/").then(),
|
||||
"servicediscovery:CreateService");
|
||||
}
|
||||
|
||||
/** A service's tags are checked on the service it creates, not on the namespace it creates it in. */
|
||||
@Test
|
||||
void aServicesTagsAreCheckedOnTheServiceNotItsNamespace() {
|
||||
String namespaceId = cloudMapNamespace("res-ns-tags-" + suffix());
|
||||
String cloudMap = "arn:aws:servicediscovery:" + REGION + ":" + ACCOUNT + ":";
|
||||
User user = user("res-cloud-map-tags");
|
||||
user.policy(allowOn("servicediscovery:CreateService", cloudMap + "namespace/" + namespaceId) + ","
|
||||
+ allowOn("servicediscovery:CreateService", cloudMap + "service/*") + ","
|
||||
+ allowOn("servicediscovery:TagResource", cloudMap + "service/*"));
|
||||
String serviceId = user.json("servicediscovery", "Route53AutoNaming_v20170314.CreateService", "1.1")
|
||||
.body("{\"Name\":\"res-svc\",\"NamespaceId\":\"" + namespaceId + "\",\"Tags\":[{\"Key\":\"a\",\"Value\":\"b\"}]}")
|
||||
.post("/").then().statusCode(200).extract().path("Service.Id");
|
||||
cleanup.register(() -> adminJson("servicediscovery", "Route53AutoNaming_v20170314.DeleteService")
|
||||
.body("{\"Id\":\"" + serviceId + "\"}").post("/"));
|
||||
}
|
||||
|
||||
/**
|
||||
* A custom action type is checked on {@code actiontype:Custom/...}, its owner being {@code Custom}, which the
|
||||
* request does not give, so a grant on the ARN CodePipeline gives it allows creating and deleting it.
|
||||
*/
|
||||
@Test
|
||||
void aCustomActionTypeIsCheckedAsCustoms() {
|
||||
String provider = "Res" + suffix();
|
||||
String arn = "arn:aws:codepipeline:" + REGION + ":" + ACCOUNT + ":actiontype:Custom/Build/" + provider + "/1";
|
||||
User user = user("res-action-type");
|
||||
user.policy(allowOn("codepipeline:CreateCustomActionType", arn) + ","
|
||||
+ allowOn("codepipeline:DeleteCustomActionType", arn));
|
||||
String type = "\"category\":\"Build\",\"provider\":\"" + provider + "\",\"version\":\"1\"";
|
||||
codePipeline(user, "CreateCustomActionType", "{" + type + ",\"inputArtifactDetails\":{\"minimumCount\":0,"
|
||||
+ "\"maximumCount\":1},\"outputArtifactDetails\":{\"minimumCount\":0,\"maximumCount\":1}}")
|
||||
.statusCode(200).body("actionType.id.owner", equalTo("Custom"));
|
||||
refusedJson(codePipeline(user, "DeleteCustomActionType", "{" + type.replace(provider, provider + "x") + "}"),
|
||||
"codepipeline:DeleteCustomActionType");
|
||||
codePipeline(user, "DeleteCustomActionType", "{" + type + "}").statusCode(200);
|
||||
}
|
||||
|
||||
/** A Cloud Map HTTP namespace, created for the test and deleted after it; its id. */
|
||||
private String cloudMapNamespace(String name) {
|
||||
adminJson("servicediscovery", "Route53AutoNaming_v20170314.CreateHttpNamespace")
|
||||
.body("{\"Name\":\"" + name + "\"}").post("/").then().statusCode(200);
|
||||
String id = adminJson("servicediscovery", "Route53AutoNaming_v20170314.ListNamespaces").body("{}")
|
||||
.post("/").then().statusCode(200).extract().path("Namespaces.find { it.Name == '" + name + "' }.Id");
|
||||
cleanup.register(() -> adminJson("servicediscovery", "Route53AutoNaming_v20170314.DeleteNamespace")
|
||||
.body("{\"Id\":\"" + id + "\"}").post("/"));
|
||||
return id;
|
||||
}
|
||||
|
||||
private static RequestSpecification adminJson(String service, String target) {
|
||||
return admin(service).header("X-Amz-Target", target).contentType("application/x-amz-json-1.1");
|
||||
}
|
||||
|
||||
private static ValidatableResponse describeDeliveryStream(User user, String name) {
|
||||
return user.json("firehose", "Firehose_20150804.DescribeDeliveryStream", "1.1")
|
||||
.body("{\"DeliveryStreamName\":\"" + name + "\"}").post("/").then();
|
||||
}
|
||||
|
||||
private static ValidatableResponse describeIdentityPool(User user, String id) {
|
||||
return user.json("cognito-identity", "AWSCognitoIdentityService.DescribeIdentityPool", "1.1")
|
||||
.body("{\"IdentityPoolId\":\"" + id + "\"}").post("/").then();
|
||||
}
|
||||
|
||||
private static ValidatableResponse cloudMap(User user, String operation, String id) {
|
||||
return user.json("servicediscovery", "Route53AutoNaming_v20170314." + operation, "1.1")
|
||||
.body("{\"Id\":\"" + id + "\"}").post("/").then();
|
||||
}
|
||||
|
||||
private static ValidatableResponse describeCertificate(User user, String arn) {
|
||||
return user.json("acm", "CertificateManager.DescribeCertificate", "1.1")
|
||||
.body("{\"CertificateArn\":\"" + arn + "\"}").post("/").then();
|
||||
}
|
||||
|
||||
private static ValidatableResponse codePipeline(User user, String operation, String body) {
|
||||
return user.json("codepipeline", "CodePipeline_20150709." + operation, "1.1").body(body).post("/").then();
|
||||
}
|
||||
|
||||
/** A pipeline with a source and a build stage, the two stages CodePipeline requires. */
|
||||
private static String pipeline(String name) {
|
||||
return "{\"pipeline\":{\"name\":\"" + name + "\",\"roleArn\":\"arn:aws:iam::" + ACCOUNT + ":role/codepipeline-role\","
|
||||
+ "\"artifactStore\":{\"type\":\"S3\",\"location\":\"codepipeline-artifacts\"},\"stages\":["
|
||||
+ "{\"name\":\"Source\",\"actions\":[{\"name\":\"SourceAction\",\"actionTypeId\":{\"category\":\"Source\","
|
||||
+ "\"owner\":\"AWS\",\"provider\":\"S3\",\"version\":\"1\"},\"runOrder\":1}]},"
|
||||
+ "{\"name\":\"Build\",\"actions\":[{\"name\":\"BuildAction\",\"actionTypeId\":{\"category\":\"Build\","
|
||||
+ "\"owner\":\"AWS\",\"provider\":\"CodeBuild\",\"version\":\"1\"},\"runOrder\":1}]}]}}";
|
||||
}
|
||||
|
||||
private static RequestSpecification tagged(RequestSpecification request) {
|
||||
return request.formParam("Tags.member.1.Key", "elbv2.k8s.aws/cluster").formParam("Tags.member.1.Value", "c");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user