Under IAM enforcement a request that passes a role to a service needs iam:PassRole on that role,
but no Redshift or Redshift Serverless operation was checked for it. A caller allowed to create a
cluster or change its roles could attach any role to it, and Floci's COPY, UNLOAD and Spectrum
statements then run as that role; statements run through the Data API on a Redshift Serverless
workgroup can use its namespace's roles the same way.
Now checked, with iam:PassedToService as the Service Authorization Reference gives it:
- Redshift CreateCluster and RestoreFromClusterSnapshot pass the roles in IamRoles, and
ModifyClusterIamRoles those in AddIamRoles, to redshift.amazonaws.com. The lists are read through
the Redshift handler's own member pattern, so IamRoles.IamRoleArn.N, as the SDK sends it,
IamRoles.member.N and IamRoles.N all count. RestoreFromClusterSnapshot is checked although
Floci's restore attaches no role yet, as AWS checks it.
- Redshift Serverless CreateNamespace and UpdateNamespace pass the roles in iamRoles and the one
in defaultIamRoleArn, and CreateScheduledAction and UpdateScheduledAction pass roleArn, to
redshift-serverless.amazonaws.com.
The Redshift management guide: "To associate an IAM role with a cluster, a user must have
iam:PassRole permission for that IAM role." A role named only as a cluster's default,
DefaultIamRoleArn, is not checked on its own: the default is one of the roles the cluster holds, and
Floci does not act on it. A namespace's defaultIamRoleArn is checked, since Floci keeps it whether
or not iamRoles holds it.
COPY, UNLOAD and Spectrum now take a role only under the ARN IAM holds it under, path included, as
STS AssumeRole does. They looked the role up by its name alone, so a cluster given
role/sandbox/AdminRole, which a PassRole grant on role/sandbox/* allows, ran its statements as the
AdminRole IAM holds under another path.
IAM's AddRoleToInstanceProfile now passes the role it adds to ec2.amazonaws.com. Every instance
running with the profile gets that role's credentials from the instance metadata service, so adding
a role to a profile already attached to a running instance handed it any role. The IAM API
reference: "The caller of this operation must be granted the PassRole permission on the IAM role by
a permissions policy." RoleName names the role without its path, so the check uses the ARN IAM holds
the role under, or, for a role IAM does not hold, the ARN the name gives.
docs/services/iam.md lists the new operations, and docs/services/redshift.md the path rule.
hectorvent's #5962 follow-up: the javadoc claimed npm/pypi/nuget each have exactly one
asset per version, but a pypi release can hold both a source distribution and a wheel.
listPackageVersionAssets already lists both correctly; only the comment was wrong.
Added a Docker-gated test confirming both files list with their own correct size and hash.
* fix(s3): check CompleteMultipartUpload conditions atomically with the write
CompleteMultipartUpload judged If-Match and If-None-Match only in the
controller, before any lock, and then stored the object with options that
carried neither header. The recheck storeObject does under the bucket
monitor for PutObject therefore never ran for a completion, so concurrent
completions with If-None-Match: * on one key could all return 200, the last
body winning.
completeMultipartUpload now takes ifMatch and ifNoneMatch and passes them on
the store options, so they are rechecked under the bucket monitor together
with the write. The controller's early check stays, to spare assembling
parts for a request that will fail.
* test(s3): race conditional CompleteMultipartUpload over HTTP
16 barrier-synced CompleteMultipartUpload requests with If-None-Match: *
on one key: exactly one 200, the rest 412, and the stored body is the
winner's. Mirrors the existing concurrent PutObject test.
* test(s3): share the barrier race harness between conditional-write tests
The concurrent PutObject and CompleteMultipartUpload If-None-Match tests
now use one raceStatusCodes helper for the barrier, executor, timeouts and
shutdown, so the two cannot drift.
DSQL knows the cluster only by the TLS server name, and refuses a connection
that sends none with FATAL 08P01 "unable to accept connection, sni was not
received" once its password is in, whatever the password (measured). The
endpoint fell back to the host in the token and let such a connection in. It
now refuses it as DSQL does, and admit takes the cluster from the server
name alone. The integration tests connected to 127.0.0.1 through pgjdbc's
NonValidatingFactory and sent no server name; DsqlClusterFixture now gives
pgjdbc a NonValidatingFactory that names the cluster, as the compatibility
test's factory does.
* fix(ssm): honor path parameter type filters
Forward GetParametersByPath Type filters through the existing parameter-filter validation and matching rules. Retain path, recursion, region and public AMI selection, and document the remaining filter and pagination limitations.
* fix(ssm): validate path filter keys and apply key ids
Reject missing and action-invalid filter keys before selecting path results. Reuse the existing Type and KeyId matcher, and validate Label options while keeping label matching a documented gap.
Verify 264 focused SSM tests, Checkstyle, 95 docs tests, docs checks, and the partition gate. Regression tests fail before the fix and detect an inverted key allowlist.
* fix(ssm): reuse canonical invalid filter option errors
Share the existing AWS InvalidFilterOption message between DescribeParameters and Label path filters. Assert the complete HTTP message for invalid KeyId and Label options.
Verify 264 focused SSM tests, three CI-failing Lambda/SQS tests, Checkstyle, docs checks, 95 docs tests, and the partition gate. The two Label message assertions fail before the fix.
* fix(kms): page ListKeys and ListAliases with Limit and Marker
Both handlers ignored Limit and Marker and always returned every entry with
Truncated=false. They now page the way ListGrants does: entries sorted by id
(KeyId, AliasName), Marker is the base64 id of the last entry returned, an
unknown or undecodable Marker is InvalidMarkerException, and Limit is clamped
to the documented range (ListKeys 1-1000, ListAliases 1-100). ListAliases
applies the KeyId filter before paging. Without a Limit both still return
every entry.
* fix(kms): resume ListKeys and ListAliases after the marked entry is deleted
The Marker named the last entry returned and was rejected with
InvalidMarkerException when that entry was gone, so deleting while listing
(as Terraform and cloud-nuke do) broke the listing. Markers are now signed
cursors from core/common/SignedMarkers, as IAM and Lambda layers use, and the
next page starts at the first id sorting after the cursor. Only a marker this
instance did not issue is InvalidMarkerException.
* fix(kms): reject a ListKeys or ListAliases Limit outside the model
Limit was read with asInt() and clamped, so 0, a negative number, a string
or a decimal came back as a one-item page. The model types Limit as an
integer in LimitType [1..1000]: a non-integer is now SerializationException
and an out-of-range value is ValidationException with Smithy's wording.
ListAliases still clamps a Limit above its documented 100 page size.
* fix(kms): refuse a blank ListKeys or ListAliases Marker
A present but blank Marker was treated as omitted and restarted the listing.
An empty Marker now fails MarkerType's length >= 1 with ValidationException,
and a whitespace-only one is InvalidMarkerException, as for any marker this
instance did not issue.
* fix(kms): accept a ListKeys or ListAliases Marker only in the listing that issued it
The signed cursor named only the last id, so a marker from one listing was
accepted by another action, region or KeyId filter and silently skipped
every entry sorting before it. The cursor now carries the action, region and
resolved KeyId filter, and a marker presented anywhere else is
InvalidMarkerException. Resuming after the marked entry is deleted still
works.
* fix(kms): resolve the ListAliases KeyId filter once per page
ListAliases resolved the KeyId filter twice, once to filter and once for the
marker context. If an alias given as KeyId was repointed between the two
lookups, the page held one key's aliases while NextMarker was signed for
another, and the next page skipped entries. The filter is now resolved once
and that key id is used for both.
* fix(kms): refuse a non-string ListKeys or ListAliases Marker
MarkerType is a string, but the handler coerced other JSON values with
asText: an object or array became an empty marker (ValidationException) and
a number or boolean an unissued one (InvalidMarkerException). A non-string
Marker is now SerializationException, matching how a non-integer Limit is
refused.
* fix(kms): bind ListKeys and ListAliases markers to the account
KMS keys and aliases are stored per account, but the signed cursor named
only the action, region and filter, so a marker issued in one account was
accepted in another and skipped its entries sorting before the cursor. The
cursor now carries the request account, and a marker presented in another
account is InvalidMarkerException.
* fix(dsql): refuse a startup packet or client message outside DSQL's limits
The endpoint took a client message up to 64 MB and dropped the connection
without a word past that; DSQL takes 10 MiB and answers FATAL 08P01
"invalid message length" as soon as a longer, or shorter than 4, length
arrives. Measuring the startup packet alongside showed it one byte off as
well: DSQL takes 9,999 bytes and answers "invalid length of startup packet"
from 10,000, where the endpoint took 10,000 and refused more in silence. Both
are DSQL's now, for the startup inside TLS, the password message and every
message after signing in. What the database sends is not DSQL's to limit, so
it is still read up to 64 MB. PostgresWire.checkedLength throws its own
InvalidLengthException, still an IOException, so a reader can tell such a
packet from a broken connection; the RDS proxy and Redshift's bridge end the
connection on it as before.
* fix(dsql): refuse any packet before TLS as not TLS, whatever its length
The first head capped the packets read before TLS at the startup limit too,
so a 10,000-byte plaintext startup packet, first or after a GSSENCRequest,
closed the connection in silence where it had been refused as not TLS; above
10,000 bytes main closed in silence as well. Measured on DSQL, it reads no
more than such a packet's length and code: a plaintext startup packet of any
length is refused with "SSL is mandatory", and one under 8 bytes ends the
connection without a word. The endpoint now reads the body only when it fits
a startup packet, so the refusal reaches the client in order, and refuses a
longer one unread.
* fix(apigateway): answer an HTTP API proxy result without a Content-Type as text/plain
Measured on AWS (eu-west-1, 2026-10-19): an HTTP API answers a Lambda proxy
result that carries a body and no Content-Type header of its own with
text/plain; charset=utf-8, in both payload formats. Floci fell back to
application/json, the REST API's default, so a client that trusts the
header read a plain body as JSON.
The fallback now follows the API kind: an HTTP API answers text/plain, a
REST API keeps answering application/json.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* test(apigateway): fold the Content-Type cases into the inference test
The three cases repeated the inference test's setup, route helper and
cleanup, so they join it: two results without a Content-Type in the two
payload formats, and one that names application/json. The docs say a
statusCode and a body, since a format 2.0 result without a statusCode
still takes the inferred JSON path, and the compatibility test's get
helper and parameterized name are back on one line each.
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
---------
Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
* refactor(dsql): read a token's expiry from the validator
DSQL's endpoint worked out a token's expiry for its "Signature expired" hint,
and SigV4RequestValidator worked it out again to judge the token, each with
its own parsing (a long against an int, its own date formatter). The
validator now exposes the expiry it judges, and the hint reports that one,
so the two cannot disagree. A date or an expiry that does not parse, or one
past what an Instant holds, gives no expiry, and the token is refused as
before.
* fix(dsql): read a token's expiry seconds as an int, as validate did
The shared expiry parsed X-Amz-Expires as a long, so a signed token whose
expiry no int holds, which validate used to refuse, was taken: a refactor
that widened what is accepted. It reads the seconds as an int again, and
the DSQL token helper signs a long so a test can sign one past an int.
* fix(lambda): share the stream OnFailure delivery and send it in the destination's account
* fix(lambda): log the cause when an OnFailure send fails
* fix(lambda): write the stream record arrival times in the source's precision
* refactor(lambda): reuse the invocation record timestamp formatter
* feat(lambdaweb): accept code up to 512 MiB and refuse more as AWS does
AWS takes a Web Function package of up to 536870912 bytes, zipped and
unzipped. A larger object is a 400 ValidationException at creation. A zip
whose files add up to more gives a Failed revision.
* fix(lambdaweb): add the declared sizes as unsigned numbers like AWS
AWS adds the sizes as unsigned 64-bit numbers and stops at the largest
one. A zip that declares sizes past the signed range is Failed too.
* test(lambdaweb): declare the large sizes instead of writing them
Adds StartJobRun, GetJobRun, ListJobRuns and CancelJobRun under
/applications/{applicationId}/jobruns. Job runs are metadata only, like
Glue's: a run is RUNNING from submission and settles when read. With the
new floci.services.emrserverless.job-run-duration-seconds at its default
of 0, a BATCH run is SUCCESS as soon as it starts; a positive duration
keeps it RUNNING that long, and a run that would outlast its
executionTimeoutMinutes (720 when not given) is CANCELLED at the
timeout. A STREAMING run stays RUNNING until it is cancelled.
A run on a CREATED or STOPPED application starts it, as auto-start
defaults to on; with auto-start off the run is refused. clientToken is
the idempotency token: a retry returns the original run, and the same
token with another request answers ConflictException "Request did not
match the original". CancelJobRun on a finished run answers
ValidationException "Job run is not in a cancellable state". ListJobRuns
returns the newest runs first, filtered by states, creation time and
mode, and its nextToken resumes only the listing it came from. A run
needs a jobDriver that sets exactly one of sparkSubmit and hive, as
GetJobRun's JobRun always carries one, and tags are checked before
auto-start, so a refused run leaves the application as it was.
createdBy is the caller's ARN.
Application createdAt and updatedAt now go out as epoch seconds, the
restJson1 default for the model's Date shape, as job runs do. They were
epoch milliseconds, which the Java SDK reads as the year 58774 and
botocore refuses as out of range. Auto-start rewrites updatedAt, so a
run's own submission reached the bug. Applications persisted with
millisecond timestamps read back at the same instant.
Part of #6046 (part 8).
Lists a package's versions with status, revision, and origin, the second of
the six missing list/lifecycle actions (ListPackageVersionAssets already
shipped). Scoped to all five formats from the start, matching real AWS: none
of the action's own format-field documentation carries a generic-only
restriction.
For generic, reads straight from the stored packageVersions records.
Container-backed formats (maven/npm/pypi/nuget) have no such record, so each
sidecar client gains a new RepositorySidecarManager.listPackageVersions
primitive: Reposilite's artifact-level directory listing plus each version's
own lastModifiedTime, Verdaccio's packument versions/time maps, pypiserver's
per-project JSON releases keys plus a HEAD on each version's file for
Last-Modified, and BaGetter's flat-container index.json plus the NuGet V3
Registration resource's catalogEntry.published (read only as an internal
timestamp source, not as a registration endpoint exposed to real NuGet
clients). Every container-backed version reports status Published, the same
convention DescribePackageVersion's own bridge already established.
Real-AWS behavior confirmed against the wire model and the User Guide before
writing any code: default page size is 50 (not the 100 this codebase's other
List actions use), sortBy=PUBLISHED_TIME is always applied (the only value
that enum has) most-recent-first, Archived and Disposed versions are excluded
unless the caller filters by that exact status (two sibling actions' own docs
name this operation as the one that hides them), Unlisted stays included by
default, and originType filtering to EXTERNAL/UNKNOWN always answers empty
since Floci never ingests from an external connection. defaultDisplayVersion
prefers npm's own dist-tags.latest, falling back to the most recently
published Published version for every format (the only stated rule for
Maven/PyPI; applied to generic/NuGet too as the best-justified inference,
since AWS states no rule for those two).
Verified live against all four real sidecar containers, not just mocks, with
new Docker-gated tests per format (Maven 26/26, npm 25/25, pypi 24/24, nuget
17/17 overall), plus the fast CodeArtifactServiceTest suite (210/210).
Checkstyle and docs-check clean.
Under IAM enforcement a REST request whose route no rule maps is let through unchecked. 51
operations of Lambda's function API had no rule, 25 of them served by Floci, so any signed caller
could read a function's configuration, environment variables included, publish versions, set its
concurrency and event invoke config, and create, read or delete layer versions and code signing
configs, with no Lambda permission at all. ListFunctionsByCodeSigningConfig, whose route ends in
/functions, was checked as lambda:ListFunctions.
Every operation of the function API now has a rule and is checked as the action of its own name,
as the Service Authorization Reference gives it, including the routes Floci does not serve yet:
provisioned concurrency, capacity providers, layer version permissions, the recursion, scaling and
runtime management configs, PutFunctionCodeSigningConfig, InvokeAsync, ListFunctionUrlConfigs and
the resource policy routes. IamRestRouteCoverageTest checks every operation of the lambda model,
as it does Scheduler, Pipes, MicroVMs and network connectors.
Each is checked against the resource the reference gives it:
- a function's settings against the function, as the other function routes are;
- an event source mapping against event-source-mapping:<uuid>, which DeleteEventSourceMapping now
gets too in place of *;
- a code signing config against code-signing-config:<id>, the id that ends the ARN the route takes,
in the request's account and Region, as Lambda looks it up;
- a layer version, its policy and its permissions against layer:<name>:<version>, the name as
given, even a name given as an ARN or holding an encoded /, since Lambda looks the layer up by it
as it is, and the version as the number Lambda parses, so 01 is checked as 1;
PublishLayerVersion against layer:<name>, and GetLayerVersionByArn against the version its Arn
names, its number read the same way;
- account settings, creating a config, and listing configs, layers or a layer's versions against
*, as they name no resource.
AWS also checks lambda:AddPermission, lambda:GetPolicy or lambda:RemovePermission for the resource
policy operations, and iam:PassRole for CreateCapacityProvider. Floci serves neither, so they are
checked as their own action alone.
docs/services/iam.md says which Lambda routes are mapped and what each is checked against.
IAM temporary delegation had no way out. The exchange token is answered by no
operation on the family, so a partner that filed a request could not obtain
what it exchanges, and NotificationChannel was stored with nothing reading it.
DelegationNotifier publishes the two notifications the user guide documents to
the SNS topic the request names, which is the channel AWS gives this feature.
Every state the guide's notification table lists notifies: ASSIGNED,
PENDING_APPROVAL, ACCEPTED, FINALIZED, REJECTED and EXPIRED, leaving only the
UNASSIGNED a request starts in, which the partner filed itself. FINALIZED
sends two, a StateChange and the ExchangeToken notification carrying the token
and an ExpiresAt of release plus SessionDuration. The payload is the guide's
own field list, a JSON string in the Message of an ordinary SNS notification,
with the owner account left out until the request carries one, which a request
filed at a named customer does from the start. A notice is taken wherever a
state is written rather than at each call site, so an expiry found on a read
announces itself the way a claim does, and a call that then fails on the
expired request still sends it. What notifies is a transition: a second
UpdateDelegationRequest on a request already under review writes its notes and
tells the partner nothing. NotificationChannel is held to more than its
declared shape, which is looser than an ARN: the member's own documentation
says only SNS topic ARNs are accepted, so a value naming no topic is refused
on the create with InvalidInput rather than accepted into a lifecycle nobody
would hear about.
IAM publishes as iam.amazonaws.com through ServiceCallAuthorizer, so the topic's
own policy decides and nothing the caller holds plays any part, which is the
statement the guide has partners add to their topic. The request's own ARN and
the account that filed it go as aws:SourceArn and aws:SourceAccount. Both the
policy and the topic are read in the account the topic ARN names: the topic is
the partner's and most of these transitions are the customer's calls, so account
aware storage would otherwise look in the caller's account and find no topic at
all.
Notifications go out once the delegation lock is released, from a snapshot taken
while the transition still owns the record, a stored request being a mutable
instance every caller holding it shares. A delivery that fails costs the
notification and not the transition behind it.
With floci.protocols.strict-claiming off, the default, a request that no wire protocol claims is
logged and served by whatever route it matches. The checks after routing read the claim, so they
saw a request of no protocol:
- IAM enforcement served it unsigned. The MissingAuthenticationToken refusal applies only to a
JSON, CBOR or Query claim. An unsigned SQS ListQueues over JSON or Query, or a Kinesis
ListStreams over CBOR, was served when it carried a Smithy-Protocol header Floci does not serve
that path by: an unknown value, or rpc-v2-cbor outside the rpcv2 path. An X-Amz-Target call with
no Content-Type reached the CBOR endpoint the same way.
- IAM enforcement checked a signed REST request as the action its X-Amz-Target header named, not
its route's. A user allowed only s3:GetObject deleted an object by sending the DELETE with
X-Amz-Target: AmazonS3.GetObject and any Smithy-Protocol header. A signed JSON call it refused
got the REST status, 403, rather than JSON's 400 AccessDeniedException.
- A call to a disabled service was served when only its claim would have named the service, as for
an unsigned JSON or rpcv2 call.
- A REST JSON service request that fell through to S3's wildcard routes was not rejected, and a
REST request signed for a service Floci lacks skipped the guard that refuses it before routing,
so S3's routes answered it with a misleading error.
The new AwsRouteClaimFilter runs after route matching and before every filter that reads the
claim, AccountContextFilter's unknown-Region refusal and the signature check among them. It claims
such a request by the route it reached, through ProtocolClaimer.routeClaim:
- the JSON 1.0, JSON 1.1 and CBOR endpoints by X-Amz-Target;
- the rpcv2 route by its path;
- the Query endpoint's POST by the form;
- every other route as REST.
Those routes serve the request the same way whatever Smithy-Protocol header it carries, so the
claim names the call that runs. A request claimed as REST also gets the unknown-service-scope
check a claimed one gets before routing, which AwsProtocolClaimFilter now exposes for it. A
claimed request is left as it was, and strict claiming still rejects an unclaimed one before
routing.
An X-Amz-Target post with a content type no protocol uses, the third kind of request the
strict-claiming docs list, matches no route at all, and got a 500 rather than its 415, as any root
POST in a content type no endpoint consumes did. Several resource methods share POST /, so RESTEasy
Reactive routes it to a placeholder with no method of its own that picks one by content type, and
answers 415 from there when none consumes it. The ResourceInfo producer then returns the
placeholder's missing method, and CDI refuses the null with IllegalProductException.
AwsRestJsonErrorHeaderFilter and S3CorsFilter read ResourceInfo on every response, so each failed
on it. Both now read it through the new RoutedResource, which gives null when routing chose no
method.
docs/services/iam.md and the strict-claiming setting's docs say how such a request is handled.
IamEnforcementFilter builds its rpcv2 route claim through the same ProtocolClaimer helper.
* fix(dynamodb): export the table as of ExportTime
* refactor(dynamodb): share the epoch seconds conversions
* fix(dynamodb): treat a table that is still being created as not found on export
* docs(dynamodb): note the writes made before point-in-time recovery is enabled
* fix(dynamodb): round timestamp inputs to milliseconds as AWS does
* fix(dynamodb): check the ListBackups time range limits
* fix(dynamodb): check the ListBackups ExclusiveStartBackupArn length
* refactor(dynamodb): reuse requireBackupSource for the export table lookup
ListQueues ignored MaxResults and NextToken on every protocol path and
returned all matching queues without a token.
The paging now lives in SqsService, so the Query, JSON and CBOR paths
share it. It follows the API reference and the botocore model:
MaxResults must be 1 to 1000, a NextToken is returned only when
MaxResults was set and more queues remain, and without MaxResults the
response holds at most 1,000 queues and no token. Queues are ordered by
name, the token is the shared Pagination cursor under its own
namespace, and QueueNamePrefix filtering applies before paging. An
out-of-range MaxResults or an unreadable NextToken returns
InvalidParameterValue.
Fixes#6219
ListRules ignored Limit and NextToken and always returned every
matching rule. It now pages through the bus's rules in name order using
the shared Pagination cursor, keeping NamePrefix and EventBusName
filtering intact.
- Limit defaults to 100, the documented per-page maximum; an integral
value outside 1 to 100, including one wider than an int, is a
ValidationException.
- A string, boolean or fractional Limit is a SerializationException
rather than being coerced into a page size.
- NextToken is returned only when more rules remain.
- A token Floci did not mint is rejected with HTTP 400 InvalidToken, as
the API reference documents for a bad pagination token.
Fixes#6220
The endpoint's one dsql-age-checks thread both timed the sessions' age
checks and ran them, and a check can block. Ending a session writes the age
error under clientWrites, which the relay holds while it writes, and waits
for the client to take it; stopping a statement sends the database a cancel
request. One client that stopped reading mid-result could then hold back
every other session's check. The thread now only times the checks, and each
due check runs on a virtual thread of its own.
* fix(cognito): fire the CustomMessage trigger for UpdateUserAttributes and GetUserAttributeVerificationCode
Both sent their verification codes without the CustomMessage trigger, so a
pool's function never shaped those messages and never saw the request's
ClientMetadata. They now fire it with CustomMessage_UpdateUserAttribute and
CustomMessage_VerifyUserAttribute.
Measured on Cognito, the event carries the user as stored once the request is
done: the whole update applied, and an email that must be verified before it
changes still the old one while the code goes to the new address. The message
is therefore sent once the update is stored and the user lock is released. The
trigger is synchronous, so holding the lock would also block a function that
calls the pool back for the same user until its invocation timed out, which
SignUp already avoids. Cognito keeps an update whose code it cannot deliver
and answers CodeDeliveryFailureException, and a message that cannot be sent
now does the same.
* fix(cognito): leave nothing behind when an attribute code's message is not sent
Sending an attribute code's message after the user lock opened four ways to
leave a code live that no message carried, or to fail an update already
stored. Each message is now sent on its own: one that cannot be sent has its
code withdrawn, so another can be asked for at once as on Cognito, and the
others still go out. An update that stops before it is stored withdraws the
codes it already issued. The pool, the client and a copy of the stored user
are read while the lock is held, as SignUp captures its trigger's user, so
nothing is looked up once the update is stored.
A Route 53 RecordSet resource now writes Region, Failover, Weight and
HealthCheckId into the record, as ChangeResourceRecordSets stores them.
A HealthCheck resource creates a health check with its tags, and its Ref
and HealthCheckId attribute return the check's id. An unknown Type is
refused before any check is created. Changing Type, RequestInterval or
MeasureLatency replaces the check, and the old one is deleted once the
update commits, or kept under UpdateReplacePolicy: Retain. Any other
change updates the check in place, and a failed stack update puts back
its earlier settings and tags.
With a path in FLOCI_BASE_URL, such as http://localhost:4566/sqs, both endpoint
strategies find the same queues. Queues saved under the longer path move to the
new key at startup. An entry saved without an account prefix moves to the
account its queue path names and is removed by its stored key. An entry whose
new key already holds a different value stays in place, with a warning.
* feat(lambdaweb): fail a revision whose code is not a zip
A revision whose code is not a zip is Failed, as on AWS, and cannot be
deployed. The endpoint CreateWebFunction makes on such a revision is
Failed too and answers 409 Platform.EndpointNotActive. An empty object
is a 500 InternalServerException with an empty body, as on AWS.
* fix(lambdaweb): remove a code copy that cannot be read and name the {} body
* test(lambdaweb): upload a real zip in the compatibility tests
* fix(ec2): AND repeated filter names on every Describe action
The Query handler read Filter.N into a map keyed by name, so a filter
whose name was already given replaced the earlier one: tag-key=Env with
tag-key=Team matched every resource tagged Team, and two vpc-id filters
naming different VPCs matched the second VPC's resources. AWS joins
every filter with an AND, a repeated name included.
Every Describe action that reads Filter.N now passes the filters in
request order to the service, as DescribeKeyPairs, DescribeTags and
DescribeAvailabilityZones already did, and each filter narrows the
answer the way a lone filter of that name does. The service keeps its
map overloads for the callers that build filters of distinct names in
code; they delegate to the ordered overloads, so what they get back
does not change. DescribeImages builds its lookup image from the first
name wildcard and returns it only when it satisfies every filter.
Four existing tests passed null or any() as the filters of a method
that now has a second overload. They pass Map.of() or anyMap() instead,
which is what the code under test sends.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): sweep transit gateway peering attachments for repeated filters
DescribeTransitGatewayPeeringAttachments goes through the same shared
matcher as the other actions the parameterized tag-key case covers, but
had no case of its own. It now has one: two tag-key filters find only
the peering attachment that carries both keys.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): satisfy every repeated filter when building a lookup image
With a filter name given twice, DescribeImages built the image it
synthesizes for an unmatched lookup from the first name wildcard and the
first concrete value of each other filter, so a later filter of the same
name could reject it and the lookup came back empty: architecture with
x86_64 or arm64 and architecture with arm64 returned nothing. Each name
filter now offers its wildcard in turn, and each other value is the
first one that every filter of its name admits. A lone filter of each
name still yields the one image it always did.
DescribeInstanceTypeOfferings kept the types of its InstanceType.N
parameter only through the first instance-type filter, so repeating that
filter dropped them. They are now kept beside the types that every
instance-type filter names.
The docs say "an action" rather than "a Describe action", since the Get
and Search actions that read Filter.N are covered too.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): let an instance-type filter without values narrow nothing
DescribeInstanceTypeOfferings looked up the types its first
instance-type filter named, so a first filter without values limited the
answer to the InstanceType.N types while a later one without values
narrowed nothing: the answer depended on the order of the filters. A
filter without values now names and narrows nothing wherever it stands,
as a lone one never added a type.
The lookup image of DescribeImages tries the first wildcard of each name
filter, which the comment now says. Every filter value the image is
built from is tested by the image matchers' own rule.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* refactor(ec2): name the per-filter checks of repeated filters
The test that every filter of one name admits a value was written out by
hand at each site. Two helpers beside everyFilterAdmits now carry it:
everyFilterContains, for exact values where a filter without values
admits anything (security group rules, prefix lists, the later
instance-type filters of DescribeInstanceTypeOfferings), and
everyFilterMatches, for values with wildcards where a filter without
values matches nothing (the location filters of offerings, and the
spot-price and timestamp filters of DescribeSpotPriceHistory). No
answer changes.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): match instance-type wildcards in DescribeInstanceTypeOfferings
AWS takes * and ? in an instance-type filter value of
DescribeInstanceTypeOfferings (the CLI reference filters on c5*), but
Floci looked each value up by its exact name, so a lone t3.* found
nothing and t3.* beside t3.micro found nothing either. A first filter
holding a wildcard now looks up the whole catalog, and every filter
matches a type with the same matcher as the location filter. Exact
values give the same answer as before.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): pin an empty lookup for overlapping name patterns
Two name filters foo-* and *-bar-* overlap, but the image built from
the first wildcard of each breaks the other filter. DescribeImages
returns no image here, as AWS returns only images that exist; before
the filters were ANDed it returned one that broke foo-*.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* fix(ec2): match offerings instance-type values with the linear glob
The instance-type wildcards of DescribeInstanceTypeOfferings went
through the regex matcher, which backtracks on a caller-supplied
pattern of many stars: twenty stars took about sixteen seconds per
request. They now go through everyFilterAdmits, the two-pointer glob
the image filters already use. Value-less filters are dropped before
the check, so no answer changes. Also reword a test comment.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(ec2): name the matcher a many-star pattern goes through
The glob that matches instance-type values is a two-pointer match, not
a strictly linear one, so the test's Javadoc says that instead.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* feat(dsql): speak DSQL's dialect and keep its transaction limits
The third part of the DSQL data plane, after #6102 and #6143: the cluster's
database answers the way Aurora DSQL does, as measured on AWS.
CREATE [UNIQUE] INDEX ASYNC answers a job_id, with sys.jobs and
sys.wait_for_job; a plain CREATE INDEX is refused. What DSQL refuses is
refused with its SQLSTATE and message: what the statement shows (TRUNCATE,
DO, LISTEN, VACUUM, sequence caches, isolation levels, locking clauses,
advisory locks, ADD CONSTRAINT) in DsqlStatements, and what only the catalog
can tell (column types, a function's language, temporary and partitioned
tables, triggers) inside the database, by event triggers, since the
statement alone cannot say.
A transaction runs one DDL statement, never with DML, and modifies at most
3,000 rows, a cascade's included. Its age follows what was measured with a
client that only reads: the client's next message after 300 seconds ends it
with 54000 and closes the connection with 08P01, an idle one is ended unasked
15 seconds later, a statement running across the limit completes and then
fails with 54000, and a failed transaction left idle as long is closed with
25P03. A first model, the age checked at the next statement, was dropped once
the reading client showed DSQL's own timer.
A write conflict is DSQL's 40001 OC000, and an error's context keeps the
statement a cascade ran while dropping what sys functions ran.
* fix(dsql): close the dialect's gaps found in review, as measured on DSQL
Measured on Aurora DSQL before each change:
- set_config of default_transaction_isolation or transaction_isolation, a
quoted SET of one and ALTER ROLE ... SET of one answer 0A000 "not
supported"; ALTER DATABASE ... SET or RESET is AlterDatabaseSet.
- CREATE TABLE AS, SELECT INTO and materialized views are CreateTableAs,
refused by the event trigger so a function body cannot reach them either.
- An expression key, or a domain over jsonb or bytea, is refused like the
type itself, named as declared: the check reads the index's own columns
and follows a domain to its base type.
- CREATE, ALTER and DROP ROLE and GRANT or REVOKE of a role are DDL.
PostgreSQL fires no event trigger for them, so they run through
sys.run_role_ddl, which counts them first, under PostgreSQL's tags.
- A statement past the transaction age limit fails with 54000, in a
transaction block or not, nothing its transaction wrote is kept, and the
rest of its query, a COMMIT included, does not run.
The age limit is reworked as the review asked. Each session has one check
scheduled at a time, on the endpoint's scheduler and by the injected Clock,
cancelled when the transaction or the connection ends; a failed
transaction's idle wait restarts after every client message. At the limit
a statement still running is cancelled with the client's own cancel
request, and its 57014 reaches the client as DSQL's 54000. DSQL lets the
statement finish and fails it then; stopping it at the limit ends the same
way. Two other ways were tried and dropped: dropping a late statement's
answer in the relay let a COMMIT in the same query commit, and a mark the
endpoint writes for the database to check is invisible to the client's
repeatable read snapshot. The age test now moves the clock and holds a row
instead of sleeping, and shares its cluster setup with the data plane test
through DsqlClusterFixture.
Also fixed: a -- comment ends at a carriage return, a quoted advisory lock
name is refused, CACHE is read from tokens rather than the raw text, a
BEGIN queued behind a long statement starts once that statement is
answered, tables that predate the counting triggers get them, and
sys.create_index_async runs one index statement and nothing else.
sys.wait_for_job with an unknown id keeps waiting, as DSQL's does.
* feat(s3): verify SigV4A (AWS4-ECDSA-P256-SHA256) request signatures
Derive the ECDSA P-256 key pair from the secret access key, as AWS does, and
check SigV4A signatures in the Authorization header and in presigned URLs when
signature verification is on. The region-less credential scope now resolves
its region from the signed region set instead of reading the service name as
a region.
Closes#5210
* fix(s3): address SigV4A review feedback and edge cases
- Reject forged SigV4A headers to non-S3 services
- Handle comma-only X-Amz-Region-Set safely in RegionResolver
- Support SigV4A credential scope in IamEnforcementFilter
- Reject duplicate Credential components in Authorization header
- Tighten SigV4CredentialScope SERVICE_PATTERN regex
- Reuse S3RequestSigner host and bodyBytes in S3SigV4aRequestSigner
- Fix Checkstyle import ordering and redundant FQCN
* fix(core): support nested credentials in SigV4CredentialScope service patterns
* refactor(core): apply SigV4A region set without service-specific check
* docs(iam): update SigV4A Javadoc on refuseUnreadableCredential
* fix(backup): resume unfinished jobs after restart
* fix(backup): address recovery review feedback
Coordinate recovery-point deletion and completion, increment new-point counts, and validate vault creation identity during recovery.
Local focused validation: 92 tests, four additional persistence/restart checks, and Checkstyle. Existing timestamp-granularity and legacy compatibility bounds remain.
* fix(backup): simplify recovery identity and deadline tests
Address maintainer feedback with the exact independently reviewed local candidate. Focused affected-area checks passed; remote CI and maintainer acceptance remain outstanding.
* fix(codepipeline): stop superseded workers at stage boundaries
* fix(codepipeline): address supersession timing review feedback
Supersede older waiters only at catch-up, persist stable admission ordering for timestamp ties, consolidate failure handling, and place the documentation under Execution.
Local focused validation: 51 tests, four additional checks including the real timestamp-collision reproduction, Checkstyle, and docs checks. Legacy equal-time executions without an ordinal remain conservatively unordered.
* test(codepipeline): consolidate review regression fixtures
Preserve review regression assertions in the shared service fixture, remove private-service reflection, expose waitForTransition to package tests, and shorten user documentation.
Independent exact-candidate QA: 51 focused tests, Checkstyle and docs checks, five supplemental edge/control cases and reverse-arrival rerun. Production method body is unchanged.
* test(codepipeline): configure worker polling for fast tests
Let tests configure a 5 ms worker-poll interval while preserving all existing/default production constructors at 100 ms and independent source scheduling.
Independent exact-candidate QA: 53 focused tests, Checkstyle/docs, repeated diagnostic timings and four supplemental JFR/behavior cases. No timing threshold or production-default change.
* fix(codepipeline): configure worker and assertion polling
Address maintainer feedback with the exact independently reviewed local candidate. Focused affected-area checks passed; remote CI and maintainer acceptance remain outstanding.
Under IAM enforcement no Lambda MicroVM or network connector route was
mapped to an IAM action, so every call went unchecked, and the roles
they take with it.
- Every MicroVM route (2025-09-09) and network connector route
(2026-04-04) is mapped, and IamRestRouteCoverageTest now checks every
operation of both models. An image or connector request is checked
against microvm-image:<name> or network-connector:<id> in the
request's account and Region, an identifier given as an ARN taken for
its name, as the service looks it up. RunMicrovm is checked against
the image its imageIdentifier names, an action on a running MicroVM
against the image it runs, and a managed image's versions against
that image, which aws owns. Creating an image or a connector and the
list operations name no resource, so they are checked against *.
- Lambda's own tag routes, /2017-03-31/tags/<arn>, which MicroVM images
share with functions, are mapped and checked against the resource
they tag: the caller's own function, image or connector of the ARN's
Region and name, whatever account the ARN names, as Lambda looks it
up, a target without the arn: prefix read as the MicroVM tag handler
reads it, and an event source mapping's ARN as written.
- iam:PassRole, to lambda.amazonaws.com as the Service Reference gives:
CreateMicrovmImage and UpdateMicrovmImage (buildRoleArn), RunMicrovm
(executionRoleArn), and CreateNetworkConnector and
UpdateNetworkConnector (OperatorRole). This finishes the Lambda half
of the follow-up on #5938.
GetAccessKeyInfo answered UnsupportedOperation 400. It takes one member and
answers one: "when you pass an access key ID to this operation, it returns the
ID of the AWS account to which the keys belong", and it models no errors at all,
so the whole operation is that lookup plus the shape of its input.
The lookup is not the one authentication uses. resolveAccountId takes only an
active long-term key and a live session, because that is what a request may be
signed with, where this operation is explicit about the opposite: "this
operation does not indicate the state of the access key. The key might be
active, inactive, or deleted". So findAccountForAccessKeyId answers from what is
stored whatever state it is in, a long-term key through the account that holds
it and an ASIA key through the session that minted it, which is the split the
page draws between AKIA as "long-term credentials for an IAM user or the AWS
account root user" and ASIA as "temporary credentials that are created using AWS
STS operations". Both long-term lookups read one scan now, the authentication
one keeping the Active filter over what the new one answers whole, so the guard
and the scan are written once.
The id is read against accessKeyIdType first, 16 to 128 characters of [\w],
which the reference glosses as "any upper- or lowercase letter or digit", so a
malformed id answers for its own shape rather than for a key that could not
exist. The violation is rendered the way the one recorded IAM rendering Floci
already follows renders it, the member in lower camel case and the offending
value quoted beside it; the older STS operations name the parameter as written
instead, which is drift of its own rather than something to copy here. An absent
member and a present empty one are different answers as well: only the absent
one reads as null, where AccessKeyId= is a value that fails the minimum and is
quoted as the empty string it is, which is what IAM answers for an empty
RoleName over this same wire.
One answer is chosen rather than read. The operation models no error for a key
that is not there, and the page says only that "providing a deleted access key
might return an error that the key doesn't exist", so a well-formed id this
emulator never issued answers InvalidParameterValue, the published common error
closest to that sentence. docs/services/sts.md records it as a deviation rather
than a recorded behaviour, since nothing says what AWS answers for an id it
never issued.
Enforcement is untouched on purpose. The "No permissions are required" note
appears on GetCallerIdentity and GetSessionToken and on no other page in the
reference, and sts:GetAccessKeyInfo is in the service authorization reference, so
this one is authorized like any other action rather than exempted the way
GetCallerIdentity is.
Ten tests. Five over the wire: a long-term key answering the account that holds
it, an inactive key still answering it, a session key answering the account its
session belongs to, four shapes refused ahead of any lookup, and a well-formed
id nobody holds. Five on the handler: the account answered and the
authentication path not consulted, the absent, short, long and malformed ids, a
present blank id read as a value rather than an absence, and the refusal for a
key the service does not hold. Docs carry the action, a
section on what it does and does not say about the key, and the matrix row at 9.
Under IAM enforcement, a request that handed Auto Scaling a role needed
no iam:PassRole on it. A user allowed only the Auto Scaling actions
could create a group from a launch template whose instance profile holds
any role in the account, and Floci launches the group's instances with
that profile, so they got the role's credentials. The IAM user guide
requires the permission for every role passed to a service, and the EC2
Auto Scaling user guide lists where these operations pass one:
- CreateLaunchConfiguration passes the roles of its IamInstanceProfile,
given by name or ARN, or else of the profile of the instance it is
made from, which the configuration copies, to ec2.amazonaws.com.
- CreateAutoScalingGroup and UpdateAutoScalingGroup pass the roles of
the instance profile in each launch template they name, at the version
the group launches from, there too: the permission is "needed on the
IAM identity (user or role) that creates or updates an Auto Scaling
group using a launch template that specifies an instance profile".
That covers the group's own template, its mixed instances policy's and
each override's. StartInstanceRefresh does the same for its desired
configuration, read merged with the group as Auto Scaling applies it:
a version named alone moves the group's own template to it, and a
template named alone keeps the group's version.
- A ServiceLinkedRoleARN other than the default
AWSServiceRoleForAutoScaling, and a lifecycle hook's RoleARN
(PutLifecycleHook, and the hooks CreateAutoScalingGroup names), go to
autoscaling.amazonaws.com. The guide asks for the permission "when a
nondefault service-linked role, an IAM role for a lifecycle hook, or a
launch template that specifies an instance profile ... is provided".
- Application Auto Scaling's RegisterScalableTarget passes RoleARN to
application-autoscaling.amazonaws.com when the request names one.
A group from a launch configuration passes nothing, since the
configuration's role was checked when it was created. Launching an EC2
instance straight from a launch template is unchanged: the EC2 user
guide has that role checked where the template is made.
The launch template version, a source instance's profile and a refresh's
merged template are looked up through PassedRoleLookup, which the Auto
Scaling service now implements with the code its own operations use, so
the filter does not depend on Auto Scaling.
* fix(kinesis): honor stream listing limits
* fix(kinesis): support stream listing continuation tokens
Return a region-scoped NextToken for truncated ListStreams pages and resume from it with five-minute expiry. Preserve strict name validation and current-account storage scope. Cover 150-stream traversal, deleted cursors, malformed and expired tokens, and the AWS JSON route.
* fix(kinesis): share configured pagination token expiry
Use one token codec and the existing configured TTL for ListStreams and ListShards. Preserve both previous token formats and verify emitted-token expiry with zero-TTL handlers instead of editing token timestamps.
* fix(cloudformation): refuse a template body that does not parse
ValidateTemplate answered success for a body that reads as neither JSON nor
YAML, since the null value check skipped a template it could not parse.
CloudFormation refuses such a body at the request, and so does Floci now, in
ValidateTemplate, CreateStack, UpdateStack, CreateChangeSet and
GetTemplateSummary, all measured with the same texts.
CloudFormation reads a body as YAML, of which JSON is a subset, so the new
CloudFormationTemplateParser tries strict JSON first (trailing tokens refused)
and falls back to the CF-aware YAML parser, which also reads JSON with a
trailing comma or unquoted keys, as AWS does. When both fail, a body that
starts with { and ends with } is "JSON not well-formed" at Jackson's position,
anything else "YAML not well-formed" at SnakeYAML's, both 1-based and taken
from the body as sent, so leading blank lines keep their line numbers. A body
that reads as a scalar or a list is "unsupported structure.".
Stack sets keep their null check skipping a body that does not parse, since
CreateStackSet was not measured with one. A template that reads but has no
Resources member is left as it was: that is a check of a template, not of
its format.
* fix(cloudformation): refuse a body that is no template in stack sets too
CreateStackSet and UpdateStackSet stored a body that does not parse, whose
instances then could not deploy: CreateStackInstances and UpdateStackSet
stopped halfway with the change set's 400. Measured on CloudFormation, both
refuse such a body before keeping it, with the same texts followed by the
service exception's details, as they refuse a null value, and an update
leaves the previous body in place. They now go through the same check as the
other operations, so a stored body always parses.
The JSON message also needs the body to start with {, not only to end with }:
[{"a": 1} is YAML not well-formed at line 1, column 10 on CloudFormation.
* fix(cloudformation): read ECS awsvpc subnets and security groups as lists
AWS::ECS::Service resolves Subnets and SecurityGroups with the engine's list resolver, so a Ref to a List<AWS::EC2::Subnet::Id> parameter gives every subnet.
* fix(cloudformation): read ECS awsvpc lists from the branch Fn::If chooses
The provisioner reads Subnets and SecurityGroups from the node with each Fn::If replaced by its chosen branch, so a conditional AwsvpcConfiguration keeps its subnets.