Commit Graph
1806 Commits
Author SHA1 Message Date
Priamo Germosen 096d336fab fix(iam): check five more services on the resources their requests name (#6810)
Under IAM enforcement, Amazon Data Firehose, Cognito identity pools,
Cloud Map, ACM and CodePipeline requests were checked on `*`, so a
grant scoped to a delivery stream, an identity pool, a namespace or a
service, a certificate, a pipeline or a webhook was refused, and a deny
scoped to one never applied.

The generated table of the resources requests name now reads them, 149
operations, from AWS's Service Reference and botocore as it reads the
first batch: their namespaces move from the generator's NOT_COVERED to
NAMESPACES, and the table is regenerated, nothing in it edited by hand.
Each resource type's ARN format is the one Floci's handler mints, which
the tests check against the ARN each create returns:

- `deliverystream/<name>`, `identitypool/<id>`, `namespace/<id>`,
  `service/<id>`, `certificate/<id>` and a pipeline's bare name.
- A CodePipeline webhook: AWS's is `webhook:<name>` (the Service
  Reference's format, and the CodePipeline User Guide's
  "arn:aws:codepipeline:eu-central-1:ACCOUNT_ID:webhook:my-webhook"),
  where Floci minted `webhook/<name>`; it now mints AWS's.

Corrections, each with its reason:

- StartPipelineExecution and GetPipelineState name their pipeline by a
  bare `name` ("The name of the pipeline to start"), which the rule
  reads only for an operation named after the type, as Step Functions'
  StartExecution names its execution, not its state machine, by `name`.
- CreatePipeline and UpdatePipeline name it by `pipeline.name`, and
  PutWebhook the webhook by `webhook.name` and the pipeline it connects
  to by `webhook.targetPipeline`. `pipeline.roleArn` holds the role
  CodePipeline assumes, an IAM role's ARN by botocore's pattern, and
  names no pipeline: read as one, a pipeline-shaped value there was the
  only resource an UpdatePipeline was checked on, so a grant on one
  pipeline let a request change another.
- CreateCustomActionType and DeleteCustomActionType are checked on
  `actiontype:Custom/<category>/<provider>/<version>`: a custom action
  type's owner is Custom, which the request does not give, and AWS's
  CreateCustomActionType example answers "owner": "Custom".
- Cloud Map's CreateService names its namespace by NamespaceId or,
  when it gives none or a JSON null, by DnsConfig.NamespaceId, which
  botocore keeps ("Use NamespaceId in Service instead") and the handler
  reads then; read by NamespaceId alone, a deny on the namespace did
  not hold for a request giving it in DnsConfig. A member given a JSON
  null now counts as absent in a resource's `when` and `unless`, as a
  handler reading it with asText(null) takes it, unless the table reads
  it as a value through `absent` (EventBridge's bus, `default`).

For those, the table may fill a variable from a structure's field
(`pipeline.name`), and give a variable no member gives the one value
its handler uses (`fixed`), in the generator, the loader and the
reader.

A create that names another resource beside the one it makes has its
tags checked on the one it makes alone, which the table marks `made`:
the resource of the type, or with an ARN format's leading resource
word, related to the operation's name past its verb. PutWebhook's tags
go on the webhook, not the pipeline it connects to, and CreateService's
on `service/*`, not the namespace; no other operation in the table is
marked.

Application Auto Scaling stays unread, its reason in NOT_COVERED: a
scalable target's ARN ends in an id the service mints, while requests
name the target by ServiceNamespace, ResourceId and ScalableDimension,
and read as a member ResourceId would fill that id.

RequestResourceMembersTest's test of every resource in the table now
expects, with the resource a request names, the resources of its
operation that every request names: Cloud Map's CreateService names
the service it creates with every variable open.
2026-10-28 17:18:11 -05:00
berce 6abd9d7ffb fix(sqs): reject DelaySeconds outside 0-900 (#6852)
* fix(sqs): reject DelaySeconds outside 0-900

* fix(sqs): don't let a json DelaySeconds outside the int range wrap around

* docs(sqs): document the DelaySeconds range
2026-10-28 16:57:56 -04:00
lex00 52eb4b9a9c fix(iam): read condition keys a request carries in a member under another name (#6858)
BY_HAND in tools/aws/regen_iam_condition_keys.py names the member for four pairs: iam:ServiceSpecificCredentialServiceName from ServiceName and iam:ServiceSpecificCredentialAgeDays from CredentialAgeDays on CreateServiceSpecificCredential, and iam:DelegationDuration from SessionDuration and iam:TemplateArn from Permissions.PolicyTemplateArn on CreateDelegationRequest. --check fails when a BY_HAND member leaves botocore, its type no longer fits the key, or the reference stops listing the pair. The other notRead pairs now say where AWS takes the value from.
2026-10-28 16:42:22 -04:00
Allen Sanborn 3212ce3c15 fix(iam): page ListUsers, ListGroups and policy lists with MaxItems and Marker (#6267)
* fix(iam): page ListUsers, ListGroups and policy lists with MaxItems and Marker

ListUsers, ListGroups, ListAttached{User,Group,Role}Policies and
List{User,Group,Role}Policies read neither MaxItems nor Marker and always
answered IsTruncated=false with every entry. They now go through the same
paginate helper ListRoles and ListPolicies use: an omitted MaxItems returns
100 items as the API reference documents, a MaxItems outside 1 to 1000 is a
ValidationError, a Marker the handler did not issue is InvalidInput, and a
Marker appears only on a truncated page.

Users, groups and inline policy names are listed in name order and attached
policies in ARN order, so a Marker keeps pointing at the same place between
calls even when the entry it names is removed in between.

* fix(iam): resume the newly paged IAM lists only from their own markers

ListUsers, ListGroups and the attached and inline policy lists read a
Marker they could not verify as a list offset, so Marker=1 silently
skipped the first entry, and a marker issued for one role's list resumed
another role's list after the same policy. These lists have only ever
issued signed markers, so their cursor now carries the action and, for a
per-principal list, the principal, and any other marker is InvalidInput.
ListRoles, ListPolicies and the other readers keep their existing marker
handling.

Also covers the omitted-MaxItems default on ListUsers and ListGroups with
101 entries: 100 on the first page, IsTruncated and a Marker that fetches
the last one.

* fix(iam): bind the newly paged IAM lists' markers to the request account

IAM entities are stored per account, but the marker cursor named only the
action and principal, so a marker issued in one account resumed the same
listing in another account after the same name and skipped its earlier
entries. The cursor now carries the account the request reads from, and a
marker from another account is InvalidInput.

* feat(iam): generate the IAM paginator table from botocore

tools/aws/regen_iam_paginators.py writes src/main/resources/aws/iam-paginators.json
from botocore's iam/2010-05-08 model, as the other tools/aws generators do: every
operation whose request models Marker, with its input and output token, limit
key, truncation flag and result keys, the MaxItems bounds of maxItemsType
(1 to 1000), the default page size the limit's documentation states ("defaults
to 100"), and markerType's bounds.

The 34 operations botocore's paginators-1.json lists take their tokens and
result keys from it. The six that model Marker without a paginator
(GetServiceLastAccessedDetails, GetServiceLastAccessedDetailsWithEntities,
GetOrganizationsAccessReport, ListServiceSpecificCredentials,
ListDelegationRequests, ListPoliciesGrantingServiceAccess) are read from
their request and response shapes and marked paginator: false.
ListServiceSpecificCredentials documents no default and
ListPoliciesGrantingServiceAccess models no MaxItems; the table records
both as such rather than inventing a value.

make aws-data-sync regenerates it and make aws-data-check fails when it is
stale against the pinned botocore.

* fix(iam): page every IAM list through one path driven by the paginator table

IamQueryHandler paged eight lists by hand through paginateScoped, a few more
through paginate, and left the rest (the tag readers, ListAccessKeys,
ListInstanceProfiles, ListPolicyVersions, GetGroup, ListGroupsForUser,
ListEntitiesForPolicy, GetAccountAuthorizationDetails, the simulations and
others) ignoring MaxItems and Marker with IsTruncated=false. Every operation
the generated aws/iam-paginators.json lists now pages through one paginate
path that reads its entry: the limit's bounds and default, the members that
resume and continue it, and the result keys pagedList and pagedLists write
under. paginateScoped, paginateByMarker and the hardcoded 100/1000 are gone.
ListEntitiesForPolicy and GetAccountAuthorizationDetails page their several
lists as one, in the paginator's order.

Marker semantics, chosen deliberately: a Marker is opaque and resumes only the
listing that issued it, on every paged operation. AWS documents it as "the
value of the Marker element in the response that you received", so a value
Floci did not issue, a bare number included, is InvalidInput; ListRoles,
ListPolicies and the report readers no longer read one as an index. The
marker names the last item of its page, so a deletion or creation ahead of
it skips nothing and repeats nothing, and it is signed (not prefixed) over
the account, the operation and every request member except Marker and
MaxItems, so a marker from another operation, principal, filter or account
is refused while the page size may change between calls. Signing the scope
instead of carrying it keeps issued markers short. markerType's 320-character
bound is not checked separately: every other value is refused as unissued,
and a long ARN key could otherwise push an issued marker past it.

MaxItems is now checked before Marker, as a malformed request is rejected
before anything is read from it. An omitted MaxItems is the documented 100;
ListServiceSpecificCredentials, which documents no default, returns its whole
list.

IamListPaginationIntegrationTest.everyPaginatedOperationHonoursMaxItemsAndMarker
iterates the table's 34 paginated operations, each with a fixture listing two
items, and checks the MaxItems bounds, a one-item page, resumption without
loss or repetition, the default page, and refusal of an unissued, bare-index
or other operation's marker. Its fixture map must name exactly the table's
operations, so one AWS starts paging later fails until it has one.
ListAccountAliases can hold one alias, so it is checked for everything but a
cut page. The tests the table test subsumes are removed; the ordering, anchor,
cross-listing and cross-account tests stay. Two ServiceLastAccessed tests
that walked by bare index now use issued markers.

* fix(iam): hold paged requests to the model through IamRequestShapes

MaxItems and Marker are request constraints, and main now checks a
request against the model before it runs. Every operation the paginator
table pages joins that wave in regen_iam_shapes.py, and the bounds leave
iam-paginators.json (which keeps only defaultItems, the documented page
size) and limit(), which now only parses the number and applies the
default. A pytest pins that every operation the paginator table carries
is in the wave, so a list AWS starts paging later cannot slip past the
bounds.

Six paged operations join with Marker and MaxItems alone: the three
report readers, whose JobId is answered by hand as "length equal to 36"
and whose SortKey enum is checked by hand; ListPoliciesGrantingServiceAccess,
whose empty ServiceNamespaces is answered InvalidInput; and the two
Simulate operations, whose ContextEntries nest a list inside a list of
structures, which the walk refuses. Vendoring their whole request would
reword answers main already settled; vendoring nothing would leave their
paging unbounded (SimulateCustomPolicy with MaxItems=0 was a 500).

Markers fit markerType's 320 characters. A marker embeds the key of the
item its page ended on, so a policy ARN with a long path produced one
of 610 characters, which the model check would now refuse on the way
back. SignedMarkers takes a maximum length: a cursor that would exceed
it is carried as a SHA-256 digest (119 characters once signed and
encoded), and the instance keeps the digest -> key mapping. That keeps
the existing resume semantics exactly: the marker still resolves to the
full key, so a deleted anchor resumes at the first key after it, and
the signature still binds account, operation and filter. Two stateless
alternatives were rejected: a truncated key prefix plus digest cannot
order a deleted anchor against items sharing the prefix, and a position
index skips or repeats when items ahead of it are deleted. The cost is
one map entry per distinct long key a page has ended on, never evicted
(marked ponytail in the code); markers already do not survive a
restart, as the signing key is per instance. Keys short enough to embed
are carried as before.

Checkstyle (./mvnw checkstyle:check) reported six errors in files this
PR touches: javax import order and two inline org.w3c.dom.Node in the
pagination test, and an inline java.util.Base64 in SignedMarkersTest.
The test now parses through XmlParser.parseDocument instead of its own
DocumentBuilderFactory. The switch statements in ListEntitiesForPolicy
and the test's holder fixture are switch expressions.

Tests: aMarkerEndingOnALongPolicyArnFitsTheModelAndResumesPastItsDeletion
attaches three policies under a 391-character path, pages with
MaxItems=1, deletes the anchor and resumes through the model check.
Constructing SignedMarkers without the limit fails it (610 characters);
restoring the pre-wave iam-request-shapes.json fails the table-driven
test (MaxItems=0 answered 500, MaxItems=1001 answered 200).

* fix(iam): bind a caller-resolved list's marker to the resolved user

ListAccessKeys, ListMFADevices, ListSSHPublicKeys, ListSigningCertificates
and ListServiceSpecificCredentials default an omitted UserName to the
caller. The marker was signed over the raw request members, so two users
in one account who both omitted UserName shared a scope and one's marker
resumed the other's listing. These handlers now page over the request
with UserName set to the resolved user, so the marker is bound to the
user the list was read for, named or implicit.

* fix(iam): bound the SignedMarkers digest map and trim the pagination test

SignedMarkers held every long cursor it had issued a digest for, in a map
that never shrank. It is now an access-ordered LinkedHashMap capped at
10,000 entries, the idiom CloudWatch Logs uses for its Insights queries. A
marker whose digest was evicted resolves to null, the same as an unknown
digest, so callers refuse it as an invalid marker.

IamListPaginationIntegrationTest spent most of its time in RestAssured's
per-request overhead on the hundred-item fixtures. Those creates and
deletes now go concurrently through java.net.http. The users and groups
default test keeps its first-page checks of the default of 100 and drops
the second page, which the roles default test and the every-operation test
already cover. The SSH public key fixture is generated once per run.
2026-10-28 16:37:49 -04:00
Jackson Price d7763fff8e fix(ec2): honor DryRun when creating VPCs, subnets and security groups (#6823)
* fix(ec2): honor DryRun when creating VPCs, subnets and security groups

CreateVpc, CreateSubnet and CreateSecurityGroup never read DryRun, so a
dry run created the resource it asked about. A real CreateVpc that
followed left a second VPC, and the real create of a subnet or group
failed: InvalidSubnet.Conflict for the subnet's CIDR block,
InvalidGroup.Duplicate for the group name.

Each handler now answers DryRunOperation (HTTP 412) and creates
nothing. It answers after parsing the tag specifications and, for
CreateSecurityGroup, reading the required GroupName and
GroupDescription. Ec2Service makes every other check, so a dry run is
answered before the VPC id, the VPC, the CIDR block, the tenancy,
overlap with other subnets or a taken group name are checked. AWS
documents no order for those checks.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): look up the VPC before answering a subnet or group dry run

A DryRun CreateSubnet or CreateSecurityGroup naming a VPC that does not
exist answered DryRunOperation, "would have succeeded", while the real
create fails with InvalidVpcID.NotFound. CreateSubnet without a VpcId
answered DryRunOperation too, where the real create gives
MissingParameter.

The handlers now require the VpcId and look up the VPC, the default one
for a security group without a VpcId, before they answer the dry run.
A RunInstances dry run already keeps the error of a missing subnet or
group, and the Service Authorization Reference lists the VPC, with its
tags and tenancy, in both actions' permissions.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): share the security group VPC lookup with its dry run

The CreateSecurityGroup handler and Ec2Service each picked the group's
VPC, the named one or the region's default, so the two copies could
drift. Ec2Service.requireSecurityGroupVpc now does it for both, and the
CreateSubnet handler looks up the VpcId it has just required.

New tests cover a group dry run with an absent or empty VpcId, which is
answered for the default VPC, and a group dry run in a missing VPC
through the SDK. The comments and docs now name every check a dry run
skips, the zone and the IPv6 block included, and link the Service
Authorization Reference.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* docs(ec2): list the errors a create dry run still returns

The CreateVpc, CreateSubnet and CreateSecurityGroup rows said which
checks a dry run skips but not which errors it keeps. They now say that
a tag specification error, and a missing VpcId, GroupName,
GroupDescription or VPC, comes back on a dry run too, and that an empty
VpcId also puts a security group in the default VPC.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): keep tag errors ahead of the create dry-run answer

CreateVpc, CreateSubnet and CreateSecurityGroup read their tag
specifications before they answer DryRun, so a reserved aws: key is
still rejected on a dry run, as the EC2 docs page says. A handler test
now pins that for all three actions; it fails if the dry-run answer is
moved ahead of the tag parsing.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): use the shared EC2 request helper in the dry-run test

Ec2CreateDryRunIntegrationTest now calls Ec2Requests.ec2 with "test"
and "us-east-1" instead of its own copy of that helper. The comments
in the CreateSubnet and CreateSecurityGroup handlers shrink to one
line each; docs/services/ec2.md already explains the order.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-28 16:26:07 -04:00
Aniket Shukla 3c391a06fb fix(lambda): paginate code signing configurations (#6832)
* fix(lambda): paginate code signing configurations

* fix(lambda): reuse signed service pagination
2026-10-28 13:46:14 -04:00
Aniket Shukla 8a19c3024b fix(sqs): reject invalid receive message counts (#6827) 2026-10-28 13:19:19 -04:00
galsuchetzky-act f926968167 fix(s3control): take TagResource and UntagResource tag condition keys from generated data (#6677)
The Service Authorization Reference lists aws:RequestTag/${TagKey} and
aws:TagKeys as condition keys for s3:TagResource, and aws:TagKeys for
s3:UntagResource. botocore's s3control model says where the request
carries them: TagResource's Tags list in the body, UntagResource's
TagKeys in the tagKeys query parameters.

With IAM enforcement on, Floci checked both S3 Control actions with no
request tag keys. A policy that allows TagResource only for certain tag
values, or UntagResource only for certain keys, matched no request, so
a request it allows was denied, and a ForAllValues condition on
aws:TagKeys allowed UntagResource whatever keys it named.

tools/aws/regen_s3control_tag_condition_keys.py now generates
s3control-tag-condition-keys.json from the two sources, as the DynamoDB
condition key table is generated: every s3 action the reference gives
either key, and every S3 Control operation's request members that feed
them, found as the tag-on-create table finds tag members.
IamConditionContextResolver reads it for a request on an S3 Control
route. The make targets check the members offline against the pinned
botocore in CI and the actions online against AWS in the IAM data drift
workflow. S3's own bucket and object tag keys stay as written, since
they were measured against AWS and do not all match the reference.
2026-10-28 10:14:26 -04:00
TATSUNO “Taz” Yasuhiro c55cb887d5 fix(lambdaweb): check resource policy statements in the order AWS does (#6788)
AWS runs each policy check on every statement before the next check. It answers an Effect other than Allow or Deny with "Invalid effect: <value>", and a malformed Principal or a non-string Effect with "Syntax error at position (-1,-1)".
2026-10-28 09:22:20 -04:00
Aniket Shukla 9eabfaf9bc fix(apigateway): map Lambda context in HTTP proxy requests (#6818) 2026-10-28 09:09:52 -04:00
Francisco Javier Barón 481b7f8d6d fix(lambda): pass LoggingConfig log format and level to the runtime (#6775)
* fix(lambda): pass LoggingConfig log format and level to the runtime

A function with LogFormat=JSON logged text: neither launcher set AWS_LAMBDA_LOG_FORMAT or AWS_LAMBDA_LOG_LEVEL, which the runtime interface clients read. Both launchers now pass them, and a JSON function without an ApplicationLogLevel gets INFO, the level the API reports, through one default shared with the response.

Closes #6774

* docs(lambda): note the log format and level the runtime receives

* refactor(lambda): build the runtime environment in one place for both launchers

ContainerLauncher and KubernetesPodLauncher wrote the same AWS_LAMBDA_* lines, the LoggingConfig ones included. LambdaRuntimeEnv.of now builds them once.
2026-10-28 09:04:14 -04:00
Aniket Shukla 119b7e9580 fix(athena): paginate query execution listings (#6816) 2026-10-28 09:03:55 -04:00
Jackson Price a83fa9c9e4 fix(ec2): keep the KMS key a volume is created with (#6756)
* fix(ec2): keep the KMS key a volume is created with

CreateVolume ignored KmsKeyId, so neither CreateVolume nor
DescribeVolumes reported kmsKeyId, even for a volume created encrypted
with a named key. A volume CreateVolume makes encrypted now keeps the
request's KmsKeyId as given, or gets the region's default EBS key when
it names none, and both responses report it. A volume that is not
encrypted keeps no key, and volumes stored before this change load as
they were, with no kmsKeyId.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): read volume responses with XmlParser

The volume KMS key tests read CreateVolume and DescribeVolumes
responses with a regular expression, substring offsets and plain
string matches. They now read them with XmlParser, as other EC2 tests
do, so element values are parsed and decoded as XML. Test-only; the
assertions are unchanged.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): keep the KMS key a launch's block device mapping names

A launch's encrypted volumes got the region's default EBS key even
when their block device mapping, or the launch template's, named
Ebs.KmsKeyId. The key now goes from the mapping to the volume, root
included, and a mapping that names none still gets the default.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* test(ec2): pin the launch volume key rules

Pin that a launch mapping naming a key without Encrypted leaves the
volume unencrypted and keyless, and that a request entry's key wins
over its launch template's. Delete the test's launch template, reuse
the launch helpers in the root-volume test, and document that a launch
volume encrypted only by its snapshot gets the region's default key,
since snapshots record no key.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-28 08:46:27 -04:00
Daniël van Ziel 0ee1d10659 fix(cognito): refuse a reused TOTP code for SOFTWARE_TOKEN_MFA (#6808)
A software-token code now answers one SOFTWARE_TOKEN_MFA challenge only. The step of the
last accepted code is stored on the user, and a code from that step or an earlier one fails
with ExpiredCodeException, as AWS does (RFC 6238 section 5.2). VerifySoftwareToken does not
record a step, and activating a new authenticator clears it.

Fixes #6804
2026-10-28 07:20:05 -04:00
Liron CohenandliRONCO11 548788840c feat(cloudfront): serve execute-api custom origins of this Floci in-process (#6754)
* feat(cloudfront): serve execute-api custom origins of this Floci in-process

A custom origin whose domain is an execute-api endpoint of an HTTP or
REST API in this Floci is now served through Floci's own listener, as
Lambda Web Function endpoints are, with the execute-api domain as Host.
Before, the origin went through DNS and the viewer got 502.

ApiGatewayExecuteApiHostFilter.routes() says whether the host filter
rewrites a host and path onto an API. A request that it does not route
(a WebSocket API, a disabled endpoint, a missing stage, another region)
answers 404 and never reaches Floci's other endpoints. Dot segments in
the forwarded path are resolved before that check. A forwarded viewer
Host answers 502. Every other origin is unchanged.

* refactor(cloudfront): share the execute-api routing decision with the host filter

ApiGatewayExecuteApiHostFilter.decide() returns the routing decision
without touching the request, with its lookups under the API owner's
account. filter() applies the decision and routes() reuses it, so the
two cannot drift.

This fixes two cases where routes() differed from filter(): an HTTP API
owned by another account than the viewer is now served through
CloudFront, and a REST API origin whose region label is not the API's
region now answers 404. The 404 body is one constant.

* refactor(apigateway): keep Optional out of the route decision record

RouteDecision stores the API owner as a nullable value, and the decision
helpers take it as a plain parameter. Optional stays the return type of
the owner lookup only, as AGENTS.md asks.

* refactor(cloudfront): name the ignored host parse failure and drop the Optional test field

---------

Co-authored-by: liRONCO11 <7966063+liRONCO11@users.noreply.github.com>
2026-10-28 07:12:47 -04:00
Aniket Shukla a636de20dc fix(backup): persist and manage backup plan tags (#6796) 2026-10-28 07:08:52 -04:00
Aniket Shukla da517acc65 fix(cognito): verify SRP proofs in custom authentication (#6794)
* fix(cognito): verify SRP proofs in custom authentication

* fix(cognito): include password-change challenge parameters
2026-10-28 07:07:12 -04:00
lex00 967e87d7f7 fix(iam): set iam: condition keys from a table generated from the Service Reference (#6762) 2026-10-28 07:00:43 -04:00
TATSUNO “Taz” Yasuhiro 0c549d267b fix(lambdaweb): refuse an Allow for a federated principal as public (#6789)
AWS blocks an Allow whose principal is Federated unless its values include "*" or a trusted condition pins the caller. It checks no pattern on Federated or CanonicalUser values.
2026-10-28 06:54:08 -04:00
Priamo Germosen 897667f4e6 feat(emr): run command-runner.jar commands and script-runner.jar scripts (#6747)
In the docker runner mode a step that was not a Spark step failed
without running, so a cluster whose steps copy files with the AWS CLI,
run a shell or Python script, or call script-runner.jar could not run
its steps in Floci. Such steps now run in the same per-step container
of the release's EMR Serverless image, with the same credentials,
endpoint, logs and lifecycle as a Spark step, as the Release Guide's
"Run commands and scripts on an Amazon EMR cluster" describes them:

- command-runner.jar runs its arguments as a command, the first naming
  it, unless that is spark-submit (the Spark step, as before) or a tool
  the image does not have: hive-script, pig-script, hadoop-streaming,
  hadoop-lzo and s3-dist-cp still fail without running.
- script-runner.jar, by name (7.13 on) or by its
  s3://<region>.elasticmapreduce/libs/script-runner/script-runner.jar
  URI, fetches its script from S3 with the image's AWS CLI and the
  step's credentials, then runs it with the step's other arguments. A
  local script named without a path runs from the working directory
  when a file there has that name.

The image runs them as its hadoop user in /home/hadoop, with bash,
Python 3, Java, curl and AWS CLI v2, which reaches Floci through
AWS_ENDPOINT_URL. A spark-submit they start runs in local mode on
Floci's S3 with the cluster's spark-defaults: the image's
spark-defaults.conf names EMR Serverless's resource manager as its
master, which a system property cannot override, so the container
starts through a wrapper that copies the image's Spark configuration,
drops that master, and adds local mode, Floci's settings and the
cluster's spark-defaults, in a SPARK_CONF_DIR of its own, each setting
escaped for the Properties file Spark reads it as. A step's own --conf
still wins. A failed command reads "The step's command exited
with code N.".

SparkJobRunner.Job gets a command, run in place of spark-submit.
2026-10-27 23:41:56 -05:00
Andre Kurait 2d3fb0ce87 fix(ecs): bound FireLens socket volume paths (#6787)
Bound the FireLens socket volume name while retaining full ownership labels and cleanup retries, and validate the inspected host path before creating containers.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-28 00:30:44 -04:00
Andre Kurait a46a2b32fd fix(lambda): honor platform-specific runtime image overrides (#6786)
Select runtime images with the effective Docker platform while preserving runtime-wide defaults, explicit platform precedence and code-volume helper platform.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-28 00:06:26 -04:00
Andre Kurait 80dbdbc0f8 fix(elb): default omitted classic listener instance protocols (#6785) 2026-10-27 23:55:13 -04:00
Vũ Thế Huy d3c4732b31 feat(cloudformation): provision Redshift event subscriptions (#6664)
* feat(redshift): support event history and SNS notifications

* fix(redshift): guard stale delivery failures and prune all event scopes

* feat(cloudformation): provision Redshift event subscriptions

* fix(redshift): scope snapshot events and serialize subscription tag mutations

* feat(cloudformation): provision Redshift event subscriptions

* fix(cloudformation): resolve Redshift subscription list parameters

Use the shared list reader for SourceIds and EventCategories. Cover CommaDelimitedList and List<String> parameters through the AWS SDK and verify concurrent tag requests preserve CloudFormation tag updates.

* fix(redshift): honor event disablement and restore rollback attributes

Check the EventBridge external service key before publishing API events. Snapshot and restore CloudFormation resource attributes alongside subscription state during in-place rollback.

* fix(redshift): drop API event publisher and share subscription setup

Remove RedshiftApiEventPublisher, its handler hook, tests and docs, which are not part of the CloudFormation resource and emit CloudTrail-style events without a trail. Route createSubscription and replaceSubscription through one helper that normalizes the subscription fields.
2026-10-27 23:28:52 -04:00
Andre Kurait 5c20d54646 fix(appconfig): reject ambiguous configuration names (#6783) 2026-10-27 23:17:05 -04:00
Andre Kurait b5033e970d fix(ec2): model scheduled capacity reservations (#6764)
* fix(ec2): reject unsupported future capacity reservations

Reject StartDate before capacity reservation creation or client-token replay. Preserve immediate reservation behavior.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(ec2): model scheduled capacity reservations

Retain future start and commitment metadata, activate through capacity reconciliation, and preserve client-token replay.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(ec2): preserve activation membership and replay tags

Reuse open-reservation instance matching during activation, persist creation tag identity, and keep replay from overwriting later tag edits.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(ec2): validate future reservation matching and capacity

Require targeted matching, supported instance families and at least 32 vCPUs before future reservation publication. Preserve scheduling, tag replay and immediate reservation behavior.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-27 23:15:52 -04:00
Vũ Thế Huy 5bd4bd481a feat(redshift): publish CloudWatch cluster metrics (#6740)
* feat(redshift): publish CloudWatch cluster metrics

* fix(redshift): skip duplicate CloudWatch publication minutes

* test(redshift): isolate metrics publisher between integration tests

* fix(test): use Java 17 list access in Redshift metrics compatibility test

* fix(metrics): share minute publishing and prevent duplicate SQS samples

Centralize daemon scheduling, minute claims, per-target failures, retention and shutdown for SQS and Redshift. Carry the Redshift proxy key in metric targets and use the shared compatibility await fixture.

* docs(metrics): restore publisher class docs after the shared publisher move

Keep the SQS sample shape on SqsMetricsPublisher and document minute stamping, 15-day retention and the nothing-may-escape rule on MinuteMetricsPublisher.
2026-10-27 22:03:23 -04:00
Andre Kurait f4ace9ebbe fix(appconfig): return no content for cached configurations (#6777) 2026-10-27 22:00:37 -04:00
TATSUNO “Taz” Yasuhiro 701b04c410 feat(lambdaweb): reject resource policies whose principal does not exist (#6769)
* feat(lambdaweb): reject resource policies whose principal does not exist

PutResourcePolicy now looks up every AWS principal a policy names, as Lambda
does before it stores the policy. A role or user ARN has to name one IAM
holds in that account, under its own path, and a unique id one in the
function's account. A missing principal, an assumed-role session, a
CanonicalUser or an ARN in another partition gets the invalid principal
message, and a role or user named under another path gets the message
that the ARN does not match the actual one.

The principals are looked up after every statement passes its other
checks and before any statement is refused as public, which is the order
AWS checks them in.

* docs(lambdaweb): drop the principal check from the items not implemented yet

* refactor(lambdaweb): find policy principals through IamService and the resolver's partition

IamService.heldPrincipalArn now gives the ARN IAM holds what a principal
ARN names under, the root as given or the role or user at its own path.
DSQL's principal check and Lambda Web's use it, and Lambda Web keeps only
the path comparison and its messages. Lambda Web takes the partition from
RegionResolver.partitionForRegion, so a custom region falls back to the
deployment's partition.
2026-10-27 22:00:28 -04:00
Jackson Price a6cf29ea86 fix(cloudformation): copy a SAM function's VersionDescription to its version (#6770)
With AutoPublishAlias, SAM passes a function's VersionDescription to the
Description of the AWS::Lambda::Version it generates. The transform
dropped it, so a version published from a SAM template never had the
description the template gave it.

The version now takes it as written, leaving an intrinsic function for
CloudFormation to resolve. As in SAM, it stays out of the hash that
names the version, and Globals cannot set it: the transform refuses it
there, as it already refuses AutoPublishCodeSha256.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-27 19:13:02 -04:00
Andre Kurait 1a5decbb4a fix(ec2): honor default subnet filters (#6772)
Handle both documented default-subnet filter aliases and preserve safe asynchronous ENI cleanup.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-27 19:09:11 -04:00
Liron Cohen 4fffb5a8c1 feat(apigatewayv2): route VPC link integrations to Cloud Map service instances (#6753) 2026-10-27 19:06:02 -04:00
Priamo Germosen 32cbf73adc fix(eventbridge): answer PutEvents to a missing event bus as AWS does (#6748)
A PutEvents entry naming an event bus that does not exist failed with
InvalidArgument "EventBus not found" and counted in FailedEntryCount.
The EventBridge User Guide, on handling PutEvents failures: "If you use
PutEvents to publish an event to an event bus that does not exist,
EventBridge event matching will not find a corresponding rule and will
drop the event. Although EventBridge will send a 200 response, it will
not fail the request or include the event in the FailedEntryCount value
of the request response." botocore models no not-found error for
PutEvents, only InternalException, and the API Reference lists none.

Such an entry is now answered as published, with an event id and not
counted as failed, and dropped: it reaches no rule and no archive.
Floci logs the drop at INFO. An entry that is not valid, missing a
required field or with a Detail that is no JSON object, still fails as
before, whichever bus it names.

Only the PutEvents action changes. Floci's own deliveries to a bus, for
a rule's event bus target, a pipe, a schedule, a Lambda destination or
a replay, still fail an entry for a bus that does not exist: the
guide's sentence is about the action, and no document says how AWS
answers those deliveries.

Step Functions' optimized events:putEvents integration calls the
action, so a task publishing to a missing bus no longer fails with
EventBridge.FailedEntry; step-functions.md listed that as a deviation,
which is gone. Its two tests that used a missing bus to have an entry
rejected now leave out the entry's Source instead, and a third checks
that a task publishing to a missing bus succeeds.
2026-10-27 17:34:34 -05:00
Andre Kurait b6d9e4c7a4 feat(lambda): list provisioned concurrency configurations (#6758)
* feat(lambda): list provisioned concurrency configurations

Dispatch List=ALL to a paginated view of existing provisioned concurrency allocations. Preserve qualified ARNs, current status and existing pool lifecycle.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

* fix(lambda): share function ARN region resolution

Share the existing Lambda region validation and error message across function resolution and provisioned-concurrency lookup/listing.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>

---------

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-27 18:13:24 -04:00
Aniket Shukla c37e0aaba9 fix(ecr): explain unavailable registry responses (#6752)
* fix(ecr): explain unavailable registry responses

* refactor(ecr): share registry errors and data-plane fixtures
2026-10-27 18:13:10 -04:00
Jackson Price c2482e2844 fix(appconfig): list deployments with the settings they started with (#6759)
ListDeployments built each deployment's summary from the deployment
strategy as it is now: once a strategy that one of an environment's
deployments used was deleted, ListDeployments on that environment
answered 404 "Deployment strategy not found", while GetDeployment
still returned the deployment. The summary also took the profile's
current name over the one the deployment recorded. AWS documents these
values as the deployment's own (GetDeployment's
DeploymentDurationInMinutes is "Total amount of time the deployment
lasted"), and DeleteDeploymentStrategy, unlike DeleteEnvironment and
DeleteConfigurationProfile, has no ConflictException for a resource
in use.

- StartDeployment records the strategy's DeploymentDurationInMinutes,
  FinalBakeTimeInMinutes, GrowthFactor and GrowthType on the
  deployment, and StartDeployment and GetDeployment return them, as
  AWS documents for both.
- ListDeployments reports the recorded profile name and strategy
  settings, so deleting the strategy leaves earlier deployments as
  they started. Floci serves no UpdateDeploymentStrategy or
  UpdateConfigurationProfile yet; the recorded values also keep
  earlier deployments as they were once anything changes a strategy
  or renames a profile in place.
- Deployments stored by earlier builds load unchanged: GetDeployment
  still omits the settings they never recorded, and ListDeployments
  reads them from the strategy while it exists and reports them as
  null once it is gone, instead of failing.

Type is unchanged: it is still read from the profile.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-27 16:44:29 -04:00
Andre Kurait 0332b5cc24 fix(lambda): preserve alias identity in qualified reads (#6757)
Preserve the requested alias ARN while returning the resolved published version configuration. Retain snapshot-versus-latest regressions for both read APIs.

Signed-off-by: Andre Kurait <akurait@amazon.com>
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
2026-10-27 16:24:36 -04:00
Jackson Price 65df465fc3 fix(ec2): create the EBS volumes a launch's block device mappings describe (#6734)
* fix(ec2): create the EBS volumes a launch's block device mappings describe

RunInstances gave every instance one 8 GiB root at /dev/xvda and took
only the root's VolumeType from its block device mappings. Launches now
plan their volumes before anything is stored: the AMI's mappings, or an
8 GiB root when it maps none, with the launch's own entries merged over
them field by field, under either spelling of a device. The instance is
rooted at the AMI's RootDeviceName. NoDevice removes an AMI device and a
VirtualName entry takes one over, never the root. Snapshot sizes apply,
a smaller size, a missing snapshot, a missing or invalid device name and
a device named twice are refused with nothing stored, and IOPS and
throughput are kept only for the types that take them.

DescribeInstances lists every attached volume with its own state and
DeleteOnTermination, and termination treats the root like any other
volume. Volume reads settle attachments to an instance that ended
terminated without TerminateInstances, as a failed container launch does.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): delete every volume of a launch that is rolled back

A launch undone after its instances were stored, an instant CreateFleet
whose later launch fails or a RunInstances whose capacity reservation
was taken in the meantime, terminated its instances. Termination keeps
the volumes whose DeleteOnTermination is false, so the refused launch
left them behind as available.

Each launch now records the volumes it creates on its reservation, and
the rollback deletes those termination left unattached. The ids do not
depend on attachments, which a read can end first when a failed
container's volumes are settled. DeleteOnTermination is never changed,
so an instance whose termination fails keeps its volumes as they were,
and a volume attached to another instance since stays.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): size a snapshot-only root from its snapshot

For an AMI that maps no root device, the launch gave the root a fallback
8 GiB size before merging the launch's own entries, so a root entry
naming only Ebs.SnapshotId kept that size and a larger snapshot was
refused with InvalidBlockDeviceMapping. The fallback size now applies
only after the merge, when the root names neither a size nor a
snapshot.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* perf(ec2): read volume attachments once per DescribeInstances

Listing an instance's block device mapping scanned the whole volume
store, once for every instance in a RunInstances or DescribeInstances
response. The attachments of all the response's instances are now
gathered in one scan per region and looked up per instance.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-27 16:13:37 -04:00
Aniket Shukla ecb39dd7e0 fix(backup): paginate backup plan listings (#6714)
* fix(backup): paginate backup plan listings

* test(backup): share SDK clients and seed large fixtures locally
2026-10-27 15:52:32 -04:00
Andre Kurait 196ae07aa8 fix(lambda): preserve Kubernetes bootstrap paths (#6585) 2026-10-27 15:47:30 -04:00
Kenshin Okinaka afdd4b46ec fix(ses): answer invalid v1 bulk destination entries on their own (#6742)
SendBulkTemplatedEmail rejected the whole call for an entry with more
than 50 recipients, for template data that is not a JSON object, and
for a tag with an empty name. AWS answers each of these with a 200 and
that entry's InvalidParameterValue ("Recipient count exceeds 50.",
"The template data is invalid", "The tag name must be specified."),
while the other entries still send. DefaultTemplateData that is not a
JSON object, or a DefaultTags tag with an empty name, fails every
entry. Within one entry an address syntax error wins over an empty tag
name, which wins over invalid template data, which wins over the
recipient count.

A DefaultTags or ReplacementTags tag without a Name or a Value is a
model violation, and a skipped tag index is a tag with neither, listed
in the 400 ValidationError after the top-level members. A missing or
empty DefaultTemplateData is a 400 InvalidParameterValue, "The default
template data does not exist".

The handler marks such an entry with its message, and the send answers
it in the per-entry loop after the address syntax. The recipient limit
stays in the service: per entry for v1, whole call for v2 SendBulkEmail,
which was not probed.
2026-10-27 11:43:25 -04:00
Vũ Thế Huy 3d30bbcf7a feat(redshift): add event subscriptions with SNS delivery (#6705)
* feat(redshift): add event subscriptions with SNS delivery

Add Create, Modify, Delete and DescribeEventSubscriptions, subscription tagging, and publication of matching events to the subscription's SNS topic, honouring the topic policy.

* fix(redshift): deliver events from a consistent subscription snapshot and reject nameless subscription ARNs

Delivery copied no state under the lock modifySubscription holds, so a concurrent
update could change the topic between matching and publishing. Match and publish
from a snapshot taken under that lock.

A tag ARN ending in eventsubscription: passed an empty name to
describeSubscriptions, which lists all subscriptions. Reject it up front.
2026-10-27 11:34:38 -04:00
Liron CohenandliRONCO11 c538fb5520 feat(cloudfront): model AWS managed cache policies (#6698)
* feat(cloudfront): model AWS managed cache policies

Serve the 7 AWS managed cache policies that AWS documents with full
settings through GetCachePolicy, GetCachePolicyConfig and
ListCachePolicies, by their AWS IDs. ListCachePolicies honors
Type=managed|custom. UpdateCachePolicy and DeleteCachePolicy refuse a
managed policy with IllegalUpdate and IllegalDelete, as for managed
origin request policies. A cache behavior that references a managed
policy now forwards what that policy selects.

The 4 Amplify-only policies are not modeled: AWS publishes their IDs
but not their settings.

Closes #6691

* refactor(cloudfront): share the policy list merge and the managed ETag

listCachePolicies, listOriginRequestPolicies and listResponseHeadersPolicies
now call one helper for the Type check, the merge of custom and managed
policies, and the sort by name. Each method keeps its own paging, so the
response headers list still rejects an unknown marker.

The managed policy ETag is one constant beside the managed policy maps.

---------

Co-authored-by: liRONCO11 <7966063+liRONCO11@users.noreply.github.com>
2026-10-27 11:34:06 -04:00
jwoa95 3890378728 fix(elasticache): enforce user permissions in backend ACL sessions (#6608)
* fix(elasticache): enforce user permissions in backend ACL sessions

* fix(elasticache): block replication commands for ACL users

* fix(elasticache): deny persistence and migration commands
2026-10-27 10:36:05 -04:00
Aniket Shukla a4ef9eaa6a fix(ecs): renew task role credentials at the published URI (#6728) 2026-10-27 10:32:00 -04:00
Mario Toffia 3f294c3529 fix(apigateway): send x-amzn-ErrorType on REST gateway responses (#6687)
* fix(apigateway): send x-amzn-ErrorType on the API key 403

* fix(apigateway): send x-amzn-ErrorType on every REST gateway response

Authorizer, validation, media-type, configuration and Lambda proxy
failures now carry the error type AWS pairs with their gateway response
type, customised or not, measured on a REST API in eu-west-1.

* fix(apigateway): keep a gateway response's own x-amzn-ErrorType where AWS does

A gateway response that maps gatewayresponse.header.x-amzn-ErrorType sends
only that value for the validation, media type, configuration and
integration types, and sends it ahead of the default for the authorizer
and API key types, as measured on AWS.
2026-10-27 10:28:34 -04:00
Jackson Price 64069f9ccd fix(cloudwatch): report StateTransitionedTimestamp and AWS's StateValue enum order (#6719) 2026-10-27 10:26:26 -04:00
TiM 77f2477641 fix(kinesis): signal closed shard exhaustion and return child shards (#6716)
Return a terminal iterator and direct child metadata from coherent shard snapshots. Preserve final-batch delivery and prevent replay in Pipes and Firehose without changing checkpoint commit boundaries.
2026-10-27 10:24:57 -04:00
Mario Toffia 7ca109b595 fix(apigateway): route greedy resources below a path parameter (#6690)
A REST API resource such as /v1/admin/catalog/{kind}/{name+} never
matched: greedy resources were matched by the literal text prefix
"/v1/admin/catalog/{kind}/", which no request path starts with, and the
template matcher skipped greedy resources. Every parameterised resource
also ranked ahead of every greedy one.

Match every resource segment by segment and rank all matches the way
AWS does: more literal segments, then more segments before the greedy
parameter, then the leftmost literal. extractPathParams now yields the
parameters before a greedy one, so {kind} reaches the proxy event,
$input.params and integration parameter mappings.

Closes #6686
2026-10-27 10:24:07 -04:00
Matheus Oliveira 97ecbdd656 fix(iam): authorize S3 Control routes as their own s3 actions (#6681)
* fix(iam): authorize S3 Control routes as their own s3 actions

S3 Control clients sign with the s3 scope, so under IAM enforcement its
/v20180820 routes fell through to the S3 data-plane rules and were
checked as s3:GetObject, PutObject or DeleteObject on a bucket named
v20180820, which no policy can name: a role allowed
s3:ListTagsForResource on a bucket was denied its tag list, and
Terraform's AWS provider, which reads bucket tags through S3 Control,
never fell back to GetBucketTagging, leaving aws_s3_bucket unrefreshable.

Map the routes to the actions the Service Authorization Reference gives
them: ListTagsForResource, TagResource and UntagResource are checked
against the ARN the route names, as written and decoded as the handler
decodes it; ListAccessPoints and the account-level Block Public Access,
to which the S3 User Guide gives no resource, against every bucket in
the request's partition; the account control takes the
PutAccountPublicAccessBlock and GetAccountPublicAccessBlock actions. A
data-plane operation under the same prefix keeps its own bucket-and-object
ARN. A denial now answers in S3 Control's own ErrorResponse envelope, the
only one the s3control SDK deserializers read, so the message naming the
missing action survives to the client.

Closes #6537

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(iam): answer the three control-route gaps the review found

A tagging query on a control route still reached the data-plane override,
so GET /v20180820/tags/<arn>?tagging was checked as s3:GetObjectTagging
while the handler read the bucket's tags: the control rules now match
before the query overrides, and a caller holding only the object action
is denied where one holding the control action passes. A tagging ARN in
the regional form was rewritten to the global form downstream and its
bucket misread, so a policy naming the regional form the API reference
requires was denied; the provider now keeps a control tagging ARN as
written and reads the bucket it names. The account actions returned
arn:<partition>:s3:::*, which a bucket-scoped statement matches; they
now return the literal wildcard, so a bucket-scoped statement grants no
account-wide action, the convention the KMS no-resource actions
follow.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(iam): drive S3 Control route authorization from AWS's own data

The s3control model is vendored in rest-routes.json, regen_rest_routes
carries it under the s3 scope, as s3control signs with s3, and
IamRestRouteCoverageTest checks every S3 Control route Floci serves
against the Service Reference. The hand-written S3_CONTROL_RULES and
S3_CONTROL_ACTIONS lists are gone: the control routes are entries of the
one rules table, flagged to match before the S3 data-plane query
overrides so ?tagging on a tagging route cannot re-point the
authorization, and a denial answers in S3 Control's ErrorResponse
envelope by following the route instead of an action-name list. The
account-level Block Public Access is the one written-down exception, as
the reference files S3's and S3 Control's Get, Put and
DeletePublicAccessBlock under the bucket actions and the Block Public
Access page gives the account level its own actions.

A tagging ARN is read once, by the handler, the IAM check and the
bucket-policy lookup together: S3ControlArnUtils decodes and parses it
with AwsArnUtils.parse, and the regional form's account is the account
whose bucket the request acts on, so a grant on
arn:aws:s3:us-east-1:222222222222:bucket/reports no longer lets a
caller in 111111111111 read and change the tags of its own same-named
bucket: it reads and writes 222222222222's bucket, and answers
NoSuchBucket when that account holds no bucket of the name.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

* fix(s3): read the policy provider's ARNs without decoding them

The provider received every ARN already decoded, the data plane's from
the request path and a control tagging one re-minted by the rule that
read it off the wire, but the one-parse helper decoded again, so an
object key carrying a plus sign or a literal percent sequence changed
its bytes before IAM checked it: a policy on arn:aws:s3:::example/a+b.txt
denied the very object it named. The provider parses without decoding
now; the wire decode stays where it belongs, at the control request
boundary.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-10-27 10:12:51 -04:00