mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(iam): check each secret a Secrets Manager batch read returns as GetSecretValue (#9774)
The API reference's required permissions for BatchGetSecretValue say "you must have secretsmanager:GetSecretValue for each secret", and the Service Reference lists that action among the operation's. Floci checked the batch action only, so a caller allowed secretsmanager:BatchGetSecretValue read every secret, whatever its policies said about GetSecretValue on each one. The authorized-actions generator now reads that clause, already vendored by fetch_secretsmanager_required_permissions.py, into a perEntry section: the action an operation needs on each entry it reads, with the type of the action the clause's words name as the generators' names go (stem: secret is Secret), where the Service Reference lists the action among the operation's. IamAuthorizedActions reads it, and the Secrets Manager handler checks each secret a batch read returns against it, both by SecretIdList and by Filters. A secret the caller may not read goes to Errors as AccessDeniedException, under the id it was requested as (its ARN for a filtered read), and the others are returned, as AWS's own fidelity check records it (check_batch_get_secret_value_returns_partial_results_with_a_per_secret_error_for_a_denied_secret). Each secret is checked with the condition keys of its own stored tags (aws:ResourceTag/<key>, secretsmanager:ResourceTag/<key>), through IamEnforcementFilter.authorizeEntryResource, so a grant or a deny scoped to a tag holds for each secret of a batch as it does for a GetSecretValue of that secret alone. The gates this change runs need today's AWS too, so the tables they cover are synced: the Service Reference lists 37 more Glue actions with no resource type and S3 Tables' ListStorageLensConfigurations (iam-authorized-actions.json), S3 Tables' StorageLens type on its tagging actions with its ARN format and tag keys, and the elasticfilesystem-endpoint and s3files-endpoint namespaces it does not read (iam-request-resources.json), three S3 actions taking s3:ResourceAccount, GetBucketDefaultStorageClass, PutBucketDefaultStorageClass and GetIncompleteUpload (s3control-tag-condition-keys.json), and the S3 user guide's permissions table gives the two default storage class operations (tools/aws/sources/s3-required-actions.json).
This commit is contained in:
1 parent
682611b339
commit
e4ee7816ad
14 files changed
+478
-19
No files matched your search
@@ -2974,7 +2974,10 @@ CodeArtifact's destination repository is its `destinationRepository`. So `StartM
|
||||
script vendors (`tools/aws/fetch_secretsmanager_required_permissions.py`) for each operation the Service Reference
|
||||
lists as authorized by another of its actions: an action needed when the request does something ("If you use filters,
|
||||
you must also have secretsmanager:ListSecrets") when it carries the member the words name (`Filters`), and one it
|
||||
always needs ("secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy") on what it names. A Lambda
|
||||
always needs ("secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy") on what it names; one it
|
||||
needs for each thing ("you must have secretsmanager:GetSecretValue for each secret") is an action the authorized-actions
|
||||
table gives the operation on each entry of the type the words name (`perEntry`), which its handler checks on each
|
||||
secret it reads, answering a denied one in the response's `Errors`. A Lambda
|
||||
operation the Service Reference lists as authorized by an action is also checked as it on the resource the Lambda
|
||||
developer guide asks permission to call that action's API on, which its own script vendors
|
||||
(`tools/aws/fetch_lambda_layer_permissions.py`): "Make sure that you have permission to call the GetLayerVersion API
|
||||
|
||||
@@ -61,10 +61,13 @@ say it needs beside its own, as each operation's page gives them:
|
||||
- `ValidateResourcePolicy` needs `secretsmanager:PutResourcePolicy` on the secret it names, or on every resource where
|
||||
it names none, as its own action is: "Required permissions: secretsmanager:ValidateResourcePolicy and
|
||||
secretsmanager:PutResourcePolicy".
|
||||
- `BatchGetSecretValue` needs `secretsmanager:GetSecretValue` on each secret it reads: "you must have
|
||||
secretsmanager:GetSecretValue for each secret". A secret the caller may not read is answered in the response's
|
||||
`Errors`, as `AccessDeniedException` under the id it was requested as (its ARN for a read using `Filters`), and the
|
||||
others are returned, as AWS does, rather than the whole call being refused.
|
||||
|
||||
A tagged `CreateSecret` needs `secretsmanager:TagResource`, which the tagging check gives already. Not checked yet:
|
||||
`BatchGetSecretValue`'s `secretsmanager:GetSecretValue` "for each secret", which AWS reports per secret in the
|
||||
response's `Errors` rather than refusing the call; `secretsmanager:PutResourcePolicy` for a cross-account replica
|
||||
`secretsmanager:PutResourcePolicy` for a cross-account replica
|
||||
(`CrossAccountPrimaryARN`) and `secretsmanager:DeleteResourcePolicy` for one stopped replicating, whose sentences name
|
||||
no member of the request; and the KMS permissions of a secret encrypted with a customer managed key.
|
||||
|
||||
|
||||
@@ -1393,6 +1393,18 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
|
||||
resourceOwnerAccountId, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Authorizes a resource a handler reads entry by entry, one of many the request does not name, as {@link #filter}
|
||||
* checks one a request names: with the condition keys of the tags its service holds on it ({@code
|
||||
* aws:ResourceTag/<key>}, {@code secretsmanager:ResourceTag/<key>}), so a grant or a deny scoped to a tag holds for
|
||||
* each entry as it does for a request reading that entry alone. A Secrets Manager batch read checks each secret it
|
||||
* returns so.
|
||||
*/
|
||||
public void authorizeEntryResource(String authorizationHeader, String action, String resource) {
|
||||
Map<String, List<String>> tags = conditionContextResolver.resourceTags(action, resource);
|
||||
authorizeAdditionalResource(authorizationHeader, action, resource, tags == null ? Map.of() : tags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Authorizes a secondary resource with the condition keys {@code requestConditions} gives, values its
|
||||
* handler reads from the request {@link #filter} has authorized: GetClusterCredentials checks
|
||||
|
||||
@@ -77,12 +77,22 @@ public final class IamAuthorizedActions {
|
||||
* no resource type, as {@code <namespace>:<Action>} in lower case, the operations authorized by method, as
|
||||
* {@code <namespace>:<Operation>}, the action of an operation for a request of one model's route, keyed by
|
||||
* {@code <namespace>:<Operation>@<model>}, the operations whose action a request parameter chooses, and the
|
||||
* reference's spelling of an action named as its operation in another case, and the actions each operation needs
|
||||
* beside its own when it sets a value, keyed by {@code <namespace>:<Operation>}.
|
||||
* reference's spelling of an action named as its operation in another case, the actions each operation needs
|
||||
* beside its own when it sets a value, and those it needs on each entry it reads, keyed by
|
||||
* {@code <namespace>:<Operation>}.
|
||||
*/
|
||||
record Table(Map<String, String> actions, Set<String> withoutResourceTypes, Set<String> byMethod,
|
||||
Map<String, String> byModel, Map<String, Versioned> versioned, Map<String, String> spellings,
|
||||
Map<String, List<Companion>> companions) {
|
||||
Map<String, List<Companion>> companions, Map<String, List<PerEntry>> perEntry) {
|
||||
}
|
||||
|
||||
/**
|
||||
* An action an operation needs on each entry of a {@code type} it reads, which its handler checks entry by entry
|
||||
* and answers a denial of in that entry's error: a Secrets Manager batch read needs
|
||||
* {@code secretsmanager:GetSecretValue} on each secret, as the API reference's required permissions say ("you
|
||||
* must have secretsmanager:GetSecretValue for each secret").
|
||||
*/
|
||||
public record PerEntry(String action, String type) {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,6 +211,14 @@ public final class IamAuthorizedActions {
|
||||
return Holder.TABLE.companions().getOrDefault(operation, List.of());
|
||||
}
|
||||
|
||||
/**
|
||||
* The actions {@code operation}, as {@code <namespace>:<Operation>}, needs on each entry it reads; none for an
|
||||
* operation the file gives none.
|
||||
*/
|
||||
public static List<PerEntry> perEntry(String operation) {
|
||||
return Holder.TABLE.perEntry().getOrDefault(operation, List.of());
|
||||
}
|
||||
|
||||
/**
|
||||
* The companion of {@code operation} reading the session tags an identity provider passes: the SAML attribute or
|
||||
* token claim carrying them and the action a trust policy has to allow for them. Empty for an operation the file
|
||||
@@ -239,7 +257,25 @@ public final class IamAuthorizedActions {
|
||||
return new Table(Map.copyOf(actions), withoutResourceTypes(document.path("actionsWithoutResourceTypes")),
|
||||
byMethod(document.path("authorizedByMethod")), byModel(document.path("authorizedByModel")),
|
||||
versioned(document.path("versioned")), spellings(document.path("spellings")),
|
||||
companions(document.path("companions")));
|
||||
companions(document.path("companions")), perEntry(document.path("perEntry")));
|
||||
}
|
||||
|
||||
/** Each namespace's operations' actions on each entry they read, keyed {@code <namespace>:<Operation>}. */
|
||||
private static Map<String, List<PerEntry>> perEntry(JsonNode namespaces) {
|
||||
Map<String, List<PerEntry>> found = new LinkedHashMap<>();
|
||||
namespaces.properties().forEach(namespace -> namespace.getValue().properties().forEach(operation -> {
|
||||
List<PerEntry> needed = new ArrayList<>();
|
||||
for (JsonNode each : operation.getValue()) {
|
||||
String type = each.path("type").asText("");
|
||||
if (type.isEmpty()) {
|
||||
throw new IllegalStateException(RESOURCE_NAME + " gives " + namespace.getKey() + ":"
|
||||
+ operation.getKey() + " an action on each entry naming no resource type");
|
||||
}
|
||||
needed.add(new PerEntry(actionOf(namespace.getKey(), operation.getKey(), each.path("action")), type));
|
||||
}
|
||||
found.put(namespace.getKey() + ":" + operation.getKey(), List.copyOf(needed));
|
||||
}));
|
||||
return Map.copyOf(found);
|
||||
}
|
||||
|
||||
/** Each namespace's operations' companion actions, keyed {@code <namespace>:<Operation>}. */
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.floci.aws.core.common.AwsException;
|
||||
import io.floci.aws.core.common.EpochSeconds;
|
||||
import io.floci.aws.core.common.IamEnforcementFilter;
|
||||
import io.floci.aws.core.common.StoredResourceArns;
|
||||
import io.floci.aws.services.iam.IamAuthorizedActions;
|
||||
import io.floci.aws.services.secretsmanager.model.Secret;
|
||||
import io.floci.aws.services.secretsmanager.model.SecretVersion;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
@@ -85,7 +86,7 @@ public class SecretsManagerJsonHandler {
|
||||
case "ListSecretVersionIds" -> handleListSecretVersionIds(request, region);
|
||||
case "GetResourcePolicy" -> handleGetResourcePolicy(request, region);
|
||||
case "GetRandomPassword" -> handleGetRandomPassword(request, region);
|
||||
case "BatchGetSecretValue" -> handleBatchGetSecretValue(request, region);
|
||||
case "BatchGetSecretValue" -> handleBatchGetSecretValue(request, region, authorization);
|
||||
case "DeleteResourcePolicy" -> handleDeleteResourcePolicy(request, region);
|
||||
case "PutResourcePolicy" -> handlePutResourcePolicy(request, region);
|
||||
case "UpdateSecretVersionStage" -> handleUpdateSecretVersionStage(request, region);
|
||||
@@ -103,7 +104,16 @@ public class SecretsManagerJsonHandler {
|
||||
return response;
|
||||
}
|
||||
|
||||
private Response handleBatchGetSecretValue(JsonNode request, String region) {
|
||||
/**
|
||||
* BatchGetSecretValue, each secret it reads checked as the actions the authorized-actions table gives the
|
||||
* operation on each entry ({@link IamAuthorizedActions#perEntry}: "you must have secretsmanager:GetSecretValue for
|
||||
* each secret"), a secret the caller may not read answered in {@code Errors} while the others are returned, as
|
||||
* AWS does (aws-emulator-evaluation-suite, {@code
|
||||
* check_batch_get_secret_value_returns_partial_results_with_a_per_secret_error_for_a_denied_secret}).
|
||||
*/
|
||||
private Response handleBatchGetSecretValue(JsonNode request, String region, String authorization) {
|
||||
List<IamAuthorizedActions.PerEntry> perEntry = IamAuthorizedActions.perEntry(
|
||||
"secretsmanager:BatchGetSecretValue");
|
||||
if (!request.has("SecretIdList") && !request.has("Filters")) {
|
||||
return Response.status(400)
|
||||
.entity(new AwsErrorResponse("InvalidParameterException", "You must specify either SecretIdList or Filters."))
|
||||
@@ -129,8 +139,8 @@ public class SecretsManagerJsonHandler {
|
||||
"SecretIdList can contain at most " + MAX_BATCH_SECRET_IDS + " items."))
|
||||
.build();
|
||||
}
|
||||
SecretsManagerService.BatchGetSecretValueResult result =
|
||||
service.batchGetSecretValue(secretIdList, region);
|
||||
SecretsManagerService.BatchGetSecretValueResult result = service.batchGetSecretValue(secretIdList,
|
||||
region, secret -> authorizeEntry(authorization, perEntry, secret.getArn()));
|
||||
values = result.values();
|
||||
errors = result.errors();
|
||||
} else {
|
||||
@@ -176,6 +186,20 @@ public class SecretsManagerJsonHandler {
|
||||
nextToken = String.valueOf(endIndex);
|
||||
}
|
||||
}
|
||||
// A secret of the page the caller may not read is answered in Errors under its ARN.
|
||||
List<SecretsManagerService.BatchSecretValue> readable = new ArrayList<>();
|
||||
List<SecretsManagerService.BatchGetSecretValueError> refused = new ArrayList<>();
|
||||
for (SecretsManagerService.BatchSecretValue value : values) {
|
||||
try {
|
||||
authorizeEntry(authorization, perEntry, value.arn());
|
||||
readable.add(value);
|
||||
} catch (AwsException e) {
|
||||
refused.add(new SecretsManagerService.BatchGetSecretValueError(value.arn(), e.getErrorCode(),
|
||||
e.getMessage()));
|
||||
}
|
||||
}
|
||||
values = readable;
|
||||
errors = refused;
|
||||
}
|
||||
|
||||
ObjectNode response = objectMapper.createObjectNode();
|
||||
@@ -701,6 +725,25 @@ public class SecretsManagerJsonHandler {
|
||||
return Response.ok(response).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Authorizes the caller for each action the operation needs on an entry it reads, on the entry's ARN and with
|
||||
* the condition keys of its tags, as a request reading that secret alone is. The filter
|
||||
* reports a denial as S3's {@code AccessDenied}, so it is raised here the way Secrets Manager reports one:
|
||||
* {@code AccessDeniedException} (API Reference, "Common Errors").
|
||||
*/
|
||||
private void authorizeEntry(String authorization, List<IamAuthorizedActions.PerEntry> perEntry, String arn) {
|
||||
for (IamAuthorizedActions.PerEntry each : perEntry) {
|
||||
try {
|
||||
iamEnforcementFilter.authorizeEntryResource(authorization, each.action(), arn);
|
||||
} catch (AwsException e) {
|
||||
if (!"AccessDenied".equals(e.getErrorCode())) {
|
||||
throw e;
|
||||
}
|
||||
throw new AwsException("AccessDeniedException", e.getMessage(), 400);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* RotateSecret also needs {@code lambda:InvokeFunction} on the rotation function (Secrets Manager
|
||||
* API Reference, RotateSecret, "Required permissions"). The filter has already authorized
|
||||
|
||||
@@ -2037,6 +2037,15 @@ public class SecretsManagerService implements ResourceProvider, StoredResourceAr
|
||||
}
|
||||
|
||||
public BatchGetSecretValueResult batchGetSecretValue(List<String> secretIdList, String region) {
|
||||
return batchGetSecretValue(secretIdList, region, secret -> { });
|
||||
}
|
||||
|
||||
/**
|
||||
* The secrets {@code secretIdList} names, each authorized by {@code authorizeEntry} once it resolves: a secret it
|
||||
* refuses goes to the result's errors under the id it was requested as, as any other secret that cannot be read.
|
||||
*/
|
||||
public BatchGetSecretValueResult batchGetSecretValue(List<String> secretIdList, String region,
|
||||
Consumer<Secret> authorizeEntry) {
|
||||
List<BatchSecretValue> secretValues = new ArrayList<>();
|
||||
List<BatchGetSecretValueError> errors = new ArrayList<>();
|
||||
|
||||
@@ -2047,6 +2056,7 @@ public class SecretsManagerService implements ResourceProvider, StoredResourceAr
|
||||
for (String secretId : secretIdList) {
|
||||
try {
|
||||
Secret secret = resolveSecret(secretId, region);
|
||||
authorizeEntry.accept(secret);
|
||||
if (secret.getDeletedDate() != null) {
|
||||
errors.add(new BatchGetSecretValueError(secretId, "InvalidRequestException",
|
||||
SCHEDULED_DELETION_ERROR_MESSAGE));
|
||||
|
||||
@@ -807,7 +807,9 @@
|
||||
],
|
||||
"glue": [
|
||||
"AccessDataQualityRuntimeConfiguration",
|
||||
"AssociateGlossaryTerms",
|
||||
"BatchGetCustomEntityTypes",
|
||||
"BatchGetIterableForms",
|
||||
"BatchGetStageFiles",
|
||||
"CheckSchemaVersionValidity",
|
||||
"CreateClassifier",
|
||||
@@ -815,17 +817,27 @@
|
||||
"CreateCustomEntityType",
|
||||
"CreateDataQualityRuleset",
|
||||
"CreateDevEndpoint",
|
||||
"CreateGlossary",
|
||||
"CreateGlossaryTerm",
|
||||
"CreateGlueIdentityCenterConfiguration",
|
||||
"CreateInboundIntegration",
|
||||
"CreateMLTransform",
|
||||
"CreateScript",
|
||||
"CreateSecurityConfiguration",
|
||||
"DeleteAsset",
|
||||
"DeleteAttachment",
|
||||
"DeleteClassifier",
|
||||
"DeleteCustomEntityType",
|
||||
"DeleteFormType",
|
||||
"DeleteGlossary",
|
||||
"DeleteGlossaryTerm",
|
||||
"DeleteGlueIdentityCenterConfiguration",
|
||||
"DeleteSecurityConfiguration",
|
||||
"DeregisterDataPreview",
|
||||
"DescribeInboundIntegrations",
|
||||
"DisassociateGlossaryTerms",
|
||||
"GetAsset",
|
||||
"GetAssetType",
|
||||
"GetClassifier",
|
||||
"GetClassifiers",
|
||||
"GetColumnStatisticsTaskRun",
|
||||
@@ -834,18 +846,24 @@
|
||||
"GetCrawlerMetrics",
|
||||
"GetCrawlers",
|
||||
"GetCustomEntityType",
|
||||
"GetDataCatalogExportConfiguration",
|
||||
"GetDataPreviewStatement",
|
||||
"GetDataflowGraph",
|
||||
"GetDevEndpoints",
|
||||
"GetEnvironment",
|
||||
"GetExecutors",
|
||||
"GetExecutorsThreads",
|
||||
"GetFormType",
|
||||
"GetGeneratedCode",
|
||||
"GetGlossary",
|
||||
"GetGlossaryTerm",
|
||||
"GetGlueIdentityCenterConfiguration",
|
||||
"GetJobBookmark",
|
||||
"GetJobs",
|
||||
"GetLineageNode",
|
||||
"GetLogParsingStatus",
|
||||
"GetMapping",
|
||||
"GetMaterializedViewRefreshTaskRun",
|
||||
"GetNotebookInstanceStatus",
|
||||
"GetPlan",
|
||||
"GetQueries",
|
||||
@@ -861,36 +879,55 @@
|
||||
"GetStages",
|
||||
"GetStorage",
|
||||
"GetStorageUnit",
|
||||
"GetSystemTable",
|
||||
"GetTriggers",
|
||||
"GlueNotebookAuthorize",
|
||||
"GlueNotebookRefreshCredentials",
|
||||
"ListAssetTypes",
|
||||
"ListBlueprints",
|
||||
"ListColumnStatisticsTaskRuns",
|
||||
"ListConnectionTypes",
|
||||
"ListCrawlers",
|
||||
"ListCustomEntityTypes",
|
||||
"ListDevEndpoints",
|
||||
"ListFormTypes",
|
||||
"ListGlossaries",
|
||||
"ListGlossaryTerms",
|
||||
"ListIntegrationTableProperties",
|
||||
"ListIterableForms",
|
||||
"ListJobs",
|
||||
"ListMaterializedViewRefreshTaskRuns",
|
||||
"ListRegistries",
|
||||
"ListSessions",
|
||||
"ListTriggers",
|
||||
"ListUsageProfiles",
|
||||
"ListWorkflows",
|
||||
"ManagedConnector",
|
||||
"PostLineageEvent",
|
||||
"PutAsset",
|
||||
"PutAttachment",
|
||||
"PutDataCatalogExportConfiguration",
|
||||
"PutFormType",
|
||||
"RequestLogParsing",
|
||||
"ResetJobBookmark",
|
||||
"RunDataPreviewStatement",
|
||||
"SearchAssets",
|
||||
"SendFeedback",
|
||||
"SendRecipeAction",
|
||||
"StartCompletion",
|
||||
"StartCrawlerSchedule",
|
||||
"StartMaterializedViewRefreshTaskRun",
|
||||
"StartNotebook",
|
||||
"StopCrawlerSchedule",
|
||||
"StopMaterializedViewRefreshTaskRun",
|
||||
"TerminateNotebook",
|
||||
"UpdateAsset",
|
||||
"UpdateClassifier",
|
||||
"UpdateCrawlerSchedule",
|
||||
"UpdateGlossary",
|
||||
"UpdateGlossaryTerm",
|
||||
"UpdateGlueIdentityCenterConfiguration",
|
||||
"UpdateSystemTable",
|
||||
"UseGlueStudio"
|
||||
],
|
||||
"guardduty": [
|
||||
@@ -1403,6 +1440,7 @@
|
||||
"PutStorageLensConfiguration"
|
||||
],
|
||||
"s3tables": [
|
||||
"ListStorageLensConfigurations",
|
||||
"ListTableBuckets"
|
||||
],
|
||||
"s3vectors": [
|
||||
@@ -1861,5 +1899,15 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"perEntry": {
|
||||
"secretsmanager": {
|
||||
"BatchGetSecretValue": [
|
||||
{
|
||||
"action": "secretsmanager:GetSecretValue",
|
||||
"type": "Secret"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.44.13 (local/aws/botocore)", "retrieved": "2026-11-29", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
|
||||
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "apigateway": ["apigateway", "apigatewayv2"], "appconfig": ["appconfig", "appconfigdata"], "application-autoscaling": ["application-autoscaling"], "appsync": ["appsync"], "aps": ["amp"], "athena": ["athena"], "backup": ["backup"], "batch": ["batch"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "bedrock": ["bedrock", "bedrock-agent", "bedrock-agent-runtime", "bedrock-data-automation", "bedrock-data-automation-runtime", "bedrock-runtime"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codeartifact": ["codeartifact"], "codebuild": ["codebuild"], "codeguru-reviewer": ["codeguru-reviewer"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "dynamodb": ["dynamodb", "dynamodbstreams"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticache": ["elasticache"], "elasticfilesystem": ["efs"], "elasticloadbalancing": ["elb", "elb-proxy", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "iam": ["iam", "iam-toolbox"], "identitystore": ["identitystore"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "memorydb": ["memorydb"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "rds-data": ["rds-data"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "route53resolver": ["route53resolver"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "sagemaker": ["sagemaker", "sagemaker-a2i-runtime", "sagemaker-edge", "sagemaker-featurestore-runtime", "sagemaker-gateway-runtime", "sagemaker-inference-router-runtime", "sagemaker-metrics", "sagemaker-runtime", "sagemakerjobruntime", "sagemakertrainingsessionruntime"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"], "xray": ["xray"]},
|
||||
"notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup:<id>:autoScalingGroupName/<name>`, while Floci mints `autoScalingGroup:<name>`, which other services (ECS capacity providers) read back; the mint is fixed first", "aws-marketplace": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "codedeploy": "not read yet: the Service Reference gives an on-premises instance's ARN as `instance:${InstanceName}`, while the CodeDeploy permissions reference gives arn:aws:codedeploy:region:account-id:instance/instance-ID and AWS's GetOnPremisesInstance example answers instance/<name>_<id>, an id the service mints after the name; reading it needs that format corrected", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "elasticbeanstalk": "not read yet: an environment's ARN carries its application's name, `environment/<application>/<name>`, while most of its requests name it by EnvironmentName or EnvironmentId alone, so reading it needs the stored environment those find", "execute-api": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "mq": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rum": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "servicecatalog": "not read yet: CreatePortfolioShare, UpdatePortfolioShare and DeletePortfolioShare give in AccountId the account a portfolio is shared with, which the rule reads as the portfolio's; a portfolio or product imported from another account keeps its owner's account in its ARN while requests name it by its id alone; and AppRegistry's applications and attribute groups are named in the path", "signin": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "ssmmessages": "channel routes authorise agent and client resources directly rather than through generated request mappings", "sso-oauth": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "swf": "not read yet: the Service Reference gives a domain's ARN no Region, `swf:Line truncated
|
||||
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifygen3", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-external", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finops-agent", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"],
|
||||
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/$Line truncated
|
||||
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifygen3", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-external", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elasticfilesystem-endpoint", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finops-agent", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "s3files-endpoint", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"],
|
||||
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/$Line truncated
|
||||
"pathFormats": {"apigateway": {"/restapis/{restapi_id}/models/{model_name}/default_template (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/models/${ModelName}/default_template", "/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/authorizers", "/restapis/{restapi_id}/stages/{stage_name}/cache/data (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/data", "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/exports/${ExportType}", "/sdktypes (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes", "/sdktypes/{sdktype_id} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes/${SdktypeId}", "/usageplans/{usageplanId}/keys/{keyId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/keys/${KeyId}/usage", "/usageplans/{usageplanId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/usage", "Authorizer (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers/${Id}", "Authorizers (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers", "Deployment (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments/${Id}", "Deployments (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments", "Integration (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration", "IntegrationResponse (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration/responses/${StatusCode}", "Model (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models/${ModelName}", "Models (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models", "Stage (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages/${StageName}", "Stages (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages"}},
|
||||
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "appconfig": {"application": ["aws:ResourceTag/"], "configuration": ["aws:ResourceTag/"], "configurationprofile": ["aws:ResourceTag/"], "deployment": ["aws:ResourceTag/"], "deploymentstrategy": ["aws:ResourceTag/"], "environment": ["aws:ResourceTag/"], "experimentdefinition": ["aws:ResourceTag/"], "experimentrun": ["aws:ResourceTag/"], "extension": ["aws:ResourceTag/"], "extensionassociation": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "appsync": {"api": ["aws:ResourceTag/"], "channelNamespace": ["aws:ResourceTag/"], "domain": ["aws:ResourceTag/"], "graphqlapi": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "backup": {"backupAccessPoint": ["aws:ResourceTag/"], "backupPlan": ["aws:ResourceTag/"], "backupVault": ["aws:ResourceTag/"], "framework": ["aws:ResourceTag/"], "legalHold": ["aws:ResourceTag/"], "recoveryPoint": ["aws:ResourceTag/"], "reportPlan": ["aws:ResourceTag/"], "restoreTestingPlan": ["aws:ResourceTag/"], "tieringConfiguration": ["aws:ResourceTag/"]}, "batch": {"compute-environment": ["aws:ResourceTag/"], "consumable-resource": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "job-definition-revision": ["aws:ResourceTag/"], "job-queue": ["aws:ResourceTag/"], "quota-share": ["aws:ResourceTag/"], "scheduling-policy": ["aws:ResourceTag/"], "service-environment": ["aws:ResourceTag/"], "service-job": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResouLine truncated
|
||||
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "appconfig": {"application": ["aws:ResourceTag/"], "configuration": ["aws:ResourceTag/"], "configurationprofile": ["aws:ResourceTag/"], "deployment": ["aws:ResourceTag/"], "deploymentstrategy": ["aws:ResourceTag/"], "environment": ["aws:ResourceTag/"], "experimentdefinition": ["aws:ResourceTag/"], "experimentrun": ["aws:ResourceTag/"], "extension": ["aws:ResourceTag/"], "extensionassociation": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "appsync": {"api": ["aws:ResourceTag/"], "channelNamespace": ["aws:ResourceTag/"], "domain": ["aws:ResourceTag/"], "graphqlapi": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "backup": {"backupAccessPoint": ["aws:ResourceTag/"], "backupPlan": ["aws:ResourceTag/"], "backupVault": ["aws:ResourceTag/"], "framework": ["aws:ResourceTag/"], "legalHold": ["aws:ResourceTag/"], "recoveryPoint": ["aws:ResourceTag/"], "reportPlan": ["aws:ResourceTag/"], "restoreTestingPlan": ["aws:ResourceTag/"], "tieringConfiguration": ["aws:ResourceTag/"]}, "batch": {"compute-environment": ["aws:ResourceTag/"], "consumable-resource": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "job-definition-revision": ["aws:ResourceTag/"], "job-queue": ["aws:ResourceTag/"], "quota-share": ["aws:ResourceTag/"], "scheduling-policy": ["aws:ResourceTag/"], "service-environment": ["aws:ResourceTag/"], "service-job": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResouLine truncated
|
||||
"resourceKeys": {"ec2": {"capacity-reservation": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:CapacityReservationFleet": {"member": "CapacityReservationFleetId", "arn": "capacity-reservation-fleet"}, "ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:EndDateType": {"member": "EndDateType"}, "ec2:EphemeralStorage": {"member": "EphemeralStorage"}, "ec2:InstanceMatchCriteria": {"member": "InstanceMatchCriteria"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:Tenancy": {"member": "Tenancy"}}, "carrier-gateway": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "dhcp-options": {"ec2:DhcpOptionsID": {"member": "DhcpOptionsId"}}, "fpga-image": {"ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}}, "image": {"ec2:ImageID": {"member": "ImageId"}, "ec2:ImageType": {"member": "ImageType"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "instance": {"ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:InstanceID": {"member": "InstanceId"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "internet-gateway": {"ec2:InternetGatewayID": {"member": "InternetGatewayId"}}, "launch-template": {"ec2:LaunchTemplate": {"member": "LaunchTemplateId", "arn": "launch-template"}}, "network-acl": {"ec2:NetworkAclID": {"member": "NetworkAclId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "network-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:NetworkInterfaceID": {"member": "NetworkInterfaceId"}, "ec2:Subnet": {"member": "SubnetId", "arn": "subnet"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "reserved-instances": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:InstanceType": {"member": "InstanceType"}}, "route-table": {"ec2:RouteTableID": {"member": "RouteTableId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "secondary-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}}, "security-group": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "snapshot": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:SnapshotID": {"member": "SnapshotId"}, "ec2:VolumeSize": {"member": "VolumeSize"}}, "subnet": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:SubnetID": {"member": "SubnetId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "transit-gateway": {"ec2:transitGatewayId": {"member": "TransitGatewayId"}}, "transit-gateway-attachment": {"ec2:transitGatewayAttachmentId": {"member": "TransitGatewayAttachmentId"}}, "transit-gateway-connect-peer": {"ec2:transitGatewayConnectPeerId": {"member": "TransitGatewayConnectPeerId"}}, "transit-gateway-metering-policy": {"ec2:transitGatewayMeteringPolicyId": {"member": "TransitGatewayMeteringPolicyId"}}, "transit-gateway-multicast-domain": {"ec2:transitGatewayMulticastDomainId": {"member": "TransitGatewayMulticastDomainId"}}, "transit-gateway-policy-table": {"ec2:transitGatewayPolicyTableId": {"member": "TransitGatewayPolicyTableId"}}, "transit-gateway-route-table": {"ec2:transitGatewayRouteTableId": {"member": "TransitGatewayRouteTableId"}}, "transit-gateway-route-table-announcement": {"ec2:transitGatewayRouteTableAnnouncementId": {"member": "TransitGatewayRouteTableAnnouncementId"}}, "volume": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:KmsKeyId": {"member": "KmsKeyId"}, "ec2:VolumeID": {"member": "VolumeId"}, "ec2:VolumeInitializationRate": {"member": "VolumeInitializationRate"}, "ec2:VolumeType": {"member": "VolumeType"}}, "vpc": {"ec2:VpcID": {"member": "VpcId"}}, "vpc-peering-connection": {"ec2:VpcPeeringConnectionID": {"member": "VpcPeeringConnectionId"}}}},
|
||||
"unqualified": {"ssm": ["parameter"], "states": ["statemachine"]},
|
||||
"mintedIds": {"events": ["api-destination", "connection"]},
|
||||
@@ -6670,7 +6670,7 @@
|
||||
"s3tables:ListTableBuckets": {"action": "s3tables:ListTableBuckets", "types": [], "resources": [{"type": "TableBucket", "fill": {}, "apis": ["rest-json/2018-05-10"]}], "located": {"type": "?type"}},
|
||||
"s3tables:ListTableMigrations": {"action": "s3tables:ListTableMigrations", "types": ["Table", "TableBucket"], "resources": [{"types": ["Table", "TableBucket"], "arn": "tableARN", "apis": ["rest-json/2018-05-10"]}, {"type": "Table", "fill": {}, "find": ["tableBucketARN", "namespace", "name"], "when": {"tableARN": [null]}, "apis": ["rest-json/2018-05-10"]}], "located": {"name": "?name", "namespace": "?namespace", "tableARN": "?tableARN", "tableBucketARN": "?tableBucketARN"}},
|
||||
"s3tables:ListTables": {"action": "s3tables:ListTables", "types": ["TableBucket"], "resources": [{"types": ["TableBucket"], "arn": "tableBucketARN", "apis": ["rest-json/2018-05-10"]}], "located": {"tableBucketARN": "{tableBucketARN}"}},
|
||||
"s3tables:ListTagsForResource": {"action": "s3tables:ListTagsForResource", "types": ["Table", "TableBucket"], "resources": [{"types": ["Table", "TableBucket"], "arn": "resourceArn", "apis": ["rest-json/2018-05-10"]}], "located": {"resourceArn": "{resourceArn}"}},
|
||||
"s3tables:ListTagsForResource": {"action": "s3tables:ListTagsForResource", "types": ["StorageLens", "Table", "TableBucket"], "resources": [{"types": ["StorageLens", "Table", "TableBucket"], "arn": "resourceArn", "apis": ["rest-json/2018-05-10"]}], "located": {"resourceArn": "{resourceArn}"}},
|
||||
"s3tables:PutTableBucketEncryption": {"action": "s3tables:PutTableBucketEncryption", "types": ["TableBucket"], "resources": [{"types": ["TableBucket"], "arn": "tableBucketARN", "apis": ["rest-json/2018-05-10"]}], "located": {"tableBucketARN": "{tableBucketARN}"}},
|
||||
"s3tables:PutTableBucketLogging": {"action": "s3tables:PutTableBucketLogging", "types": ["TableBucket"], "resources": [{"types": ["TableBucket"], "arn": "tableBucketARN", "apis": ["rest-json/2018-05-10"]}], "located": {"tableBucketARN": "{tableBucketARN}"}},
|
||||
"s3tables:PutTableBucketMaintenanceConfiguration": {"action": "s3tables:PutTableBucketMaintenanceConfiguration", "types": ["TableBucket"], "resources": [{"types": ["TableBucket"], "arn": "tableBucketARN", "apis": ["rest-json/2018-05-10"]}], "located": {"tableBucketARN": "{tableBucketARN}"}},
|
||||
@@ -6685,8 +6685,8 @@
|
||||
"s3tables:RenameTable": {"action": "s3tables:RenameTable", "types": ["Table"], "resources": [{"type": "Table", "fill": {}, "find": ["tableBucketARN", "namespace", "name"], "apis": ["rest-json/2018-05-10"]}], "located": {"name": "{name}", "namespace": "{namespace}", "tableBucketARN": "{tableBucketARN}"}},
|
||||
"s3tables:StartTableMigration": {"action": "s3tables:StartTableMigration", "types": ["TableBucket"], "resources": [{"types": ["TableBucket"], "arn": "destinationTable.tableBucketARN", "apis": ["rest-json/2018-05-10"]}, {"type": "TableBucket", "fill": {"TableBucketName": "migrationOutput.bucket"}, "apis": ["rest-json/2018-05-10"]}]},
|
||||
"s3tables:SyncTableMigration": {"action": "s3tables:SyncTableMigration", "types": ["Table"], "resources": [{"types": ["Table"], "arn": "tableARN", "apis": ["rest-json/2018-05-10"]}]},
|
||||
"s3tables:TagResource": {"action": "s3tables:TagResource", "types": ["Table", "TableBucket"], "resources": [{"types": ["Table", "TableBucket"], "arn": "resourceArn", "apis": ["rest-json/2018-05-10"]}], "located": {"resourceArn": "{resourceArn}"}},
|
||||
"s3tables:UntagResource": {"action": "s3tables:UntagResource", "types": ["Table", "TableBucket"], "resources": [{"types": ["Table", "TableBucket"], "arn": "resourceArn", "apis": ["rest-json/2018-05-10"]}], "located": {"resourceArn": "{resourceArn}"}},
|
||||
"s3tables:TagResource": {"action": "s3tables:TagResource", "types": ["StorageLens", "Table", "TableBucket"], "resources": [{"types": ["StorageLens", "Table", "TableBucket"], "arn": "resourceArn", "apis": ["rest-json/2018-05-10"]}], "located": {"resourceArn": "{resourceArn}"}},
|
||||
"s3tables:UntagResource": {"action": "s3tables:UntagResource", "types": ["StorageLens", "Table", "TableBucket"], "resources": [{"types": ["StorageLens", "Table", "TableBucket"], "arn": "resourceArn", "apis": ["rest-json/2018-05-10"]}], "located": {"resourceArn": "{resourceArn}"}},
|
||||
"s3tables:UpdateTableMetadataLocation": {"action": "s3tables:UpdateTableMetadataLocation", "types": ["Table"], "resources": [{"type": "Table", "fill": {}, "find": ["tableBucketARN", "namespace", "name"], "apis": ["rest-json/2018-05-10"]}], "located": {"name": "{name}", "namespace": "{namespace}", "tableBucketARN": "{tableBucketARN}"}},
|
||||
"s3tables:UpdateTableMigration": {"action": "s3tables:UpdateTableMigration", "types": ["Table"], "resources": [{"types": ["Table"], "arn": "tableARN", "apis": ["rest-json/2018-05-10"]}, {"types": ["Table"], "through": "migrationId", "apis": ["rest-json/2018-05-10"]}, {"type": "Table", "fill": {}, "when": {"tableARN": [null]}, "default": true, "apis": ["rest-json/2018-05-10"]}], "located": {"migrationId": "?migrationId", "tableARN": "?tableARN"}},
|
||||
"s3vectors:CreateIndex": {"action": "s3vectors:CreateIndex", "types": ["Index"], "resources": [{"type": "Index", "fill": {"BucketName": "vectorBucketName", "IndexName": "indexName"}, "unless": {"vectorBucketName": [null]}, "apis": ["rest-json/2025-07-15"]}]},
|
||||
|
||||
@@ -223,6 +223,9 @@
|
||||
"s3:GetBucketCORS": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
"s3:GetBucketDefaultStorageClass": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
"s3:GetBucketLocation": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
@@ -270,6 +273,9 @@
|
||||
"s3:GetEncryptionConfiguration": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
"s3:GetIncompleteUpload": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
"s3:GetIntelligentTieringConfiguration": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
@@ -473,6 +479,9 @@
|
||||
"s3:PutBucketCORS": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
"s3:PutBucketDefaultStorageClass": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
"s3:PutBucketLogging": [
|
||||
"s3:ResourceAccount"
|
||||
],
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -18,6 +19,17 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
class IamAuthorizedActionsTest {
|
||||
|
||||
/**
|
||||
* A Secrets Manager batch read needs {@code secretsmanager:GetSecretValue} on each secret it reads ("you must have
|
||||
* secretsmanager:GetSecretValue for each secret"), and an operation the file gives none needs none.
|
||||
*/
|
||||
@Test
|
||||
void aBatchReadNeedsGetSecretValueOnEachSecret() {
|
||||
assertEquals(List.of(new IamAuthorizedActions.PerEntry("secretsmanager:GetSecretValue", "Secret")),
|
||||
IamAuthorizedActions.perEntry("secretsmanager:BatchGetSecretValue"));
|
||||
assertEquals(List.of(), IamAuthorizedActions.perEntry("secretsmanager:GetSecretValue"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void batchOperationsAreAuthorizedAsTheirSingleItemAction() {
|
||||
assertEquals("sqs:SendMessage", IamAuthorizedActions.actionFor("sqs", "SendMessageBatch"));
|
||||
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
package io.floci.aws.services.iam;
|
||||
|
||||
import io.floci.aws.testing.AwsTestClients;
|
||||
import io.floci.aws.testing.EnforcementFixtures;
|
||||
import io.floci.aws.testing.EnforcementFixtures.UserCredentials;
|
||||
import io.floci.aws.testing.IamEnforcementProfile;
|
||||
import io.floci.aws.testing.PartitionCleanup;
|
||||
import io.quarkus.test.common.http.TestHTTPResource;
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.quarkus.test.junit.TestProfile;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
import software.amazon.awssdk.regions.Region;
|
||||
import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
|
||||
import software.amazon.awssdk.services.secretsmanager.model.APIErrorType;
|
||||
import software.amazon.awssdk.services.secretsmanager.model.BatchGetSecretValueResponse;
|
||||
import software.amazon.awssdk.services.secretsmanager.model.FilterNameStringType;
|
||||
import software.amazon.awssdk.services.secretsmanager.model.SecretValueEntry;
|
||||
import software.amazon.awssdk.services.secretsmanager.model.SecretsManagerException;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static io.floci.aws.testing.EnforcementFixtures.auth;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* A Secrets Manager batch read needs {@code secretsmanager:GetSecretValue} on each secret it reads ("you must have
|
||||
* secretsmanager:GetSecretValue for each secret"), and answers a secret the caller may not read in {@code Errors}
|
||||
* while it returns the others, as AWS's own fidelity check records it
|
||||
* ({@code check_batch_get_secret_value_returns_partial_results_with_a_per_secret_error_for_a_denied_secret}): the
|
||||
* entry names the secret as it was requested, with {@code AccessDeniedException} and the denial's sentence.
|
||||
*/
|
||||
@QuarkusTest
|
||||
@TestProfile(IamEnforcementProfile.class)
|
||||
class SecretsManagerBatchReadEnforcementIntegrationTest {
|
||||
|
||||
private static final String ACCOUNT_ID = "000000000000";
|
||||
|
||||
@TestHTTPResource("/")
|
||||
static URI baseUri;
|
||||
|
||||
@RegisterExtension
|
||||
final PartitionCleanup cleanup = new PartitionCleanup();
|
||||
|
||||
@Test
|
||||
void aSecretItsCallerIsDeniedIsAnErrorEntryAndTheOthersAreRead() {
|
||||
List<String> arns = List.of(createSecret("alpha"), createSecret("bravo"), createSecret("charlie"));
|
||||
String denied = arns.get(1);
|
||||
try (SecretsManagerClient reader = userAllowed("*", denied)) {
|
||||
SecretsManagerException single = assertThrows(SecretsManagerException.class,
|
||||
() -> reader.getSecretValue(r -> r.secretId(denied)));
|
||||
assertEquals("AccessDeniedException", single.awsErrorDetails().errorCode());
|
||||
BatchGetSecretValueResponse read = reader.batchGetSecretValue(r -> r.secretIdList(arns));
|
||||
|
||||
assertEquals(Set.of(arns.get(0), arns.get(2)), read.secretValues().stream().map(SecretValueEntry::arn)
|
||||
.collect(Collectors.toSet()));
|
||||
assertEquals(1, read.errors().size(), read.errors().toString());
|
||||
APIErrorType error = read.errors().getFirst();
|
||||
assertEquals(denied, error.secretId());
|
||||
assertEquals("AccessDeniedException", error.errorCode());
|
||||
assertTrue(error.message().contains("is not authorized to perform: secretsmanager:GetSecretValue"),
|
||||
error.message());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void aSecretTheCallersPolicyDoesNotAllowReadingIsAnErrorEntry() {
|
||||
String allowed = createSecret("readable");
|
||||
String other = createSecret("unreadable");
|
||||
try (SecretsManagerClient reader = userAllowed(allowed)) {
|
||||
BatchGetSecretValueResponse read = reader.batchGetSecretValue(r -> r.secretIdList(allowed, other));
|
||||
|
||||
assertEquals(List.of(allowed), read.secretValues().stream().map(SecretValueEntry::arn).toList());
|
||||
assertEquals(List.of(other), read.errors().stream().map(APIErrorType::secretId).toList());
|
||||
assertEquals("AccessDeniedException", read.errors().getFirst().errorCode());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void aFilteredReadAnswersASecretItMayNotReadInErrorsByItsArn() {
|
||||
String prefix = "filtered-" + UUID.randomUUID().toString().substring(0, 8);
|
||||
String allowed = createSecret(prefix + "-readable");
|
||||
String other = createSecret(prefix + "-unreadable");
|
||||
try (SecretsManagerClient reader = userAllowed(allowed)) {
|
||||
BatchGetSecretValueResponse read = reader.batchGetSecretValue(r -> r.filters(
|
||||
filter -> filter.key(FilterNameStringType.NAME).values(prefix)));
|
||||
|
||||
assertEquals(List.of(allowed), read.secretValues().stream().map(SecretValueEntry::arn).toList());
|
||||
assertEquals(List.of(other), read.errors().stream().map(APIErrorType::secretId).toList());
|
||||
assertEquals("AccessDeniedException", read.errors().getFirst().errorCode());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Each secret is checked with the condition keys of its own tags, as a read of it alone is: a grant scoped to
|
||||
* {@code aws:ResourceTag/Environment} returns the secrets it matches and answers the others in {@code Errors}, and
|
||||
* a deny scoped to it answers the secrets it matches there, by {@code SecretIdList} and by {@code Filters}.
|
||||
*/
|
||||
@Test
|
||||
void eachSecretIsCheckedWithItsOwnTags() {
|
||||
String prefix = "tagged-" + UUID.randomUUID().toString().substring(0, 8);
|
||||
String prod = createTaggedSecret(prefix + "-prod", "prod");
|
||||
String dev = createTaggedSecret(prefix + "-dev", "dev");
|
||||
String condition = "\"Condition\":{\"StringEquals\":{\"aws:ResourceTag/Environment\":\"%s\"}}";
|
||||
try (SecretsManagerClient granted = userWithPolicy("""
|
||||
{"Effect":"Allow","Action":"secretsmanager:GetSecretValue","Resource":"*",%s}"""
|
||||
.formatted(condition.formatted("prod")));
|
||||
SecretsManagerClient denied = userWithPolicy("""
|
||||
{"Effect":"Allow","Action":"secretsmanager:GetSecretValue","Resource":"*"},
|
||||
{"Effect":"Deny","Action":"secretsmanager:GetSecretValue","Resource":"*",%s}"""
|
||||
.formatted(condition.formatted("dev")))) {
|
||||
for (SecretsManagerClient reader : List.of(granted, denied)) {
|
||||
BatchGetSecretValueResponse byId = reader.batchGetSecretValue(r -> r.secretIdList(prod, dev));
|
||||
assertEquals(List.of(prod), byId.secretValues().stream().map(SecretValueEntry::arn).toList());
|
||||
assertEquals(List.of(dev), byId.errors().stream().map(APIErrorType::secretId).toList());
|
||||
BatchGetSecretValueResponse byFilter = reader.batchGetSecretValue(r -> r.filters(
|
||||
filter -> filter.key(FilterNameStringType.NAME).values(prefix)));
|
||||
assertEquals(List.of(prod), byFilter.secretValues().stream().map(SecretValueEntry::arn).toList());
|
||||
assertEquals(List.of(dev), byFilter.errors().stream().map(APIErrorType::secretId).toList());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String createTaggedSecret(String name, String environment) {
|
||||
String arn;
|
||||
try (SecretsManagerClient admin = admin()) {
|
||||
arn = admin.createSecret(r -> r.name(name).secretString("value").tags(
|
||||
tag -> tag.key("Environment").value(environment))).arn();
|
||||
}
|
||||
cleanup.register(() -> {
|
||||
try (SecretsManagerClient admin = admin()) {
|
||||
admin.deleteSecret(r -> r.secretId(name).forceDeleteWithoutRecovery(true));
|
||||
}
|
||||
});
|
||||
return arn;
|
||||
}
|
||||
|
||||
/** A user allowed the batch read and ListSecrets, and given {@code statements} beside them. */
|
||||
private SecretsManagerClient userWithPolicy(String statements) {
|
||||
String userName = "batch-" + UUID.randomUUID().toString().substring(0, 8);
|
||||
UserCredentials user = EnforcementFixtures.createUser(cleanup, baseUri.getPort(), auth(ACCOUNT_ID, "iam"),
|
||||
userName);
|
||||
EnforcementFixtures.putUserPolicy(baseUri.getPort(), auth(ACCOUNT_ID, "iam"), userName, "batch", """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow","Action":["secretsmanager:BatchGetSecretValue","secretsmanager:ListSecrets"],
|
||||
"Resource":"*"},%s]}""".formatted(statements));
|
||||
return AwsTestClients.create(SecretsManagerClient.builder(), user.accessKeyId(), user.secretAccessKey(),
|
||||
Region.US_EAST_1, baseUri);
|
||||
}
|
||||
|
||||
private SecretsManagerClient admin() {
|
||||
return AwsTestClients.create(SecretsManagerClient.builder(), ACCOUNT_ID, Region.US_EAST_1, baseUri);
|
||||
}
|
||||
|
||||
private String createSecret(String label) {
|
||||
String name = label.startsWith("filtered-") ? label
|
||||
: "batch-" + label + "-" + UUID.randomUUID().toString().substring(0, 8);
|
||||
String arn;
|
||||
try (SecretsManagerClient admin = admin()) {
|
||||
arn = admin.createSecret(r -> r.name(name).secretString("value-" + label)).arn();
|
||||
}
|
||||
cleanup.register(() -> {
|
||||
try (SecretsManagerClient admin = admin()) {
|
||||
admin.deleteSecret(r -> r.secretId(name).forceDeleteWithoutRecovery(true));
|
||||
}
|
||||
});
|
||||
return arn;
|
||||
}
|
||||
|
||||
private SecretsManagerClient userAllowed(String readable) {
|
||||
return userAllowed(readable, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* A user allowed the batch read, ListSecrets and GetSecretValue on {@code readable} alone ({@code *} for every
|
||||
* secret), and denied GetSecretValue on {@code denied} where it names one.
|
||||
*/
|
||||
private SecretsManagerClient userAllowed(String readable, String denied) {
|
||||
String userName = "batch-" + UUID.randomUUID().toString().substring(0, 8);
|
||||
UserCredentials user = EnforcementFixtures.createUser(cleanup, baseUri.getPort(), auth(ACCOUNT_ID, "iam"),
|
||||
userName);
|
||||
EnforcementFixtures.putUserPolicy(baseUri.getPort(), auth(ACCOUNT_ID, "iam"), userName, "batch", """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow","Action":["secretsmanager:BatchGetSecretValue","secretsmanager:ListSecrets"],
|
||||
"Resource":"*"},
|
||||
{"Effect":"Allow","Action":"secretsmanager:GetSecretValue","Resource":"%s"},
|
||||
{"Effect":"Deny","Action":"secretsmanager:GetSecretValue","Resource":"%s"}]}"""
|
||||
.formatted(readable, denied == null ? "arn:aws:secretsmanager:*:*:secret:none" : denied));
|
||||
return AwsTestClients.create(SecretsManagerClient.builder(), user.accessKeyId(), user.secretAccessKey(),
|
||||
Region.US_EAST_1, baseUri);
|
||||
}
|
||||
}
|
||||
@@ -702,6 +702,40 @@ def _required_permission_companions(documents: list[dict], source: dict | None,
|
||||
return found
|
||||
|
||||
|
||||
def per_entry_actions(documents: list[dict], required: dict | None) -> dict[str, dict[str, list[dict]]]:
|
||||
"""The actions an operation needs on each entry it reads, from an API reference's required permissions
|
||||
(`required`, `load_required_permissions`): for each clause saying an action is needed for each thing ("you must
|
||||
have secretsmanager:GetSecretValue for each secret"), the action, where the reference lists it among the
|
||||
operation's actions, with the one of its resource types the clause's words name as the generators' names go
|
||||
(`stem`: secret is `Secret`). The operation's handler checks it on each entry, as BatchGetSecretValue does on each
|
||||
secret it reads, and answers a denial in that entry's error. Words naming no type of the action, or more than
|
||||
one, give none."""
|
||||
if not required:
|
||||
return {}
|
||||
from regen_iam_request_resources import stem
|
||||
found: dict[str, dict[str, list[dict]]] = {}
|
||||
for document in documents:
|
||||
namespace = document.get("Name")
|
||||
operations = {operation.get("Name"): operation for operation in document.get("Operations") or []}
|
||||
actions = {reference.get("Name"): reference for reference in document.get("Actions") or []}
|
||||
for entry in required["required"]:
|
||||
operation = operations.get(entry["operation"])
|
||||
clauses = [permission for permission in entry["permissions"]
|
||||
if "each" in permission and permission["action"].split(":", 1)[0] == namespace]
|
||||
if operation is None or not clauses:
|
||||
continue
|
||||
authorized = {f"{service}:{name}" for service, name in _authorized_actions(namespace, operation)}
|
||||
for permission in clauses:
|
||||
reference = actions.get(permission["action"].split(":", 1)[1]) or {}
|
||||
kinds = [resource.get("Name") for resource in reference.get("Resources") or []
|
||||
if stem(resource.get("Name", "")) == stem(permission["each"])]
|
||||
if permission["action"] not in authorized or len(kinds) != 1:
|
||||
continue
|
||||
found.setdefault(namespace, {}).setdefault(entry["operation"], []).append(
|
||||
{"action": permission["action"], "type": kinds[0]})
|
||||
return {namespace: dict(sorted(operations.items())) for namespace, operations in sorted(found.items())}
|
||||
|
||||
|
||||
def _session_tag_companions(documents: list[dict], page: dict | None) -> dict[str, dict[str, list[dict]]]:
|
||||
"""The session tag companions of `companions`: an operation the page names the attribute or claim of needs the
|
||||
page's action where the reference's action of the operation's name takes a key of the page's request key, and
|
||||
@@ -770,6 +804,7 @@ def build(documents: list[dict], provenance: str, routed: list[str],
|
||||
"authorizedByMethod": authorized_by_method(documents, methods or {}, renamed),
|
||||
**vendored_sections(documents, page, models, query, renamed),
|
||||
"companions": companions(documents, source_identity, requests, session_tags, load_required_permissions()),
|
||||
"perEntry": per_entry_actions(documents, load_required_permissions()),
|
||||
}
|
||||
|
||||
|
||||
@@ -848,6 +883,13 @@ def _section_problems(document: dict) -> list[str]:
|
||||
or not isinstance(companion.get("callerPolicyWhenChained"), bool):
|
||||
problems.append(f"companions {namespace}:{operation} is not an action of {namespace}, a request "
|
||||
f"member, a global key and whether a chained caller's policy must allow it")
|
||||
for namespace, operations in (document.get("perEntry") or {}).items():
|
||||
for operation, needed in (operations.items() if isinstance(operations, dict) else []):
|
||||
for each in (needed if isinstance(needed, list) else [None]):
|
||||
if not isinstance(each, dict) or set(each) != {"action", "type"} \
|
||||
or not action_of(namespace, each.get("action")) or not NAME_RE.match(str(each.get("type"))):
|
||||
problems.append(f"perEntry {namespace}:{operation} is not an action of {namespace} and a "
|
||||
f"resource type")
|
||||
return problems
|
||||
|
||||
|
||||
@@ -1073,7 +1115,8 @@ def main(argv: list[str] | None = None) -> int:
|
||||
untrue, added = verify_against(vendored, upstream)
|
||||
sections = {**vendored_sections(documents, page, models, query, upstream),
|
||||
"companions": companions(documents, source_identity, None, session_tags,
|
||||
load_required_permissions())}
|
||||
load_required_permissions()),
|
||||
"perEntry": per_entry_actions(documents, load_required_permissions())}
|
||||
for section, value in sections.items():
|
||||
if vendored_document.get(section, {}) != value:
|
||||
untrue.append(f"{section} differs from what AWS gives: expected {json.dumps(value)}")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"_source": {
|
||||
"page": "https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-policy-actions.html",
|
||||
"fetcher": "tools/aws/fetch_s3_required_actions.py",
|
||||
"retrieved": "2026-11-21",
|
||||
"retrieved": "2026-11-29",
|
||||
"note": "Each heading's '(Required)' rows of the page, under the heading as it stands (one naming several operations kept whole): its single required actions, and an Either row's two actions with the sentence it gives each, copied as they stand."
|
||||
},
|
||||
"operations": {
|
||||
@@ -469,6 +469,12 @@
|
||||
"s3:GetBucketCORS"
|
||||
]
|
||||
},
|
||||
"GetBucketDefaultStorageClass": {
|
||||
"section": "Bucket operations and permissions",
|
||||
"required": [
|
||||
"s3:GetBucketDefaultStorageClass"
|
||||
]
|
||||
},
|
||||
"GetBucketEncryption": {
|
||||
"section": "Bucket operations and permissions",
|
||||
"required": [
|
||||
@@ -893,6 +899,12 @@
|
||||
"s3:PutBucketCORS"
|
||||
]
|
||||
},
|
||||
"PutBucketDefaultStorageClass": {
|
||||
"section": "Bucket operations and permissions",
|
||||
"required": [
|
||||
"s3:PutBucketDefaultStorageClass"
|
||||
]
|
||||
},
|
||||
"PutBucketEncryption": {
|
||||
"section": "Bucket operations and permissions",
|
||||
"required": [
|
||||
|
||||
@@ -813,6 +813,36 @@ def test_a_required_permission_needed_when_the_request_does_something_is_a_compa
|
||||
assert r.validate(document, []) == []
|
||||
|
||||
|
||||
def secrets_typed() -> dict:
|
||||
"""SECRETS with GetSecretValue acting on the `Secret` type, as the Service Reference gives it."""
|
||||
typed = json.loads(json.dumps(SECRETS))
|
||||
for action in typed["Actions"]:
|
||||
if action["Name"] == "GetSecretValue":
|
||||
action["Resources"] = [{"Name": "Secret"}]
|
||||
return typed
|
||||
|
||||
|
||||
def test_a_required_permission_needed_for_each_thing_is_an_action_on_each_entry_of_the_type_its_words_name():
|
||||
# "you must have secretsmanager:GetSecretValue for each secret": the secret is the action's `Secret` type.
|
||||
assert r.per_entry_actions([secrets_typed()], REQUIRED) == {"secretsmanager": {
|
||||
"BatchGetSecretValue": [{"action": "secretsmanager:GetSecretValue", "type": "Secret"}]}}
|
||||
document = r.build([SECRETS, *ANCHOR_SERVICES], "a test", [], requests=SECRET_REQUESTS)
|
||||
document["perEntry"] = r.per_entry_actions([secrets_typed()], REQUIRED)
|
||||
assert r.validate(document, []) == []
|
||||
document["perEntry"] = {"secretsmanager": {"BatchGetSecretValue": [{"action": "kms:Decrypt", "type": "Key"}]}}
|
||||
assert any("perEntry secretsmanager:BatchGetSecretValue" in problem for problem in r.validate(document, []))
|
||||
|
||||
|
||||
def test_an_each_clause_naming_no_type_of_its_action_or_an_action_not_authorizing_the_operation_gives_none():
|
||||
# Without the type, the words name nothing; without the reference listing it, the action is not the operation's.
|
||||
assert r.per_entry_actions([SECRETS], REQUIRED) == {}
|
||||
unlisted = json.loads(json.dumps(secrets_typed()))
|
||||
for operation in unlisted["Operations"]:
|
||||
if operation["Name"] == "BatchGetSecretValue":
|
||||
operation["AuthorizedActions"] = [{"Service": "secretsmanager", "Name": "BatchGetSecretValue"}]
|
||||
assert r.per_entry_actions([unlisted], REQUIRED) == {}
|
||||
|
||||
|
||||
def test_an_action_the_reference_does_not_list_the_operation_as_authorized_by_is_no_companion():
|
||||
unlisted = service("secretsmanager", {"BatchGetSecretValue": ["secretsmanager:BatchGetSecretValue"]},
|
||||
["BatchGetSecretValue", "ListSecrets"])
|
||||
|
||||
Reference in new issue
Block a user