mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
feat(iam): read S3 and S3 Control from the generated tables (#9155)
S3 leaves the registry's hand rules and ResourceArnBuilder's S3 branch: its requests are matched on their botocore routes, checked as the actions the authorized-actions file gives them, on the resources the request-resources table reads. regen_rest_routes.py no longer lists s3 as hand-routed, and regen_iam_request_resources.py reads s3 instead of leaving it to the builder; the tables gain S3's and S3 Control's 195 operations and nothing else changes. Operations sharing a route are told apart by the query parameters and headers botocore requires, an S3 Control request by its route's model, which also picks S3 Control's error envelope (isS3ControlRequest), and a member the two clients locate apart is read for the client whose route the request matched. An object key is read as S3 reads it, keeping the slashes it was sent with, through RequestPathLabels, a per-namespace hook S3 implements with S3ObjectKeys. DeleteObjects names its keys in its XML body, so it takes s3:DeleteObject's types from the S3 user guide's Either row and is unread: the filter leaves it to S3, which checks each key. The registry's S3 rules, S3 Control rules and sub-resource overrides are deleted, with the tests of Floci's own handler order, the regional S3 Control ARN form, and a version for HEAD, HEAD ?annotation and Select, none of which an AWS source gives. S3 also runs only what botocore routes, so what runs is what is checked: a request naming annotationName is GetObjectAnnotation and a HEAD naming one HeadObject, SelectObjectContent runs on ?select&select-type=2 and reads the current version, the S3 Control tagging handler decodes its ARN once, and a request two operations' routes take alike is refused under enforcement.
This commit is contained in:
1 parent
546770ab69
commit
4735606fb9
29 files changed
+912
-1143
No files matched your search
+17
-6
@@ -2693,8 +2693,17 @@ actions list the operations AWS checks as the action their HTTP method names (ab
|
||||
resource Floci neither builds nor reads would not be checked, since checked on `*` a grant scoped to
|
||||
the resource would be refused; no vendored route is one now. The routes of
|
||||
Lambda, EKS, EventBridge Scheduler, EventBridge Pipes and Aurora DSQL are all mapped by their rules,
|
||||
so none is checked differently. S3 is routed by its rules alone, since it tells apart the
|
||||
operations of one route by their query and headers. A route
|
||||
so none is checked differently. S3 and S3 Control are routed by their botocore routes too, both under the
|
||||
s3 scope: operations sharing a route are told apart by the query parameters and headers their requests
|
||||
require (`UploadPart`, on `PUT /{Bucket}/{Key+}` with `PutObject`, carries `partNumber` and `uploadId`),
|
||||
and an S3 Control request, which answers a denial in S3 Control's own envelope, by the model of the route
|
||||
it matches. A key keeps the slashes it was sent with, read as S3 reads it, so `PUT /bucket//email.txt`
|
||||
is checked on `arn:aws:s3:::bucket//email.txt`. `DeleteObjects` names its keys in its XML body, which the
|
||||
filter does not read, so S3 checks each key itself. S3 runs only what botocore routes, so the operation that runs is
|
||||
the one checked: `SelectObjectContent` is `POST ?select&select-type=2` and reads the current version, and a tagging
|
||||
ARN is decoded once, as the Go SDK encodes it. An S3 Control route Floci does not serve reaches no handler. A request two operations' routes take
|
||||
alike, none outranking the other, as one naming two of S3's sub-resources, runs as whichever its handler picks, so
|
||||
it is refused. A route
|
||||
matching nothing is not checked, as an unsigned REST request is not; the other REST services' routes
|
||||
are not vendored yet.
|
||||
|
||||
@@ -2726,7 +2735,8 @@ An S3 object operation is checked as the action the S3 documentation gives it:
|
||||
and ACLs, checks the same actions, and offers the bucket policy the tag and Object Lock keys the
|
||||
request sets.
|
||||
- **Restore and select:** `RestoreObject` is checked as `s3:RestoreObject`, and
|
||||
`SelectObjectContent` as `s3:GetObject`, or `s3:GetObjectVersion` when it names a version.
|
||||
`SelectObjectContent` as `s3:GetObject`, which the S3 user guide's permissions table requires for it
|
||||
alone; botocore gives its request no version.
|
||||
- **Attributes:** `GetObjectAttributes` needs `s3:GetObject` and `s3:GetObjectAttributes`, as its
|
||||
API reference says.
|
||||
- **Copying:** `CopyObject` and `UploadPartCopy` also need `s3:GetObject` on the source object, or
|
||||
@@ -2746,10 +2756,11 @@ An S3 object operation is checked as the action the S3 documentation gives it:
|
||||
user guide also says the permission does not apply to annotation operations, so deleting an
|
||||
annotation does not need it.
|
||||
- **Annotations:** object annotations use the `s3:*ObjectAnnotation` actions, and
|
||||
`s3:ListObjectAnnotations` when no annotation name is given.
|
||||
`s3:ListObjectAnnotations` when the request carries no `annotationName`.
|
||||
- **Versions:** a `versionId` selects the version action AWS checks.
|
||||
- Reading or heading a version needs `s3:GetObjectVersion`; `s3:GetObject` is not needed. Its
|
||||
attributes need `s3:GetObjectVersion` and `s3:GetObjectVersionAttributes`.
|
||||
- Reading a version needs `s3:GetObjectVersion`; `s3:GetObject` is not needed. Its
|
||||
attributes need `s3:GetObjectVersion` and `s3:GetObjectVersionAttributes`. Heading one needs
|
||||
`s3:GetObject`, which the S3 user guide's permissions table gives `HeadObject` whatever version it names.
|
||||
- Deleting a version needs `s3:DeleteObjectVersion`, so a deny on it stops permanent deletes
|
||||
while a plain delete still adds a delete marker.
|
||||
- A version's ACL, tags and annotations use `s3:GetObjectVersionAcl`, `s3:PutObjectVersionAcl`,
|
||||
|
||||
@@ -95,6 +95,9 @@ specific object version through the four `?annotation` operations. Notes on the
|
||||
- Annotations are stored per AWS account. With `globalBucketNamespace` enabled, object reads
|
||||
resolve cross-account but annotation reads, writes, and listings stay in the caller's account.
|
||||
- S3 Metadata annotation tables and annotation replication are not implemented.
|
||||
- A request naming `annotationName` is `GetObjectAnnotation`, as botocore's model reads it, so an empty name is
|
||||
refused with `InvalidAnnotationName`; one naming none lists the annotations. Botocore models no `HEAD` of an
|
||||
annotation, so a `HEAD` naming one is a `HeadObject`.
|
||||
|
||||
## Object Versions
|
||||
|
||||
|
||||
@@ -457,6 +457,14 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
|
||||
if (action == null) {
|
||||
return; // unknown action → ALLOW for ordinary credentials (permissive)
|
||||
}
|
||||
// A request two operations' routes take alike, as one naming two of S3's sub-resources, runs as whichever its
|
||||
// handler picks, so it is refused rather than checked as one of them.
|
||||
if (!isRpcCall(ctx) && IamActionRegistry.ambiguousRoute(credentialScope, ctx)) {
|
||||
LOG.infov("IAM enforcement DENY: akid={0} action={1}, a request two operations' routes take alike",
|
||||
akid, action);
|
||||
ctx.abortWith(accessDeniedForRequest(action, credentialScope, ctx));
|
||||
return;
|
||||
}
|
||||
if ("sts:GetCallerIdentity".equals(action)) {
|
||||
return; // AWS returns caller identity even when an identity policy explicitly denies it
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package io.floci.aws.core.common;
|
||||
|
||||
import jakarta.ws.rs.container.ContainerRequestContext;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* The values a service reads the labels of its REST requests' paths as, where they differ from what the router's
|
||||
* normalized path gives the labels of the request's vendored route: S3 reads an object's key from the path as the
|
||||
* client sent it, which keeps the key's own slashes ({@code PUT /bucket//email.txt} writes {@code /email.txt}, where
|
||||
* the normalized path gives {@code email.txt}). The request-resources reader lays them over the route's labels, so a
|
||||
* request is checked on the resource its handler acts on.
|
||||
*
|
||||
* <p>Implemented by the service whose handlers read their path so (S3); looked up lazily by namespace, as
|
||||
* {@link StoredResourceArns} is.
|
||||
*/
|
||||
public interface RequestPathLabels {
|
||||
|
||||
/** The namespace whose requests it reads, as the request-resources table names it. */
|
||||
String namespace();
|
||||
|
||||
/**
|
||||
* The labels the request's path gives, by the label's name, that the service reads otherwise than {@code routed},
|
||||
* the values the router's path gives the labels of the request's route; empty when it reads them alike.
|
||||
*/
|
||||
Map<String, String> labels(ContainerRequestContext ctx, Map<String, String> routed);
|
||||
}
|
||||
@@ -59,12 +59,10 @@ public class IamActionRegistry {
|
||||
/**
|
||||
* A route and the action it is checked as. A rule naming a query parameter matches only a request
|
||||
* carrying it with that value, as {@code GET /layers?find=LayerVersion} is GetLayerVersionByArn
|
||||
* where {@code GET /layers} is ListLayers. A rule flagged to match before the S3 query
|
||||
* overrides is one of the S3 Control routes, which the control plane answers whatever its
|
||||
* query string carries.
|
||||
* where {@code GET /layers} is ListLayers.
|
||||
*/
|
||||
private record ActionRule(String service, String method, Pattern pathPattern, String queryParameter,
|
||||
String queryValue, String action, boolean beforeS3QueryOverrides) {
|
||||
String queryValue, String action) {
|
||||
|
||||
boolean matches(String scope, String requestMethod, String path, ContainerRequestContext ctx) {
|
||||
return service.equals(scope) && method.equals(requestMethod) && pathPattern.matcher(path).find()
|
||||
@@ -73,47 +71,8 @@ public class IamActionRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The routes of the S3 Control model, checked as the actions the Service Reference gives
|
||||
* them by {@code IamRestRouteCoverageTest}. S3 Control clients sign with the s3 scope
|
||||
* (botocore's s3control model declares signingName "s3"), so its operations are
|
||||
* {@code s3:} actions, and its routes must be matched before the S3 data-plane query
|
||||
* overrides: the control plane answers a tagging route whatever its query string carries,
|
||||
* so a parameter such as {@code ?tagging} must not re-point the authorization at the
|
||||
* data-plane object tagging it suggests, and the data-plane rules below would otherwise
|
||||
* read {@code /v20180820/...} as a bucket named v20180820.
|
||||
*
|
||||
* <p>The account-level Block Public Access is the one route the Service Reference cannot
|
||||
* settle, because it files S3's and S3 Control's GetPublicAccessBlock, PutPublicAccessBlock
|
||||
* and DeletePublicAccessBlock under the bucket actions; the S3 User Guide's Block Public
|
||||
* Access page gives the account level its own actions, and the exception is written down
|
||||
* where the data is checked. ListAccessPoints and the account actions have no resource
|
||||
* type, so IAM checks them against the wildcard rather than a bucket.
|
||||
*/
|
||||
/** The routes the registry checks as an action of its own, each a rule of the scope it serves. */
|
||||
private static final List<ActionRule> RULES = List.of(
|
||||
// ── S3 Control ───────────────────────────────────────────────────────────
|
||||
s3ControlRule("GET", "^/v20180820/tags/.+", "s3:ListTagsForResource"),
|
||||
s3ControlRule("POST", "^/v20180820/tags/.+", "s3:TagResource"),
|
||||
s3ControlRule("DELETE", "^/v20180820/tags/.+", "s3:UntagResource"),
|
||||
s3ControlRule("GET", "^/v20180820/accesspoint/?$", "s3:ListAccessPoints"),
|
||||
s3ControlRule("PUT", "^/v20180820/configuration/publicAccessBlock/?$",
|
||||
"s3:PutAccountPublicAccessBlock"),
|
||||
s3ControlRule("GET", "^/v20180820/configuration/publicAccessBlock/?$",
|
||||
"s3:GetAccountPublicAccessBlock"),
|
||||
s3ControlRule("DELETE", "^/v20180820/configuration/publicAccessBlock/?$",
|
||||
"s3:PutAccountPublicAccessBlock"),
|
||||
|
||||
// ── S3 ─────────────────────────────────────────────────────────────────
|
||||
rule("s3", "GET", "^/?$", "s3:ListAllMyBuckets"),
|
||||
rule("s3", "PUT", "^/[^/]+/?$", "s3:CreateBucket"),
|
||||
rule("s3", "DELETE", "^/[^/]+/?$", "s3:DeleteBucket"),
|
||||
rule("s3", "HEAD", "^/[^/]+/?$", "s3:ListBucket"),
|
||||
rule("s3", "GET", "^/[^/]+/?$", "s3:ListBucket"),
|
||||
rule("s3", "GET", "^/[^/]+/.+", "s3:GetObject"),
|
||||
rule("s3", "PUT", "^/[^/]+/.+", "s3:PutObject"),
|
||||
rule("s3", "DELETE", "^/[^/]+/.+", "s3:DeleteObject"),
|
||||
rule("s3", "HEAD", "^/[^/]+/.+", "s3:GetObject"),
|
||||
|
||||
// ── Lambda ──────────────────────────────────────────────────────────────
|
||||
// Code signing configs first: a config's function list ends in /functions, as ListFunctions does.
|
||||
rule("lambda", "GET", "^/2020-04-22/code-signing-configs/[^/]+/functions$",
|
||||
@@ -565,35 +524,22 @@ public class IamActionRegistry {
|
||||
private static ActionRule rule(String service, String method, String path, String queryParameter,
|
||||
String queryValue, String action) {
|
||||
return new ActionRule(service, method, Pattern.compile(path, Pattern.CASE_INSENSITIVE), queryParameter,
|
||||
queryValue, action, false);
|
||||
}
|
||||
|
||||
private static ActionRule s3ControlRule(String method, String path, String action) {
|
||||
return new ActionRule("s3", method, Pattern.compile(path, Pattern.CASE_INSENSITIVE), null, null,
|
||||
action, true);
|
||||
queryValue, action);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the request is one of the S3 Control routes, as the rules flag them. A denial then
|
||||
* answers in S3 Control's own REST-XML envelope, the only one the s3control SDK
|
||||
* deserializers read (issue #557), so the route decides the shape and not the action: the
|
||||
* data plane resolves actions a control route never shares, and an action-name list would
|
||||
* have to track every route to stay right. A request whose route cannot be read, which only
|
||||
* a synthetic context is, is not a control one.
|
||||
* Whether the request is an S3 Control one: the route it matches is the {@code s3control} model's. A denial then
|
||||
* answers in S3 Control's own REST-XML envelope, the only one the s3control SDK deserializers read (issue #557),
|
||||
* so the route decides the shape and not the action. A request whose route cannot be read, which only a synthetic
|
||||
* context is, is not a control one.
|
||||
*/
|
||||
public static boolean isS3ControlRequest(String credentialScope, ContainerRequestContext ctx) {
|
||||
if (!"s3".equals(credentialScope) || ctx.getMethod() == null || ctx.getUriInfo() == null
|
||||
|| ctx.getUriInfo().getRequestUri() == null) {
|
||||
return false;
|
||||
}
|
||||
String method = ctx.getMethod().toUpperCase();
|
||||
String path = sentPath(ctx.getUriInfo());
|
||||
for (ActionRule rule : RULES) {
|
||||
if (rule.beforeS3QueryOverrides() && rule.matches(credentialScope, method, path, ctx)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return matchedRoute(IamRestRoutes.vendored(), credentialScope, ctx)
|
||||
.map(match -> "s3control".equals(match.model())).orElse(false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -675,36 +621,15 @@ public class IamActionRegistry {
|
||||
* {@code apigateway:PUT} for a PUT. That is when Floci can check it as AWS does ({@code checkedAsAws}). One
|
||||
* it cannot is left unmapped rather than checked on {@code *}, which would refuse a grant scoped to the
|
||||
* resource AWS checks it on. A request a route filter moved under an internal prefix is matched on its
|
||||
* path without the prefix ({@link #withoutInternalPrefix}), the path the model gives it. S3, the scope the
|
||||
* vendored routes list as hand-routed, has its rules alone. Returns {@code null} when nothing maps the
|
||||
* request (caller treats this as ALLOW).
|
||||
* path without the prefix ({@link #withoutInternalPrefix}), the path the model gives it. Returns {@code null}
|
||||
* when nothing maps the request (caller treats this as ALLOW).
|
||||
*/
|
||||
public String resolveRoute(String credentialScope, ContainerRequestContext ctx) {
|
||||
String method = ctx.getMethod().toUpperCase();
|
||||
// An S3 key may end in a slash, PUT /bucket// writes the key "/", and S3's rules already take a
|
||||
// bucket's one trailing slash, so an S3 path is matched as sent.
|
||||
// An S3 key may end in a slash, and one of slashes alone arrives escaped as S3SlashOnlyKeyFilter rewrites
|
||||
// it (PUT /bucket// writes the key "/"), so an S3 path is matched as sent, not decoded.
|
||||
String path = "s3".equals(credentialScope) ? sentPath(ctx.getUriInfo()) : routedPath(ctx);
|
||||
|
||||
if ("s3".equals(credentialScope)) {
|
||||
// An S3 Control route is matched before the query overrides below, which would read the
|
||||
// query string of a route the control plane answers whatever it carries: ?tagging on a
|
||||
// tagging route is caller-supplied noise, not the object sub-resource it names.
|
||||
for (ActionRule rule : RULES) {
|
||||
if (rule.beforeS3QueryOverrides() && rule.matches(credentialScope, method, path, ctx)) {
|
||||
return rule.action();
|
||||
}
|
||||
}
|
||||
// S3 sub-resource override: the URL path alone doesn't distinguish
|
||||
// s3:GetObjectAcl / s3:PutObjectAcl from s3:GetObject / s3:PutObject:
|
||||
// only the {@code ?acl} query parameter does. Without this hook,
|
||||
// an actor with s3:GetObject permission could read ACLs that their
|
||||
// policy intends to forbid.
|
||||
String s3SubAction = resolveS3SubResourceAction(method, ctx);
|
||||
if (s3SubAction != null) {
|
||||
return s3SubAction;
|
||||
}
|
||||
}
|
||||
|
||||
for (ActionRule rule : RULES) {
|
||||
if (rule.matches(credentialScope, method, path, ctx)) {
|
||||
return rule.action();
|
||||
@@ -801,6 +726,22 @@ public class IamActionRegistry {
|
||||
static final RouteMembers NONE = new RouteMembers(Map.of(), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether a REST request of the credential scope is taken alike by the routes of two operations, none outranking
|
||||
* the other, as one naming two of S3's sub-resources is ({@code PUT /bucket?cors&policy}): no botocore client
|
||||
* sends one, and it runs as whichever its handler picks, so no one action covers it.
|
||||
*/
|
||||
public static boolean ambiguousRoute(String credentialScope, ContainerRequestContext ctx) {
|
||||
if (credentialScope == null || ctx.getMethod() == null || ctx.getUriInfo() == null
|
||||
|| ctx.getUriInfo().getRequestUri() == null) {
|
||||
return false;
|
||||
}
|
||||
String path = "s3".equals(credentialScope) ? sentPath(ctx.getUriInfo()) : routedPath(ctx);
|
||||
return IamRestRoutes.vendored().ambiguous(credentialScope, ctx.getMethod().toUpperCase(),
|
||||
withoutInternalPrefix(ctx, path), ctx.getUriInfo().getQueryParameters(), movedUnderPrefix(ctx),
|
||||
ctx.getHeaders());
|
||||
}
|
||||
|
||||
/** The route a request of the operation matches, {@link RouteMembers#NONE} for one it matches none of. */
|
||||
public static RouteMembers routeMembers(String operation, ContainerRequestContext ctx) {
|
||||
int separator = operation.indexOf(':');
|
||||
@@ -946,225 +887,4 @@ public class IamActionRegistry {
|
||||
&& "application".equalsIgnoreCase(mediaType.getType())
|
||||
&& "x-www-form-urlencoded".equalsIgnoreCase(mediaType.getSubtype());
|
||||
}
|
||||
|
||||
private static boolean isFormUpload(MediaType mediaType) {
|
||||
return mediaType != null
|
||||
&& "multipart".equalsIgnoreCase(mediaType.getType())
|
||||
&& "form-data".equalsIgnoreCase(mediaType.getSubtype());
|
||||
}
|
||||
|
||||
/** One bucket sub-resource operation: the query parameter that selects it, and the IAM action. */
|
||||
private record SubResourceAction(String queryParameter, String action) {}
|
||||
|
||||
private static SubResourceAction sub(String queryParameter, String action) {
|
||||
return new SubResourceAction(queryParameter, action);
|
||||
}
|
||||
|
||||
private static final List<SubResourceAction> GET_BUCKET_SUBRESOURCES = List.of(
|
||||
sub("uploads", "s3:ListBucketMultipartUploads"),
|
||||
sub("notification", "s3:GetBucketNotification"),
|
||||
sub("versioning", "s3:GetBucketVersioning"),
|
||||
sub("versions", "s3:ListBucketVersions"),
|
||||
sub("location", "s3:GetBucketLocation"),
|
||||
sub("tagging", "s3:GetBucketTagging"),
|
||||
sub("object-lock", "s3:GetBucketObjectLockConfiguration"),
|
||||
sub("website", "s3:GetBucketWebsite"),
|
||||
sub("logging", "s3:GetBucketLogging"),
|
||||
sub("policy", "s3:GetBucketPolicy"),
|
||||
sub("policyStatus", "s3:GetBucketPolicyStatus"),
|
||||
sub("cors", "s3:GetBucketCORS"),
|
||||
sub("lifecycle", "s3:GetLifecycleConfiguration"),
|
||||
sub("acl", "s3:GetBucketAcl"),
|
||||
sub("encryption", "s3:GetEncryptionConfiguration"),
|
||||
sub("publicAccessBlock", "s3:GetBucketPublicAccessBlock"),
|
||||
sub("ownershipControls", "s3:GetBucketOwnershipControls"),
|
||||
sub("requestPayment", "s3:GetBucketRequestPayment"),
|
||||
sub("accelerate", "s3:GetAccelerateConfiguration"),
|
||||
sub("replication", "s3:GetReplicationConfiguration"),
|
||||
sub("metrics", "s3:GetMetricsConfiguration"),
|
||||
sub("intelligent-tiering", "s3:GetIntelligentTieringConfiguration"),
|
||||
sub("analytics", "s3:GetAnalyticsConfiguration"),
|
||||
sub("inventory", "s3:GetInventoryConfiguration"));
|
||||
|
||||
private static final List<SubResourceAction> PUT_BUCKET_SUBRESOURCES = List.of(
|
||||
sub("notification", "s3:PutBucketNotification"),
|
||||
sub("versioning", "s3:PutBucketVersioning"),
|
||||
sub("tagging", "s3:PutBucketTagging"),
|
||||
sub("object-lock", "s3:PutBucketObjectLockConfiguration"),
|
||||
sub("website", "s3:PutBucketWebsite"),
|
||||
sub("logging", "s3:PutBucketLogging"),
|
||||
sub("policy", "s3:PutBucketPolicy"),
|
||||
sub("cors", "s3:PutBucketCORS"),
|
||||
sub("lifecycle", "s3:PutLifecycleConfiguration"),
|
||||
sub("acl", "s3:PutBucketAcl"),
|
||||
sub("encryption", "s3:PutEncryptionConfiguration"),
|
||||
sub("publicAccessBlock", "s3:PutBucketPublicAccessBlock"),
|
||||
sub("ownershipControls", "s3:PutBucketOwnershipControls"),
|
||||
sub("requestPayment", "s3:PutBucketRequestPayment"),
|
||||
sub("accelerate", "s3:PutAccelerateConfiguration"),
|
||||
sub("replication", "s3:PutReplicationConfiguration"),
|
||||
sub("metrics", "s3:PutMetricsConfiguration"),
|
||||
sub("intelligent-tiering", "s3:PutIntelligentTieringConfiguration"),
|
||||
sub("analytics", "s3:PutAnalyticsConfiguration"),
|
||||
sub("inventory", "s3:PutInventoryConfiguration"));
|
||||
|
||||
// AWS gives only DeleteBucketPolicy and DeleteBucketWebsite their own action; removing any other
|
||||
// sub-resource is authorised by the same Put* action that sets it. ?accelerate is absent because
|
||||
// S3Controller rejects DELETE on it with 405, so no mapping should claim the request.
|
||||
private static final List<SubResourceAction> DELETE_BUCKET_SUBRESOURCES = List.of(
|
||||
sub("tagging", "s3:PutBucketTagging"),
|
||||
sub("website", "s3:DeleteBucketWebsite"),
|
||||
sub("policy", "s3:DeleteBucketPolicy"),
|
||||
sub("cors", "s3:PutBucketCORS"),
|
||||
sub("lifecycle", "s3:PutLifecycleConfiguration"),
|
||||
sub("encryption", "s3:PutEncryptionConfiguration"),
|
||||
sub("publicAccessBlock", "s3:PutBucketPublicAccessBlock"),
|
||||
sub("ownershipControls", "s3:PutBucketOwnershipControls"),
|
||||
sub("replication", "s3:PutReplicationConfiguration"),
|
||||
sub("metrics", "s3:PutMetricsConfiguration"),
|
||||
sub("intelligent-tiering", "s3:PutIntelligentTieringConfiguration"),
|
||||
sub("analytics", "s3:PutAnalyticsConfiguration"),
|
||||
sub("inventory", "s3:PutInventoryConfiguration"));
|
||||
|
||||
private static String resolveS3SubResourceAction(String method, ContainerRequestContext ctx) {
|
||||
MultivaluedMap<String, String> params = ctx.getUriInfo().getQueryParameters();
|
||||
// /{bucket}?acl -> bucket-level; /{bucket}/{key}?acl -> object-level.
|
||||
// A trailing slash is a valid key character, so /bucket/folder/?acl is an object request -
|
||||
// we cannot use endsWith("/") to infer bucket-level.
|
||||
String path = ctx.getUriInfo().getPath();
|
||||
String stripped = path.startsWith("/") ? path.substring(1) : path;
|
||||
int firstSlash = stripped.indexOf('/');
|
||||
boolean isBucketLevel = firstSlash < 0 || firstSlash == stripped.length() - 1;
|
||||
if (!isBucketLevel) {
|
||||
return objectSubResourceAction(method, params);
|
||||
}
|
||||
if ("POST".equals(method)) {
|
||||
// S3Controller runs DeleteObjects and a browser-form PostObject ahead of any other sub-resource and
|
||||
// checks them per key; another sub-resource S3 defines for POST, such as ?metadataTable, it answers
|
||||
// NotImplemented, so that request is checked as the operation it names.
|
||||
return params.containsKey("delete") || isFormUpload(ctx.getMediaType())
|
||||
? null : unservedSubresourceAction(method, params);
|
||||
}
|
||||
List<SubResourceAction> chain = switch (method) {
|
||||
case "GET" -> GET_BUCKET_SUBRESOURCES;
|
||||
case "PUT" -> PUT_BUCKET_SUBRESOURCES;
|
||||
case "DELETE" -> DELETE_BUCKET_SUBRESOURCES;
|
||||
default -> List.of();
|
||||
};
|
||||
for (SubResourceAction entry : chain) {
|
||||
if (params.containsKey(entry.queryParameter())) {
|
||||
return entry.action();
|
||||
}
|
||||
}
|
||||
return chain.isEmpty() ? null : unservedSubresourceAction(method, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* A sub-resource S3 defines for the method that the lists above, or POST's DeleteObjects, do not hold is one
|
||||
* S3Controller does not serve: it answers the request NotImplemented rather than run the bucket's operation, so
|
||||
* the request is checked as the operation it names, as AWS checks it. Null when it names none, or one S3 defines
|
||||
* for other methods only, which S3Controller refuses as not allowed.
|
||||
*/
|
||||
private static String unservedSubresourceAction(String method, MultivaluedMap<String, String> params) {
|
||||
S3BucketSubresources subresources = S3BucketSubresources.vendored();
|
||||
for (String name : subresources.names()) {
|
||||
List<String> operations = subresources.operations(method, name);
|
||||
if (params.containsKey(name) && operations.size() == 1) {
|
||||
return IamAuthorizedActions.actionFor("s3", operations.get(0));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The operation an object sub-resource selects, checked in the order S3Controller dispatches
|
||||
* them: a request naming several runs the first, so it is checked as that one. A
|
||||
* {@code versionId} selects the version action AWS checks in place of an action that has one
|
||||
* (see {@link S3ObjectActions#forVersion}). Null where the controller falls through to the plain
|
||||
* object operation on the current version, which the rules check.
|
||||
*/
|
||||
private static String objectSubResourceAction(String method, MultivaluedMap<String, String> params) {
|
||||
String versionId = params.getFirst("versionId");
|
||||
return switch (method) {
|
||||
case "GET" -> {
|
||||
if (params.containsKey("uploadId")) {
|
||||
yield "s3:ListMultipartUploadParts";
|
||||
}
|
||||
if (params.containsKey("tagging")) {
|
||||
yield S3ObjectActions.forVersion("s3:GetObjectTagging", versionId);
|
||||
}
|
||||
if (params.containsKey("annotation")) {
|
||||
yield S3ObjectActions.forVersion(annotationReadAction(params), versionId);
|
||||
}
|
||||
if (params.containsKey("retention")) {
|
||||
yield "s3:GetObjectRetention";
|
||||
}
|
||||
if (params.containsKey("legal-hold")) {
|
||||
yield "s3:GetObjectLegalHold";
|
||||
}
|
||||
if (params.containsKey("acl")) {
|
||||
yield S3ObjectActions.forVersion("s3:GetObjectAcl", versionId);
|
||||
}
|
||||
yield versionId != null ? "s3:GetObjectVersion" : null;
|
||||
}
|
||||
case "HEAD" -> {
|
||||
if (params.containsKey("annotation")) {
|
||||
yield S3ObjectActions.forVersion(annotationReadAction(params), versionId);
|
||||
}
|
||||
yield versionId != null ? "s3:GetObjectVersion" : null;
|
||||
}
|
||||
case "PUT" -> {
|
||||
if (params.containsKey("tagging")) {
|
||||
yield S3ObjectActions.forVersion("s3:PutObjectTagging", versionId);
|
||||
}
|
||||
if (params.containsKey("retention")) {
|
||||
yield "s3:PutObjectRetention";
|
||||
}
|
||||
if (params.containsKey("legal-hold")) {
|
||||
yield "s3:PutObjectLegalHold";
|
||||
}
|
||||
if (params.containsKey("acl")) {
|
||||
yield S3ObjectActions.forVersion("s3:PutObjectAcl", versionId);
|
||||
}
|
||||
// A PUT naming an uploadId and a partNumber is UploadPart, which the rules check as
|
||||
// s3:PutObject, as they do PutObject and CopyObject.
|
||||
yield params.containsKey("annotation")
|
||||
? S3ObjectActions.forVersion("s3:PutObjectAnnotation", versionId)
|
||||
: null;
|
||||
}
|
||||
case "DELETE" -> {
|
||||
if (params.containsKey("tagging")) {
|
||||
yield S3ObjectActions.forVersion("s3:DeleteObjectTagging", versionId);
|
||||
}
|
||||
if (params.containsKey("annotation")) {
|
||||
yield S3ObjectActions.forVersion("s3:DeleteObjectAnnotation", versionId);
|
||||
}
|
||||
if (params.containsKey("uploadId")) {
|
||||
yield "s3:AbortMultipartUpload";
|
||||
}
|
||||
yield versionId != null ? "s3:DeleteObjectVersion" : null;
|
||||
}
|
||||
case "POST" -> {
|
||||
if (params.containsKey("uploads")) {
|
||||
yield "s3:PutObject";
|
||||
}
|
||||
if (params.containsKey("restore")) {
|
||||
yield "s3:RestoreObject";
|
||||
}
|
||||
if (params.containsKey("select")) {
|
||||
// S3Controller selects from the version a versionId names.
|
||||
yield S3ObjectActions.forVersion("s3:GetObject", versionId);
|
||||
}
|
||||
yield params.containsKey("uploadId") ? "s3:PutObject" : null;
|
||||
}
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
/** A named annotation is GetObjectAnnotation; an empty or absent name lists them, as S3Controller does. */
|
||||
private static String annotationReadAction(MultivaluedMap<String, String> params) {
|
||||
String name = params.getFirst("annotationName");
|
||||
return name != null && !name.isEmpty() ? "s3:GetObjectAnnotation" : "s3:ListObjectAnnotations";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -226,18 +226,47 @@ final class IamRestRoutes {
|
||||
|
||||
private Optional<Match> best(String scope, String method, String requestPath, MultivaluedMap<String, String> query,
|
||||
boolean spanned, MultivaluedMap<String, String> headers) {
|
||||
Route best = null;
|
||||
for (Route route : routes.getOrDefault(scope, Map.of()).getOrDefault(method, List.of())) {
|
||||
if (route.matches(requestPath, query, spanned) && route.carries(headers)
|
||||
&& (best == null || route.outranks(best))) {
|
||||
best = route;
|
||||
}
|
||||
}
|
||||
Route best = ranked(scope, method, requestPath, query, spanned, headers).best();
|
||||
return best == null ? Optional.empty()
|
||||
: Optional.of(new Match(best.operation(), best.labelValues(requestPath, spanned), best.located(),
|
||||
best.documented(), best.model()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the request is taken alike by the routes of two operations, none outranking the other: a request naming
|
||||
* two of S3's sub-resources ({@code PUT /bucket?cors&policy}) matches both their routes, and no botocore client
|
||||
* sends one, so which it is depends on the handler alone.
|
||||
*/
|
||||
boolean ambiguous(String scope, String method, String path, MultivaluedMap<String, String> query,
|
||||
boolean movedUnderPrefix, MultivaluedMap<String, String> headers) {
|
||||
String requestPath = IamActionRegistry.withoutTrailingSlash(path);
|
||||
Ranked ranked = ranked(scope, method, requestPath, query, false, headers);
|
||||
return ranked.best() == null && movedUnderPrefix
|
||||
? ranked(scope, method, requestPath, query, true, headers).tied() : ranked.tied();
|
||||
}
|
||||
|
||||
/** The route a request matches that outranks the others it matches, and whether another operation's ties it. */
|
||||
private record Ranked(Route best, boolean tied) {
|
||||
}
|
||||
|
||||
private Ranked ranked(String scope, String method, String requestPath, MultivaluedMap<String, String> query,
|
||||
boolean spanned, MultivaluedMap<String, String> headers) {
|
||||
List<Route> matching = new ArrayList<>();
|
||||
Route best = null;
|
||||
for (Route route : routes.getOrDefault(scope, Map.of()).getOrDefault(method, List.of())) {
|
||||
if (route.matches(requestPath, query, spanned) && route.carries(headers)) {
|
||||
matching.add(route);
|
||||
if (best == null || route.outranks(best)) {
|
||||
best = route;
|
||||
}
|
||||
}
|
||||
}
|
||||
Route winner = best;
|
||||
boolean tied = winner != null && matching.stream().anyMatch(route -> route != winner
|
||||
&& !winner.outranks(route) && !winner.operation().equals(route.operation()));
|
||||
return new Ranked(best, tied);
|
||||
}
|
||||
|
||||
/** The modelled denial status, or the existing protocol default when the model declares none. */
|
||||
int accessDeniedStatus(String scope, int fallback) {
|
||||
return scope == null ? fallback : accessDeniedStatuses.getOrDefault(scope, fallback);
|
||||
|
||||
@@ -7,17 +7,13 @@ import io.floci.aws.core.common.AwsArnUtils;
|
||||
import io.floci.aws.core.common.AwsException;
|
||||
import io.floci.aws.core.common.AwsQueryServiceResolver;
|
||||
import io.floci.aws.core.common.AwsRegions;
|
||||
import io.floci.aws.core.common.RequestPathLabels;
|
||||
import io.floci.aws.core.common.RequestResources;
|
||||
import io.floci.aws.core.common.ServicePrincipals;
|
||||
import io.floci.aws.core.common.SigV4CredentialScope;
|
||||
import io.floci.aws.core.common.StoredResourceArns;
|
||||
import io.floci.aws.core.common.auth.SigV4Canonicalization;
|
||||
import io.floci.aws.services.kms.KmsService;
|
||||
import io.floci.aws.services.s3.S3ControlArnUtils;
|
||||
import io.floci.aws.services.s3.S3ObjectKeys;
|
||||
import io.floci.aws.services.s3.S3ResourceArns;
|
||||
import io.quarkus.vertx.http.runtime.CurrentVertxRequest;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.enterprise.inject.Instance;
|
||||
import jakarta.inject.Inject;
|
||||
@@ -26,10 +22,10 @@ import jakarta.ws.rs.container.ContainerRequestContext;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URI;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
@@ -58,9 +54,6 @@ public class ResourceArnBuilder {
|
||||
/** What a service-linked role deletion task identifier starts with; see its resolver. */
|
||||
private static final String DELETION_TASK_PREFIX = "task" + ServiceLinkedRoles.PATH;
|
||||
|
||||
/** Where an S3 Control tagging route carries the ARN of the resource it acts on. */
|
||||
private static final String S3_CONTROL_TAGS_PREFIX = "/v20180820/tags/";
|
||||
|
||||
/** The segment that starts an API Gateway v2 management path, and is not part of the resource it names. */
|
||||
private static final String API_GATEWAY_V2_SEGMENT = "v2";
|
||||
|
||||
@@ -84,22 +77,21 @@ public class ResourceArnBuilder {
|
||||
*/
|
||||
private final Instance<StoredResourceArns> storedResourceArns;
|
||||
/**
|
||||
* The current request, for the path as the client sent it: an S3 key keeps its own slashes,
|
||||
* which JAX-RS has collapsed out of {@code UriInfo} by the time this runs. Null outside a
|
||||
* request, as in a unit test, where the request URI's raw path stands in.
|
||||
* Looked up lazily as well, to read a path's labels as the namespace's handlers read them where the router's
|
||||
* normalized path gives them otherwise (an S3 key's own slashes).
|
||||
*/
|
||||
private final CurrentVertxRequest currentVertxRequest;
|
||||
private final Instance<RequestPathLabels> requestPathLabels;
|
||||
|
||||
@Inject
|
||||
public ResourceArnBuilder(ObjectMapper objectMapper, Instance<IamService> iamService,
|
||||
Instance<KmsService> kmsService,
|
||||
Instance<StoredResourceArns> storedResourceArns,
|
||||
CurrentVertxRequest currentVertxRequest) {
|
||||
Instance<RequestPathLabels> requestPathLabels) {
|
||||
this.objectMapper = objectMapper;
|
||||
this.iamService = iamService;
|
||||
this.kmsService = kmsService;
|
||||
this.storedResourceArns = storedResourceArns;
|
||||
this.currentVertxRequest = currentVertxRequest;
|
||||
this.requestPathLabels = requestPathLabels;
|
||||
}
|
||||
|
||||
public ResourceArnBuilder(ObjectMapper objectMapper, Instance<IamService> iamService,
|
||||
@@ -125,10 +117,6 @@ public class ResourceArnBuilder {
|
||||
this(objectMapper, null, null);
|
||||
}
|
||||
|
||||
ResourceArnBuilder(ObjectMapper objectMapper, CurrentVertxRequest currentVertxRequest) {
|
||||
this(objectMapper, null, null, null, currentVertxRequest);
|
||||
}
|
||||
|
||||
public String build(String credentialScope, ContainerRequestContext ctx,
|
||||
String region, String accountId) {
|
||||
List<String> list = buildResources(credentialScope, ctx, region, accountId);
|
||||
@@ -163,10 +151,8 @@ public class ResourceArnBuilder {
|
||||
if (operation != null && operation.startsWith(credentialScope + ":") && RequestResources.reads(operation)) {
|
||||
return namedResources(credentialScope, operation, ctx, region, accountId, partition);
|
||||
}
|
||||
String path = "s3".equals(credentialScope) ? ctx.getUriInfo().getPath()
|
||||
: IamActionRegistry.decodedPath(ctx);
|
||||
String path = IamActionRegistry.decodedPath(ctx);
|
||||
return switch (credentialScope) {
|
||||
case "s3" -> buildS3Resources(operation, path, ctx, region);
|
||||
case "dynamodb" -> buildDynamoDbArns(ctx, region, accountId);
|
||||
case "iam" -> buildIamArns(ctx, region, accountId);
|
||||
case "apigateway" -> List.of(buildApiGatewayArn(ctx, region, partition));
|
||||
@@ -179,16 +165,40 @@ public class ResourceArnBuilder {
|
||||
* The resources a request of a namespace this builder has no branch for names, from the vendored table of
|
||||
* request resources (see {@link RequestResources}); {@code *} when it names none, or the operation is not one
|
||||
* of the namespace. A resource whose service mints an id after its name, or as all of its ARN, is the one the
|
||||
* namespace's {@link StoredResourceArns} finds under that name or the members naming it.
|
||||
* namespace's {@link StoredResourceArns} finds under that name or the members naming it. A label of the
|
||||
* request's path is read as the namespace's {@link RequestPathLabels} reads it, where it reads one otherwise.
|
||||
*/
|
||||
private List<String> namedResources(String credentialScope, String operation, ContainerRequestContext ctx,
|
||||
String region, String accountId, String partition) {
|
||||
List<String> named = operation == null || !operation.startsWith(credentialScope + ":") ? List.of()
|
||||
: RequestResources.of(operation, ctx, partition, region, accountId, storedResourceArns(credentialScope),
|
||||
IamActionRegistry.pathLabels(credentialScope, ctx));
|
||||
if (operation == null || !operation.startsWith(credentialScope + ":")) {
|
||||
return List.of("*");
|
||||
}
|
||||
Map<String, String> labels = IamActionRegistry.pathLabels(credentialScope, ctx);
|
||||
RequestPathLabels read = requestPathLabels(credentialScope);
|
||||
Map<String, String> otherwise = read == null ? Map.of() : read.labels(ctx, labels);
|
||||
if (!otherwise.isEmpty()) {
|
||||
Map<String, String> merged = new HashMap<>(labels);
|
||||
merged.putAll(otherwise);
|
||||
labels = Map.copyOf(merged);
|
||||
}
|
||||
List<String> named = RequestResources.of(operation, ctx, partition, region, accountId,
|
||||
storedResourceArns(credentialScope), labels);
|
||||
return named.isEmpty() ? List.of("*") : named;
|
||||
}
|
||||
|
||||
/** The registered reader of the namespace's path labels; null when there is none. */
|
||||
private RequestPathLabels requestPathLabels(String namespace) {
|
||||
if (requestPathLabels == null || requestPathLabels.isUnsatisfied()) {
|
||||
return null;
|
||||
}
|
||||
for (RequestPathLabels read : requestPathLabels) {
|
||||
if (read.namespace().equals(namespace)) {
|
||||
return read;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The requests the service of {@code operation}, the one the request is dispatched as, makes to another service as
|
||||
* the caller on what the resources it is checked on hold (see {@link RequestResources#forwarded}), each resource
|
||||
@@ -751,115 +761,6 @@ public class ResourceArnBuilder {
|
||||
return stored.filter(entity -> entity.arn() != null && !entity.arn().isBlank());
|
||||
}
|
||||
|
||||
// ── S3 ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
/**
|
||||
* The path of an S3 data-plane request, {@code path} as JAX-RS matched it, with its object key
|
||||
* read from the path as the client sent it. {@code UriInfo} carries JAX-RS's collapsing of
|
||||
* consecutive slashes, which drops a key's own leading slash and so names another object:
|
||||
* {@code PUT /bucket//email.txt} stores the key {@code /email.txt} but would be checked on
|
||||
* {@code arn:aws:s3:::bucket/email.txt}, so a grant on that object would cover this one and a
|
||||
* statement naming {@code bucket//*} would match nothing it names. {@code S3Controller} stores
|
||||
* the object under the key read here and the IAM condition resolver describes that same key,
|
||||
* so all three agree on which object the request is about. The bucket comes from the matched
|
||||
* path, which {@code S3VirtualHostFilter} has put it into for a virtual-hosted request.
|
||||
*/
|
||||
private String s3Path(String path, ContainerRequestContext ctx) {
|
||||
String bucket = s3Bucket(path);
|
||||
if (bucket == null) {
|
||||
return path;
|
||||
}
|
||||
URI requestUri = ctx.getUriInfo().getRequestUri();
|
||||
RoutingContext current = currentVertxRequest == null ? null : currentVertxRequest.getCurrent();
|
||||
String sentPath = current != null && current.request() != null ? current.request().path()
|
||||
: requestUri == null ? null : requestUri.getRawPath();
|
||||
String key = S3ObjectKeys.objectKey(sentPath, requestUri == null ? null : requestUri.getPath(),
|
||||
path, bucket);
|
||||
return key == null ? path : "/" + bucket + "/" + key;
|
||||
}
|
||||
|
||||
/**
|
||||
* The bucket an S3 data-plane path names an object in, or null when the path names no object to
|
||||
* read a key for: the root, and a bucket on its own or with one trailing slash, which the ARN
|
||||
* reads as the bucket itself.
|
||||
*/
|
||||
private static String s3Bucket(String path) {
|
||||
if (path == null) {
|
||||
return null;
|
||||
}
|
||||
String stripped = path.startsWith("/") ? path.substring(1) : path;
|
||||
int slash = stripped.indexOf('/');
|
||||
return slash <= 0 || slash == stripped.length() - 1 ? null : stripped.substring(0, slash);
|
||||
}
|
||||
|
||||
// Minted in the request's partition; IamEnforcementFilter re-mints an existing bucket's ARN
|
||||
// in the bucket's own partition through S3ResourcePolicyProvider before any policy sees it.
|
||||
private String buildS3Arn(String path, String region) {
|
||||
// path: /bucket or /bucket/key
|
||||
String partition = AwsRegions.partitionFor(region);
|
||||
String stripped = path.startsWith("/") ? path.substring(1) : path;
|
||||
if (stripped.isEmpty()) {
|
||||
return S3ResourceArns.bucket(partition, "*");
|
||||
}
|
||||
// S3VirtualHostFilter rewrites a bucket-level virtual-hosted request (GET /) to
|
||||
// /bucket/, and the empty key after that separator is not part of the resource.
|
||||
// A policy names the bucket as arn:<partition>:s3:::bucket, so the trailing slash has to
|
||||
// go or a bucket-level ARN never matches. A key that itself ends in a slash
|
||||
// (a folder marker such as folder/) keeps it, because there the slash is key data.
|
||||
int firstSlash = stripped.indexOf('/');
|
||||
if (firstSlash < 0 || firstSlash == stripped.length() - 1) {
|
||||
return S3ResourceArns.bucket(partition, firstSlash < 0 ? stripped : stripped.substring(0, firstSlash));
|
||||
}
|
||||
return S3ResourceArns.object(partition, stripped.substring(0, firstSlash), stripped.substring(firstSlash + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* The resources an s3-scope request names, which an S3 Control operation reads differently
|
||||
* from an S3 data-plane path. S3 Control clients sign with the s3 scope and its operations
|
||||
* are {@code s3:} actions (the Service Authorization Reference lists them under Amazon S3),
|
||||
* so the operation, not the path, tells the two apart: a tagging route carries the ARN of the
|
||||
* bucket or access point it acts on in its path, and the request is checked against that ARN
|
||||
* as written, the way every ARN-carrying request is; the Service Authorization Reference
|
||||
* gives ListAccessPoints and the account-level Block Public Access no resource type, so
|
||||
* those are checked against the wildcard alone, as the no-resource actions of other
|
||||
* namespaces are (the KMS list operations), and a bucket-scoped statement grants them
|
||||
* nothing. Any other operation is the data plane, checked against the bucket or object its
|
||||
* path names, even in a bucket named like the S3 Control prefix, {@code v20180820}.
|
||||
*/
|
||||
private List<String> buildS3Resources(String operation, String path, ContainerRequestContext ctx,
|
||||
String region) {
|
||||
if (operation == null) {
|
||||
return List.of(buildS3Arn(s3Path(path, ctx), region));
|
||||
}
|
||||
return switch (operation) {
|
||||
case "s3:ListTagsForResource", "s3:TagResource", "s3:UntagResource" ->
|
||||
List.of(taggedS3ControlArn(path));
|
||||
case "s3:ListAccessPoints", "s3:PutAccountPublicAccessBlock",
|
||||
"s3:GetAccountPublicAccessBlock" -> List.of("*");
|
||||
default -> List.of(buildS3Arn(s3Path(path, ctx), region));
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The ARN an S3 Control tagging route names in its path, read with the one parse the handler
|
||||
* and the policy lookup share: the Go SDK, and so Terraform's provider, percent-encodes the
|
||||
* ARN's colons and slashes, so the path may still carry them. A path naming no ARN leaves
|
||||
* the wildcard, which the handler answers {@code InvalidRequest} under, and nothing is
|
||||
* rebuilt from the bucket it names: the ARN as the caller wrote it is the resource.
|
||||
*/
|
||||
private static String taggedS3ControlArn(String path) {
|
||||
String tagged = path.startsWith(S3_CONTROL_TAGS_PREFIX)
|
||||
? path.substring(S3_CONTROL_TAGS_PREFIX.length()) : null;
|
||||
if (tagged == null) {
|
||||
return "*";
|
||||
}
|
||||
try {
|
||||
return S3ControlArnUtils.parse(tagged).map(AwsArnUtils.Arn::toString).orElse("*");
|
||||
} catch (IllegalArgumentException malformedEncoding) {
|
||||
return "*";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* API Gateway authorizes a management call as its HTTP method on the path it names, in the Region serving
|
||||
* it and with no account: {@code GET /restapis/abc/stages} acts on
|
||||
|
||||
@@ -2,8 +2,6 @@ package io.floci.aws.services.s3;
|
||||
|
||||
import io.floci.aws.core.common.AwsArnUtils;
|
||||
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@@ -25,16 +23,15 @@ public final class S3ControlArnUtils {
|
||||
private S3ControlArnUtils() {}
|
||||
|
||||
/**
|
||||
* The tagging route's ARN, decoded as its handler decodes it and parsed once. Empty when the
|
||||
* value is null, blank or not an s3 ARN; {@link IllegalArgumentException} when its
|
||||
* percent-encoding is malformed.
|
||||
* The tagging route's ARN, as the router decoded its path parameter, once, the way IAM reads the route's label:
|
||||
* the Go SDK, and so Terraform's provider, sends it percent-encoded once, so a value still percent-encoded after
|
||||
* that names no ARN. Empty when the value is null, blank or not an s3 ARN.
|
||||
*/
|
||||
public static Optional<AwsArnUtils.Arn> parse(String resourceArn) {
|
||||
if (resourceArn == null || resourceArn.isBlank()) {
|
||||
return Optional.empty();
|
||||
}
|
||||
String decoded = URLDecoder.decode(resourceArn, StandardCharsets.UTF_8);
|
||||
return AwsArnUtils.isArnFor(decoded, "s3") ? Optional.of(AwsArnUtils.parse(decoded)) : Optional.empty();
|
||||
return AwsArnUtils.isArnFor(resourceArn, "s3") ? Optional.of(AwsArnUtils.parse(resourceArn)) : Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,6 @@ import org.jboss.resteasy.reactive.server.ServerExceptionMapper;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
@@ -312,21 +311,14 @@ public class S3ControlController {
|
||||
}
|
||||
|
||||
/**
|
||||
* The bucket ARN a tagging route names, decoded and parsed the one way every reader of it
|
||||
* The bucket ARN a tagging route names, decoded once and parsed the one way every reader of it
|
||||
* shares: the handler here, the IAM resource the request is checked against, and the bucket
|
||||
* policy lookup. The regional form carries the account and region of the bucket it names, and
|
||||
* the global form the caller's own account, so a request naming another account's bucket acts
|
||||
* on that account's bucket, never on the caller's same-named one.
|
||||
*/
|
||||
private static AwsArnUtils.Arn taggedBucketArn(String resourceArn) {
|
||||
Optional<AwsArnUtils.Arn> arn;
|
||||
try {
|
||||
arn = S3ControlArnUtils.parse(resourceArn);
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new AwsException("InvalidRequest",
|
||||
"Malformed percent-encoding in resource ARN: " + e.getMessage(), 400);
|
||||
}
|
||||
return arn.filter(S3ControlArnUtils::namesBucket)
|
||||
return S3ControlArnUtils.parse(resourceArn).filter(S3ControlArnUtils::namesBucket)
|
||||
.orElseThrow(() -> new AwsException("InvalidRequest",
|
||||
"Unsupported resource type. Only S3 bucket ARNs are supported " +
|
||||
"(arn:aws:s3:<region>:<account>:bucket/<name> or arn:aws:s3:::<name>).", 400)); // partition-literal: AWS's message text
|
||||
|
||||
@@ -1080,10 +1080,9 @@ public class S3Controller {
|
||||
return handleGetObjectTagging(bucket, key, versionId);
|
||||
}
|
||||
if (params.has("annotation")) {
|
||||
String annotationNameParam = params.first("annotationName");
|
||||
// An empty annotationName is not a Get request for the empty name: it falls
|
||||
// through to ListObjectAnnotations, matching the blank-name put semantics.
|
||||
if (annotationNameParam != null && !annotationNameParam.isEmpty()) {
|
||||
// A request naming an annotation is GetObjectAnnotation, as botocore's model, which requires the
|
||||
// name, reads it and IAM checks it: an empty name is refused as one, not listed.
|
||||
if (params.first("annotationName") != null) {
|
||||
s3Service.authorizeObjectRead(bucket, key, versionId, "s3:GetObjectAnnotation", authorization);
|
||||
return handleGetObjectAnnotation(bucket, key, uriInfo, httpHeaders);
|
||||
}
|
||||
@@ -1421,19 +1420,8 @@ public class S3Controller {
|
||||
}
|
||||
}
|
||||
checkVersionId(bucket, params.first("versionId"));
|
||||
// HEAD honors the annotation subresource so a HEAD probe reports the same status and
|
||||
// annotation metadata a GET would, instead of falling through to the object's headers.
|
||||
if (params.has("annotation")) {
|
||||
String annotationNameParam = params.first("annotationName");
|
||||
// An empty annotationName is not a Get request for the empty name: it falls
|
||||
// through to ListObjectAnnotations, matching the blank-name put semantics.
|
||||
if (annotationNameParam != null && !annotationNameParam.isEmpty()) {
|
||||
s3Service.authorizeObjectRead(bucket, key, versionId, "s3:GetObjectAnnotation", authorization);
|
||||
return headOnlyResponse(handleGetObjectAnnotation(bucket, key, uriInfo, httpHeaders));
|
||||
}
|
||||
s3Service.authorizeObjectRead(bucket, key, versionId, "s3:ListObjectAnnotations", authorization);
|
||||
return headOnlyResponse(handleListObjectAnnotations(bucket, key, uriInfo));
|
||||
}
|
||||
// Botocore models no HEAD of an annotation, so a HEAD is HeadObject whatever its query names, as IAM
|
||||
// checks it.
|
||||
s3Service.authorizeGetObject(bucket, key, versionId, authorization);
|
||||
|
||||
S3Object obj = s3Service.headObject(bucket, key, versionId);
|
||||
@@ -1747,12 +1735,15 @@ public class S3Controller {
|
||||
return started ? Response.accepted().build() : Response.ok().build();
|
||||
}
|
||||
|
||||
if (hasQueryParam(uriInfo, "select")) {
|
||||
s3Service.authorizeGetObject(bucket, key, versionId, authorization);
|
||||
// SelectObjectContent is POST ?select&select-type=2, as botocore routes it and IAM checks it, and its
|
||||
// request names no version, so it reads the current one.
|
||||
if (hasQueryParam(uriInfo, "select")
|
||||
&& "2".equals(ResteasyRequests.queryParameters(uriInfo).getFirst("select-type"))) {
|
||||
s3Service.authorizeGetObject(bucket, key, null, authorization);
|
||||
// The object and its metadata are opened as one snapshot, as for GetObject, and the
|
||||
// query reads it as the response is written, so the object is never held in memory.
|
||||
S3SelectService.EventStream events = s3SelectService.select(
|
||||
s3Service.openObject(bucket, key, versionId), new String(body, StandardCharsets.UTF_8));
|
||||
s3Service.openObject(bucket, key, null), new String(body, StandardCharsets.UTF_8));
|
||||
StreamingOutput entity = events::writeTo;
|
||||
return Response.ok(entity)
|
||||
.type("application/octet-stream")
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package io.floci.aws.services.s3;
|
||||
|
||||
import io.floci.aws.core.common.RequestPathLabels;
|
||||
import io.quarkus.vertx.http.runtime.CurrentVertxRequest;
|
||||
import io.vertx.ext.web.RoutingContext;
|
||||
import jakarta.enterprise.context.ApplicationScoped;
|
||||
import jakarta.inject.Inject;
|
||||
import jakarta.ws.rs.container.ContainerRequestContext;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* The key an S3 object request names, as {@link S3Controller} reads it ({@link S3ObjectKeys}): from the path as the
|
||||
* client sent it, where the key's own slashes survive, which JAX-RS collapses out of the path the route's labels are
|
||||
* read from. {@code PUT /bucket//email.txt} stores the key {@code /email.txt}, and would otherwise be checked on
|
||||
* {@code arn:aws:s3:::bucket/email.txt}, so a grant on that object would cover this one. The object stored, the
|
||||
* object the conditions describe and the object a policy is matched against are then the same one. A route naming no
|
||||
* key, as every bucket and S3 Control route, is read as the router reads it.
|
||||
*/
|
||||
@ApplicationScoped
|
||||
public class S3RequestPathLabels implements RequestPathLabels {
|
||||
|
||||
/** The current request, for its path as sent; null outside a request, where the request URI's raw path stands in. */
|
||||
private final CurrentVertxRequest currentVertxRequest;
|
||||
|
||||
@Inject
|
||||
public S3RequestPathLabels(CurrentVertxRequest currentVertxRequest) {
|
||||
this.currentVertxRequest = currentVertxRequest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String namespace() {
|
||||
return "s3";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> labels(ContainerRequestContext ctx, Map<String, String> routed) {
|
||||
String bucket = routed.get("Bucket");
|
||||
if (bucket == null || !routed.containsKey("Key") || ctx.getUriInfo() == null) {
|
||||
return Map.of();
|
||||
}
|
||||
URI requestUri = ctx.getUriInfo().getRequestUri();
|
||||
RoutingContext current = currentVertxRequest == null ? null : currentVertxRequest.getCurrent();
|
||||
String sentPath = current != null && current.request() != null ? current.request().path()
|
||||
: requestUri == null ? null : requestUri.getRawPath();
|
||||
String key = S3ObjectKeys.objectKey(sentPath, requestUri == null ? null : requestUri.getPath(),
|
||||
ctx.getUriInfo().getPath(), bucket);
|
||||
return key == null ? Map.of() : Map.of("Key", key);
|
||||
}
|
||||
}
|
||||
@@ -1153,6 +1153,23 @@
|
||||
"TestDNSAnswer",
|
||||
"UpdateIpGuardrailPolicy"
|
||||
],
|
||||
"s3": [
|
||||
"CreateJob",
|
||||
"CreateStorageLensGroup",
|
||||
"GetAccessPoint",
|
||||
"GetAccountPublicAccessBlock",
|
||||
"ListAccessGrantsInstances",
|
||||
"ListAccessPoints",
|
||||
"ListAccessPointsForObjectLambda",
|
||||
"ListAllMyBuckets",
|
||||
"ListJobs",
|
||||
"ListMultiRegionAccessPoints",
|
||||
"ListStorageLensConfigurations",
|
||||
"ListStorageLensGroups",
|
||||
"PutAccessPointPublicAccessBlock",
|
||||
"PutAccountPublicAccessBlock",
|
||||
"PutStorageLensConfiguration"
|
||||
],
|
||||
"s3tables": [
|
||||
"ListTableBuckets"
|
||||
],
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-21", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
|
||||
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dsql": ["dsql"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
|
||||
"handBuilt": ["apigateway", "bedrock", "dynamodb", "iam", "kms", "s3"],
|
||||
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dsql": ["dsql"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
|
||||
"handBuilt": ["apigateway", "bedrock", "dynamodb", "iam", "kms"],
|
||||
"notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appsync": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "aps": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup:<id>:autoScalingGroupName/<name>`, while Floci mints `autoScalingGroup:<name>`, which other services (ECS capacity providers) read back; the mint is fixed first", "aws-marketplace": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "backup": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "batch": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "cloudwatch": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeartifact": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "codedeploy": "not read yet: the Service Reference gives an on-premises instance's ARN as `instance:${InstanceName}`, while the CodeDeploy permissions reference gives arn:aws:codedeploy:region:account-id:instance/instance-ID and AWS's GetOnPremisesInstance example answers instance/<name>_<id>, an id the service mints after the name; reading it needs that format corrected", "codeguru-reviewer": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "comprehend": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticache": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticbeanstalk": "not read yet: an environment's ARN carries its application's name, `environment/<application>/<name>`, while most of its requests name it by EnvironmentName or EnvironmentId alone, so reading it needs the stored environment those find", "elasticfilesystem": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "execute-api": "REST: its requests name their resourcLine truncated
|
||||
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "ssmmessages", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"],
|
||||
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:$Line truncated
|
||||
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dsql": {"Cluster": ["aws:ResourceTag/"], "Stream": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-rLine truncated
|
||||
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:$Line truncated
|
||||
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dsql": {"Cluster": ["aws:ResourceTag/"], "Stream": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-rLine 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"]},
|
||||
@@ -4556,6 +4556,201 @@
|
||||
"route53:UpdateHostedZoneTier": {"action": "route53:UpdateHostedZoneTier", "types": ["hostedzone"], "resources": []},
|
||||
"route53:UpdateTrafficPolicyComment": {"action": "route53:UpdateTrafficPolicyComment", "types": ["trafficpolicy"], "resources": [{"type": "trafficpolicy", "fill": {"Id": "Id"}}], "located": {"Id": "{Id}"}},
|
||||
"route53:UpdateTrafficPolicyInstance": {"action": "route53:UpdateTrafficPolicyInstance", "types": ["trafficpolicyinstance"], "resources": [{"type": "trafficpolicyinstance", "fill": {"Id": "Id"}}], "located": {"Id": "{Id}"}},
|
||||
"s3:AbortMultipartUpload": {"action": "s3:AbortMultipartUpload", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:AssociateAccessGrantsIdentityCenter": {"action": "s3:AssociateAccessGrantsIdentityCenter", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:CompleteMultipartUpload": {"action": "s3:PutObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:CopyObject": {"action": "s3:PutObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:CreateAccessGrant": {"action": "s3:CreateAccessGrant", "types": ["accessgrant"], "resources": [{"type": "accessgrant", "fill": {}}]},
|
||||
"s3:CreateAccessGrantsInstance": {"action": "s3:CreateAccessGrantsInstance", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:CreateAccessGrantsLocation": {"action": "s3:CreateAccessGrantsLocation", "types": ["accessgrantslocation"], "resources": [{"type": "accessgrantslocation", "fill": {}}]},
|
||||
"s3:CreateAccessPoint": {"action": "s3:CreateAccessPoint", "types": ["accesspoint"], "resources": [{"type": "accesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:CreateAccessPointForObjectLambda": {"action": "s3:CreateAccessPointForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:CreateBucket": {"action": "s3:CreateBucket", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:CreateBucketMetadataConfiguration": {"action": "s3:CreateBucketMetadataTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:CreateBucketMetadataTableConfiguration": {"action": "s3:CreateBucketMetadataTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:CreateJob": {"action": "s3:CreateJob", "types": [], "resources": [], "makes": [{"type": "job", "fill": {}}]},
|
||||
"s3:CreateMultiRegionAccessPoint": {"action": "s3:CreateMultiRegionAccessPoint", "types": ["multiregionaccesspoint"], "resources": [{"type": "multiregionaccesspoint", "fill": {}}]},
|
||||
"s3:CreateMultipartUpload": {"action": "s3:PutObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:CreateSession": {"action": "s3:CreateSession", "types": [], "resources": []},
|
||||
"s3:CreateStorageLensGroup": {"action": "s3:CreateStorageLensGroup", "types": [], "resources": [], "makes": [{"type": "storagelensgroup", "fill": {}}]},
|
||||
"s3:DeleteAccessGrant": {"action": "s3:DeleteAccessGrant", "types": ["accessgrant"], "resources": [{"type": "accessgrant", "fill": {"Token": "AccessGrantId"}}], "located": {"AccessGrantId": "{id}"}},
|
||||
"s3:DeleteAccessGrantsInstance": {"action": "s3:DeleteAccessGrantsInstance", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:DeleteAccessGrantsInstanceResourcePolicy": {"action": "s3:DeleteAccessGrantsInstanceResourcePolicy", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:DeleteAccessGrantsLocation": {"action": "s3:DeleteAccessGrantsLocation", "types": ["accessgrantslocation"], "resources": [{"type": "accessgrantslocation", "fill": {"Token": "AccessGrantsLocationId"}}], "located": {"AccessGrantsLocationId": "{id}"}},
|
||||
"s3:DeleteAccessPoint": {"action": "s3:DeleteAccessPoint", "types": ["accesspoint"], "resources": [{"type": "accesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:DeleteAccessPointForObjectLambda": {"action": "s3:DeleteAccessPointForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:DeleteAccessPointPolicy": {"action": "s3:DeleteAccessPointPolicy", "types": ["accesspoint"], "resources": [{"type": "accesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:DeleteAccessPointPolicyForObjectLambda": {"action": "s3:DeleteAccessPointPolicyForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:DeleteAccessPointScope": {"action": "s3:DeleteAccessPointScope", "types": [], "resources": []},
|
||||
"s3:DeleteBucket": {"action": "s3:DeleteBucket", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:DeleteBucketAnalyticsConfiguration": {"action": "s3:PutAnalyticsConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketCors": {"action": "s3:PutBucketCORS", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketEncryption": {"action": "s3:PutEncryptionConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketIntelligentTieringConfiguration": {"action": "s3:PutIntelligentTieringConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketInventoryConfiguration": {"action": "s3:PutInventoryConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketLifecycle": {"action": "s3:PutLifecycleConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketLifecycleConfiguration": {"action": "s3:DeleteBucketLifecycleConfiguration", "types": [], "resources": []},
|
||||
"s3:DeleteBucketMetadataConfiguration": {"action": "s3:DeleteBucketMetadataTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketMetadataTableConfiguration": {"action": "s3:DeleteBucketMetadataTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketMetricsConfiguration": {"action": "s3:PutMetricsConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketOwnershipControls": {"action": "s3:PutBucketOwnershipControls", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteBucketPolicy": {"action": "s3:DeleteBucketPolicy", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:DeleteBucketReplication": {"action": "s3:PutReplicationConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:DeleteBucketTagging": {"action": "s3:PutBucketTagging", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:DeleteBucketWebsite": {"action": "s3:DeleteBucketWebsite", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteJobTagging": {"action": "s3:DeleteJobTagging", "types": ["job"], "resources": [{"type": "job", "fill": {"JobId": "JobId"}}], "located": {"JobId": "{id}"}},
|
||||
"s3:DeleteMultiRegionAccessPoint": {"action": "s3:DeleteMultiRegionAccessPoint", "types": ["multiregionaccesspoint"], "resources": []},
|
||||
"s3:DeleteObject": {"action": "s3:DeleteObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:DeleteObjectAnnotation": {"action": "s3:DeleteObjectAnnotation", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:DeleteObjectTagging": {"action": "s3:DeleteObjectTagging", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:DeleteObjects": {"action": "s3:DeleteObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket"}}], "unread": ["Delete.Objects[].Key"], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeletePublicAccessBlock": {"action": "s3:PutBucketPublicAccessBlock", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}, "endpoint": "s3"}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:DeleteStorageLensConfiguration": {"action": "s3:DeleteStorageLensConfiguration", "types": ["storagelensconfiguration"], "resources": []},
|
||||
"s3:DeleteStorageLensConfigurationTagging": {"action": "s3:DeleteStorageLensConfigurationTagging", "types": ["storagelensconfiguration"], "resources": []},
|
||||
"s3:DeleteStorageLensGroup": {"action": "s3:DeleteStorageLensGroup", "types": ["storagelensgroup"], "resources": [{"type": "storagelensgroup", "fill": {"Name": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:DescribeJob": {"action": "s3:DescribeJob", "types": ["job"], "resources": [{"type": "job", "fill": {"JobId": "JobId"}}], "located": {"JobId": "{id}"}},
|
||||
"s3:DescribeMultiRegionAccessPointOperation": {"action": "s3:DescribeMultiRegionAccessPointOperation", "types": ["multiregionaccesspointrequestarn"], "resources": [{"types": ["multiregionaccesspointrequestarn"], "arn": "RequestTokenARN"}], "located": {"RequestTokenARN": "{request_token}"}},
|
||||
"s3:DissociateAccessGrantsIdentityCenter": {"action": "s3:DissociateAccessGrantsIdentityCenter", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:GetAccessGrant": {"action": "s3:GetAccessGrant", "types": ["accessgrant"], "resources": [{"type": "accessgrant", "fill": {"Token": "AccessGrantId"}}], "located": {"AccessGrantId": "{id}"}},
|
||||
"s3:GetAccessGrantsInstance": {"action": "s3:GetAccessGrantsInstance", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:GetAccessGrantsInstanceForPrefix": {"action": "s3:GetAccessGrantsInstanceForPrefix", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:GetAccessGrantsInstanceResourcePolicy": {"action": "s3:GetAccessGrantsInstanceResourcePolicy", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:GetAccessGrantsLocation": {"action": "s3:GetAccessGrantsLocation", "types": ["accessgrantslocation"], "resources": [{"type": "accessgrantslocation", "fill": {"Token": "AccessGrantsLocationId"}}], "located": {"AccessGrantsLocationId": "{id}"}},
|
||||
"s3:GetAccessPoint": {"action": "s3:GetAccessPoint", "types": [], "resources": []},
|
||||
"s3:GetAccessPointConfigurationForObjectLambda": {"action": "s3:GetAccessPointConfigurationForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetAccessPointForObjectLambda": {"action": "s3:GetAccessPointForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetAccessPointPolicy": {"action": "s3:GetAccessPointPolicy", "types": ["accesspoint"], "resources": [{"type": "accesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetAccessPointPolicyForObjectLambda": {"action": "s3:GetAccessPointPolicyForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetAccessPointPolicyStatus": {"action": "s3:GetAccessPointPolicyStatus", "types": ["accesspoint"], "resources": [{"type": "accesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetAccessPointPolicyStatusForObjectLambda": {"action": "s3:GetAccessPointPolicyStatusForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetAccessPointScope": {"action": "s3:GetAccessPointScope", "types": [], "resources": []},
|
||||
"s3:GetBucket": {"action": "s3:GetBucket", "types": [], "resources": []},
|
||||
"s3:GetBucketAbac": {"action": "s3:GetBucketAbac", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketAccelerateConfiguration": {"action": "s3:GetAccelerateConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketAcl": {"action": "s3:GetBucketAcl", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketAnalyticsConfiguration": {"action": "s3:GetAnalyticsConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketCors": {"action": "s3:GetBucketCORS", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketEncryption": {"action": "s3:GetEncryptionConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketIntelligentTieringConfiguration": {"action": "s3:GetIntelligentTieringConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketInventoryConfiguration": {"action": "s3:GetInventoryConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketLifecycle": {"action": "s3:GetLifecycleConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketLifecycleConfiguration": {"action": "s3:GetLifecycleConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:GetBucketLocation": {"action": "s3:GetBucketLocation", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketLogging": {"action": "s3:GetBucketLogging", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketMetadataConfiguration": {"action": "s3:GetBucketMetadataTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketMetadataTableConfiguration": {"action": "s3:GetBucketMetadataTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketMetricsConfiguration": {"action": "s3:GetMetricsConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketNotification": {"action": "s3:GetBucketNotification", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketNotificationConfiguration": {"action": "s3:GetBucketNotification", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketOwnershipControls": {"action": "s3:GetBucketOwnershipControls", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketPolicy": {"action": "s3:GetBucketPolicy", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:GetBucketPolicyStatus": {"action": "s3:GetBucketPolicyStatus", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketReplication": {"action": "s3:GetReplicationConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:GetBucketRequestPayment": {"action": "s3:GetBucketRequestPayment", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetBucketTagging": {"action": "s3:GetBucketTagging", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:GetBucketVersioning": {"action": "s3:GetBucketVersioning", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:GetBucketWebsite": {"action": "s3:GetBucketWebsite", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetDataAccess": {"action": "s3:GetDataAccess", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:GetJobTagging": {"action": "s3:GetJobTagging", "types": ["job"], "resources": [{"type": "job", "fill": {"JobId": "JobId"}}], "located": {"JobId": "{id}"}},
|
||||
"s3:GetMultiRegionAccessPoint": {"action": "s3:GetMultiRegionAccessPoint", "types": ["multiregionaccesspoint"], "resources": [{"type": "multiregionaccesspoint", "fill": {"AccessPointAlias": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetMultiRegionAccessPointPolicy": {"action": "s3:GetMultiRegionAccessPointPolicy", "types": ["multiregionaccesspoint"], "resources": [{"type": "multiregionaccesspoint", "fill": {"AccessPointAlias": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetMultiRegionAccessPointPolicyStatus": {"action": "s3:GetMultiRegionAccessPointPolicyStatus", "types": ["multiregionaccesspoint"], "resources": [{"type": "multiregionaccesspoint", "fill": {"AccessPointAlias": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:GetMultiRegionAccessPointRoutes": {"action": "s3:GetMultiRegionAccessPointRoutes", "types": ["multiregionaccesspoint"], "resources": [{"type": "multiregionaccesspoint", "fill": {"AccessPointAlias": "Mrap"}}], "located": {"Mrap": "{mrap}"}},
|
||||
"s3:GetObject": {"action": "s3:GetObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:GetObjectAcl": {"action": "s3:GetObjectAcl", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:GetObjectAnnotation": {"action": "s3:GetObjectAnnotation", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:GetObjectAttributes": {"action": "s3:GetObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:GetObjectLegalHold": {"action": "s3:GetObjectLegalHold", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:GetObjectLockConfiguration": {"action": "s3:GetBucketObjectLockConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetObjectRetention": {"action": "s3:GetObjectRetention", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:GetObjectTagging": {"action": "s3:GetObjectTagging", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:GetObjectTorrent": {"action": "s3:GetObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:GetPublicAccessBlock": {"action": "s3:GetBucketPublicAccessBlock", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}, "endpoint": "s3"}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:GetStorageLensConfiguration": {"action": "s3:GetStorageLensConfiguration", "types": ["storagelensconfiguration"], "resources": []},
|
||||
"s3:GetStorageLensConfigurationTagging": {"action": "s3:GetStorageLensConfigurationTagging", "types": ["storagelensconfiguration"], "resources": []},
|
||||
"s3:GetStorageLensGroup": {"action": "s3:GetStorageLensGroup", "types": ["storagelensgroup"], "resources": [{"type": "storagelensgroup", "fill": {"Name": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:HeadBucket": {"action": "s3:ListBucket", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:HeadObject": {"action": "s3:GetObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:ListAccessGrants": {"action": "s3:ListAccessGrants", "types": ["accessgrantsinstance"], "resources": [{"types": ["accessgrantsinstance"], "arn": "ApplicationArn"}, {"type": "accessgrantsinstance", "fill": {}}], "located": {"ApplicationArn": "?application_arn"}},
|
||||
"s3:ListAccessGrantsInstances": {"action": "s3:ListAccessGrantsInstances", "types": [], "resources": []},
|
||||
"s3:ListAccessGrantsLocations": {"action": "s3:ListAccessGrantsLocations", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:ListAccessPoints": {"action": "s3:ListAccessPoints", "types": [], "resources": []},
|
||||
"s3:ListAccessPointsForDirectoryBuckets": {"action": "s3:ListAccessPointsForDirectoryBuckets", "types": [], "resources": []},
|
||||
"s3:ListAccessPointsForObjectLambda": {"action": "s3:ListAccessPointsForObjectLambda", "types": [], "resources": []},
|
||||
"s3:ListBucketAnalyticsConfigurations": {"action": "s3:GetAnalyticsConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:ListBucketIntelligentTieringConfigurations": {"action": "s3:GetIntelligentTieringConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:ListBucketInventoryConfigurations": {"action": "s3:GetInventoryConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:ListBucketMetricsConfigurations": {"action": "s3:GetMetricsConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:ListBuckets": {"action": "s3:ListAllMyBuckets", "types": [], "resources": []},
|
||||
"s3:ListCallerAccessGrants": {"action": "s3:ListCallerAccessGrants", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:ListDirectoryBuckets": {"action": "s3:ListDirectoryBuckets", "types": [], "resources": []},
|
||||
"s3:ListJobs": {"action": "s3:ListJobs", "types": [], "resources": []},
|
||||
"s3:ListMultiRegionAccessPoints": {"action": "s3:ListMultiRegionAccessPoints", "types": [], "resources": []},
|
||||
"s3:ListMultipartUploads": {"action": "s3:ListBucketMultipartUploads", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:ListObjectAnnotations": {"action": "s3:ListObjectAnnotations", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:ListObjectVersions": {"action": "s3:ListBucketVersions", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:ListObjects": {"action": "s3:ListBucket", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:ListObjectsV2": {"action": "s3:ListBucket", "types": ["accesspoint", "bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:ListParts": {"action": "s3:ListMultipartUploadParts", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:ListRegionalBuckets": {"action": "s3:ListRegionalBuckets", "types": [], "resources": []},
|
||||
"s3:ListStorageLensConfigurations": {"action": "s3:ListStorageLensConfigurations", "types": [], "resources": []},
|
||||
"s3:ListStorageLensGroups": {"action": "s3:ListStorageLensGroups", "types": [], "resources": []},
|
||||
"s3:ListTagsForResource": {"action": "s3:ListTagsForResource", "types": ["accessgrant", "accessgrantsinstance", "accessgrantslocation", "accesspoint", "bucket", "storagelensgroup"], "resources": [{"types": ["accessgrant", "accessgrantsinstance", "accessgrantslocation", "accesspoint", "bucket", "storagelensgroup"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{resourceArn}"}},
|
||||
"s3:PutAccessGrantsInstanceResourcePolicy": {"action": "s3:PutAccessGrantsInstanceResourcePolicy", "types": ["accessgrantsinstance"], "resources": [{"type": "accessgrantsinstance", "fill": {}}]},
|
||||
"s3:PutAccessPointConfigurationForObjectLambda": {"action": "s3:PutAccessPointConfigurationForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:PutAccessPointPolicy": {"action": "s3:PutAccessPointPolicy", "types": ["accesspoint"], "resources": [{"type": "accesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:PutAccessPointPolicyForObjectLambda": {"action": "s3:PutAccessPointPolicyForObjectLambda", "types": ["objectlambdaaccesspoint"], "resources": [{"type": "objectlambdaaccesspoint", "fill": {"AccessPointName": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:PutAccessPointScope": {"action": "s3:PutAccessPointScope", "types": [], "resources": []},
|
||||
"s3:PutBucketAbac": {"action": "s3:PutBucketAbac", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketAccelerateConfiguration": {"action": "s3:PutAccelerateConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketAcl": {"action": "s3:PutBucketAcl", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketAnalyticsConfiguration": {"action": "s3:PutAnalyticsConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketCors": {"action": "s3:PutBucketCORS", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketEncryption": {"action": "s3:PutEncryptionConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketIntelligentTieringConfiguration": {"action": "s3:PutIntelligentTieringConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketInventoryConfiguration": {"action": "s3:PutInventoryConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketLifecycle": {"action": "s3:PutLifecycleConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketLifecycleConfiguration": {"action": "s3:PutLifecycleConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:PutBucketLogging": {"action": "s3:PutBucketLogging", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketMetricsConfiguration": {"action": "s3:PutMetricsConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketNotification": {"action": "s3:PutBucketNotification", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketNotificationConfiguration": {"action": "s3:PutBucketNotification", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketOwnershipControls": {"action": "s3:PutBucketOwnershipControls", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketPolicy": {"action": "s3:PutBucketPolicy", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:PutBucketReplication": {"action": "s3:PutReplicationConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:PutBucketRequestPayment": {"action": "s3:PutBucketRequestPayment", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutBucketTagging": {"action": "s3:PutBucketTagging", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:PutBucketVersioning": {"action": "s3:PutBucketVersioning", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "locatedApart": {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}},
|
||||
"s3:PutBucketWebsite": {"action": "s3:PutBucketWebsite", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutJobTagging": {"action": "s3:PutJobTagging", "types": ["job"], "resources": [{"type": "job", "fill": {"JobId": "JobId"}}], "located": {"JobId": "{id}"}},
|
||||
"s3:PutMultiRegionAccessPointPolicy": {"action": "s3:PutMultiRegionAccessPointPolicy", "types": ["multiregionaccesspoint"], "resources": []},
|
||||
"s3:PutObject": {"action": "s3:PutObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:PutObjectAcl": {"action": "s3:PutObjectAcl", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:PutObjectAnnotation": {"action": "s3:PutObjectAnnotation", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:PutObjectLegalHold": {"action": "s3:PutObjectLegalHold", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:PutObjectLockConfiguration": {"action": "s3:PutBucketObjectLockConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutObjectRetention": {"action": "s3:PutObjectRetention", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:PutObjectTagging": {"action": "s3:PutObjectTagging", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:PutPublicAccessBlock": {"action": "s3:PutBucketPublicAccessBlock", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}, "endpoint": "s3"}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:PutStorageLensConfiguration": {"action": "s3:PutStorageLensConfiguration", "types": [], "resources": [], "makes": [{"type": "storagelensconfiguration", "fill": {}}]},
|
||||
"s3:PutStorageLensConfigurationTagging": {"action": "s3:PutStorageLensConfigurationTagging", "types": ["storagelensconfiguration"], "resources": []},
|
||||
"s3:RenameObject": {"action": "s3:RenameObject", "types": [], "resources": []},
|
||||
"s3:RestoreObject": {"action": "s3:RestoreObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:SelectObjectContent": {"action": "s3:GetObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:SubmitMultiRegionAccessPointRoutes": {"action": "s3:SubmitMultiRegionAccessPointRoutes", "types": ["multiregionaccesspoint"], "resources": [{"type": "multiregionaccesspoint", "fill": {"AccessPointAlias": "Mrap"}}], "located": {"Mrap": "{mrap}"}},
|
||||
"s3:TagResource": {"action": "s3:TagResource", "types": ["accessgrant", "accessgrantsinstance", "accessgrantslocation", "accesspoint", "bucket", "storagelensgroup"], "resources": [{"types": ["accessgrant", "accessgrantsinstance", "accessgrantslocation", "accesspoint", "bucket", "storagelensgroup"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{resourceArn}"}},
|
||||
"s3:UntagResource": {"action": "s3:UntagResource", "types": ["accessgrant", "accessgrantsinstance", "accessgrantslocation", "accesspoint", "bucket", "storagelensgroup"], "resources": [{"types": ["accessgrant", "accessgrantsinstance", "accessgrantslocation", "accesspoint", "bucket", "storagelensgroup"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{resourceArn}"}},
|
||||
"s3:UpdateAccessGrantsLocation": {"action": "s3:UpdateAccessGrantsLocation", "types": ["accessgrantslocation"], "resources": [{"type": "accessgrantslocation", "fill": {"Token": "AccessGrantsLocationId"}}], "located": {"AccessGrantsLocationId": "{id}"}},
|
||||
"s3:UpdateBucketMetadataAnnotationTableConfiguration": {"action": "s3:UpdateBucketMetadataAnnotationTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:UpdateBucketMetadataInventoryTableConfiguration": {"action": "s3:UpdateBucketMetadataInventoryTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:UpdateBucketMetadataJournalTableConfiguration": {"action": "s3:UpdateBucketMetadataJournalTableConfiguration", "types": ["bucket"], "resources": [{"type": "bucket", "fill": {"BucketName": "Bucket"}}], "located": {"Bucket": "{Bucket}"}},
|
||||
"s3:UpdateJobPriority": {"action": "s3:UpdateJobPriority", "types": ["job"], "resources": [{"type": "job", "fill": {"JobId": "JobId"}}], "located": {"JobId": "{id}"}},
|
||||
"s3:UpdateJobStatus": {"action": "s3:UpdateJobStatus", "types": ["job"], "resources": [{"type": "job", "fill": {"JobId": "JobId"}}], "located": {"JobId": "{id}"}},
|
||||
"s3:UpdateObjectEncryption": {"action": "s3:UpdateObjectEncryption", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:UpdateStorageLensGroup": {"action": "s3:UpdateStorageLensGroup", "types": ["storagelensgroup"], "resources": [{"type": "storagelensgroup", "fill": {"Name": "Name"}}], "located": {"Name": "{name}"}},
|
||||
"s3:UploadPart": {"action": "s3:PutObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:UploadPartCopy": {"action": "s3:PutObject", "types": ["accesspointobject", "object"], "resources": [{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}], "located": {"Bucket": "{Bucket}", "Key": "{Key}"}},
|
||||
"s3:WriteGetObjectResponse": {"action": "s3:WriteGetObjectResponse", "types": [], "resources": []},
|
||||
"s3tables:CompleteTableMigration": {"action": "s3tables:CompleteTableMigration", "types": ["Table"], "resources": []},
|
||||
"s3tables:CreateNamespace": {"action": "s3tables:CreateNamespace", "types": ["TableBucket"], "resources": [{"types": ["TableBucket"], "arn": "tableBucketARN"}], "located": {"tableBucketARN": "{tableBucketARN}"}},
|
||||
"s3tables:CreateTable": {"action": "s3tables:CreateTable", "types": ["TableBucket"], "resources": [{"types": ["TableBucket"], "arn": "tableBucketARN"}], "creates": [{"type": "Table", "parent": "TableBucket", "arn": "tableBucketARN"}], "located": {"tableBucketARN": "{tableBucketARN}"}},
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"_source": {"generator": "tools/aws/regen_rest_routes.py", "botocore": "botocore 1.43.118 (installed package)"},
|
||||
"handRouted": {
|
||||
"s3": "S3 tells apart the operations it serves on one route by their query parameters and headers, which the registry's S3 rules and sub-resource overrides read, and an S3 Control route Floci does not serve runs as the S3 data plane, checked as the bucket or object operation that runs"
|
||||
},
|
||||
"models": {
|
||||
"accessanalyzer": {
|
||||
@@ -1972,49 +1971,49 @@
|
||||
"accessDeniedStatus": 403,
|
||||
"signedElsewhere": {"ListDirectoryBuckets": "s3express", "WriteGetObjectResponse": "s3-object-lambda"},
|
||||
"operations": {
|
||||
"AbortMultipartUpload": {"method": "DELETE", "requestUri": "/{Bucket}/{Key+}", "required": {"query": ["uploadId"]}, "requires": {"query": ["uploadId"]}},
|
||||
"CompleteMultipartUpload": {"method": "POST", "requestUri": "/{Bucket}/{Key+}", "required": {"query": ["uploadId"]}},
|
||||
"CopyObject": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}", "required": {"headers": ["x-amz-copy-source"]}, "requires": {"headers": ["x-amz-copy-source"]}},
|
||||
"AbortMultipartUpload": {"method": "DELETE", "requestUri": "/{Bucket}/{Key+}", "requires": {"query": ["uploadId"]}},
|
||||
"CompleteMultipartUpload": {"method": "POST", "requestUri": "/{Bucket}/{Key+}"},
|
||||
"CopyObject": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}", "requires": {"headers": ["x-amz-copy-source"]}},
|
||||
"CreateBucket": {"method": "PUT", "requestUri": "/{Bucket}"},
|
||||
"CreateBucketMetadataConfiguration": {"method": "POST", "requestUri": "/{Bucket}?metadataConfiguration"},
|
||||
"CreateBucketMetadataTableConfiguration": {"method": "POST", "requestUri": "/{Bucket}?metadataTable"},
|
||||
"CreateMultipartUpload": {"method": "POST", "requestUri": "/{Bucket}/{Key+}?uploads"},
|
||||
"CreateSession": {"method": "GET", "requestUri": "/{Bucket}?session"},
|
||||
"DeleteBucket": {"method": "DELETE", "requestUri": "/{Bucket}"},
|
||||
"DeleteBucketAnalyticsConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?analytics", "required": {"query": ["id"]}},
|
||||
"DeleteBucketAnalyticsConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?analytics"},
|
||||
"DeleteBucketCors": {"method": "DELETE", "requestUri": "/{Bucket}?cors"},
|
||||
"DeleteBucketEncryption": {"method": "DELETE", "requestUri": "/{Bucket}?encryption"},
|
||||
"DeleteBucketIntelligentTieringConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?intelligent-tiering", "required": {"query": ["id"]}},
|
||||
"DeleteBucketInventoryConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?inventory", "required": {"query": ["id"]}},
|
||||
"DeleteBucketIntelligentTieringConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?intelligent-tiering"},
|
||||
"DeleteBucketInventoryConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?inventory"},
|
||||
"DeleteBucketLifecycle": {"method": "DELETE", "requestUri": "/{Bucket}?lifecycle"},
|
||||
"DeleteBucketMetadataConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?metadataConfiguration"},
|
||||
"DeleteBucketMetadataTableConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?metadataTable"},
|
||||
"DeleteBucketMetricsConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?metrics", "required": {"query": ["id"]}},
|
||||
"DeleteBucketMetricsConfiguration": {"method": "DELETE", "requestUri": "/{Bucket}?metrics"},
|
||||
"DeleteBucketOwnershipControls": {"method": "DELETE", "requestUri": "/{Bucket}?ownershipControls"},
|
||||
"DeleteBucketPolicy": {"method": "DELETE", "requestUri": "/{Bucket}?policy"},
|
||||
"DeleteBucketReplication": {"method": "DELETE", "requestUri": "/{Bucket}?replication"},
|
||||
"DeleteBucketTagging": {"method": "DELETE", "requestUri": "/{Bucket}?tagging"},
|
||||
"DeleteBucketWebsite": {"method": "DELETE", "requestUri": "/{Bucket}?website"},
|
||||
"DeleteObject": {"method": "DELETE", "requestUri": "/{Bucket}/{Key+}"},
|
||||
"DeleteObjectAnnotation": {"method": "DELETE", "requestUri": "/{Bucket}/{Key+}?annotation", "required": {"query": ["annotationName"]}},
|
||||
"DeleteObjectAnnotation": {"method": "DELETE", "requestUri": "/{Bucket}/{Key+}?annotation"},
|
||||
"DeleteObjectTagging": {"method": "DELETE", "requestUri": "/{Bucket}/{Key+}?tagging"},
|
||||
"DeleteObjects": {"method": "POST", "requestUri": "/{Bucket}?delete"},
|
||||
"DeletePublicAccessBlock": {"method": "DELETE", "requestUri": "/{Bucket}?publicAccessBlock"},
|
||||
"GetBucketAbac": {"method": "GET", "requestUri": "/{Bucket}?abac"},
|
||||
"GetBucketAccelerateConfiguration": {"method": "GET", "requestUri": "/{Bucket}?accelerate"},
|
||||
"GetBucketAcl": {"method": "GET", "requestUri": "/{Bucket}?acl"},
|
||||
"GetBucketAnalyticsConfiguration": {"method": "GET", "requestUri": "/{Bucket}?analytics", "required": {"query": ["id"]}, "requires": {"query": ["id"]}},
|
||||
"GetBucketAnalyticsConfiguration": {"method": "GET", "requestUri": "/{Bucket}?analytics", "requires": {"query": ["id"]}},
|
||||
"GetBucketCors": {"method": "GET", "requestUri": "/{Bucket}?cors"},
|
||||
"GetBucketEncryption": {"method": "GET", "requestUri": "/{Bucket}?encryption"},
|
||||
"GetBucketIntelligentTieringConfiguration": {"method": "GET", "requestUri": "/{Bucket}?intelligent-tiering", "required": {"query": ["id"]}, "requires": {"query": ["id"]}},
|
||||
"GetBucketInventoryConfiguration": {"method": "GET", "requestUri": "/{Bucket}?inventory", "required": {"query": ["id"]}, "requires": {"query": ["id"]}},
|
||||
"GetBucketIntelligentTieringConfiguration": {"method": "GET", "requestUri": "/{Bucket}?intelligent-tiering", "requires": {"query": ["id"]}},
|
||||
"GetBucketInventoryConfiguration": {"method": "GET", "requestUri": "/{Bucket}?inventory", "requires": {"query": ["id"]}},
|
||||
"GetBucketLifecycle": {"method": "GET", "requestUri": "/{Bucket}?lifecycle", "deprecated": true},
|
||||
"GetBucketLifecycleConfiguration": {"method": "GET", "requestUri": "/{Bucket}?lifecycle"},
|
||||
"GetBucketLocation": {"method": "GET", "requestUri": "/{Bucket}?location"},
|
||||
"GetBucketLogging": {"method": "GET", "requestUri": "/{Bucket}?logging"},
|
||||
"GetBucketMetadataConfiguration": {"method": "GET", "requestUri": "/{Bucket}?metadataConfiguration"},
|
||||
"GetBucketMetadataTableConfiguration": {"method": "GET", "requestUri": "/{Bucket}?metadataTable"},
|
||||
"GetBucketMetricsConfiguration": {"method": "GET", "requestUri": "/{Bucket}?metrics", "required": {"query": ["id"]}, "requires": {"query": ["id"]}},
|
||||
"GetBucketMetricsConfiguration": {"method": "GET", "requestUri": "/{Bucket}?metrics", "requires": {"query": ["id"]}},
|
||||
"GetBucketNotification": {"method": "GET", "requestUri": "/{Bucket}?notification", "deprecated": true},
|
||||
"GetBucketNotificationConfiguration": {"method": "GET", "requestUri": "/{Bucket}?notification"},
|
||||
"GetBucketOwnershipControls": {"method": "GET", "requestUri": "/{Bucket}?ownershipControls"},
|
||||
@@ -2027,8 +2026,8 @@
|
||||
"GetBucketWebsite": {"method": "GET", "requestUri": "/{Bucket}?website"},
|
||||
"GetObject": {"method": "GET", "requestUri": "/{Bucket}/{Key+}"},
|
||||
"GetObjectAcl": {"method": "GET", "requestUri": "/{Bucket}/{Key+}?acl"},
|
||||
"GetObjectAnnotation": {"method": "GET", "requestUri": "/{Bucket}/{Key+}?annotation", "required": {"query": ["annotationName"]}, "requires": {"query": ["annotationName"]}},
|
||||
"GetObjectAttributes": {"method": "GET", "requestUri": "/{Bucket}/{Key+}?attributes", "required": {"headers": ["x-amz-object-attributes"]}},
|
||||
"GetObjectAnnotation": {"method": "GET", "requestUri": "/{Bucket}/{Key+}?annotation", "requires": {"query": ["annotationName"]}},
|
||||
"GetObjectAttributes": {"method": "GET", "requestUri": "/{Bucket}/{Key+}?attributes"},
|
||||
"GetObjectLegalHold": {"method": "GET", "requestUri": "/{Bucket}/{Key+}?legal-hold"},
|
||||
"GetObjectLockConfiguration": {"method": "GET", "requestUri": "/{Bucket}?object-lock"},
|
||||
"GetObjectRetention": {"method": "GET", "requestUri": "/{Bucket}/{Key+}?retention"},
|
||||
@@ -2047,19 +2046,19 @@
|
||||
"ListObjectVersions": {"method": "GET", "requestUri": "/{Bucket}?versions"},
|
||||
"ListObjects": {"method": "GET", "requestUri": "/{Bucket}"},
|
||||
"ListObjectsV2": {"method": "GET", "requestUri": "/{Bucket}?list-type=2"},
|
||||
"ListParts": {"method": "GET", "requestUri": "/{Bucket}/{Key+}", "required": {"query": ["uploadId"]}, "requires": {"query": ["uploadId"]}},
|
||||
"ListParts": {"method": "GET", "requestUri": "/{Bucket}/{Key+}", "requires": {"query": ["uploadId"]}},
|
||||
"PutBucketAbac": {"method": "PUT", "requestUri": "/{Bucket}?abac"},
|
||||
"PutBucketAccelerateConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?accelerate"},
|
||||
"PutBucketAcl": {"method": "PUT", "requestUri": "/{Bucket}?acl"},
|
||||
"PutBucketAnalyticsConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?analytics", "required": {"query": ["id"]}},
|
||||
"PutBucketAnalyticsConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?analytics"},
|
||||
"PutBucketCors": {"method": "PUT", "requestUri": "/{Bucket}?cors"},
|
||||
"PutBucketEncryption": {"method": "PUT", "requestUri": "/{Bucket}?encryption"},
|
||||
"PutBucketIntelligentTieringConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?intelligent-tiering", "required": {"query": ["id"]}},
|
||||
"PutBucketInventoryConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?inventory", "required": {"query": ["id"]}},
|
||||
"PutBucketIntelligentTieringConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?intelligent-tiering"},
|
||||
"PutBucketInventoryConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?inventory"},
|
||||
"PutBucketLifecycle": {"method": "PUT", "requestUri": "/{Bucket}?lifecycle", "deprecated": true},
|
||||
"PutBucketLifecycleConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?lifecycle"},
|
||||
"PutBucketLogging": {"method": "PUT", "requestUri": "/{Bucket}?logging"},
|
||||
"PutBucketMetricsConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?metrics", "required": {"query": ["id"]}},
|
||||
"PutBucketMetricsConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?metrics"},
|
||||
"PutBucketNotification": {"method": "PUT", "requestUri": "/{Bucket}?notification", "deprecated": true},
|
||||
"PutBucketNotificationConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?notification"},
|
||||
"PutBucketOwnershipControls": {"method": "PUT", "requestUri": "/{Bucket}?ownershipControls"},
|
||||
@@ -2071,124 +2070,124 @@
|
||||
"PutBucketWebsite": {"method": "PUT", "requestUri": "/{Bucket}?website"},
|
||||
"PutObject": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}"},
|
||||
"PutObjectAcl": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?acl"},
|
||||
"PutObjectAnnotation": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?annotation", "required": {"query": ["annotationName"]}},
|
||||
"PutObjectAnnotation": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?annotation"},
|
||||
"PutObjectLegalHold": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?legal-hold"},
|
||||
"PutObjectLockConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?object-lock"},
|
||||
"PutObjectRetention": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?retention"},
|
||||
"PutObjectTagging": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?tagging"},
|
||||
"PutPublicAccessBlock": {"method": "PUT", "requestUri": "/{Bucket}?publicAccessBlock"},
|
||||
"RenameObject": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?renameObject", "required": {"headers": ["x-amz-rename-source"]}},
|
||||
"RenameObject": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?renameObject"},
|
||||
"RestoreObject": {"method": "POST", "requestUri": "/{Bucket}/{Key+}?restore"},
|
||||
"SelectObjectContent": {"method": "POST", "requestUri": "/{Bucket}/{Key+}?select&select-type=2"},
|
||||
"UpdateBucketMetadataAnnotationTableConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?metadataAnnotationTable"},
|
||||
"UpdateBucketMetadataInventoryTableConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?metadataInventoryTable"},
|
||||
"UpdateBucketMetadataJournalTableConfiguration": {"method": "PUT", "requestUri": "/{Bucket}?metadataJournalTable"},
|
||||
"UpdateObjectEncryption": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}?encryption"},
|
||||
"UploadPart": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}", "required": {"query": ["partNumber", "uploadId"]}, "requires": {"query": ["partNumber", "uploadId"]}},
|
||||
"UploadPartCopy": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}", "required": {"query": ["partNumber", "uploadId"], "headers": ["x-amz-copy-source"]}, "requires": {"query": ["partNumber", "uploadId"], "headers": ["x-amz-copy-source"]}}
|
||||
"UploadPart": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}", "requires": {"query": ["partNumber", "uploadId"]}},
|
||||
"UploadPartCopy": {"method": "PUT", "requestUri": "/{Bucket}/{Key+}", "requires": {"query": ["partNumber", "uploadId"], "headers": ["x-amz-copy-source"]}}
|
||||
}
|
||||
},
|
||||
"s3control": {
|
||||
"credentialScope": "s3",
|
||||
"apiVersion": "2018-08-20",
|
||||
"operations": {
|
||||
"AssociateAccessGrantsIdentityCenter": {"method": "POST", "requestUri": "/v20180820/accessgrantsinstance/identitycenter", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"CreateAccessGrant": {"method": "POST", "requestUri": "/v20180820/accessgrantsinstance/grant", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"CreateAccessGrantsInstance": {"method": "POST", "requestUri": "/v20180820/accessgrantsinstance", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"CreateAccessGrantsLocation": {"method": "POST", "requestUri": "/v20180820/accessgrantsinstance/location", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"CreateAccessPoint": {"method": "PUT", "requestUri": "/v20180820/accesspoint/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"CreateAccessPointForObjectLambda": {"method": "PUT", "requestUri": "/v20180820/accesspointforobjectlambda/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"AssociateAccessGrantsIdentityCenter": {"method": "POST", "requestUri": "/v20180820/accessgrantsinstance/identitycenter"},
|
||||
"CreateAccessGrant": {"method": "POST", "requestUri": "/v20180820/accessgrantsinstance/grant"},
|
||||
"CreateAccessGrantsInstance": {"method": "POST", "requestUri": "/v20180820/accessgrantsinstance"},
|
||||
"CreateAccessGrantsLocation": {"method": "POST", "requestUri": "/v20180820/accessgrantsinstance/location"},
|
||||
"CreateAccessPoint": {"method": "PUT", "requestUri": "/v20180820/accesspoint/{name}"},
|
||||
"CreateAccessPointForObjectLambda": {"method": "PUT", "requestUri": "/v20180820/accesspointforobjectlambda/{name}"},
|
||||
"CreateBucket": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}"},
|
||||
"CreateJob": {"method": "POST", "requestUri": "/v20180820/jobs", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"CreateMultiRegionAccessPoint": {"method": "POST", "requestUri": "/v20180820/async-requests/mrap/create", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"CreateStorageLensGroup": {"method": "POST", "requestUri": "/v20180820/storagelensgroup", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessGrant": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance/grant/{id}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessGrantsInstance": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessGrantsInstanceResourcePolicy": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance/resourcepolicy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessGrantsLocation": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance/location/{id}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessPoint": {"method": "DELETE", "requestUri": "/v20180820/accesspoint/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessPointForObjectLambda": {"method": "DELETE", "requestUri": "/v20180820/accesspointforobjectlambda/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessPointPolicy": {"method": "DELETE", "requestUri": "/v20180820/accesspoint/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessPointPolicyForObjectLambda": {"method": "DELETE", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteAccessPointScope": {"method": "DELETE", "requestUri": "/v20180820/accesspoint/{name}/scope", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteBucket": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteBucketLifecycleConfiguration": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}/lifecycleconfiguration", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteBucketPolicy": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteBucketReplication": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}/replication", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteBucketTagging": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteJobTagging": {"method": "DELETE", "requestUri": "/v20180820/jobs/{id}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteMultiRegionAccessPoint": {"method": "POST", "requestUri": "/v20180820/async-requests/mrap/delete", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeletePublicAccessBlock": {"method": "DELETE", "requestUri": "/v20180820/configuration/publicAccessBlock", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteStorageLensConfiguration": {"method": "DELETE", "requestUri": "/v20180820/storagelens/{storagelensid}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteStorageLensConfigurationTagging": {"method": "DELETE", "requestUri": "/v20180820/storagelens/{storagelensid}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DeleteStorageLensGroup": {"method": "DELETE", "requestUri": "/v20180820/storagelensgroup/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DescribeJob": {"method": "GET", "requestUri": "/v20180820/jobs/{id}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DescribeMultiRegionAccessPointOperation": {"method": "GET", "requestUri": "/v20180820/async-requests/mrap/{request_token+}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"DissociateAccessGrantsIdentityCenter": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance/identitycenter", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessGrant": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/grant/{id}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessGrantsInstance": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessGrantsInstanceForPrefix": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/prefix", "required": {"query": ["s3prefix"], "headers": ["x-amz-account-id"]}},
|
||||
"GetAccessGrantsInstanceResourcePolicy": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/resourcepolicy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessGrantsLocation": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/location/{id}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessPoint": {"method": "GET", "requestUri": "/v20180820/accesspoint/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessPointConfigurationForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/configuration", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessPointForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessPointPolicy": {"method": "GET", "requestUri": "/v20180820/accesspoint/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessPointPolicyForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessPointPolicyStatus": {"method": "GET", "requestUri": "/v20180820/accesspoint/{name}/policyStatus", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessPointPolicyStatusForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/policyStatus", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetAccessPointScope": {"method": "GET", "requestUri": "/v20180820/accesspoint/{name}/scope", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetBucket": {"method": "GET", "requestUri": "/v20180820/bucket/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetBucketLifecycleConfiguration": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/lifecycleconfiguration", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetBucketPolicy": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetBucketReplication": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/replication", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetBucketTagging": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetBucketVersioning": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/versioning", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetDataAccess": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/dataaccess", "required": {"query": ["permission", "target"], "headers": ["x-amz-account-id"]}},
|
||||
"GetJobTagging": {"method": "GET", "requestUri": "/v20180820/jobs/{id}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetMultiRegionAccessPoint": {"method": "GET", "requestUri": "/v20180820/mrap/instances/{name+}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetMultiRegionAccessPointPolicy": {"method": "GET", "requestUri": "/v20180820/mrap/instances/{name+}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetMultiRegionAccessPointPolicyStatus": {"method": "GET", "requestUri": "/v20180820/mrap/instances/{name+}/policystatus", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetMultiRegionAccessPointRoutes": {"method": "GET", "requestUri": "/v20180820/mrap/instances/{mrap+}/routes", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetPublicAccessBlock": {"method": "GET", "requestUri": "/v20180820/configuration/publicAccessBlock", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetStorageLensConfiguration": {"method": "GET", "requestUri": "/v20180820/storagelens/{storagelensid}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetStorageLensConfigurationTagging": {"method": "GET", "requestUri": "/v20180820/storagelens/{storagelensid}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"GetStorageLensGroup": {"method": "GET", "requestUri": "/v20180820/storagelensgroup/{name}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListAccessGrants": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/grants", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListAccessGrantsInstances": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstances", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListAccessGrantsLocations": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/locations", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListAccessPoints": {"method": "GET", "requestUri": "/v20180820/accesspoint", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListAccessPointsForDirectoryBuckets": {"method": "GET", "requestUri": "/v20180820/accesspointfordirectory", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListAccessPointsForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListCallerAccessGrants": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/caller/grants", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListJobs": {"method": "GET", "requestUri": "/v20180820/jobs", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListMultiRegionAccessPoints": {"method": "GET", "requestUri": "/v20180820/mrap/instances", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListRegionalBuckets": {"method": "GET", "requestUri": "/v20180820/bucket", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListStorageLensConfigurations": {"method": "GET", "requestUri": "/v20180820/storagelens", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListStorageLensGroups": {"method": "GET", "requestUri": "/v20180820/storagelensgroup", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"ListTagsForResource": {"method": "GET", "requestUri": "/v20180820/tags/{resourceArn+}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutAccessGrantsInstanceResourcePolicy": {"method": "PUT", "requestUri": "/v20180820/accessgrantsinstance/resourcepolicy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutAccessPointConfigurationForObjectLambda": {"method": "PUT", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/configuration", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutAccessPointPolicy": {"method": "PUT", "requestUri": "/v20180820/accesspoint/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutAccessPointPolicyForObjectLambda": {"method": "PUT", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutAccessPointScope": {"method": "PUT", "requestUri": "/v20180820/accesspoint/{name}/scope", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutBucketLifecycleConfiguration": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/lifecycleconfiguration", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutBucketPolicy": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutBucketReplication": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/replication", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutBucketTagging": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutBucketVersioning": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/versioning", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutJobTagging": {"method": "PUT", "requestUri": "/v20180820/jobs/{id}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutMultiRegionAccessPointPolicy": {"method": "POST", "requestUri": "/v20180820/async-requests/mrap/put-policy", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutPublicAccessBlock": {"method": "PUT", "requestUri": "/v20180820/configuration/publicAccessBlock", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutStorageLensConfiguration": {"method": "PUT", "requestUri": "/v20180820/storagelens/{storagelensid}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"PutStorageLensConfigurationTagging": {"method": "PUT", "requestUri": "/v20180820/storagelens/{storagelensid}/tagging", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"SubmitMultiRegionAccessPointRoutes": {"method": "PATCH", "requestUri": "/v20180820/mrap/instances/{mrap+}/routes", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"TagResource": {"method": "POST", "requestUri": "/v20180820/tags/{resourceArn+}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"UntagResource": {"method": "DELETE", "requestUri": "/v20180820/tags/{resourceArn+}", "required": {"query": ["tagKeys"], "headers": ["x-amz-account-id"]}},
|
||||
"UpdateAccessGrantsLocation": {"method": "PUT", "requestUri": "/v20180820/accessgrantsinstance/location/{id}", "required": {"headers": ["x-amz-account-id"]}},
|
||||
"UpdateJobPriority": {"method": "POST", "requestUri": "/v20180820/jobs/{id}/priority", "required": {"query": ["priority"], "headers": ["x-amz-account-id"]}},
|
||||
"UpdateJobStatus": {"method": "POST", "requestUri": "/v20180820/jobs/{id}/status", "required": {"query": ["requestedJobStatus"], "headers": ["x-amz-account-id"]}},
|
||||
"UpdateStorageLensGroup": {"method": "PUT", "requestUri": "/v20180820/storagelensgroup/{name}", "required": {"headers": ["x-amz-account-id"]}}
|
||||
"CreateJob": {"method": "POST", "requestUri": "/v20180820/jobs"},
|
||||
"CreateMultiRegionAccessPoint": {"method": "POST", "requestUri": "/v20180820/async-requests/mrap/create"},
|
||||
"CreateStorageLensGroup": {"method": "POST", "requestUri": "/v20180820/storagelensgroup"},
|
||||
"DeleteAccessGrant": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance/grant/{id}"},
|
||||
"DeleteAccessGrantsInstance": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance"},
|
||||
"DeleteAccessGrantsInstanceResourcePolicy": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance/resourcepolicy"},
|
||||
"DeleteAccessGrantsLocation": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance/location/{id}"},
|
||||
"DeleteAccessPoint": {"method": "DELETE", "requestUri": "/v20180820/accesspoint/{name}"},
|
||||
"DeleteAccessPointForObjectLambda": {"method": "DELETE", "requestUri": "/v20180820/accesspointforobjectlambda/{name}"},
|
||||
"DeleteAccessPointPolicy": {"method": "DELETE", "requestUri": "/v20180820/accesspoint/{name}/policy"},
|
||||
"DeleteAccessPointPolicyForObjectLambda": {"method": "DELETE", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/policy"},
|
||||
"DeleteAccessPointScope": {"method": "DELETE", "requestUri": "/v20180820/accesspoint/{name}/scope"},
|
||||
"DeleteBucket": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}"},
|
||||
"DeleteBucketLifecycleConfiguration": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}/lifecycleconfiguration"},
|
||||
"DeleteBucketPolicy": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}/policy"},
|
||||
"DeleteBucketReplication": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}/replication"},
|
||||
"DeleteBucketTagging": {"method": "DELETE", "requestUri": "/v20180820/bucket/{name}/tagging"},
|
||||
"DeleteJobTagging": {"method": "DELETE", "requestUri": "/v20180820/jobs/{id}/tagging"},
|
||||
"DeleteMultiRegionAccessPoint": {"method": "POST", "requestUri": "/v20180820/async-requests/mrap/delete"},
|
||||
"DeletePublicAccessBlock": {"method": "DELETE", "requestUri": "/v20180820/configuration/publicAccessBlock"},
|
||||
"DeleteStorageLensConfiguration": {"method": "DELETE", "requestUri": "/v20180820/storagelens/{storagelensid}"},
|
||||
"DeleteStorageLensConfigurationTagging": {"method": "DELETE", "requestUri": "/v20180820/storagelens/{storagelensid}/tagging"},
|
||||
"DeleteStorageLensGroup": {"method": "DELETE", "requestUri": "/v20180820/storagelensgroup/{name}"},
|
||||
"DescribeJob": {"method": "GET", "requestUri": "/v20180820/jobs/{id}"},
|
||||
"DescribeMultiRegionAccessPointOperation": {"method": "GET", "requestUri": "/v20180820/async-requests/mrap/{request_token+}"},
|
||||
"DissociateAccessGrantsIdentityCenter": {"method": "DELETE", "requestUri": "/v20180820/accessgrantsinstance/identitycenter"},
|
||||
"GetAccessGrant": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/grant/{id}"},
|
||||
"GetAccessGrantsInstance": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance"},
|
||||
"GetAccessGrantsInstanceForPrefix": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/prefix"},
|
||||
"GetAccessGrantsInstanceResourcePolicy": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/resourcepolicy"},
|
||||
"GetAccessGrantsLocation": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/location/{id}"},
|
||||
"GetAccessPoint": {"method": "GET", "requestUri": "/v20180820/accesspoint/{name}"},
|
||||
"GetAccessPointConfigurationForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/configuration"},
|
||||
"GetAccessPointForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda/{name}"},
|
||||
"GetAccessPointPolicy": {"method": "GET", "requestUri": "/v20180820/accesspoint/{name}/policy"},
|
||||
"GetAccessPointPolicyForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/policy"},
|
||||
"GetAccessPointPolicyStatus": {"method": "GET", "requestUri": "/v20180820/accesspoint/{name}/policyStatus"},
|
||||
"GetAccessPointPolicyStatusForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/policyStatus"},
|
||||
"GetAccessPointScope": {"method": "GET", "requestUri": "/v20180820/accesspoint/{name}/scope"},
|
||||
"GetBucket": {"method": "GET", "requestUri": "/v20180820/bucket/{name}"},
|
||||
"GetBucketLifecycleConfiguration": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/lifecycleconfiguration"},
|
||||
"GetBucketPolicy": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/policy"},
|
||||
"GetBucketReplication": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/replication"},
|
||||
"GetBucketTagging": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/tagging"},
|
||||
"GetBucketVersioning": {"method": "GET", "requestUri": "/v20180820/bucket/{name}/versioning"},
|
||||
"GetDataAccess": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/dataaccess"},
|
||||
"GetJobTagging": {"method": "GET", "requestUri": "/v20180820/jobs/{id}/tagging"},
|
||||
"GetMultiRegionAccessPoint": {"method": "GET", "requestUri": "/v20180820/mrap/instances/{name+}"},
|
||||
"GetMultiRegionAccessPointPolicy": {"method": "GET", "requestUri": "/v20180820/mrap/instances/{name+}/policy"},
|
||||
"GetMultiRegionAccessPointPolicyStatus": {"method": "GET", "requestUri": "/v20180820/mrap/instances/{name+}/policystatus"},
|
||||
"GetMultiRegionAccessPointRoutes": {"method": "GET", "requestUri": "/v20180820/mrap/instances/{mrap+}/routes"},
|
||||
"GetPublicAccessBlock": {"method": "GET", "requestUri": "/v20180820/configuration/publicAccessBlock"},
|
||||
"GetStorageLensConfiguration": {"method": "GET", "requestUri": "/v20180820/storagelens/{storagelensid}"},
|
||||
"GetStorageLensConfigurationTagging": {"method": "GET", "requestUri": "/v20180820/storagelens/{storagelensid}/tagging"},
|
||||
"GetStorageLensGroup": {"method": "GET", "requestUri": "/v20180820/storagelensgroup/{name}"},
|
||||
"ListAccessGrants": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/grants"},
|
||||
"ListAccessGrantsInstances": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstances"},
|
||||
"ListAccessGrantsLocations": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/locations"},
|
||||
"ListAccessPoints": {"method": "GET", "requestUri": "/v20180820/accesspoint"},
|
||||
"ListAccessPointsForDirectoryBuckets": {"method": "GET", "requestUri": "/v20180820/accesspointfordirectory"},
|
||||
"ListAccessPointsForObjectLambda": {"method": "GET", "requestUri": "/v20180820/accesspointforobjectlambda"},
|
||||
"ListCallerAccessGrants": {"method": "GET", "requestUri": "/v20180820/accessgrantsinstance/caller/grants"},
|
||||
"ListJobs": {"method": "GET", "requestUri": "/v20180820/jobs"},
|
||||
"ListMultiRegionAccessPoints": {"method": "GET", "requestUri": "/v20180820/mrap/instances"},
|
||||
"ListRegionalBuckets": {"method": "GET", "requestUri": "/v20180820/bucket"},
|
||||
"ListStorageLensConfigurations": {"method": "GET", "requestUri": "/v20180820/storagelens"},
|
||||
"ListStorageLensGroups": {"method": "GET", "requestUri": "/v20180820/storagelensgroup"},
|
||||
"ListTagsForResource": {"method": "GET", "requestUri": "/v20180820/tags/{resourceArn+}"},
|
||||
"PutAccessGrantsInstanceResourcePolicy": {"method": "PUT", "requestUri": "/v20180820/accessgrantsinstance/resourcepolicy"},
|
||||
"PutAccessPointConfigurationForObjectLambda": {"method": "PUT", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/configuration"},
|
||||
"PutAccessPointPolicy": {"method": "PUT", "requestUri": "/v20180820/accesspoint/{name}/policy"},
|
||||
"PutAccessPointPolicyForObjectLambda": {"method": "PUT", "requestUri": "/v20180820/accesspointforobjectlambda/{name}/policy"},
|
||||
"PutAccessPointScope": {"method": "PUT", "requestUri": "/v20180820/accesspoint/{name}/scope"},
|
||||
"PutBucketLifecycleConfiguration": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/lifecycleconfiguration"},
|
||||
"PutBucketPolicy": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/policy"},
|
||||
"PutBucketReplication": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/replication"},
|
||||
"PutBucketTagging": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/tagging"},
|
||||
"PutBucketVersioning": {"method": "PUT", "requestUri": "/v20180820/bucket/{name}/versioning"},
|
||||
"PutJobTagging": {"method": "PUT", "requestUri": "/v20180820/jobs/{id}/tagging"},
|
||||
"PutMultiRegionAccessPointPolicy": {"method": "POST", "requestUri": "/v20180820/async-requests/mrap/put-policy"},
|
||||
"PutPublicAccessBlock": {"method": "PUT", "requestUri": "/v20180820/configuration/publicAccessBlock"},
|
||||
"PutStorageLensConfiguration": {"method": "PUT", "requestUri": "/v20180820/storagelens/{storagelensid}"},
|
||||
"PutStorageLensConfigurationTagging": {"method": "PUT", "requestUri": "/v20180820/storagelens/{storagelensid}/tagging"},
|
||||
"SubmitMultiRegionAccessPointRoutes": {"method": "PATCH", "requestUri": "/v20180820/mrap/instances/{mrap+}/routes"},
|
||||
"TagResource": {"method": "POST", "requestUri": "/v20180820/tags/{resourceArn+}"},
|
||||
"UntagResource": {"method": "DELETE", "requestUri": "/v20180820/tags/{resourceArn+}"},
|
||||
"UpdateAccessGrantsLocation": {"method": "PUT", "requestUri": "/v20180820/accessgrantsinstance/location/{id}"},
|
||||
"UpdateJobPriority": {"method": "POST", "requestUri": "/v20180820/jobs/{id}/priority"},
|
||||
"UpdateJobStatus": {"method": "POST", "requestUri": "/v20180820/jobs/{id}/status"},
|
||||
"UpdateStorageLensGroup": {"method": "PUT", "requestUri": "/v20180820/storagelensgroup/{name}"}
|
||||
}
|
||||
},
|
||||
"s3tables": {
|
||||
|
||||
@@ -480,7 +480,9 @@ class RequestResourceMembersTest {
|
||||
@TestFactory
|
||||
Stream<DynamicTest> everyResourceOfTheTableIsReadFromAJsonBodyAndAForm() {
|
||||
RequestResourceMembers.Table table = RequestResourceMembers.table();
|
||||
return table.operations().entrySet().stream().flatMap(operation -> operation.getValue().stream()
|
||||
// An unread operation names what it acts on in a body the reader does not read, so it reads none of it.
|
||||
return table.operations().entrySet().stream().filter(operation -> !table.unread().contains(operation.getKey()))
|
||||
.flatMap(operation -> operation.getValue().stream()
|
||||
.map(resource -> DynamicTest.dynamicTest(operation.getKey() + " " + resource, () -> {
|
||||
String namespace = operation.getKey().substring(0, operation.getKey().indexOf(':'));
|
||||
String name = operation.getKey().substring(namespace.length() + 1);
|
||||
@@ -534,9 +536,9 @@ class RequestResourceMembersTest {
|
||||
&& other.when().equals(resource.when()) && other.unless().equals(resource.unless()))
|
||||
&& (other.endpoint() == null || resource.endpoint() == null
|
||||
|| other.endpoint().equals(resource.endpoint())))
|
||||
.map(other -> other == resource ? expected : expected(
|
||||
table.formats().get(namespace).get(other.types().getFirst()).format(), other,
|
||||
"000000000000", given.keySet()))
|
||||
.flatMap(other -> other == resource ? inTheRequestsRegionToo(expected, resource).stream()
|
||||
: Stream.of(expected(table.formats().get(namespace).get(other.types().getFirst())
|
||||
.format(), other, "000000000000", given.keySet())))
|
||||
.distinct().toList();
|
||||
StoredResourceArns stored = runningOn(namespace, arn, resource.byDefault());
|
||||
assertEquals(named, RequestResources.of(operation.getKey(),
|
||||
@@ -803,6 +805,21 @@ class RequestResourceMembersTest {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The ARN a request names in a member, and, for one whose format gives it a Region of its own (a Multi-Region
|
||||
* Access Point request's, in us-west-2), the same ARN in the request's, us-east-1, where the reader checks a named
|
||||
* resource as well.
|
||||
*/
|
||||
private static List<String> inTheRequestsRegionToo(String expected, Resource resource) {
|
||||
if (resource.arn() == null || !AwsArnUtils.isArn(expected)) {
|
||||
return List.of(expected);
|
||||
}
|
||||
AwsArnUtils.Arn named = AwsArnUtils.parse(expected);
|
||||
return named.region().isEmpty() || named.region().equals("us-east-1") ? List.of(expected)
|
||||
: List.of(expected, new AwsArnUtils.Arn(named.partition(), named.service(), "us-east-1",
|
||||
named.accountId(), named.resource()).toString());
|
||||
}
|
||||
|
||||
private static String document(String formats, String resource) {
|
||||
return "{\"namespaces\":{\"a\":[]}," + formats + ",\"operations\":{\"a:Op\":{\"resources\":[" + resource + "]}}}";
|
||||
}
|
||||
|
||||
@@ -638,7 +638,8 @@ class IamActionRegistryTest {
|
||||
@Test
|
||||
void aTrailingSlashIsCheckedAsTheRouteWithoutIt() {
|
||||
// The router matches /clusters/ as /clusters, so the rule ending at the route's last segment covers it.
|
||||
// An S3 path is matched as sent, as before: a key may end in a slash.
|
||||
// An S3 path is matched as sent: a key may end in a slash, and one of slashes alone arrives as
|
||||
// S3SlashOnlyKeyFilter rewrites it, escaped.
|
||||
String[][] routes = {
|
||||
{"eks", "POST", "/clusters/", "eks:CreateCluster"},
|
||||
{"eks", "GET", "/clusters/c/node-groups/ng/", "eks:DescribeNodegroup"},
|
||||
@@ -647,9 +648,9 @@ class IamActionRegistryTest {
|
||||
{"lambda", "GET", "/2015-03-31/functions/fn/", "lambda:GetFunction"},
|
||||
{"s3", "GET", "/bucket/", "s3:ListBucket"},
|
||||
{"s3", "GET", "/bucket/folder/", "s3:GetObject"},
|
||||
{"s3", "PUT", "/bucket//", "s3:PutObject"},
|
||||
{"s3", "GET", "/bucket//", "s3:GetObject"},
|
||||
{"s3", "DELETE", "/bucket//", "s3:DeleteObject"},
|
||||
{"s3", "PUT", "/bucket/%2F", "s3:PutObject"},
|
||||
{"s3", "GET", "/bucket/%2F", "s3:GetObject"},
|
||||
{"s3", "DELETE", "/bucket/%2F", "s3:DeleteObject"},
|
||||
};
|
||||
for (String[] route : routes) {
|
||||
assertEquals(route[3], registry.resolveRoute(route[0], mockCtx(route[1], route[2],
|
||||
@@ -780,29 +781,13 @@ class IamActionRegistryTest {
|
||||
assertEquals("s3:PutObjectLegalHold", s3Action("PUT", "/bucket/key", "legal-hold"));
|
||||
assertEquals("s3:GetObjectAnnotation", s3Action("GET", "/bucket/key", "annotation", "annotationName=n"));
|
||||
assertEquals("s3:ListObjectAnnotations", s3Action("GET", "/bucket/key", "annotation"));
|
||||
assertEquals("s3:ListObjectAnnotations", s3Action("GET", "/bucket/key", "annotation", "annotationName="));
|
||||
assertEquals("s3:GetObjectAnnotation", s3Action("HEAD", "/bucket/key", "annotation", "annotationName=n"));
|
||||
assertEquals("s3:PutObjectAnnotation", s3Action("PUT", "/bucket/key", "annotation"));
|
||||
assertEquals("s3:DeleteObjectAnnotation", s3Action("DELETE", "/bucket/key", "annotation"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3ObjectSubresourcesFollowTheOrderTheControllerDispatchesThem() {
|
||||
assertEquals("s3:GetObjectTagging", s3Action("GET", "/bucket/key", "acl", "tagging"));
|
||||
assertEquals("s3:PutObjectTagging", s3Action("PUT", "/bucket/key", "acl", "tagging"));
|
||||
assertEquals("s3:ListMultipartUploadParts", s3Action("GET", "/bucket/key", "acl", "uploadId=u1"));
|
||||
assertEquals("s3:GetObjectRetention", s3Action("GET", "/bucket/key", "acl", "retention"));
|
||||
assertEquals("s3:DeleteObjectTagging", s3Action("DELETE", "/bucket/key", "acl", "tagging"));
|
||||
assertEquals("s3:DeleteObjectAnnotation", s3Action("DELETE", "/bucket/key", "annotation", "uploadId=u1"));
|
||||
assertEquals("s3:PutObject", s3Action("POST", "/bucket/key", "uploads", "restore"));
|
||||
assertEquals("s3:RestoreObject", s3Action("POST", "/bucket/key", "restore", "uploadId=u1"));
|
||||
assertEquals("s3:GetObject", s3Action("POST", "/bucket/key", "select", "uploadId=u1"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3VersionedObjectRequestsResolveToTheVersionActions() {
|
||||
assertEquals("s3:GetObjectVersion", s3Action("GET", "/bucket/key", "versionId=v1"));
|
||||
assertEquals("s3:GetObjectVersion", s3Action("HEAD", "/bucket/key", "versionId=v1"));
|
||||
assertEquals("s3:DeleteObjectVersion", s3Action("DELETE", "/bucket/key", "versionId=v1"));
|
||||
assertEquals("s3:GetObjectVersionAcl", s3Action("GET", "/bucket/key", "acl", "versionId=v1"));
|
||||
assertEquals("s3:PutObjectVersionAcl", s3Action("PUT", "/bucket/key", "acl", "versionId=v1"));
|
||||
@@ -814,8 +799,6 @@ class IamActionRegistryTest {
|
||||
assertEquals("s3:GetObjectVersionTagging", s3Action("GET", "/bucket/key", "tagging", "versionId=null"));
|
||||
assertEquals("s3:GetObjectVersionAnnotation",
|
||||
s3Action("GET", "/bucket/key", "annotation", "annotationName=n", "versionId=v1"));
|
||||
assertEquals("s3:GetObjectVersionAnnotation",
|
||||
s3Action("HEAD", "/bucket/key", "annotation", "annotationName=n", "versionId=v1"));
|
||||
assertEquals("s3:ListObjectVersionAnnotations",
|
||||
s3Action("GET", "/bucket/key", "annotation", "versionId=v1"));
|
||||
assertEquals("s3:PutObjectVersionAnnotation",
|
||||
@@ -824,8 +807,6 @@ class IamActionRegistryTest {
|
||||
s3Action("DELETE", "/bucket/key", "annotation", "annotationName=n", "versionId=v1"));
|
||||
// GetObjectAttributes of a version is checked as the read of that version.
|
||||
assertEquals("s3:GetObjectVersion", s3Action("GET", "/bucket/key", "attributes", "versionId=v1"));
|
||||
// S3Controller selects from the version a versionId names.
|
||||
assertEquals("s3:GetObjectVersion", s3Action("POST", "/bucket/key", "select", "versionId=v1"));
|
||||
// Retention and legal hold have no version action; the upload operations take no version.
|
||||
assertEquals("s3:GetObjectRetention", s3Action("GET", "/bucket/key", "retention", "versionId=v1"));
|
||||
assertEquals("s3:PutObjectLegalHold", s3Action("PUT", "/bucket/key", "legal-hold", "versionId=v1"));
|
||||
@@ -929,27 +910,6 @@ class IamActionRegistryTest {
|
||||
mockCtx("GET", "/2015-03-31/functions", new MultivaluedHashMap<>(), null, "")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3AccelerateYieldsToSubresourcesDispatchedFirst() {
|
||||
MultivaluedMap<String, String> withRequestPayment = new MultivaluedHashMap<>();
|
||||
withRequestPayment.add("requestPayment", "");
|
||||
withRequestPayment.add("accelerate", "");
|
||||
assertEquals("s3:PutBucketRequestPayment",
|
||||
registry.resolve("s3", mockCtx("PUT", "/bucket", withRequestPayment, null, "")));
|
||||
MultivaluedMap<String, String> withLocation = new MultivaluedHashMap<>();
|
||||
withLocation.add("location", "");
|
||||
withLocation.add("accelerate", "");
|
||||
assertEquals("s3:GetBucketLocation",
|
||||
registry.resolve("s3", mockCtx("GET", "/bucket", withLocation, null, "")));
|
||||
// uploads is a GET-only dispatch branch; on PUT it is inert and accelerate executes,
|
||||
// so the mapping must still claim the request there.
|
||||
MultivaluedMap<String, String> withUploads = new MultivaluedHashMap<>();
|
||||
withUploads.add("uploads", "");
|
||||
withUploads.add("accelerate", "");
|
||||
assertEquals("s3:PutAccelerateConfiguration",
|
||||
registry.resolve("s3", mockCtx("PUT", "/bucket", withUploads, null, "")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3ReplicationResolvesToItsOwnActions() {
|
||||
// Without the override, PUT ?replication resolves to s3:CreateBucket — a
|
||||
@@ -980,41 +940,6 @@ class IamActionRegistryTest {
|
||||
registry.resolve("s3", mockCtx("DELETE", "/bucket/key.txt", replication, null, "")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3ReplicationYieldsToSubresourcesDispatchedFirst() {
|
||||
// The first dispatched subresource determines the required permission.
|
||||
MultivaluedMap<String, String> withRequestPayment = new MultivaluedHashMap<>();
|
||||
withRequestPayment.add("requestPayment", "");
|
||||
withRequestPayment.add("replication", "");
|
||||
assertEquals("s3:PutBucketRequestPayment",
|
||||
registry.resolve("s3", mockCtx("PUT", "/bucket", withRequestPayment, null, "")));
|
||||
MultivaluedMap<String, String> withLocation = new MultivaluedHashMap<>();
|
||||
withLocation.add("location", "");
|
||||
withLocation.add("replication", "");
|
||||
assertEquals("s3:GetBucketLocation",
|
||||
registry.resolve("s3", mockCtx("GET", "/bucket", withLocation, null, "")));
|
||||
// The DELETE chain dispatches website ahead of replication.
|
||||
MultivaluedMap<String, String> withWebsite = new MultivaluedHashMap<>();
|
||||
withWebsite.add("website", "");
|
||||
withWebsite.add("replication", "");
|
||||
assertEquals("s3:DeleteBucketWebsite",
|
||||
registry.resolve("s3", mockCtx("DELETE", "/bucket", withWebsite, null, "")));
|
||||
// requestPayment has no DELETE dispatch branch; it is inert there and
|
||||
// replication executes, so the mapping must still claim the request.
|
||||
MultivaluedMap<String, String> deleteWithRequestPayment = new MultivaluedHashMap<>();
|
||||
deleteWithRequestPayment.add("requestPayment", "");
|
||||
deleteWithRequestPayment.add("replication", "");
|
||||
assertEquals("s3:PutReplicationConfiguration",
|
||||
registry.resolve("s3", mockCtx("DELETE", "/bucket", deleteWithRequestPayment, null, "")));
|
||||
// uploads is a GET-only dispatch branch; on PUT it is inert and replication
|
||||
// executes, so the mapping must still claim the request there.
|
||||
MultivaluedMap<String, String> putWithUploads = new MultivaluedHashMap<>();
|
||||
putWithUploads.add("uploads", "");
|
||||
putWithUploads.add("replication", "");
|
||||
assertEquals("s3:PutReplicationConfiguration",
|
||||
registry.resolve("s3", mockCtx("PUT", "/bucket", putWithUploads, null, "")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3ReplicationAndAcceleratePrecedenceFollowsEachMethodsDispatchOrder() {
|
||||
// PUT and GET dispatch accelerate ahead of replication; DELETE routes
|
||||
@@ -1030,36 +955,6 @@ class IamActionRegistryTest {
|
||||
registry.resolve("s3", mockCtx("DELETE", "/bucket", both, null, "")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3ReplicationDoesNotPreemptAclOrTagging() {
|
||||
// Appending an inert ?replication must not downgrade a stricter resolution.
|
||||
MultivaluedMap<String, String> withAcl = new MultivaluedHashMap<>();
|
||||
withAcl.add("replication", "");
|
||||
withAcl.add("acl", "");
|
||||
assertEquals("s3:PutBucketAcl",
|
||||
registry.resolve("s3", mockCtx("PUT", "/bucket", withAcl, null, "")));
|
||||
MultivaluedMap<String, String> withTagging = new MultivaluedHashMap<>();
|
||||
withTagging.add("replication", "");
|
||||
withTagging.add("tagging", "");
|
||||
assertEquals("s3:PutBucketTagging",
|
||||
registry.resolve("s3", mockCtx("DELETE", "/bucket", withTagging, null, "")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3AccelerateDoesNotPreemptAclOrTagging() {
|
||||
// Appending an inert ?accelerate must not downgrade a stricter resolution.
|
||||
MultivaluedMap<String, String> withAcl = new MultivaluedHashMap<>();
|
||||
withAcl.add("accelerate", "");
|
||||
withAcl.add("acl", "");
|
||||
assertEquals("s3:PutBucketAcl",
|
||||
registry.resolve("s3", mockCtx("PUT", "/bucket", withAcl, null, "")));
|
||||
MultivaluedMap<String, String> withTagging = new MultivaluedHashMap<>();
|
||||
withTagging.add("accelerate", "");
|
||||
withTagging.add("tagging", "");
|
||||
assertEquals("s3:DeleteObjectTagging",
|
||||
registry.resolve("s3", mockCtx("DELETE", "/bucket/key.txt", withTagging, null, "")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3BucketSubResourceWritesResolveToTheirOwnActionNotCreateBucket() {
|
||||
// The live failure: CDK's BucketNotificationsHandler role grants s3:PutBucketNotification
|
||||
@@ -1120,10 +1015,7 @@ class IamActionRegistryTest {
|
||||
assertEquals("s3:DeleteBucket", bucketAction("DELETE", "versioning"));
|
||||
assertEquals("s3:CreateBucket", bucketAction("PUT", "location"));
|
||||
assertNull(bucketAction("POST", "versioning"));
|
||||
// A browser-form PostObject runs ahead of any sub-resource and is checked per key, as DeleteObjects is.
|
||||
MultivaluedMap<String, String> params = new MultivaluedHashMap<>();
|
||||
params.add("metadataTable", "");
|
||||
assertNull(registry.resolve("s3", mockCtx("POST", "/bucket", params, MediaType.MULTIPART_FORM_DATA_TYPE, "")));
|
||||
// DeleteObjects names its keys in its body, which S3Controller checks one by one.
|
||||
assertNull(bucketAction("POST", "delete"));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.floci.aws.services.iam;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.floci.aws.core.common.RequestResources;
|
||||
import jakarta.ws.rs.container.ContainerRequestContext;
|
||||
import jakarta.ws.rs.core.MultivaluedHashMap;
|
||||
import jakarta.ws.rs.core.MultivaluedMap;
|
||||
@@ -45,32 +46,6 @@ class IamRestRouteCoverageTest {
|
||||
/** The REST namespaces whose entries in {@code iam-authorized-actions.json} only the route table can apply. */
|
||||
private static final Set<String> ROUTED_NAMESPACES = Set.of("s3", "apigateway", "lambda");
|
||||
|
||||
/**
|
||||
* The S3 Control operations Floci serves, the rest-routes entry of which is a route the
|
||||
* registry maps. Every other operation of the s3control model has no route in Floci: the
|
||||
* request falls through to the S3 data plane and is checked as the object or bucket
|
||||
* operation that runs.
|
||||
*/
|
||||
private static final Set<String> SERVED_S3_CONTROL_OPERATIONS = Set.of(
|
||||
"DeletePublicAccessBlock", "GetPublicAccessBlock", "ListAccessPoints", "ListTagsForResource",
|
||||
"PutPublicAccessBlock", "TagResource", "UntagResource");
|
||||
|
||||
/**
|
||||
* The account-level Block Public Access, the one route the Service Reference cannot settle.
|
||||
* It files S3's and S3 Control's GetPublicAccessBlock, PutPublicAccessBlock and
|
||||
* DeletePublicAccessBlock under the bucket actions (s3:GetBucketPublicAccessBlock,
|
||||
* s3:PutBucketPublicAccessBlock and s3:DeleteBucketPublicAccessBlock), one action between
|
||||
* the two clients, although the account level is a different permission. The S3 User
|
||||
* Guide's Block Public Access page gives the account level s3:PutAccountPublicAccessBlock
|
||||
* to write and s3:GetAccountPublicAccessBlock to read, and a delete needs the same action
|
||||
* as the write it undoes.
|
||||
* https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html
|
||||
*/
|
||||
private static final Map<String, String> ACCOUNT_PUBLIC_ACCESS_BLOCK_ACTIONS = Map.of(
|
||||
"GetPublicAccessBlock", "s3:GetAccountPublicAccessBlock",
|
||||
"PutPublicAccessBlock", "s3:PutAccountPublicAccessBlock",
|
||||
"DeletePublicAccessBlock", "s3:PutAccountPublicAccessBlock");
|
||||
|
||||
private final IamActionRegistry registry = new IamActionRegistry();
|
||||
|
||||
@TestFactory
|
||||
@@ -157,14 +132,9 @@ class IamRestRouteCoverageTest {
|
||||
Stream<DynamicTest> everyOperationOfARoutedScopeResolvesToItsActionWhenFlociCanCheckIt() throws IOException {
|
||||
JsonNode document = load("/aws/rest-routes.json");
|
||||
JsonNode models = document.path("models");
|
||||
JsonNode authorizedActions = load("/aws/iam-authorized-actions.json");
|
||||
JsonNode authorized = authorizedActions.path("authorizedActions");
|
||||
JsonNode requestResources = load("/aws/iam-request-resources.json");
|
||||
Set<String> handBuilt = new HashSet<>();
|
||||
requestResources.path("handBuilt").forEach(namespace -> handBuilt.add(namespace.asText()));
|
||||
Set<String> byMethod = new HashSet<>();
|
||||
authorizedActions.path("authorizedByMethod").properties().forEach(scope ->
|
||||
scope.getValue().forEach(operation -> byMethod.add(scope.getKey() + ":" + operation.asText())));
|
||||
List<DynamicTest> tests = new ArrayList<>();
|
||||
for (String model : routedModels(document)) {
|
||||
String scope = models.path(model).path("credentialScope").asText();
|
||||
@@ -173,20 +143,22 @@ class IamRestRouteCoverageTest {
|
||||
Map.Entry<String, JsonNode> operation = operations.next();
|
||||
String method = operation.getValue().path("method").asText();
|
||||
List<Route> routes = new ArrayList<>(List.of(new Route(scope, model, operation.getKey(), method,
|
||||
operation.getValue().path("requestUri").asText())));
|
||||
operation.getValue().path("requestUri").asText(), operation.getValue().path("requires"))));
|
||||
operation.getValue().path("alternatives").forEach(alternative -> routes.add(new Route(scope, model,
|
||||
operation.getKey(), alternative.path("method").asText(method),
|
||||
alternative.path("requestUri").asText())));
|
||||
boolean read = requestResources.path("operations").has(scope + ":" + operation.getKey());
|
||||
// An unread operation names what it acts on in a body the reader does not read, so it is left to its
|
||||
// service, as one whose resources nothing reads is.
|
||||
boolean read = RequestResources.reads(scope + ":" + operation.getKey());
|
||||
for (Route route : routes) {
|
||||
String action = byMethod.contains(scope + ":" + operation.getKey())
|
||||
? scope + ":" + route.method()
|
||||
: authorized.path(scope).path(operation.getKey()).asText(scope + ":" + operation.getKey());
|
||||
String expected = handBuilt.contains(scope) || read
|
||||
|| IamAuthorizedActions.actsOnNoResourceType(action)
|
||||
? action : null;
|
||||
tests.add(DynamicTest.dynamicTest(route.toString(),
|
||||
() -> assertEquals(expected, resolve(route), route.toString())));
|
||||
tests.add(DynamicTest.dynamicTest(route.toString(), () -> {
|
||||
ContainerRequestContext request = route.request();
|
||||
String action = IamAuthorizedActions.actionFor(scope, operation.getKey(), route.method(),
|
||||
model, request.getUriInfo().getQueryParameters());
|
||||
String expected = handBuilt.contains(scope) || read
|
||||
|| IamAuthorizedActions.actsOnNoResourceType(action) ? action : null;
|
||||
assertEquals(expected, registry.resolveRoute(scope, request), route.toString());
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,53 +181,26 @@ class IamRestRouteCoverageTest {
|
||||
while (operations.hasNext()) {
|
||||
Map.Entry<String, JsonNode> operation = operations.next();
|
||||
Route route = new Route(scope, model, operation.getKey(), operation.getValue().path("method").asText(),
|
||||
operation.getValue().path("requestUri").asText());
|
||||
operation.getValue().path("requestUri").asText(), operation.getValue().path("requires"));
|
||||
tests.add(DynamicTest.dynamicTest(model + " " + operation.getKey(), () -> {
|
||||
ContainerRequestContext request = route.request();
|
||||
String matched = IamRestRoutes.vendored().operation(scope, route.method(),
|
||||
request.getUriInfo().getPath(), request.getUriInfo().getQueryParameters()).orElse(null);
|
||||
assertEquals(IamAuthorizedActions.actionFor(scope, operation.getKey(), route.method()),
|
||||
matched == null ? null : IamAuthorizedActions.actionFor(scope, matched, route.method()),
|
||||
route.toString());
|
||||
MultivaluedMap<String, String> query = request.getUriInfo().getQueryParameters();
|
||||
String matched = IamRestRoutes.vendored().match(scope, route.method(),
|
||||
request.getUriInfo().getPath(), query, false, request.getHeaders())
|
||||
.map(match -> IamAuthorizedActions.actionFor(scope, match.operation(), route.method(),
|
||||
match.model(), query))
|
||||
.orElse(null);
|
||||
assertEquals(IamAuthorizedActions.actionFor(scope, operation.getKey(), route.method(), model, query),
|
||||
matched, route.toString());
|
||||
// No request an SDK sends on a route is one two operations' routes take alike, which is refused.
|
||||
assertFalse(IamRestRoutes.vendored().ambiguous(scope, route.method(), request.getUriInfo().getPath(),
|
||||
query, false, request.getHeaders()), route.toString());
|
||||
}));
|
||||
}
|
||||
}
|
||||
return tests.stream();
|
||||
}
|
||||
|
||||
/**
|
||||
* Every route of the s3control model, which signs with the s3 scope. A route Floci serves is
|
||||
* checked as the action the Service Reference gives the operation, with the account-level
|
||||
* Block Public Access as its one written-down exception; a route Floci does not serve runs
|
||||
* as the S3 data plane, so it must not resolve to any of the served routes' actions.
|
||||
*/
|
||||
@TestFactory
|
||||
Stream<DynamicTest> everyS3ControlRouteIsCheckedAsTheServiceReferenceGivesIt() throws IOException {
|
||||
JsonNode models = load("/aws/rest-routes.json").path("models");
|
||||
JsonNode authorized = load("/aws/iam-authorized-actions.json").path("authorizedActions");
|
||||
Map<String, String> served = new HashMap<>();
|
||||
for (String operation : SERVED_S3_CONTROL_OPERATIONS) {
|
||||
served.put(operation, ACCOUNT_PUBLIC_ACCESS_BLOCK_ACTIONS.getOrDefault(operation,
|
||||
authorized.path("s3").path(operation).asText("s3:" + operation)));
|
||||
}
|
||||
List<DynamicTest> tests = new ArrayList<>();
|
||||
Iterator<Map.Entry<String, JsonNode>> operations =
|
||||
models.path("s3control").path("operations").fields();
|
||||
while (operations.hasNext()) {
|
||||
Map.Entry<String, JsonNode> operation = operations.next();
|
||||
Route route = new Route("s3", "s3control", operation.getKey(),
|
||||
operation.getValue().path("method").asText(),
|
||||
operation.getValue().path("requestUri").asText());
|
||||
String expected = served.get(operation.getKey());
|
||||
tests.add(expected == null
|
||||
? DynamicTest.dynamicTest("s3control " + operation.getKey() + " (not served)",
|
||||
() -> assertFalse(served.containsValue(resolve(route)), route.toString()))
|
||||
: DynamicTest.dynamicTest("s3control " + operation.getKey(),
|
||||
() -> assertEquals(expected, resolve(route), route.toString())));
|
||||
}
|
||||
return tests.stream();
|
||||
}
|
||||
|
||||
/** The models of every credential scope the vendored routes do not list as hand-routed. */
|
||||
private static List<String> routedModels(JsonNode document) {
|
||||
List<String> models = new ArrayList<>();
|
||||
|
||||
@@ -306,7 +306,10 @@ class IamRestRoutesTest {
|
||||
assertEquals(Optional.empty(), get("/nothing"));
|
||||
}
|
||||
|
||||
/** The vendored routes load, a model routed under the scope it signs with, and S3 is left to its rules. */
|
||||
/**
|
||||
* The vendored routes load, a model routed under the scope it signs with: S3 and S3 Control under the s3 scope, a
|
||||
* route several operations share told apart by what each requires.
|
||||
*/
|
||||
@Test
|
||||
void theVendoredRoutesAreRead() {
|
||||
assertEquals(Optional.of("GetFunction"),
|
||||
@@ -317,7 +320,32 @@ class IamRestRoutesTest {
|
||||
IamRestRoutes.vendored().operation("es", "GET", "/2021-01-01/opensearch/domain/logs", null));
|
||||
assertEquals(Optional.of("DescribeElasticsearchDomain"),
|
||||
IamRestRoutes.vendored().operation("es", "GET", "/2015-01-01/es/domain/logs", null));
|
||||
assertEquals(Optional.empty(), IamRestRoutes.vendored().operation("s3", "GET", "/bucket", null));
|
||||
assertEquals(Optional.of("ListObjects"), IamRestRoutes.vendored().operation("s3", "GET", "/bucket", null));
|
||||
MultivaluedMap<String, String> upload = new MultivaluedHashMap<>();
|
||||
upload.add("uploadId", "u");
|
||||
assertEquals(Optional.of("ListParts"), IamRestRoutes.vendored().operation("s3", "GET", "/bucket/key", upload));
|
||||
assertEquals(Optional.of("GetPublicAccessBlock"), IamRestRoutes.vendored()
|
||||
.match("s3", "GET", "/v20180820/configuration/publicAccessBlock", null)
|
||||
.filter(match -> "s3control".equals(match.model())).map(IamRestRoutes.Match::operation));
|
||||
}
|
||||
|
||||
/**
|
||||
* A request two operations' routes take alike, none outranking the other, is ambiguous: one naming two of S3's
|
||||
* sub-resources. One a route requiring more takes over one requiring less is not.
|
||||
*/
|
||||
@Test
|
||||
void aRequestTwoOperationsRoutesTakeAlikeIsAmbiguous() {
|
||||
MultivaluedMap<String, String> both = new MultivaluedHashMap<>();
|
||||
both.add("cors", "");
|
||||
both.add("policy", "");
|
||||
assertTrue(IamRestRoutes.vendored().ambiguous("s3", "PUT", "/bucket", both, false, null));
|
||||
MultivaluedMap<String, String> one = new MultivaluedHashMap<>();
|
||||
one.add("cors", "");
|
||||
assertFalse(IamRestRoutes.vendored().ambiguous("s3", "PUT", "/bucket", one, false, null));
|
||||
MultivaluedMap<String, String> part = new MultivaluedHashMap<>();
|
||||
part.add("partNumber", "1");
|
||||
part.add("uploadId", "u");
|
||||
assertFalse(IamRestRoutes.vendored().ambiguous("s3", "PUT", "/bucket/key", part, false, null));
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
|
||||
@@ -7,6 +7,7 @@ import io.floci.aws.core.common.AwsRegions;
|
||||
import io.floci.aws.core.common.ProtocolClaim;
|
||||
import io.floci.aws.core.common.RegionResolver;
|
||||
import io.floci.aws.core.common.RequestContext;
|
||||
import io.floci.aws.core.common.RequestPathLabels;
|
||||
import io.floci.aws.core.common.StoredResourceArns;
|
||||
import io.floci.aws.core.common.WireProtocol;
|
||||
import io.floci.aws.core.storage.AccountAwareStorageBackend;
|
||||
@@ -25,6 +26,7 @@ import io.floci.aws.services.iam.model.ServerCertificate;
|
||||
import io.floci.aws.services.kms.KmsService;
|
||||
import io.floci.aws.services.lambda.LambdaStoredResourceArns;
|
||||
import io.floci.aws.services.lambdamicrovms.LambdaMicrovmsService;
|
||||
import io.floci.aws.services.s3.S3RequestPathLabels;
|
||||
import io.floci.aws.services.sqs.SqsService;
|
||||
import io.floci.aws.services.sqs.SqsServiceFactory;
|
||||
import io.floci.aws.services.sqs.SqsStoredResourceArns;
|
||||
@@ -1947,97 +1949,28 @@ class ResourceArnBuilderTest {
|
||||
builder.buildResources("sns", "sns:TagResource", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
}
|
||||
|
||||
// ── S3 ──────────────────────────────────────────────────────────────────────
|
||||
// ── S3 and S3 Control ───────────────────────────────────────────────────────
|
||||
|
||||
@Test
|
||||
void s3BuildsBucketArn() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket");
|
||||
String arn = builder.build("s3", ctx, "us-east-1", "000000000000");
|
||||
assertEquals("arn:aws:s3:::my-bucket", arn);
|
||||
/** The resources an S3 or S3 Control request names, read from the generated table on the route it matches. */
|
||||
private List<String> s3(ResourceArnBuilder from, String method, String sent, String operation, String region,
|
||||
String partition) {
|
||||
when(ctx.getMethod()).thenReturn(method);
|
||||
request(sent);
|
||||
return from.buildResources("s3", "s3:" + operation, ctx, region, ACCOUNT, partition);
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3BuildsArnsInTheRequestRegionsPartition() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket/key.txt");
|
||||
assertEquals("arn:aws-cn:s3:::my-bucket/key.txt",
|
||||
builder.build("s3", ctx, "cn-north-1", "000000000000"));
|
||||
when(uriInfo.getPath()).thenReturn("/");
|
||||
assertEquals("arn:aws-us-gov:s3:::*", builder.build("s3", ctx, "us-gov-west-1", "000000000000"));
|
||||
private List<String> s3(String method, String sent, String operation) {
|
||||
return s3(builder, method, sent, operation, "us-east-1", "aws");
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3BuildsObjectArn() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket/folder/file.json");
|
||||
String arn = builder.build("s3", ctx, "us-east-1", "000000000000");
|
||||
assertEquals("arn:aws:s3:::my-bucket/folder/file.json", arn);
|
||||
}
|
||||
|
||||
/**
|
||||
* S3VirtualHostFilter rewrites a virtual-hosted bucket-level request (GET /) to
|
||||
* /bucket/. The resource is still the bucket, so the ARN must carry no trailing
|
||||
* slash or a policy naming arn:aws:s3:::bucket stops matching and an allowed
|
||||
* ListBucket is denied for every SDK that defaults to virtual-hosted addressing.
|
||||
*/
|
||||
@Test
|
||||
void s3BuildsBucketArnForVirtualHostedRewrittenPath() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket/");
|
||||
String arn = builder.build("s3", ctx, "us-east-1", "000000000000");
|
||||
assertEquals("arn:aws:s3:::my-bucket", arn);
|
||||
}
|
||||
|
||||
@Test
|
||||
void s3KeepsTrailingSlashOfAFolderMarkerKey() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket/folder/");
|
||||
String arn = builder.build("s3", ctx, "us-east-1", "000000000000");
|
||||
assertEquals("arn:aws:s3:::my-bucket/folder/", arn);
|
||||
}
|
||||
|
||||
/**
|
||||
* A key keeps the slashes it is sent with, and so does the ARN the request is checked against.
|
||||
* {@code PUT /bucket//email.txt} stores the key {@code /email.txt}; read from the collapsed
|
||||
* path it was checked on {@code bucket/email.txt}, so a grant on that object covered this one
|
||||
* and a statement naming {@code bucket//*} reached nothing.
|
||||
*/
|
||||
@Test
|
||||
void s3ReadsAKeysOwnLeadingSlashFromThePathAsSent() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket/email.txt");
|
||||
when(uriInfo.getRequestUri()).thenReturn(URI.create("http://localhost/my-bucket//email.txt"));
|
||||
|
||||
assertEquals("arn:aws:s3:::my-bucket//email.txt", builder.build("s3", ctx, "us-east-1", ACCOUNT));
|
||||
}
|
||||
|
||||
/** The same inside a key, where the collapsed path named a key one separator short. */
|
||||
@Test
|
||||
void s3KeepsADoubleSlashInsideAKey() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket/a/b.txt");
|
||||
when(uriInfo.getRequestUri()).thenReturn(URI.create("http://localhost/my-bucket/a//b.txt"));
|
||||
|
||||
assertEquals("arn:aws:s3:::my-bucket/a//b.txt", builder.build("s3", ctx, "us-east-1", ACCOUNT));
|
||||
}
|
||||
|
||||
/**
|
||||
* Virtual-hosted, where the bucket came from the Host header and S3VirtualHostFilter rewrote the
|
||||
* path: the key's leading slash is then only in the request the server received.
|
||||
*/
|
||||
@Test
|
||||
void s3ReadsAVirtualHostedKeysOwnSlashFromTheRequestAsReceived() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket/email.txt");
|
||||
when(uriInfo.getRequestUri()).thenReturn(URI.create("http://my-bucket.localhost/my-bucket/email.txt"));
|
||||
ResourceArnBuilder withRequest = new ResourceArnBuilder(new ObjectMapper(), vertxRequestOn("//email.txt"));
|
||||
|
||||
assertEquals("arn:aws:s3:::my-bucket//email.txt", withRequest.build("s3", ctx, "us-east-1", ACCOUNT));
|
||||
}
|
||||
|
||||
/**
|
||||
* A key of slashes alone reaches the object route through the escaped path S3SlashOnlyKeyFilter
|
||||
* rewrites it to, and still reads as that object rather than as the bucket.
|
||||
*/
|
||||
@Test
|
||||
void s3KeepsAKeyOfOnlySlashes() {
|
||||
when(uriInfo.getPath()).thenReturn("/my-bucket//");
|
||||
when(uriInfo.getRequestUri()).thenReturn(URI.create("http://localhost/my-bucket/%2F"));
|
||||
|
||||
assertEquals("arn:aws:s3:::my-bucket//", builder.build("s3", ctx, "us-east-1", ACCOUNT));
|
||||
/** A builder reading S3's keys as S3 does, from {@code received}, the path the server received. */
|
||||
private static ResourceArnBuilder readingS3Keys(String received) {
|
||||
RequestPathLabels s3Keys = new S3RequestPathLabels(vertxRequestOn(received));
|
||||
@SuppressWarnings("unchecked")
|
||||
Instance<RequestPathLabels> labels = mock(Instance.class);
|
||||
when(labels.isUnsatisfied()).thenReturn(false);
|
||||
when(labels.iterator()).thenAnswer(invocation -> List.of(s3Keys).iterator());
|
||||
return new ResourceArnBuilder(new ObjectMapper(), null, null, null, labels);
|
||||
}
|
||||
|
||||
/** A current request whose path is {@code sentPath}, the path the server received. */
|
||||
@@ -2051,90 +1984,72 @@ class ResourceArnBuilderTest {
|
||||
return current;
|
||||
}
|
||||
|
||||
// ── S3 Control ─────────────────────────────────────────────────────────────
|
||||
/** A bucket and an object are named by their route's labels, in the partition of the request's Region. */
|
||||
@Test
|
||||
void anS3RequestIsCheckedOnTheBucketOrObjectItsRouteNames() {
|
||||
assertEquals(List.of("arn:aws:s3:::my-bucket"), s3("PUT", "/my-bucket", "CreateBucket"));
|
||||
assertEquals(List.of("arn:aws:s3:::my-bucket"), s3("GET", "/my-bucket?list-type=2", "ListObjectsV2"));
|
||||
assertEquals(List.of("arn:aws:s3:::my-bucket/folder/file.json"),
|
||||
s3("GET", "/my-bucket/folder/file.json", "GetObject"));
|
||||
assertEquals(List.of("arn:aws-cn:s3:::my-bucket/key.txt"),
|
||||
s3(builder, "GET", "/my-bucket/key.txt", "GetObject", "cn-north-1", "aws-cn"));
|
||||
// ListBuckets acts on no resource type.
|
||||
assertEquals(List.of("*"), s3("GET", "/", "ListBuckets"));
|
||||
}
|
||||
|
||||
/**
|
||||
* An S3 Control tagging route names the resource it acts on by its ARN, and that ARN as
|
||||
* written is what the request is checked against. The data-plane reading of the path, which
|
||||
* issue #6537 reports, checked s3:GetObject on a bucket named v20180820, so a policy
|
||||
* allowing the tagging action on the real bucket never matched. The ARN is the caller's own
|
||||
* naming of the resource, kept as the ARN-carrying requests of other services are: the plain
|
||||
* general-purpose form and the directory-bucket form the Go SDK and Terraform send alike.
|
||||
* A key keeps the slashes it is sent with, and so does the ARN the request is checked against, read as S3 reads
|
||||
* it: {@code PUT /bucket//email.txt} stores the key {@code /email.txt}; read from the router's collapsed path it
|
||||
* would be checked on {@code bucket/email.txt}, so a grant on that object would cover this one.
|
||||
*/
|
||||
@Test
|
||||
void s3ControlTaggingIsCheckedAgainstTheArnTheRouteNames() {
|
||||
for (String action : List.of("s3:ListTagsForResource", "s3:TagResource", "s3:UntagResource")) {
|
||||
when(uriInfo.getPath()).thenReturn("/v20180820/tags/arn:aws:s3:::repro-bucket");
|
||||
void anS3KeyKeepsTheSlashesItWasSentWith() {
|
||||
assertEquals(List.of("arn:aws:s3:::my-bucket//email.txt"),
|
||||
s3(readingS3Keys("/my-bucket//email.txt"), "PUT", "/my-bucket//email.txt", "PutObject", "us-east-1",
|
||||
"aws"));
|
||||
assertEquals(List.of("arn:aws:s3:::my-bucket/a//b.txt"),
|
||||
s3(readingS3Keys("/my-bucket/a//b.txt"), "GET", "/my-bucket/a//b.txt", "GetObject", "us-east-1",
|
||||
"aws"));
|
||||
assertEquals(List.of("arn:aws:s3:::my-bucket/folder/"),
|
||||
s3(readingS3Keys("/my-bucket/folder/"), "PUT", "/my-bucket/folder/", "PutObject", "us-east-1", "aws"));
|
||||
// Virtual-hosted: S3VirtualHostFilter put the bucket into the path, and the server received the key alone.
|
||||
assertEquals(List.of("arn:aws:s3:::my-bucket//email.txt"),
|
||||
s3(readingS3Keys("//email.txt"), "GET", "/my-bucket//email.txt", "GetObject", "us-east-1", "aws"));
|
||||
}
|
||||
|
||||
/**
|
||||
* An S3 Control tagging route names the resource it acts on by its ARN, and that ARN as written, percent-encoded as
|
||||
* the Go SDK sends it or not, is what the request is checked against, never a bucket named v20180820 (issue
|
||||
* #6537). One naming no ARN stays on the wildcard, under which the handler refuses it.
|
||||
*/
|
||||
@Test
|
||||
void anS3ControlTaggingRouteIsCheckedOnTheArnItNames() {
|
||||
for (String[] call : List.of(new String[] {"GET", "ListTagsForResource"}, new String[] {"POST", "TagResource"},
|
||||
new String[] {"DELETE", "UntagResource"})) {
|
||||
assertEquals(List.of("arn:aws:s3:::repro-bucket"),
|
||||
builder.buildResources("s3", action, ctx, "us-east-1", ACCOUNT, "aws"), action);
|
||||
when(uriInfo.getPath())
|
||||
.thenReturn("/v20180820/tags/arn:aws:s3:us-east-1:000000000000:bucket/repro-bucket");
|
||||
assertEquals(List.of("arn:aws:s3:us-east-1:000000000000:bucket/repro-bucket"),
|
||||
builder.buildResources("s3", action, ctx, "us-east-1", ACCOUNT, "aws"), action);
|
||||
s3(call[0], "/v20180820/tags/arn:aws:s3:::repro-bucket", call[1]), call[1]);
|
||||
assertEquals(List.of("arn:aws:s3:::repro-bucket"),
|
||||
s3(call[0], "/v20180820/tags/arn%3Aaws%3As3%3A%3A%3Arepro-bucket", call[1]), call[1]);
|
||||
}
|
||||
assertEquals(List.of("*"), s3("GET", "/v20180820/tags/not-an-arn", "ListTagsForResource"));
|
||||
}
|
||||
|
||||
/**
|
||||
* An S3 Control route names no object, so nothing of it is read as a bucket and a key: the ARN
|
||||
* in its path is still taken as written, percent-encoded as the Go SDK sends it or not.
|
||||
* AWS gives s3:ListAccessPoints and the account-level Block Public Access actions no resource type, so a request
|
||||
* of them is checked on the wildcard alone, as other namespaces' no-resource actions are.
|
||||
*/
|
||||
@Test
|
||||
void s3ControlTaggingIsNotReadAsABucketAndAKey() {
|
||||
when(uriInfo.getPath()).thenReturn("/v20180820/tags/arn:aws:s3:::repro-bucket");
|
||||
when(uriInfo.getRequestUri())
|
||||
.thenReturn(URI.create("http://localhost/v20180820/tags/arn%3Aaws%3As3%3A%3A%3Arepro-bucket"));
|
||||
|
||||
assertEquals(List.of("arn:aws:s3:::repro-bucket"),
|
||||
builder.buildResources("s3", "s3:TagResource", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
void anS3ControlAccountRouteIsCheckedOnTheWildcardAlone() {
|
||||
assertEquals(List.of("*"), s3("GET", "/v20180820/accesspoint", "ListAccessPoints"));
|
||||
assertEquals(List.of("*"), s3("GET", "/v20180820/configuration/publicAccessBlock", "GetPublicAccessBlock"));
|
||||
assertEquals(List.of("*"), s3("PUT", "/v20180820/configuration/publicAccessBlock", "PutPublicAccessBlock"));
|
||||
}
|
||||
|
||||
/** A tagging route naming no ARN stays on the wildcard, under which the handler refuses it. */
|
||||
/** A data-plane request into a bucket named v20180820 keeps its own bucket and object. */
|
||||
@Test
|
||||
void s3ControlTaggingNamingNoArnLeavesTheWildcard() {
|
||||
when(uriInfo.getPath()).thenReturn("/v20180820/tags/not-an-arn");
|
||||
assertEquals(List.of("*"),
|
||||
builder.buildResources("s3", "s3:ListTagsForResource", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
}
|
||||
|
||||
/**
|
||||
* AWS gives s3:ListAccessPoints and the account-level Block Public Access actions no
|
||||
* resource type, so the request is checked against the wildcard alone, as the no-resource
|
||||
* actions of other namespaces are (the KMS list operations): a bucket-scoped statement,
|
||||
* {@code arn:<partition>:s3:::*} or any other ARN, grants them nothing, and a NotResource
|
||||
* naming any bucket denies the call.
|
||||
*/
|
||||
@Test
|
||||
void s3ControlAccountRoutesAreCheckedAgainstTheWildcardAlone() {
|
||||
when(uriInfo.getPath()).thenReturn("/v20180820/accesspoint");
|
||||
assertEquals(List.of("*"),
|
||||
builder.buildResources("s3", "s3:ListAccessPoints", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
when(uriInfo.getPath()).thenReturn("/v20180820/configuration/publicAccessBlock");
|
||||
assertEquals(List.of("*"),
|
||||
builder.buildResources("s3", "s3:PutAccountPublicAccessBlock", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
assertEquals(List.of("*"),
|
||||
builder.buildResources("s3", "s3:GetAccountPublicAccessBlock", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
assertEquals(List.of("*"),
|
||||
builder.buildResources("s3", "s3:PutAccountPublicAccessBlock", ctx, "us-gov-west-1", ACCOUNT,
|
||||
"aws-us-gov"));
|
||||
}
|
||||
|
||||
/**
|
||||
* The operation tells S3 Control's requests from the data plane, not the path: a request a
|
||||
* data-plane action claims under the same prefix, a bucket actually named v20180820, keeps
|
||||
* the bucket and object ARN of its own path, the slashes of its key included.
|
||||
*/
|
||||
@Test
|
||||
void aDataPlaneOperationUnderTheS3ControlPrefixKeepsItsOwnArn() {
|
||||
when(uriInfo.getPath()).thenReturn("/v20180820/tags/key.txt");
|
||||
assertEquals(List.of("arn:aws:s3:::v20180820/tags/key.txt"),
|
||||
builder.buildResources("s3", "s3:PutObject", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
when(uriInfo.getPath()).thenReturn("/v20180820");
|
||||
assertEquals(List.of("arn:aws:s3:::v20180820"),
|
||||
builder.buildResources("s3", "s3:ListBucket", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
when(uriInfo.getPath()).thenReturn("/v20180820/a/b.txt");
|
||||
when(uriInfo.getRequestUri()).thenReturn(URI.create("http://localhost/v20180820/a//b.txt"));
|
||||
assertEquals(List.of("arn:aws:s3:::v20180820/a//b.txt"),
|
||||
builder.buildResources("s3", "s3:PutObject", ctx, "us-east-1", ACCOUNT, "aws"));
|
||||
void aDataPlaneRequestUnderTheS3ControlPrefixKeepsItsOwnBucketAndObject() {
|
||||
assertEquals(List.of("arn:aws:s3:::v20180820/tags/key.txt"), s3("PUT", "/v20180820/tags/key.txt", "PutObject"));
|
||||
assertEquals(List.of("arn:aws:s3:::v20180820"), s3("GET", "/v20180820", "ListObjects"));
|
||||
}
|
||||
|
||||
// ── The vendored table of request resources ─────────────────────────────────
|
||||
|
||||
+47
-23
@@ -156,17 +156,57 @@ class S3ObjectOperationsIamEnforcementIntegrationTest {
|
||||
f.select("a/rows.csv").statusCode(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* SelectObjectContent is POST ?select&select-type=2, as botocore routes it: a request naming ?select alone is the
|
||||
* object's other POST route, checked as s3:PutObject, and S3 runs no query on it, so a caller allowed to write but
|
||||
* not to read gets none of the object.
|
||||
*/
|
||||
@Test
|
||||
void selectingFromAVersionNeedsGetObjectVersion() {
|
||||
// S3Controller selects from the version named, so it is checked as reading that version.
|
||||
Fixture f = new Fixture("select-version", true);
|
||||
String versionId = f.seedVersion("a/rows.csv");
|
||||
void aSelectWithoutItsTypeReadsNothing() {
|
||||
Fixture f = new Fixture("select-untyped", false);
|
||||
f.seed("a/rows.csv");
|
||||
|
||||
f.policy(f.allow("s3:PutObject"));
|
||||
ValidatableResponse response = f.user().queryParam("select", "")
|
||||
.contentType("application/xml")
|
||||
.body("""
|
||||
<SelectObjectContentRequest>
|
||||
<Expression>SELECT * FROM S3Object</Expression>
|
||||
<ExpressionType>SQL</ExpressionType>
|
||||
<InputSerialization><CSV><FileHeaderInfo>USE</FileHeaderInfo></CSV></InputSerialization>
|
||||
<OutputSerialization><CSV/></OutputSerialization>
|
||||
</SelectObjectContentRequest>
|
||||
""")
|
||||
.when().post(f.path("a/rows.csv")).then();
|
||||
response.statusCode(not(200)).body(not(containsString("1,one")));
|
||||
}
|
||||
|
||||
/**
|
||||
* Botocore gives SelectObjectContent's request no version, and the S3 user guide requires s3:GetObject for it alone,
|
||||
* so it reads the current version whatever versionId it names: a caller allowed s3:GetObject reads no older one.
|
||||
*/
|
||||
@Test
|
||||
void aSelectReadsTheCurrentVersionWhateverItNames() {
|
||||
Fixture f = new Fixture("select-current", true);
|
||||
String old = f.admin().body("id,name\n1,old\n").when().put(f.path("a/rows.csv"))
|
||||
.then().statusCode(200).extract().header("x-amz-version-id");
|
||||
f.admin().body("id,name\n2,new\n").when().put(f.path("a/rows.csv")).then().statusCode(200);
|
||||
|
||||
f.policy(f.allow("s3:GetObject"));
|
||||
denied(f.select("a/rows.csv", versionId), "s3:GetObjectVersion");
|
||||
f.select("a/rows.csv", old).statusCode(200)
|
||||
.body(containsString("2,new")).body(not(containsString("1,old")));
|
||||
}
|
||||
|
||||
f.policy(f.allow("s3:GetObjectVersion"));
|
||||
f.select("a/rows.csv", versionId).statusCode(200);
|
||||
/**
|
||||
* A request naming two of a bucket's sub-resources is taken alike by both their routes, and runs as whichever S3's
|
||||
* handler picks, so it is refused even for a caller allowed both actions.
|
||||
*/
|
||||
@Test
|
||||
void aRequestNamingTwoSubresourcesIsRefused() {
|
||||
Fixture f = new Fixture("two-subresources", false);
|
||||
f.policy(f.allowOnBucket("s3:PutBucketCORS", "s3:PutBucketPolicy"));
|
||||
f.user().queryParam("cors", "").queryParam("policy", "").body("{}")
|
||||
.when().put("/" + f.bucket).then().statusCode(403).body(containsString("AccessDenied"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -496,22 +536,6 @@ class S3ObjectOperationsIamEnforcementIntegrationTest {
|
||||
.when().put(f.path("a/created")).then().statusCode(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
void aRequestNamingTwoSubresourcesIsCheckedAsTheOneThatRuns() {
|
||||
// S3 serves ?tagging before ?acl, so this request returns the object's tags.
|
||||
Fixture f = new Fixture("order", false);
|
||||
f.seed("a/tagged");
|
||||
|
||||
f.policy(f.allow("s3:GetObjectAcl"));
|
||||
denied(f.user().queryParam("acl", "").queryParam("tagging", "").when().get(f.path("a/tagged")).then(),
|
||||
"s3:GetObjectTagging");
|
||||
|
||||
f.policy(f.allow("s3:GetObjectTagging"));
|
||||
f.user().queryParam("acl", "").queryParam("tagging", "").when().get(f.path("a/tagged")).then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<Tagging"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void readingAVersionNeedsGetObjectVersion() {
|
||||
// The API reference: with a versionId, s3:GetObjectVersion is needed and s3:GetObject is not.
|
||||
|
||||
@@ -127,7 +127,8 @@ class S3AnnotationsIntegrationTest {
|
||||
|
||||
@Test
|
||||
@Order(7)
|
||||
void headObjectAnnotationMatchesGetStatus() {
|
||||
void aHeadNamingAnAnnotationIsAHeadOfTheObject() {
|
||||
// Botocore models no HEAD of an annotation, so the request is HeadObject, whichever annotation it names.
|
||||
given()
|
||||
.when()
|
||||
.head("/" + BUCKET + "/docs/report.txt?annotation&annotationName=labels")
|
||||
@@ -138,7 +139,7 @@ class S3AnnotationsIntegrationTest {
|
||||
.when()
|
||||
.head("/" + BUCKET + "/docs/report.txt?annotation&annotationName=missing")
|
||||
.then()
|
||||
.statusCode(404);
|
||||
.statusCode(200);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -211,13 +212,14 @@ class S3AnnotationsIntegrationTest {
|
||||
|
||||
@Test
|
||||
@Order(13)
|
||||
void emptyAnnotationNameDispatchesToList() {
|
||||
void anEmptyAnnotationNameIsRefusedAsTheGetItNames() {
|
||||
// A request naming annotationName is GetObjectAnnotation, as botocore reads it, so an empty one is refused.
|
||||
given()
|
||||
.when()
|
||||
.get("/" + BUCKET + "/docs/report.txt?annotation&annotationName=")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<ListObjectAnnotationsOutput"));
|
||||
.statusCode(400)
|
||||
.body(containsString("<Code>InvalidAnnotationName</Code>"));
|
||||
}
|
||||
|
||||
// ========== Versioned bucket behavior ==========
|
||||
|
||||
+48
-103
@@ -73,8 +73,10 @@ class S3ControlIamEnforcementIntegrationTest {
|
||||
{"Effect":"Allow","Action":"s3:ListTagsForResource","Resource":"arn:aws:s3:::%1$s"}]}"""
|
||||
.formatted(bucket));
|
||||
|
||||
// The Go SDK sends the ARN's colons percent-encoded once: RestAssured must not encode the % again.
|
||||
String encodedArn = "arn%3Aaws%3As3%3A%3A%3A" + bucket;
|
||||
given()
|
||||
.urlEncodingEnabled(false)
|
||||
.header("Authorization", auth(user, "s3"))
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
@@ -163,35 +165,63 @@ class S3ControlIamEnforcementIntegrationTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* The regional ARN form, the one the tagging operation's own request pattern and the AWS
|
||||
* CLI examples use, is the request's resource as written: a policy naming it authorizes the
|
||||
* read, because the ARN is not rewritten into the global form a data-plane path mints.
|
||||
* The ARN is decoded once, as the Go SDK encodes it once and IAM reads the route: one encoded twice names no ARN
|
||||
* after that, so the handler refuses it rather than act on a bucket whose policy denies the call.
|
||||
*/
|
||||
@Test
|
||||
void listTagsForResourceIsAuthorizedByAPolicyOnTheRegionalArnForm() {
|
||||
String bucket = bucketWithTags("control-regional");
|
||||
void anArnEncodedTwiceNamesNoBucket() {
|
||||
String bucket = bucketWithTags("control-double-encoded");
|
||||
given()
|
||||
.header("Authorization", auth("test", "s3"))
|
||||
.contentType("application/json")
|
||||
.body("""
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Deny","Principal":"*","Action":"s3:ListTagsForResource",
|
||||
"Resource":"arn:aws:s3:::%1$s"}]}"""
|
||||
.formatted(bucket))
|
||||
.when()
|
||||
.put("/" + bucket + "?policy")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
String user = userWith("""
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow","Action":"s3:ListTagsForResource",
|
||||
"Resource":"arn:aws:s3:us-east-1:000000000000:bucket/%1$s"}]}"""
|
||||
.formatted(bucket));
|
||||
{"Effect":"Allow","Action":"s3:ListTagsForResource","Resource":"*"}]}""");
|
||||
|
||||
given()
|
||||
.urlEncodingEnabled(false)
|
||||
.header("Authorization", auth(user, "s3"))
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
.get("/v20180820/tags/arn:aws:s3:us-east-1:000000000000:bucket/" + bucket)
|
||||
.get("/v20180820/tags/arn%253Aaws%253As3%253A%253A%253A" + bucket)
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<ListTagsForResourceResult"))
|
||||
.body(containsString("<Key>Env</Key>"));
|
||||
.statusCode(400)
|
||||
.body(containsString("<Code>InvalidRequest</Code>"))
|
||||
.body(not(containsString("<Key>Env</Key>")));
|
||||
}
|
||||
|
||||
/**
|
||||
* A bucket policy is resolved from the bucket the tagged ARN names, not from the bucket the
|
||||
* data-plane reading of the ARN's resource part would find: the regional form's resource is
|
||||
* {@code bucket/<name>}, and the real bucket's policy denying the control action must deny a
|
||||
* caller whose identity policy allows it.
|
||||
* A request matching an S3 Control route Floci does not serve reaches no handler: the router answers every path
|
||||
* under {@code /v20180820} that S3ControlController does not serve with 404, so none runs as an object of a bucket
|
||||
* named v20180820, whatever IAM checks it as.
|
||||
*/
|
||||
@Test
|
||||
void anS3ControlRouteFlociDoesNotServeRunsNothing() {
|
||||
for (String[] call : new String[][] {{"PUT", "/v20180820/bucket/foo"}, {"DELETE", "/v20180820/bucket/foo"},
|
||||
{"GET", "/v20180820/accesspoint/foo"}, {"PUT", "/v20180820"}}) {
|
||||
given()
|
||||
.header("Authorization", auth("test", "s3"))
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.body("x")
|
||||
.when()
|
||||
.request(call[0], call[1])
|
||||
.then()
|
||||
.statusCode(404);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A bucket policy is resolved from the bucket the tagged ARN names: the bucket's policy denying
|
||||
* the control action denies a caller whose identity policy allows it.
|
||||
*/
|
||||
@Test
|
||||
void aBucketPolicyOnTheTaggedBucketDeniesTheControlRead() {
|
||||
@@ -202,7 +232,7 @@ class S3ControlIamEnforcementIntegrationTest {
|
||||
.body("""
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Deny","Principal":"*","Action":"s3:ListTagsForResource",
|
||||
"Resource":"arn:aws:s3:us-east-1:000000000000:bucket/%1$s"}]}"""
|
||||
"Resource":"arn:aws:s3:::%1$s"}]}"""
|
||||
.formatted(bucket))
|
||||
.when()
|
||||
.put("/" + bucket + "?policy")
|
||||
@@ -217,7 +247,7 @@ class S3ControlIamEnforcementIntegrationTest {
|
||||
.header("Authorization", auth(user, "s3"))
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
.get("/v20180820/tags/arn:aws:s3:us-east-1:000000000000:bucket/" + bucket)
|
||||
.get("/v20180820/tags/arn:aws:s3:::" + bucket)
|
||||
.then()
|
||||
.statusCode(403)
|
||||
.body(containsString("is not authorized to perform: s3:ListTagsForResource"));
|
||||
@@ -391,91 +421,6 @@ class S3ControlIamEnforcementIntegrationTest {
|
||||
.body(containsString("is not authorized to perform: s3:ListAccessPoints"));
|
||||
}
|
||||
|
||||
/**
|
||||
* The regional form names the account whose bucket it acts on, so a grant on
|
||||
* {@code arn:aws:s3:us-east-1:222222222222:bucket/<name>} authorizes a caller in another
|
||||
* account, whom the bucket's own policy admits, to read and change the tags of
|
||||
* 222222222222's bucket, and never of its own same-named one, which the plain bucket name
|
||||
* would otherwise resolve to. The bucket's policy is found in the account the ARN names,
|
||||
* the same bucket the read and the write act on.
|
||||
*/
|
||||
@Test
|
||||
void aRegionalArnActsOnTheBucketOfTheAccountItNames() {
|
||||
String bucket = "control-cross-account-" + UUID.randomUUID().toString().substring(0, 8);
|
||||
String regionalArn = "arn:aws:s3:us-east-1:" + OTHER_ACCOUNT + ":bucket/" + bucket;
|
||||
cleanup.register(() -> EnforcementFixtures.removeBucket(baseUri.getPort(),
|
||||
auth(OTHER_ACCOUNT, "s3"), bucket));
|
||||
cleanup.register(() -> EnforcementFixtures.removeBucket(baseUri.getPort(),
|
||||
auth("test", "s3"), bucket));
|
||||
createBucketWithTag(bucket, "Team", "other", auth(OTHER_ACCOUNT, "s3"));
|
||||
createBucketWithTag(bucket, "Team", "own", auth("test", "s3"));
|
||||
|
||||
String userName = "s3-control-cross-" + UUID.randomUUID().toString().substring(0, 8);
|
||||
EnforcementFixtures.UserCredentials credentials = EnforcementFixtures.createUser(cleanup,
|
||||
baseUri.getPort(), auth("test", "iam"), userName);
|
||||
String userArn = "arn:aws:iam::" + ACCOUNT + ":user/" + userName;
|
||||
String identityPolicy = """
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow","Action":["s3:ListTagsForResource","s3:TagResource"],
|
||||
"Resource":"%1$s"}]}"""
|
||||
.formatted(regionalArn);
|
||||
EnforcementFixtures.putUserPolicy(baseUri.getPort(), auth("test", "iam"), userName, "p",
|
||||
identityPolicy);
|
||||
String user = credentials.accessKeyId();
|
||||
|
||||
given()
|
||||
.header("Authorization", auth(OTHER_ACCOUNT, "s3"))
|
||||
.contentType("application/json")
|
||||
.body("""
|
||||
{"Version":"2012-10-17","Statement":[
|
||||
{"Effect":"Allow","Principal":{"AWS":"%1$s"},
|
||||
"Action":["s3:ListTagsForResource","s3:TagResource"],
|
||||
"Resource":"%2$s"}]}"""
|
||||
.formatted(userArn, regionalArn))
|
||||
.when()
|
||||
.put("/" + bucket + "?policy")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
|
||||
given()
|
||||
.header("Authorization", auth(user, "s3"))
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
.get("/v20180820/tags/" + regionalArn)
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<Key>Team</Key>"))
|
||||
.body(containsString("<Value>other</Value>"));
|
||||
|
||||
given()
|
||||
.header("Authorization", auth(user, "s3"))
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.contentType("application/xml")
|
||||
.body("<Tagging><Tags><Tag><Key>Owner</Key><Value>team</Value></Tag></Tags></Tagging>")
|
||||
.when()
|
||||
.post("/v20180820/tags/" + regionalArn)
|
||||
.then()
|
||||
.statusCode(204);
|
||||
|
||||
given()
|
||||
.header("Authorization", auth(OTHER_ACCOUNT, "s3"))
|
||||
.when()
|
||||
.get("/" + bucket + "?tagging")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<Key>Owner</Key>"))
|
||||
.body(not(containsString("<Value>own</Value>")));
|
||||
|
||||
given()
|
||||
.header("Authorization", auth("test", "s3"))
|
||||
.when()
|
||||
.get("/" + bucket + "?tagging")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body(containsString("<Value>own</Value>"))
|
||||
.body(not(containsString("<Key>Owner</Key>")));
|
||||
}
|
||||
|
||||
/**
|
||||
* A tagging ARN naming a bucket its account does not own answers {@code NoSuchBucket}, not
|
||||
* the tags of the caller's same-named bucket: the handler acts on the bucket the ARN names
|
||||
|
||||
@@ -37,7 +37,8 @@ class S3ControlUrlEncodedArnIntegrationTest {
|
||||
private static final String DECODED_ARN =
|
||||
"arn:aws:s3:" + REGION + ":" + ACCOUNT + ":bucket/" + BUCKET;
|
||||
|
||||
// What the Go SDK actually puts on the wire: colons AND slashes URL-encoded.
|
||||
// What the Go SDK actually puts on the wire: colons AND slashes URL-encoded, once, which RestAssured must not
|
||||
// encode again.
|
||||
private static final String ENCODED_ARN =
|
||||
"arn%3Aaws%3As3%3A" + REGION + "%3A" + ACCOUNT + "%3Abucket%2F" + BUCKET;
|
||||
|
||||
@@ -82,6 +83,7 @@ class S3ControlUrlEncodedArnIntegrationTest {
|
||||
@DisplayName("ListTagsForResource accepts URL-encoded ARN from Go AWS SDK v2 (#435)")
|
||||
void listTagsForResourceWithUrlEncodedArn() {
|
||||
given()
|
||||
.urlEncodingEnabled(false)
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
.get("/v20180820/tags/" + ENCODED_ARN)
|
||||
@@ -119,6 +121,7 @@ class S3ControlUrlEncodedArnIntegrationTest {
|
||||
"</Tags></Tagging>";
|
||||
|
||||
given()
|
||||
.urlEncodingEnabled(false)
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.contentType("application/xml")
|
||||
.body(body)
|
||||
@@ -128,6 +131,7 @@ class S3ControlUrlEncodedArnIntegrationTest {
|
||||
.statusCode(204);
|
||||
|
||||
String response = given()
|
||||
.urlEncodingEnabled(false)
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
.get("/v20180820/tags/" + ENCODED_ARN)
|
||||
@@ -144,6 +148,7 @@ class S3ControlUrlEncodedArnIntegrationTest {
|
||||
@DisplayName("UntagResource accepts URL-encoded ARN from Go AWS SDK v2 (#435)")
|
||||
void untagResourceWithUrlEncodedArn() {
|
||||
given()
|
||||
.urlEncodingEnabled(false)
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
.delete("/v20180820/tags/" + ENCODED_ARN + "?tagKeys=CostCenter")
|
||||
@@ -151,6 +156,7 @@ class S3ControlUrlEncodedArnIntegrationTest {
|
||||
.statusCode(204);
|
||||
|
||||
given()
|
||||
.urlEncodingEnabled(false)
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
.get("/v20180820/tags/" + ENCODED_ARN)
|
||||
@@ -177,7 +183,7 @@ class S3ControlUrlEncodedArnIntegrationTest {
|
||||
@Order(7)
|
||||
@DisplayName("Malformed percent-encoding returns S3 Control ErrorResponse wrapper (#435, #557)")
|
||||
void malformedPercentEncodingReturnsXmlError() {
|
||||
// %ZZ is not a valid percent-encoding sequence; URLDecoder throws IAE.
|
||||
// %ZZ is not a valid percent-encoding sequence, so what the router decodes names no ARN.
|
||||
Response response = given()
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
@@ -209,6 +215,7 @@ class S3ControlUrlEncodedArnIntegrationTest {
|
||||
// Go SDK v2 percent-encodes colons: arn%3Aaws%3As3%3A%3A%3A<bucket>
|
||||
String encodedPlainArn = "arn%3Aaws%3As3%3A%3A%3A" + BUCKET;
|
||||
given()
|
||||
.urlEncodingEnabled(false)
|
||||
.header("x-amz-account-id", ACCOUNT)
|
||||
.when()
|
||||
.get("/v20180820/tags/" + encodedPlainArn)
|
||||
|
||||
@@ -286,6 +286,32 @@ def authorized_actions(documents: list[dict], page: dict | None = None, models:
|
||||
if operations}
|
||||
|
||||
|
||||
def version_choice(entry: dict) -> dict | None:
|
||||
"""The choice an S3 user guide Either row gives: the parameter its sentences name, the action for a request
|
||||
without it and the one for a request specifying it; None for a row giving no such choice."""
|
||||
sentences = entry.get("either", {}).get("sentences", {})
|
||||
named = {match.group(1) for match in map(SPECIFYING_RE.search, sentences.values()) if match}
|
||||
without = [action for action, sentence in sentences.items() if "without specifying" in sentence]
|
||||
with_ = [action for action, sentence in sentences.items() if "without specifying" not in sentence]
|
||||
if len(named) == 1 and len(without) == 1 and len(with_) == 1:
|
||||
return {"parameter": next(iter(named)), "without": without[0], "with": with_[0]}
|
||||
return None
|
||||
|
||||
|
||||
def s3_version_choices(page: dict) -> dict[str, dict]:
|
||||
"""Each S3 operation the user guide gives a version choice and no single required action of its own, wherever its
|
||||
request names the version: DeleteObjects names each in its body, so no request's query tells the choice."""
|
||||
found = {}
|
||||
for heading, entry in page.items():
|
||||
head = LEVEL_RE.match(heading)
|
||||
if head is None or head.group(2) or any(action.startswith("s3:") for action in entry.get("required", [])):
|
||||
continue
|
||||
choice = version_choice(entry)
|
||||
if choice is not None:
|
||||
found[head.group(1)] = choice
|
||||
return dict(sorted(found.items()))
|
||||
|
||||
|
||||
def s3_query_parameters(data: Path | None = None) -> dict[str, list[str]]:
|
||||
"""The query parameters botocore's S3 model gives each operation's request, from the botocore `regen_rest_routes`
|
||||
reads unless `data` names one."""
|
||||
@@ -347,14 +373,8 @@ def s3_required(page: dict, models: dict, query: dict[str, list[str]]) -> tuple[
|
||||
s3_model[operation] = singles[0]
|
||||
elif len(singles) == 1:
|
||||
actions[operation] = singles[0]
|
||||
elif not singles and "either" in entry:
|
||||
sentences = entry["either"]["sentences"]
|
||||
named = {match.group(1) for match in map(SPECIFYING_RE.search, sentences.values()) if match}
|
||||
without = [action for action, sentence in sentences.items() if "without specifying" in sentence]
|
||||
with_ = [action for action, sentence in sentences.items() if "without specifying" not in sentence]
|
||||
if (len(named) == 1 and len(without) == 1 and len(with_) == 1
|
||||
and next(iter(named)) in query.get(operation, [])):
|
||||
versioned[operation] = {"parameter": next(iter(named)), "without": without[0], "with": with_[0]}
|
||||
elif not singles and (choice := version_choice(entry)) and choice["parameter"] in query.get(operation, []):
|
||||
versioned[operation] = choice
|
||||
for (namespace, model, operation), (action, evidence) in MEASURED_BY_MODEL.items():
|
||||
if "https://" not in evidence:
|
||||
raise ValueError(f"MEASURED_BY_MODEL gives {model}:{operation} with no link to its evidence")
|
||||
|
||||
@@ -274,7 +274,8 @@ from pathlib import Path
|
||||
|
||||
import fetch_athena_glue_ddl_permissions
|
||||
from regen_iam_authorized_actions import (ROUTES as ROUTES_FILE, authorized_actions, fetch_references,
|
||||
load_s3_required, s3_query_parameters, vendored_sections)
|
||||
load_s3_required, s3_query_parameters, s3_version_choices,
|
||||
vendored_sections)
|
||||
from regen_iam_passed_roles import (
|
||||
NAMESPACE_RE,
|
||||
OPERATION_RE,
|
||||
@@ -303,10 +304,10 @@ NAMESPACES = ("access-analyzer", "account", "acm", "application-autoscaling", "a
|
||||
"servicequotas", "ssm", "sso", "states", "textract", "timestream-influxdb", "translate", "signer", "xray",
|
||||
"securityhub", "guardduty", "secretsmanager", "scheduler", "lambda", "cloudformation", "glue",
|
||||
"sqs", "sns", "kinesis", "pipes", "dsql", "sts", "eks", "resource-groups", "logs",
|
||||
"ec2-instance-connect")
|
||||
"ec2-instance-connect", "s3")
|
||||
|
||||
# The namespaces whose resources ResourceArnBuilder builds itself.
|
||||
HAND_BUILT = ("apigateway", "bedrock", "dynamodb", "iam", "kms", "s3")
|
||||
HAND_BUILT = ("apigateway", "bedrock", "dynamodb", "iam", "kms")
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------
|
||||
# MEASURED: what AWS was measured to check where neither botocore nor the Service Reference says it.
|
||||
@@ -581,6 +582,17 @@ def action_mapping(documents: list[dict]) -> dict[str, dict[str, str]]:
|
||||
for namespace, operations in sections["versioned"].items():
|
||||
for operation, choice in operations.items():
|
||||
mapped.setdefault(namespace, {}).setdefault(operation, choice["without"])
|
||||
# One whose request names the version in its body takes the same types (DeleteObjects, s3:DeleteObject's), though
|
||||
# no query tells which action a request needs.
|
||||
if query is not None:
|
||||
types = {action["Name"]: sorted(resource["Name"] for resource in action.get("Resources") or [])
|
||||
for document in documents if document.get("Name") == "s3" for action in document.get("Actions", [])}
|
||||
for operation, choice in s3_version_choices(page).items():
|
||||
without, with_ = (choice[side].split(":", 1)[1] for side in ("without", "with"))
|
||||
if types.get(without) != types.get(with_):
|
||||
raise ValueError(f"s3:{operation}: the S3 user guide's {choice['without']} and {choice['with']} act on "
|
||||
f"different types, so neither's stand for the other's")
|
||||
mapped.setdefault("s3", {}).setdefault(operation, choice["without"])
|
||||
for namespace, clients in sections["authorizedByModel"].items():
|
||||
for operation, action in clients.get(namespace, {}).items():
|
||||
mapped.setdefault(namespace, {}).setdefault(operation, action)
|
||||
|
||||
@@ -9,21 +9,21 @@ A request no rule maps is the operation whose route it matches, checked as the a
|
||||
`iam-authorized-actions.json` names for it, or as its own; `IamRestRouteCoverageTest` builds a
|
||||
request on each route and compares the action the registry gives with that one.
|
||||
|
||||
The credential scopes in `HAND_ROUTED` are authorized by the registry's rules alone, each for its
|
||||
reason, and their routes are vendored for the coverage test only, each with the query parameters and
|
||||
headers botocore requires its request to carry (`required`), which the registry's rules read: S3's
|
||||
CompleteMultipartUpload, on `POST /{Bucket}/{Key+}`, is told by its `uploadId`. Operations sharing a route are told
|
||||
apart by what botocore models their requests as carrying: the query parameters and headers of the
|
||||
members their input requires (`requires`: S3's UploadPart, on `PUT /{Bucket}/{Key+}` with PutObject,
|
||||
requires `partNumber` and `uploadId`, CopyObject the `x-amz-copy-source` header), and a deprecated
|
||||
operation (`deprecated`) yields to a current one of the same route and conditions. An operation whose
|
||||
every request botocore's endpoint rules send to another service's endpoint, signed for it, is that
|
||||
service's (`signedElsewhere`: S3's ListDirectoryBuckets, signed `s3express`). Within any scope, the
|
||||
operations of a route must leave every request one operation: no two current ones requiring the same, and
|
||||
what any two require together required by one of them, the route requiring all a request carries being its
|
||||
operation (`shared_routes`). The generation fails otherwise. Supported shared-controller alternatives are generated beside the modeled URI, with
|
||||
member-location overrides for the bare route, and its own method where that is not the operation's. These
|
||||
alternatives describe existing Floci compatibility paths, not additional botocore operations.
|
||||
The credential scopes in `HAND_ROUTED`, none now, are authorized by the registry's rules alone, each for
|
||||
its reason, and their routes are vendored for the coverage test only, each with the query parameters and
|
||||
headers botocore requires its request to carry (`required`), which the registry's rules read. Operations
|
||||
sharing a route are told apart by what botocore models their requests as carrying: the query parameters
|
||||
and headers of the members their input requires (`requires`: S3's UploadPart, on `PUT /{Bucket}/{Key+}`
|
||||
with PutObject, requires `partNumber` and `uploadId`, CopyObject the `x-amz-copy-source` header), and a
|
||||
deprecated operation (`deprecated`) yields to a current one of the same route and conditions. An
|
||||
operation whose every request botocore's endpoint rules send to another service's endpoint, signed for
|
||||
it, is that service's (`signedElsewhere`: S3's ListDirectoryBuckets, signed `s3express`). Within any
|
||||
scope, the operations of a route must leave every request one operation: no two current ones requiring
|
||||
the same, and what any two require together required by one of them, the route requiring all a request
|
||||
carries being its operation (`shared_routes`). The generation fails otherwise. Supported shared-
|
||||
controller alternatives are generated beside the modeled URI, with member-location overrides for the
|
||||
bare route, and its own method where that is not the operation's. These alternatives describe existing
|
||||
Floci compatibility paths, not additional botocore operations.
|
||||
|
||||
The models are botocore's `<model>/<apiVersion>/service-2.json` (Apache-2.0,
|
||||
https://github.com/boto/botocore), the latest API version of each, located as
|
||||
@@ -62,11 +62,7 @@ REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
OUTPUT = REPO_ROOT / "src/main/resources/aws/rest-routes.json"
|
||||
|
||||
# Credential scopes the registry's rules authorize alone, and why.
|
||||
HAND_ROUTED: dict[str, str] = {
|
||||
"s3":"S3 tells apart the operations it serves on one route by their query parameters and headers, which the "
|
||||
"registry's S3 rules and sub-resource overrides read, and an S3 Control route Floci does not serve "
|
||||
"runs as the S3 data plane, checked as the bucket or object operation that runs",
|
||||
}
|
||||
HAND_ROUTED: dict[str, str] = {}
|
||||
|
||||
# botocore model -> the credential scope Floci authorizes its requests under.
|
||||
MODELS: dict[str, str] = {
|
||||
|
||||
@@ -617,6 +617,22 @@ def test_a_version_choice_is_read_only_where_botocore_gives_its_parameter_in_the
|
||||
assert "GetObject" in versioned["s3"]
|
||||
|
||||
|
||||
def test_every_version_choice_is_listed_wherever_the_request_names_the_version():
|
||||
deletes = {"section": "Object operations and permissions",
|
||||
"either": {"actions": ["s3:DeleteObject", "s3:DeleteObjectVersion"], "sentences": {
|
||||
"s3:DeleteObject": "Required if you want to remove an object without specifying versionId in the "
|
||||
"request.",
|
||||
"s3:DeleteObjectVersion": "Required if you want to remove a specific version of an object by "
|
||||
"specifying versionId in the request."}}}
|
||||
choices = r.s3_version_choices({**S3_PAGE, "DeleteObjects": deletes})
|
||||
# DeleteObjects names its versions in its body, so it has no query choice, but its choice is still the page's.
|
||||
assert choices["DeleteObjects"] == {"parameter": "versionId", "without": "s3:DeleteObject",
|
||||
"with": "s3:DeleteObjectVersion"}
|
||||
assert choices["GetObject"]["with"] == "s3:GetObjectVersion"
|
||||
# CopyObject requires an action of its own, so its Either row is about its source, not its version.
|
||||
assert "CopyObject" not in choices
|
||||
|
||||
|
||||
def test_a_measured_version_choice_by_a_parameter_botocore_gives_no_query_is_refused():
|
||||
with pytest.raises(ValueError):
|
||||
r.s3_required(S3_PAGE, S3_MODELS, {**S3_QUERY, "GetObjectAnnotation": []})
|
||||
|
||||
@@ -1116,7 +1116,13 @@ def test_the_vendored_file_is_well_formed():
|
||||
for kind in ("app", "gwy", "net")]
|
||||
assert operations["elasticloadbalancing:CreateRule"]["creates"] == [
|
||||
{"type": f"listener-rule/{kind}", "parent": f"listener/{kind}", "arn": "ListenerArn"} for kind in ("app", "net")]
|
||||
assert set(document["handBuilt"]) >= {"s3"}
|
||||
# S3 is read from the table: an object by its bucket and key, a bucket per client, and DeleteObjects, whose keys
|
||||
# its XML body names, left to S3.
|
||||
assert "s3" in document["namespaces"] and "s3" not in document["handBuilt"]
|
||||
assert operations["s3:PutObject"]["resources"] == [
|
||||
{"type": "object", "fill": {"BucketName": "Bucket", "ObjectName": "Key"}}]
|
||||
assert operations["s3:CreateBucket"]["locatedApart"] == {"s3": {"Bucket": "{Bucket}"}, "s3control": {"Bucket": "{name}"}}
|
||||
assert operations["s3:DeleteObjects"]["unread"] == ["Delete.Objects[].Key"]
|
||||
# An SQS request names its queue by URL, which SQS finds as its handlers do; a create names it by name.
|
||||
assert operations["sqs:SendMessage"]["resources"] == [{"type": "queue", "fill": {}, "find": ["QueueUrl"]}]
|
||||
assert operations["sqs:CreateQueue"]["resources"] == [{"type": "queue", "fill": {"QueueName": "QueueName"}}]
|
||||
|
||||
@@ -85,7 +85,8 @@ def test_check_passes_on_a_fresh_generation_and_fails_on_a_stale_one(tmp_path, m
|
||||
assert r.main(data + ["--check"]) == 1
|
||||
|
||||
|
||||
def test_a_route_naming_two_operations_a_request_cannot_tell_apart_is_refused():
|
||||
def test_a_route_naming_two_operations_a_request_cannot_tell_apart_is_refused(monkeypatch):
|
||||
monkeypatch.setattr(r, "HAND_ROUTED", {"s3": "the rules route it alone"})
|
||||
with pytest.raises(SystemExit):
|
||||
r.build({"lambda": model("rest-json", "2015-03-31", GetByName=("GET", "/things/{Name}"),
|
||||
GetById=("GET", "/things/{Id}/"))}, "botocore test")
|
||||
@@ -190,7 +191,8 @@ def test_an_operation_signed_for_another_service_on_every_request_is_left_out_of
|
||||
r.build({"s3": s3}, "botocore test")
|
||||
|
||||
|
||||
def test_the_hand_routed_scopes_are_rendered_with_their_reasons():
|
||||
def test_the_hand_routed_scopes_are_rendered_with_their_reasons(monkeypatch):
|
||||
monkeypatch.setattr(r, "HAND_ROUTED", {"s3": "the rules route it alone"})
|
||||
text = r.render(r.build({"s3": model("rest-xml", "2006-03-01", HeadBucket=("HEAD", "/{Bucket}"))},
|
||||
"botocore test"))
|
||||
|
||||
@@ -456,7 +458,8 @@ def test_vendored_documented_routes_read_from_another_page_or_malformed_are_refu
|
||||
r.carried_documented(r.render(r.build({}, "test", {"glue-iceberg-rest": malformed})))
|
||||
|
||||
|
||||
def test_a_hand_routed_scopes_routes_list_all_their_requests_must_carry_for_the_coverage_test():
|
||||
def test_a_hand_routed_scopes_routes_list_all_their_requests_must_carry_for_the_coverage_test(monkeypatch):
|
||||
monkeypatch.setattr(r, "HAND_ROUTED", {"s3": "the rules route it alone"})
|
||||
s3 = shaped(model("rest-xml", "2006-03-01", CompleteMultipartUpload=("POST", "/{Bucket}/{Key+}"),
|
||||
PutObject=("PUT", "/{Bucket}/{Key+}")),
|
||||
"CompleteMultipartUpload", {"UploadId": ("querystring", "uploadId")})
|
||||
|
||||
Reference in new issue
Block a user