mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
02eb4e7297f60d575ebd97aba4c4fa199d4a0459
469
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
18128b432a |
fix(organizations): start a new root with no policy types enabled (#4756)
CreateOrganization (and EnableAllFeatures) seeded the root with SERVICE_CONTROL_POLICY already ENABLED, so the first EnablePolicyType a caller issues was rejected with PolicyTypeAlreadyEnabledException. That is exactly what Terraform's aws_organizations_organization does with enabled_policy_types right after CreateOrganization, so the common "create the org and turn on SCPs" configuration failed at its first resource. On AWS a new root has an empty PolicyTypes list: the provider's acceptance test for a plain organization asserts roots.0.policy_types is empty, and its enabled_policy_types test enables SCPs on a fresh organization successfully. DescribeOrganization's AvailablePolicyTypes used to read the root's list, which is what the seed was standing in for. It is now reported separately and, as AWS documents for the deprecated field, lists only SERVICE_CONTROL_POLICY for an ALL organization. Tests that relied on the seed now call EnablePolicyType first, as a real caller must. The CloudFormation test creates the stack without its SCP, enables the type, then adds the SCP by UpdateStack, because no CloudFormation resource enables a policy type. |
||
|
|
fd094aee05 |
fix(stepfunctions): return the PascalCase execution envelope from states:startExecution, .sync and .sync:2 (#4737)
AWS returns, as the Task result of the optimized states:startExecution
integration (measured in ap-northeast-1 on 2026-09-30):
- request-response: the StartExecution response, {ExecutionArn, StartDate},
StartDate in epoch milliseconds
- .sync: the child's DescribeExecution response, PascalCase with its keys
in alphabetical order, dates in epoch milliseconds, Input and Output as
JSON strings
- .sync:2: the same envelope with Input and Output as JSON values
Floci returned camelCase with dates in seconds for the first two and the
child's output alone for .sync:2, so a state machine written against AWS
found nothing at $.Output, $.ExecutionArn or $.Status.
The failure cause of the two .sync modes already built this envelope
(#4675). It now builds the success result too: a SUCCEEDED child carries
Output, OutputDetails and RedriveStatusReason and reports NOT_REDRIVABLE.
Request-response returns the response TaskSubmitted already records.
This changes the result shape for state machines written against Floci's
earlier one: the child output of .sync:2 moves from $ to $.Output.
Closes #4723
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
|
||
|
|
d267ba3a9d |
fix(ses): validate EventBridge default bus ARNs (#4677)
* fix(ses): validate EventBridge default bus ARNs Signed-off-by: boulea7 <zln1905391059@163.com> * fix(ses): reject EventBridge bus account and Region mismatches Signed-off-by: boulea7 <zln1905391059@163.com> --------- Signed-off-by: boulea7 <zln1905391059@163.com> |
||
|
|
5aad012e78 |
feat(emr-serverless): tag, untag and list tags for applications (#4667)
EMR Serverless had no tagging API: no TagHandler was registered for the emr-serverless ARN service, so TagResource, UntagResource and ListTagsForResource could not be routed, and a tagged aws_emrserverless_application could not be planned. Register an emr-serverless handler with the shared /tags dispatcher, answering 200 as the model does, over the tags already stored on the application. Validate keys and values, the user guide's 50 tag limit and its reserved aws: prefix, refuse job run ARNs as not found, and synchronize the application mutators so a tag write cannot lose a concurrent update. Closes #4662 |
||
|
|
560de5c13f |
fix(tagging): find resources by the tags their own service holds (#4563)
* fix(tagging): list resources by the tags their own service holds
GetResources, GetTagKeys and GetTagValues merge the tagging store with every
ResourceProvider, so SQS, Lambda and Logs tags are discoverable. Resource type
filters now parse colon and leading-slash ARNs (function:f, log-group:x, /apikeys/k),
and TagResources/UntagResources write through to the owning TagHandler.
* fix(apigateway): expose tagged resources and API key tags to the tagging API
ApiGatewayService is a ResourceProvider for REST APIs, stages, API keys, usage plans and
domain names, and ApiGatewayTagHandler serves /apikeys/<id> ARNs, so GetResources finds
API Gateway resources by tag and tagging-API writes land on the API key itself.
* fix(cloudformation): forward AWS::Lambda::Function Tags
CreateFunction now receives the template Tags; an in-place UpdateStack untags dropped keys and retags the desired set, mirroring SqsCfnProvisioner.
* fix(tagging): scope global-ARN resources by region and clamp stale page tokens
Provider resources with an empty ARN region use their own region, stale page tokens
past the end return an empty page, and provider tags are copied inside the skip guard.
* test(compat): discover SQS, Lambda, Logs and API Gateway resources by tag
* docs(tagging): describe owning-service discovery
* fix(tagging): forward tags only for resources the owning service lists
* fix(apigateway): report the calling account and tag usage plans
* docs(cloudformation): note Lambda tag reconciliation on update
* fix(tagging): match declared resource types and scope owner writes to the request
API Gateway API key and usage plan ARNs must now name the key or plan at the
start of the resource part, so a nested /apikeys/ segment no longer tags the key.
* fix(tagging): match AWS type filters, regions and failure codes
Compared against a live AWS account: type filters, IAM listing, cross-region
TagResources and FailedResourcesMap entries now answer as AWS does.
* fix(cloudformation): keep Lambda tags added outside the template
* fix(tagging): route TagResources to V1 tag handlers too
* fix(apigateway): reject sub-resource ARNs when tagging a REST API
* fix(tagging): write tagging API tags through to SQS, Lambda and Logs
TagResources and UntagResources now reach the queue, function or log group's own tags through TagHandler beans qualified @TaggingApiOnly, so ListQueueTags, Lambda ListTags and Logs ListTagsForResource show them. The qualifier keeps these handlers off the /tags/{arn} and /v1/tags/{arn} paths, since each service defines tags in its own protocol.
* fix(cloudformation): forward SSM parameter tags
AWS::SSM::Parameter now applies its Tags after the overwriting put. On UpdateStack only the keys the previous template set and the new one drops are removed, tracked in the internal FlociSsmTemplateTagKeys attribute, so tags added outside the template are kept.
* fix(tagging): hide tagging-store copies of global resources
GetResources no longer lists an IAM role or user tagged through TagResources, since AWS never lists global resources.
* fix(tagging): reject every wildcard log group ARN
TagResources and UntagResources now send a log group ARN ending in :* to CloudWatch Logs even when the group does not exist, so it is rejected as in AWS instead of stored.
* fix(tagging): clear store tags on every untag
UntagResources now removes the keys from the tagging store for every ARN, even one the owning service rejects, so a copy stored earlier can always be cleared.
* fix(cloudformation): tag an adopted Lambda function
When CreateFunction conflicts and the provisioner adopts the existing function, the template's tags are now applied to it.
* fix(apigateway): tag only exact domain and stage ARNs
A domain or stage segment nested elsewhere in an API Gateway ARN, such as /restapis/<id>/domainnames/<d>, is now rejected instead of tagging that domain or stage.
* fix(cloudformation): leave an adopted Lambda function's tags alone
Adoption uses the existing function as it is, as before, so a function outside the stack keeps its tags.
* fix(cloudformation): record no template tag keys for an adopted Lambda function
An adopted function keeps its own tags, so a later update adds the template's tags without removing any it never set.
* fix(tagging): never list IAM ARNs from the tagging store
A role tagged through TagResources stays hidden after DeleteRole, as AWS never lists IAM resources.
* fix(tagging): fail a write when an owning service cannot be read
A provider that fails while routing TagResources or UntagResources now returns InternalServiceException instead of writing the tagging store and reporting success.
* fix(tagging): fail only unresolved ARNs when a provider cannot be read
A provider failure no longer fails the whole TagResources or UntagResources call; only ARNs whose owner could not be resolved are reported in FailedResourcesMap.
* fix(tagging): report another account's ARN instead of storing it
TagResources and UntagResources report an ARN from another account in FailedResourcesMap with AccessDeniedException, as AWS reports it per ARN, and never write it to the tagging store.
* fix(tagging): keep stored tags for an ARN an untag could not resolve
UntagResources leaves the tagging store unchanged for an ARN it reports as unresolved or from another account; an ARN its owner rejected is still cleared.
* fix(tagging): fail an unresolved ARN only when its own service cannot be read
A provider failure now only affects unlisted ARNs of the services that provider declares.
* fix(tagging): copy stored tags under the writers' lock
GetResources, GetTagKeys and GetTagValues no longer race a concurrent TagResources on a stored mapping.
* fix(apigateway): reject reserved tags when tagging a usage plan
TagResources on a usage plan now refuses floci:override-id as the other API Gateway tag paths do, instead of dropping it and reporting success.
* fix(apigateway): reject tag ARNs with an account or another region
The /tags path now answers an ARN with an account segment with BadRequestException and one naming another region with NotFoundException, as AWS does, instead of resolving the id in the caller's region.
* fix(ssm,lambda): reject tag keys outside the AWS pattern
AddTagsToResource, PutParameter, TagResource and CreateFunction now reject a tag key outside the AWS pattern or 1 to 128 characters with ValidationException, as AWS does, which also keeps the CloudFormation managed-key attributes lossless.
* fix(ssm,lambda): validate CloudFormation tag keys before changing the resource
* docs(tagging): say every handled ARN ending in :* reaches its service
* fix(tagging): read a negative pagination token as the first page
|
||
|
|
6b7d17698c |
fix(ec2): an interface VPC endpoint reports its network interfaces, and they resolve (#4598)
* fix(ec2): report an interface VPC endpoint's network interfaces
DescribeVpcEndpoints never emitted networkInterfaceIdSet, so an interface (PrivateLink)
endpoint came back with no interfaces at all. Terraform's aws_vpc_endpoint surfaces that
element as network_interface_ids, and modules feed the output downstream to
security-group rules, flow-log filters and DNS, so the empty list does not merely differ
from AWS: it propagates into whatever consumes it.
The interfaces already existed. Ec2Service.endpointNetworkInterfaces derives one per
subnet deterministically, with a stable id, the subnet's availability zone and
interfaceType vpc_endpoint, so flow-log generation can attribute AWS-service traffic to a
stable endpoint address. Nothing reported them on the wire.
So this adds a reader rather than a new resource. endpointNetworkInterfaceIds returns the
same ids that endpointNetworkInterfaces synthesizes, reusing endpointEniId, deliberately
derived instead of stored: a second, stored copy could disagree with the one flow-log
attribution reads, and then two answers would exist for one question. It mirrors the
existing endpointDnsEntries accessor, which the same XML writer already calls.
A Gateway endpoint is a route-table entry and owns no interfaces. AWS reports none for
one, and so does this: the element is omitted rather than emitted empty.
Ec2VpcEndpointNetworkInterfaceIdsIntegrationTest covers one interface per subnet with
distinct ids, the ids being stable across two DescribeVpcEndpoints calls (Terraform reads
them between plan and apply), a single-subnet endpoint reporting exactly one, and a
gateway endpoint reporting none. That last case is what stops a change that simply
emitted the set unconditionally from passing.
Verified by reverting the emission alone: 2 of the 3 tests fail, and the gateway case
correctly still passes. Restored, all 3 pass.
Ec2*Test is 1246 tests with 2 failures, both in Ec2VolumeBlockDeviceDockerIntegrationTest
(Docker block devices, mke2fs). Measured on a clean checkout of upstream/main with these
changes removed: the same 2 fail. Pre-existing and environment-specific, not from this
change.
* fix(ec2): reattach the DnsEntries javadoc to its own method
The previous commit inserted endpointNetworkInterfaceIds and its javadoc between the
endpointDnsEntries javadoc and endpointDnsEntries itself. Java binds a doc comment to the
next declaration, so that left two consecutive blocks on the new method -- the first
dangling, the second the real one -- and endpointDnsEntries documented by nothing.
Moving the new method above the DnsEntries javadoc restores that binding and puts the
accessor next to endpointEniId, the helper whose ids it returns. Comment placement only;
no behaviour changes.
Ec2VpcEndpointNetworkInterfaceIdsIntegrationTest: 3 tests, 0 failures.
* refactor(ec2): derive endpoint ENI ids from the interfaces, not beside them
Review found that the javadoc on endpointNetworkInterfaceIds asserted an invariant the
code did not have. It said the ids were derived from endpointNetworkInterfaces so a
second copy could not disagree with what flow-log attribution reads. They were not
derived from it: both called endpointEniId independently, and they filtered differently.
endpointNetworkInterfaces skips a subnet whose record has gone; the id method emitted one
for every entry of getSubnetIds() unconditionally.
The gap is reachable. deleteSubnet checks only for transit-gateway attachments, so
nothing stops a subnet being deleted out from under a live endpoint, and the two were
then measured reporting different sets -- two answers to one question, with flow-log
attribution reading the shorter. Real AWS answers DependencyViolation to that delete and
Terraform's graph destroys the endpoint first, so the state is reachable only in an
emulator. That is the argument for the emulator staying self-consistent in it, not
against.
Extracts endpointNetworkInterfacesOf(VpcEndpoint). The region-wide
endpointNetworkInterfaces(String) is now that method looped, and the id list is mapped
over it, so one copy of the subnet-existence filter serves both and congruence holds by
construction rather than by inspection.
A distinct NAME rather than an overload: endpointNetworkInterfaces(VpcEndpoint) beside
endpointNetworkInterfaces(String) makes a Mockito any() ambiguous, and
FlowLogServiceTest:31 already uses one. Caught by the compiler; a new method should not
make an existing test stop compiling.
Incidental saving: vpcEndpointXml called the region-wide scan once per endpoint in a
response, so DescribeVpcEndpoints was quadratic in subnet lookups. It no longer is.
THE TEST WAS DECORATIVE UNTIL IT WAS MEASURED. Its first draft compared the wire ids to
the service's list for an endpoint whose subnets all still existed -- a case where both
derivations trivially agree, and it passed against the buggy version. It now deletes a
subnet out from under the endpoint first. Verified both ways: it FAILS on the old
independent derivation and PASSES on this one.
Ec2VpcEndpoint*, FlowLogServiceTest, Ec2ServiceTest and Ec2NetworkInterfaceIntegrationTest:
1251 tests, the only failures being Ec2VolumeBlockDeviceDockerIntegrationTest's known 2
of 8 (Docker block devices, mke2fs), measured identically on a clean upstream/main
checkout.
Not addressed here, filed separately: the ids this publishes do not resolve through
DescribeNetworkInterfaces, which never consults endpointNetworkInterfaces. Real AWS
returns endpoint ENIs there as requester-managed with interfaceType vpc_endpoint. That
gap predates this branch; publishing ids makes it visible rather than creating it, and no
corpus module looks one up today.
* docs(ec2): narrow the congruence claim to what the code actually guarantees
Three findings from review of #21, none behavioural.
The javadoc said the wire ids are BY CONSTRUCTION "the interfaces flow-log attribution
reads". Within one account that is exact -- vpcEndpoints.scan and subnets.get share a
prefix and both stores are account-wrapped. But FlowLogService runs on a scheduler with
no request context, so it reads the default account while this path reads the caller's;
for a non-default account the flow-log side sees no endpoints at all. Each side stays
internally consistent, which IS the property the refactor established and the one worth
claiming. Both seeing the same endpoints is not, and the absolute phrasing claimed it.
Restated as shared derivation rather than shared view.
endpointNetworkInterfacesOf was public with no caller outside the class -- not in
Ec2QueryHandler, which calls endpointNetworkInterfaceIds, and not in any test. Every
sibling helper in the same block is private (endpointEniId, endpointDnsDiscriminator,
endpointServiceToken, endpointPrivateIp), so public was the outlier. Now private. The
javadoc's argument for the distinct NAME stands untouched; that was about the Mockito
ambiguity, not the visibility.
The same javadoc cited FlowLogServiceTest:31 for that ambiguity. The line is 44 on this
base, and a comment carrying a line number is wrong again at the next rebase, so it now
names the stub instead.
Also drops a stray backslash in "method\'s" that survived from the heredoc the comment
was written in.
* test(ec2): say what the gateway case actually catches, which is less than claimed
The class javadoc and the PR description both said the gateway assertion is "what stops a
change that simply emitted the set unconditionally from passing". It is not. The emission
is guarded by `if (!endpointEniIds.isEmpty())`; remove that guard and a gateway endpoint
gets an empty `<networkInterfaceIdSet/>`, whose `item` list is empty, so
`eniIdsOf(...).isEmpty()` still holds and the test still passes.
Found by review of #21. Third claim on this branch that asserted more than the code
delivered -- after the javadoc that claimed a congruence invariant the code lacked, and
the one that claimed both sides see the same endpoints across accounts.
Not fixed by tightening the assertion to pin absence, which was the obvious move and the
wrong one: real AWS emits the empty element where this omits it. Absent and empty are
indistinguishable to any ec2query SDK, and Terraform's TypeSet lands both as an empty set,
so the behaviour is fine -- but an assertion pinning absence would pin the side of that
choice further from AWS, and make a later move toward AWS look like a regression.
So the comment now states the limit instead. The case still earns its place as a
regression guard: a gateway endpoint must never report interface ids.
Also orders the new test's imports like the sibling SubnetConfiguration suite.
* fix(ec2): an endpoint on a subnet whose CIDR is not dotted IPv4 must still answer
Both findings from the Greptile review of #4598.
P1. endpointPrivateIp splits the subnet's CidrBlock on dots and reads parts[1] and
parts[2]. CreateSubnet calls setCidrBlock with whatever it was given and never validates
the address family, so the value is not guaranteed to be dotted IPv4 -- "2001:db8::/56"
splits to one element and parts[1] throws.
This PR is what makes that reachable from a request. Deriving an endpoint's interfaces
used to happen only on the flow-log scheduler, where a throw was contained; it now also
happens while rendering CreateVpcEndpoint and DescribeVpcEndpoints, so the same odd subnet
turns into a failed EC2 response rather than a degraded address. Measured, with the guard
removed:
Unhandled error dispatching Query action CreateVpcEndpoint for service ec2:
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
Falls back to the same default the existing null-CidrBlock branch already uses, so "no
usable IPv4" has one behaviour instead of two. Deliberately NOT fixed by validating in
CreateSubnet: rejecting a non-IPv4 CidrBlock is what AWS does and is probably right, but
it is a behaviour change with a wider blast radius than this PR should carry, and it would
not help an IPv6-only subnet, which legitimately has no IPv4 CIDR at all.
anEndpointOnASubnetWithoutIpv4StillAnswers is a regression guard and states so. Measured
both ways: it FAILS at CreateVpcEndpoint without the guard and PASSES with it. Reviewer
found the defect by reading; the test is what keeps it found.
P2. Import order -- io.restassured sorts before jakarta. I reordered the first two imports
in an earlier commit and did not notice the same rule applied further down the block.
Ec2VpcEndpoint* and FlowLogServiceTest: 52 tests, 0 failures.
* fix(ec2): the non-IPv4 fallback gave every subnet on an endpoint the same address
Second Greptile round on #4598, and a defect introduced by the fix for the first.
The crash fix fell back to a CONSTANT network, 172.31.0.0. The host octet is derived from
the ENDPOINT, so it is identical across that endpoint's interfaces; on the IPv4 path the
only thing making them distinct is each subnet supplying its own network. Collapsing the
network to a constant threw that away, so every non-IPv4 subnet on one endpoint got the
same private address -- a crash traded for a silent collision. Measured:
got [172.31.0.249, 172.31.0.249]
The third octet now comes from the subnet id, restoring the property the IPv4 path has by
construction rather than by luck. The ENI ids were never affected -- endpointEniId already
mixes the subnet in -- and the new test asserts both, so a later change cannot fix one and
break the other.
twoSubnetsWithoutIpv4GetDistinctAddresses measured both ways: it FAILS on the constant
fallback with the collision above and PASSES with the subnet-derived one. The existing
non-IPv4 test could not have caught this: it uses a single subnet, where a collision has
nothing to collide with.
Ec2VpcEndpoint*, FlowLogServiceTest, Ec2ServiceTest, Ec2NetworkInterfaceIntegrationTest:
264 tests, 0 failures.
* test(compat): validate the endpoint's network interface ids through the Java SDK
Greptile's P2 on #4598. The integration test asserts the wire element over RestAssured,
which is deliberate -- an absent networkInterfaceIdSet and an empty one are different
things and only raw XML can tell them apart. But AGENTS.md's "Management APIs should be
validated with AWS SDK clients, not only handcrafted HTTP requests" sits under AWS Protocol
Rules, not under Compatibility Project, so it is general and "not only" is the operative
phrase. Both, not either.
src/test cannot host it: the main module has no AWS SDK dependency at all. sdk-test-java is
where the repo keeps SDK validation and already had 60 EC2 tests, covering
DescribeVpcEndpointServices but not an endpoint's own interfaces.
What this proves that the XML assertions cannot: that the real Java SDK DESERIALIZES the
element into networkInterfaceIds(). A response can be well-formed XML and still not populate
the model -- a wrong element name or nesting fails silently and leaves an empty list rather
than raising, which is the exact symptom this PR fixes.
Asserted on CreateVpcEndpoint and again on DescribeVpcEndpoints, and that the two agree,
because Terraform reads from one and re-reads from the other between plan and apply.
DeleteVpc moves from @Order(50) to @Order(51) so this runs while the shared VPC still
exists.
* fix(ec2): an endpoint's published interface ids have to resolve too
Blocking finding from hectorvent on #4598, and the gap it names is one this branch
filed as separate work (floci-5wby) on reasoning that turns out to be wrong.
DescribeVpcEndpoints publishes one ENI id per subnet in networkInterfaceIdSet.
describeNetworkInterfaces enumerated instance-attached interfaces and the standalone
CreateNetworkInterface store only, never endpointNetworkInterfaces, so asking about a
published id got InvalidNetworkInterfaceID.NotFound from the same emulator that had
just handed it over.
WHY IT CANNOT SHIP SEPARATELY. The bead argued no corpus module writes
data "aws_network_interface", so nothing resolves one. The corpus check was right and
the conclusion was wrong: the provider does the lookup ITSELF, inside its own read of
aws_vpc_endpoint. resourceVPCEndpointFlatten calls
findSubnetConfigurationsByNetworkInterfaceIDs over every id in network_interface_ids to
build subnet_configuration, and returns the lookup error rather than tolerating a
NotFound -- it handles retry.NotFound for the prefix list a few lines above and
pointedly does not here. So the blast radius is not "modules that look up an ENI", it is
every interface endpoint read. Publishing the ids without this turns an empty list on
main into a hard read failure, which is a regression against main rather than a
pre-existing gap left unfixed.
Endpoint interfaces now answer describeNetworkInterfaces: listed unfiltered, resolvable
by id, and selectable by interface-type, subnet-id and vpc-id. interface-type had no arm
at all, so it matched everything through the default; requester-managed is new alongside
it.
WIRE SHAPE. interfaceType vpc_endpoint and requesterManaged true, which is what AWS
reports for an interface it creates on the customer's behalf, and requesterManaged is now
emitted for every interface, false included, as the documented sample response does.
requesterId is left unset on purpose: real AWS reports an internal service account there,
which floci cannot know, and an invented twelve-digit id would be a wrong answer rather
than a missing one. No attachment block, for the same reason -- AWS reports one carrying
an AWS-side owner alias that would have to be fabricated, and the provider reads none of
it.
The new arm is deliberately NOT account-scoped, unlike the two above it. describeVpcEndpoints
is not account-scoped either, so scoping here would leave an id that IS published to a
caller unresolvable BY that caller -- the exact defect being closed. Its ids are added to
foundIds before the filter check, matching the other arms, so an id asked for by name and
then excluded by a filter is absent from the answer rather than NotFound.
Measured both ways at
|
||
|
|
c0ec98b43e |
feat(ec2): return spot price history for known instance types (#4698)
* feat(ec2): return spot price history for known instance types * fix(ec2): address review feedback on spot price history pagination and platforms * style(ec2): fix import ordering and inline qualified class names |
||
|
|
433893d298 |
feat(cognito): support software-token MFA setup and challenges (#4620)
* feat(cognito): require TOTP MFA after primary authentication * test(cognito): verify TOTP MFA with Java SDK * fix(cognito): reject disabled users completing TOTP challenges * fix(cognito): preserve new-password trigger through TOTP * fix(cognito): gate custom password auth with required MFA * fix(cognito): limit failed TOTP verification attempts * fix(cognito): report code mismatch for invalid TOTP setup |
||
|
|
b8aec4c50f |
fix(elasticache): serve a second cache asking for 6379 instead of refusing it (#4693)
* fix(elasticache): serve a second cache asking for 6379 instead of refusing it
CreateReplicationGroup answered a second cache on port 6379 with
InvalidParameterValue: Port 6379 is already in use by another
replication group.
AWS has no such rule. Port belongs to a cache's own endpoint, and 6379 is
the Redis default, so nearly every ElastiCache cluster uses it and they
coexist: AWS gives each cache a DNS name of its own and the port never has
to tell them apart. Floci puts every cache's proxy on one host, where a TCP
port is exclusive and the port IS the only thing that tells them apart. Any
module standing up two Redis clusters, and any suite running one per test in
parallel, failed at the second create.
A pinned port that is free and inside the proxy range is still honored. One
that is taken, or outside the range, now yields a port from the range rather
than a rejection, and that port is what the cache's endpoint reports.
The port a cache reports is always the port it is actually on. That is the
whole design, and it rules out the tempting alternative of reporting the
pinned port while listening elsewhere: the endpoint would then name a
DIFFERENT cache's listener, and a client following it reads the wrong
cache's data with no error at all. Measured, on a build that did exactly
that: two no-auth caches pinned to 6379, write through each, then read
through the second's advertised endpoint and get the FIRST cache's value,
from the host and from inside a container both. #4094 removed that same
failure from the restore path last week, where "the old endpoint then
reached an unrelated cache instead of failing cleanly".
What a caller gives up is the pinned port when Floci cannot serve it, which
terraform surfaces as a replacement-forcing diff on the next plan. A visible
difference, against a silent wrong answer: the create still succeeds, which
is what unblocks the modules.
The out-of-range rejection goes for the same reason. That range bounds what
this emulator may listen on and never bounded what AWS accepts. The only
rejection left is AWS's own, 1150 to 65535, as RdsService already applies.
Tests: the two that pinned the old rejections now pin the substitution, and
ElastiCachePortSharingIntegrationTest asserts at the DATA plane, writing
through each cache's own advertised endpoint and reading its own value back.
A control-plane-only test passes against the wrong-endpoint design too,
which is how that design survived review. ElastiCache surface: 214 tests,
0 failures.
Refs: floci-j55a
* test(elasticache): gate Docker per test, tie each endpoint to its own group
Five review points, no behaviour change. The service diff is the 1150 comment.
CORRECTING THE PREVIOUS COMMIT MESSAGE, which cannot be amended without a
force-push. It said a control-plane-only test "passes against the wrong-
endpoint design too, which is how that design got through four rounds". False
about this file: Order(2) compares the two REPORTED ports and requires them to
differ, and the withdrawn design reported 6379 for both, so it fails there
before anything connects. The general point stands, but not as stated. An
assertion about a SINGLE reported value cannot see a wrong-endpoint design,
because "the API says 6379" is satisfied whatever 6379 serves. An assertion
about a RELATIONSHIP between reported values often can. That is the
distinction, not control plane against data plane. Both javadocs said the
wrong thing and both are rewritten.
@BeforeAll gated the whole class on Docker, and only Order(6) needs it: a
group reaches available with no daemon reachable. On a Docker-less runner the
entire regression test for this fix would have vanished, silently and green,
including the control-plane assertion that catches the original bug. The
assumption now sits in Order(6) alone.
Order(6) claimed more than it proved. Writing "first" and "second" through the
two endpoints and reading each back passes under a consistent relabelling,
where each endpoint reaches a distinct cache that is not its own. Each group
now carries its own AuthToken and each proxy validates the token of the group
it was started for, so an endpoint reaching the other group's proxy is refused
its own group's token. The test AUTHs with its own token and requires the
other group's to be refused, which is what makes the method name true. Order(2)
stays: the two catch different things and neither subsumes the other.
Those refusal assertions check the proxy's actual error text, not the helper's
prefix, because a connection returning nothing would also fail to start with
"+OK" and must not read as a pass.
The docs section stated two rules as the service's that are false for
Memcached: CreateCacheCluster routes that engine to a path Port is not passed
to, so a pinned port is ignored and the 1150 check never runs. Scoped to
redis/valkey, with Memcached's behaviour stated. Third time on this work that
a Redis-path rule was written as though it covered the service.
The 1150 bound is no longer called AWS's own, in docs or javadoc. It is the
bound RdsService applies to the same argument; nothing here establishes
ElastiCache's real limit. It is strictly more permissive than the check it
replaced, so the risk is accepting a port AWS would refuse, never refusing one
AWS accepts. The upper arm was untested and now is.
ElastiCache surface: 215 tests, 0 failures, 0 skipped.
Refs: floci-j55a
* test(elasticache): stop the method name claiming the bound is AWS's
Two review points, both about claims rather than behaviour. The only
non-comment change in the diff is the rename.
aPortOutsideTheRangeAwsAcceptsIsStillRefused was the last place in the tree
still asserting that 1150 to 65535 is what AWS accepts, after the previous
commit removed that claim from the docs, the service javadoc and the unit
test. It is now aPortOutsideTheAcceptedRangeIsStillRefused, and its javadoc
says the bound is the one RdsService.reserveProxyPort applies to the same
argument, with nothing here establishing ElastiCache's real limit.
It survived a round that corrected the identical claim in three other places
because a method name does not present itself as prose. It is read far more
often than the body under it and re-read far less, which is true of a display
name, a bead title and a commit subject too.
Order(2) carried a one-line javadoc about the original bug, so a reader
landing there sees no reason it is not redundant against Order(6). It now says
what it catches that Order(6) cannot: comparing the two REPORTED ports is what
rejects a build reporting one port for both caches, it does so before anything
connects, and it still runs on a machine where Order(6) skips for want of
Docker. The non-subsumption was already stated in the class javadoc and in
Order(6)'s, which is not where someone doubting Order(2) is standing.
ElastiCache surface: 215 tests, 0 failures, 0 skipped. The renamed test is
present in the surefire report under its new name.
Refs: floci-j55a
* test(elasticache): SDK coverage for port sharing, and two test defects
Three Greptile findings on #4693, all in the tests. Verified live against
|
||
|
|
0383ecf53e |
fix(apigateway): resolve AWS variables on REST import (#4547)
* fix(apigateway): resolve AWS variables on REST import * fix(apigateway): preserve OpenAPI mapping templates * fix(apigateway): resolve imported authorizer variables * chore(ci): retry Docker Hub limited tests * fix(apigateway): resolve import variables across definitions * test(apigateway): cover variable imports with AWS SDK * refactor(apigateway): remove unused import validation region * style(apigateway): sort OpenAPI parser import * fix(apigateway): preserve imported authorizer merge behavior --------- Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com> |
||
|
|
86c4904bcc |
fix(ssm): resolve Secrets Manager references in GetParameter (#4581)
* fix(ssm): resolve Secrets Manager references in GetParameter GetParameter and GetParameters now answer /aws/reference/secretsmanager/<secret-id>[:<version-id-or-label>] from Secrets Manager, with the checks, error texts and response fields measured against AWS: WithDecryption must be true, a missing secret is ParameterNotFound, and GetParameters lists a reference it cannot answer in InvalidParameters. ECS task secrets and CodeBuild parameter-store variables read through the same path; a CloudFormation AWS::SSM::Parameter::Value<String> parameter still refuses one, as on AWS. * fix(ssm): check secretsmanager:GetSecretValue on a Secrets Manager reference AWS reads /aws/reference/secretsmanager/ with the caller's own secretsmanager:GetSecretValue, checked before the secret is looked up. With IAM enforcement on, a caller allowed only ssm:GetParameter now gets the ValidationException AWS sends, and GetParameters fails as a whole. * fix(ssm): authorize a Secrets Manager reference on the secret's ARN A grant on a secret's exact ARN, which CDK grantRead and a CloudFormation Ref produce, did not match the suffix-less name ARN, so an allowed caller was refused. The check now uses the secret's ARN and falls back to the name only when the secret does not exist. * fix(ssm): check a Secrets Manager reference's value on the secret it came from The value is read by name after the check, so a secret force-deleted and recreated in between was returned on the old secret's grant. The ARN of the secret actually read is now checked too. * fix(ssm): read a Secrets Manager reference's value from the secret it described * docs(ssm): note the partial-ARN fallback a Secrets Manager reference read leaves * fix(ssm): return SourceResult on a Secrets Manager reference * fix(ssm): reject a malformed Secrets Manager reference before checking IAM * chore(ssm): sort SsmService imports |
||
|
|
78c06239be |
feat(sns): support SMS account preferences (#4597)
* feat(sns): support SMS account preferences * fix(sns): include result element in SetSMSAttributes response * fix(sns): validate SMS sender IDs and cover JSON updates * refactor(sns): centralize SMS preference storage key |
||
|
|
33617e340d |
fix(iam): match condition values case-sensitively (#4672)
* fix(iam): match condition values case-sensitively * chore(ci): retry transient registry pull failure |
||
|
|
970bdf2e54 |
fix(iam): return protocol-correct access-denied statuses (#4673)
* fix(iam): return protocol-correct access-denied statuses * chore(test): alphabetize IAM enforcement imports |
||
|
|
1d646c6fea |
fix(cloudwatch): retain metric-math alarm query definitions (#4594)
* fix(cloudwatch): retain metric-math alarm query definitions * test(cloudwatch): use shared XML parser for alarm assertions |
||
|
|
cfc9a440c1 |
fix(apigateway): merge OpenAPI imports in PutRestApi (#4570)
* fix(apigateway): merge OpenAPI imports in PutRestApi Signed-off-by: zhanglangning <zln1905391059@163.com> * fix(apigateway): preserve authorization across API merges Signed-off-by: zhanglangning <zln1905391059@163.com> * fix(apigateway): preserve authorization across API merges Signed-off-by: zhanglangning <zln1905391059@163.com> * fix(apigateway): reject invalid PutRestApi modes Signed-off-by: boulea7 <zln1905391059@163.com> --------- Signed-off-by: zhanglangning <zln1905391059@163.com> Signed-off-by: boulea7 <zln1905391059@163.com> |
||
|
|
071a170ce9 |
fix(lambda): return current reserved concurrency in GetFunction (#4592)
* fix(lambda): return current reserved concurrency in GetFunction * fix(lambda): omit concurrency for qualified GetFunction reads |
||
|
|
0a786207d6 |
fix(lambda): return event source mapping ARN and support tagging mappings (#4587)
* fix(lambda): return event source mapping ARN and support tagging mappings CreateEventSourceMapping now stores Tags, every mapping response carries EventSourceMappingArn, and TagResource/ListTags/UntagResource route event-source-mapping ARNs to the mapping instead of rejecting them as non-function ARNs. * fix(lambda): address review on event source mapping ARN and tags - CloudFormation builds EventSourceMappingArn from the region and account the mapping is stored in, not the stack's, so it matches Lambda's ARN. - TagResource rejects a non-object Tags or a non-string tag value with SerializationException instead of persisting it. - The tag APIs match a mapping ARN exactly, so an ARN in another partition is reported as ResourceNotFoundException. - Explain the tolerated teardown failures in LambdaEsmTagsTest. |
||
|
|
b830ade6cd |
fix(elbv2): scope SetRulePriorities conflicts to the rule's listener (#4507)
* fix(elbv2): scope SetRulePriorities conflicts to the rule's listener
SetRulePriorities rejected a priority held by any rule in the region, so a
rule on one load balancer could not move to a priority used on another. AWS
scopes rule priorities to a listener ("A listener can't have multiple rules
with the same priority"), as CreateRule already did here.
Conflicts are now checked per listener, against that listener's rules that
are not part of the request. Two rules of the same listener given the same
priority in one request now fail with PriorityInUse instead of both being
applied.
* test(elbv2): keep SetRulePriorities compatibility tests in execution order
* fix(elbv2): check SetRulePriorities collisions against the concurrent rule map
The listener index lists are plain ArrayLists that CreateRule and DeleteRule
mutate without a lock, so iterating them could throw
ConcurrentModificationException. Iterate the region's ConcurrentHashMap and
filter by listener instead.
|
||
|
|
903efdf58e |
ci: key the ECR Public prefetch on the classes that start each image (#4600)
* ci: key the ECR Public prefetch on the classes that start each image prefetch-images.sh keyed the four Lambda runtimes on any /lambda/ path in shard.txt, and partition.sh spreads the Lambda tests over every shard, so each of the four shards pulled all four runtimes (674 MiB) plus the Firelens router (105 MiB) from ECR Public anonymously before its tests started. ECR Public counts that transfer per runner IP, and once the quota is spent every later anonymous pull fails with "toomanyrequests: Data limit exceeded", which is how a 2 MiB busybox pull took a shard down on main twice on 2026-09-27. Measured from a full four-shard run by pairing each ImageCacheService "Pulling image" / "Image already present locally" line with the class that logged it: nodejs:20 is reached from every shard, python:3.14 and python:3.12 each have one Docker-backed class, nodejs:18 was pulled by every shard and started by none, and the Firelens router has one class. Each entry now keys on those classes, which cuts a shard's ECR Public prefetch from about 800 MiB to between 120 and 330 MiB. A class the list misses pulls inline, as before. The tests also used three busybox tags (latest, 1.36, stable) for the same 2 MiB image. They now share one pin, TestImages.BUSYBOX (busybox:stable, the tag application.yml and the compatibility suites already use), and the prefetch script reads that pin from the class the way it reads the sidecar pins from application.yml, so one prefetch serves every test and the two cannot drift apart. The one test that pulls the other architecture keeps a tag of its own: a foreign-platform pull replaces what the local tag points at on a daemon without the containerd image store, and the docker build in the VolumesFrom test resolves its base from that local tag. Each key that names a class is checked against src/test/java, and a stale name is written to the log, so a rename cannot silently turn a prefetch off. The prefetch also set off ECR Public's per-second limit on its own: every pull started in the background at once, so the shard's ECR Public pulls landed in the same second. They are now queued and pulled one after another, a second apart, small images first because core/common/docker sorts near the top of every shard, while the Docker Hub pulls stay parallel. And each pull now writes one result line to prefetch-images.log, printed by a step after the tests, so a failed or still-running prefetch can be told apart from a test pulling the image itself. * ci: pull the Docker library test images from Docker Hub The first run of the prefetch results log showed where the quota actually runs out. On the two shards that failed, the very first pull of the job, docker/library/busybox or docker/library/python from the ECR Public mirror, came back with "toomanyrequests: Data limit exceeded" before the job had transferred anything, so the shard's own volume was not what spent it. The same runner then pulled busybox from Docker Hub seven seconds later and a 116 MiB lambda/ image from ECR Public half a minute after that, both fine. The mirror at public.ecr.aws/docker/library has an anonymous quota of its own, shared by runner IP and often already spent when a job starts, while GitHub-hosted runners pull Docker Hub without a limit: the fourteen Docker Hub images each shard prefetches have never failed. TestImages now names busybox and python-alpine the Docker Hub way, with the reason in its Javadoc, and the prefetch pulls them with the other Docker Hub images instead of queuing them behind the ECR Public runtimes. The three python-alpine literals share one pin. The pin is read with a regex that tolerates spacing, and a pin the script cannot read writes a "prefetch skipped" line instead of silently pulling nothing. An image two entries name is pulled once. The results step also lists any docker pull still running, so an early exit does not make an unfinished pull look like one that never ran. * test(compat): pull the SageMaker and CodeBuild images from Docker Hub The SageMaker compatibility tests (Java and Python) and the CodeBuild one named busybox through the public.ecr.aws/docker/library mirror, the same namespace whose anonymous quota fails the Build and Test shards, and the native Python jobs of another PR failed on it the same way. They now name the image the Docker Hub way. The CodeBuild digest is the same on both registries, so that reference only changes its host. |
||
|
|
dce7983b15 |
chore(ci): native CI now fails when the native image breaks a Docker call (#4514)
* chore(ecs): read the task metadata stats from inside a container No compatibility test reached Docker's stats API, so the native image could lose the docker-java stats models without any test failing. * chore(compat): reach the Docker commands no native test used Recording the Docker API calls of the Java suite against the native image showed commands no test reached. Cover the ones a CI run can reach: - ECS Exec resizes the terminal of an interactive session - a Lambda function with 33 MB of unzipped code is served from a code volume, which lists the volumes - Timestream for InfluxDB reboots an instance * chore(ci): run container-backed EC2 against the native image The native suites run EC2 in mock mode, so no native test reached the Docker calls only container-backed EC2 makes: building the security group helper image, committing an instance as an AMI and removing that image, and the VPC networks. A new job starts the native image with container-backed EC2, once with security group enforcement and once without, since an enforced instance lives in its helper's network rather than on a VPC network. It ends by killing and restarting Floci, which must remove the VPC network the tests leave behind. * chore(compat): trust Floci's test certificate in the ECS Exec session client The native CI job runs Floci with TLS, which makes the ExecuteCommand stream URL wss:// on Floci's test CA. * chore(ci): launch arm64 EC2 guests in the container-backed EC2 job The job runs on an arm64 runner, and the x86_64 AMI starts its guest as linux/amd64. The VPC network instances never reached running there. Maven also logs its test counts now, so a skipped phase shows in the job log. * chore(compat): say why the new tests' cleanup failures are ignored * chore(ci): stop waiting for Floci once it reports unhealthy in the EC2 job The wait kept polling for the full minute after an unhealthy status, unlike the existing wait step in the same workflow. |
||
|
|
4001556a31 |
fix(elasticache): honor top-level user passwords and let ModifyUser change auth and access string (#4431)
* fix(elasticache): honor top-level user passwords and let ModifyUser change auth and access string CreateUser read passwords only from AuthenticationMode, so a user created with the top-level Passwords member (aws elasticache create-user --passwords) was stored as no-password-required. ModifyUser ignored AuthenticationMode.Type, NoPasswordRequired, AccessString and AppendAccessString, so a user's auth mode and permissions could not be changed without deleting it. Both actions now resolve authentication from AuthenticationMode or from the top-level Passwords and NoPasswordRequired members, and reject contradictory combinations with InvalidParameterCombination. * test(elasticache): use explicit response types in the user auth compat test * ci: re-run checks after a Docker Hub image pull rate limit The previous run's shard 3 failed on 'toomanyrequests: Data limit exceeded' while pulling images for three ECS and core Docker integration tests. Nothing in this branch touches those paths. |
||
|
|
93ec5967fe |
fix(s3): return NoSuchTagSet from GetBucketTagging on untagged buckets (#4585)
GetBucketTagging returned 200 with an empty TagSet when a bucket had no tags, including after DeleteBucketTagging. AWS returns the NoSuchTagSet error instead. S3 Control ListTagsForResource still reports an empty list. |
||
|
|
bc15516cc0 |
feat(glue): create and run workflows (#4471)
Glue had no workflows: CreateWorkflow, StartWorkflowRun and the rest answered InvalidAction. Add CreateWorkflow, GetWorkflow, ListWorkflows, BatchGetWorkflows, UpdateWorkflow, DeleteWorkflow, StartWorkflowRun, StopWorkflowRun, ResumeWorkflowRun, GetWorkflowRun, GetWorkflowRuns, GetWorkflowRunProperties and PutWorkflowRunProperties, and let triggers belong to a workflow. StartWorkflowRun fires the workflow's starting triggers inside a new run. The workflow's conditional triggers fire only on job runs and crawls of that run, evaluate AND within it, and start their actions in it; job runs get --WORKFLOW_NAME and --WORKFLOW_RUN_ID. A run completes once nothing in it runs and nothing more fires. GetWorkflow and GetWorkflowRun report the graph of trigger, job and crawler nodes. Closes #4380 |
||
|
|
70c1c407bc |
feat(ec2): support instance and network-interface route targets (#4416)
Support InstanceId and NetworkInterfaceId in CreateRoute, ReplaceRoute, and DescribeRouteTables, automatically resolving InstanceOwnerId. - Parse and store InstanceId and NetworkInterfaceId on Route - Validate instance target existence and set InstanceOwnerId to caller account - Enforce single-target mutual exclusion across all supported route targets - Remove InstanceId and NetworkInterfaceId from UNSUPPORTED_ROUTE_TARGETS - Render instanceId, instanceOwnerId, and networkInterfaceId in DescribeRouteTables - Add DescribeRouteTables filter support for route.instance-id and route.network-interface-id - Document route target support in docs/services/ec2.md - Add integration tests in Ec2RouteTargetIntegrationTest - Add AWS SDK compatibility tests in Ec2RouteTargetTest |
||
|
|
3441532a9d |
feat(ses): paginate template lists and align ListExportJobs paging (#4465)
* feat(ses): paginate template lists and align ListExportJobs paging Add a namespaced Pagination.paginate overload and SesListPaging, which holds the probed per-operation page-size bounds, default page sizes, error messages and empty-token handling. ListTemplates (v1) and ListEmailTemplates (v2) now page newest first and share one token namespace, so a token from either continues the other. Without a page size the template lists serve 10, as SES does. ListExportJobs refuses a PageSize above 100 instead of clamping it, returns a null NextToken on the last page, and uses SES's own error messages. * refactor(ses): inject the template service clock and drop the paging test sleeps * test(ses): tick the clock between template create and update |
||
|
|
67437115c5 |
feat(iam): add last-accessed reporting actions (#4488)
Add GenerateServiceLastAccessedDetails, GetServiceLastAccessedDetails, GetServiceLastAccessedDetailsWithEntities and ListPoliciesGrantingServiceAccess. Floci records no service-access history, but AWS's "never used" shape keeps the report and nulls the usage fields rather than emptying the report, so that is what these reproduce. GetServiceLastAccessedDetails lists every service the entity could reach through its permissions policies and leaves LastAuthenticated and TotalAuthenticatedEntities absent for the ones never used. GetServiceLastAccessedDetailsWithEntities lists the entities that could have used the reported permissions: a group report yields the group's users, a policy report the users and roles it is attached to, and a user or role report that entity. Both lists come from permissions-policy logic, which Floci can evaluate, so both are computed rather than stubbed; the usage timestamps are the only part left out. A report is produced when the job is created and stored with it, matching AWS, where the Get operations retrieve a report that Generate produced. So editing the policies afterwards does not change what a completed job answers, and deleting the entity does not stop a valid JobId resolving. Generate resolves the whole ARN first, rejecting one whose account is not the caller's or whose path is not the resolved entity's, so it cannot fall back to a same-named local identity; AWS-managed policy ARNs carry the literal "aws" account and are allowed through to the global catalog. An unknown JobId is NoSuchEntity, Granularity is validated and echoed back as JobType, and both readers honour MaxItems and Marker. ListPoliciesGrantingServiceAccess needs no job and no usage history, since AWS defines it purely over permissions-policy logic. A user contributes its own managed and inline policies plus those of every group it belongs to, while a group or role contributes only its own; permissions boundaries are excluded. Only Allow grants, and Allow with NotAction grants every service the list does not carve out. It models a Marker but no MaxItems, so only the former is applied. Services reachable only through a wildcard or NotAction cannot be enumerated without a catalog of IAM service namespaces, which is tracked separately in #4487 and documented. |
||
|
|
60d112542d |
fix(cloudformation): delete UPDATE_FAILED resources on DeleteStack (#4470)
* fix(cloudformation): delete UPDATE_FAILED resources on DeleteStack A failed update whose rollback cannot restore a resource leaves it UPDATE_FAILED with its physical id and the stack in UPDATE_ROLLBACK_FAILED. DeleteStack only walked CREATE_COMPLETE, UPDATE_COMPLETE and DELETE_FAILED resources, plus UPDATE_FAILED ones whose provisioner opted in, so every other failed resource was skipped without an event and the stack still reached DELETE_COMPLETE, leaving the role, log group or bucket behind. Delete every UPDATE_FAILED resource that has a physical id. Delete a CREATE_FAILED resource only when the provisioner marked its entity as created by the stack, as the create rollback does, since a failed create can name an entity that existed before. Closes #4467 * test(cloudformation): clean up the outside log group when the test fails * docs(cloudformation): list the resource statuses DeleteStack deletes * fix(cloudformation): mark a failed nested stack the operation created as stack-owned A nested stack whose child fails during creation came back CREATE_FAILED with the child's stack id but no ownership marker, so neither the create rollback nor DeleteStack deleted the child stack. * test(cloudformation): clean up the stack, role and log group when the test fails * docs(cloudformation): update the hasPendingRollbackCleanup javadoc now that DeleteStack no longer calls it |
||
|
|
a5ded3e162 |
fix(apigateway): import x-amazon-apigateway-any-method in the native image and roll back failed imports (#4473)
* fix(apigateway): import x-amazon-apigateway-any-method in the native image and roll back failed imports The ANY pseudo-operation reaches the service as an untyped extension map, and it was bound to io.swagger.v3.oas.models.Operation with Jackson bean deserialization. The swagger model graph is not registered for reflection, so in the native image every ImportRestApi or PutRestApi body with x-amazon-apigateway-any-method failed with BadRequestException. Parse it with the swagger parser's own Operation reader, the one that already builds the real verbs, which needs no reflection. A failed import also left state behind: ImportRestApi kept a half-built API whose id the caller never received, and PutRestApi left the API cleared and partly rebuilt. ImportRestApi now deletes what it created and PutRestApi restores the API-scoped state it replaced. * chore(apigateway): import swagger Json instead of qualifying it inline |
||
|
|
5af1d4048e |
fix(elasticache): report a ConfigurationEndpoint only for cluster-mode-enabled replication groups (#4469)
A cluster-mode-disabled replication group reported a ConfigurationEndpoint alongside NodeGroups[0].PrimaryEndpoint. AWS only returns ConfigurationEndpoint for a cluster-mode-enabled group, and terraform-provider-aws branches on its presence: when it is set, primary_endpoint_address and reader_endpoint_address are left null. |
||
|
|
0d813adf95 |
feat(glue): create, run and chain triggers (#4436)
Glue had no triggers: CreateTrigger and the rest answered InvalidAction. Add CreateTrigger, GetTrigger, GetTriggers, ListTriggers, BatchGetTriggers, UpdateTrigger, DeleteTrigger, StartTrigger and StopTrigger. StartTrigger runs an ON_DEMAND trigger's actions. An activated CONDITIONAL trigger fires when a watched job run or crawl finishes in the named state, evaluated after every Glue request, so a chain of triggers completes within the request that starts it when runs finish at once. Runs started by a trigger carry its TriggerName. SCHEDULED triggers are stored and can be activated but do not fire on a timer. Part of #4380 |
||
|
|
93c7b1f93f |
feat(glue): start and stop crawls, crawler metrics, listing and schedules (#4427)
A crawler could be defined but never run: StartCrawler answered InvalidAction and a crawler stayed READY with no LastCrawl. Add StartCrawler, StopCrawler, GetCrawlerMetrics, ListCrawlers, BatchGetCrawlers, UpdateCrawlerSchedule, StartCrawlerSchedule and StopCrawlerSchedule. Crawls follow the crawler state machine without reading data and are settled on read, as job runs are; floci.services.glue.crawler-run-duration-seconds (default 0) can keep a crawler RUNNING. UpdateCrawler and DeleteCrawler are refused while a crawl runs, and DeleteCrawler removes the crawl history. Part of #4380 |
||
|
|
3d35eabf51 |
feat(iam): finish the SAML provider lifecycle (#4360)
Adds UpdateSAMLProvider, DeleteSAMLProvider, TagSAMLProvider, UntagSAMLProvider and ListSAMLProviderTags, and adds tags to GetSAMLProvider. UpdateSAMLProvider re-parses a new SAMLMetadataDocument the same way CreateSAMLProvider does and replaces the stored entity ID and certificate. The document is optional on the request: omitting it (metadata == null) is a no-op, but an explicitly empty one is invalid input, the same as CreateSAMLProvider already rejects it as; the two are distinguishable at the wire level and were previously treated the same. The update replaces the stored provider with a newly built one rather than mutating the existing, already-published object's fields one at a time: assertion verification (StsQueryHandler) reads a provider via find() / findForAccount() without taking providerLock, so setting entityId and certificate as two separate writes on the live object could let it observe one field updated and the other not. Publishing a fully-built replacement through the same ConcurrentHashMap-backed store means any reader, synchronized or not, sees either the old provider intact or the new one intact, never a mix. DeleteSAMLProvider's existence check now runs inside the same lock as the delete itself, not before it: two concurrent deletes could otherwise both pass the check before either removed the provider, so the second returned success instead of NoSuchEntity, and a delete racing a recreate of the same ARN could remove the newly created provider instead of the deleted one. DeleteSAMLProvider itself does not check or update any role whose trust policy still references the provider's ARN. This corrects an assumption from the original gap-report plan (which expected a delete-blocked-while- referenced check, by analogy with DeletePolicy's attachment guard): AWS's own docs say the opposite, that deletion always succeeds and it is a later AssumeRoleWithSAML against the now-dangling ARN that fails, not this call. GetSAMLProvider and ListSAMLProviderTags both sort their tags by key, matching AWS's own documented behavior for both, which the same wording in ListInstanceProfileTags's docs already established the precedent for. Also completes AwsQueryController's IAM_ACTIONS fallback set for every SAML provider action, including the three pre-existing ones (ListSAMLProviders, CreateSAMLProvider, GetSAMLProvider), none of which were there before, and adds SDK-client coverage for the whole SAML provider lifecycle to compatibility-tests/sdk-test-java/IamTest.java, which (like the three pre-existing SAML actions) had none. |
||
|
|
fd3696a9fc |
fix(ec2): report a flow log's custom LogFormat (#4386)
* fix(ec2): report a flow log's custom LogFormat CreateFlowLogs parsed LogFormat and stored it on the flow log, and DescribeFlowLogs never emitted it. A client comparing its declared format against the live flow log saw the field unset every time and proposed the same change on every plan. XmlBuilder.elem skips a null, so a flow log created without a custom format reports no element rather than an empty one. LogGroupName is also in the model's FlowLog shape and is not parsed, stored or emitted here. That is a missing input rather than a dropped round-trip, and it needs a decision about how it sits alongside LogDestination, so it is left out of this change. * test(ec2): address the flow log format assertions by id DescribeFlowLogs serves no filters, so the resource-id filter these tests passed was ignored and both described every flow log in the region. The negative test then found the other test's custom format whenever it ran second. Capture the id CreateFlowLogs returns and describe that one log. * test(ec2): validate the flow log format with the EC2 SDK client AGENTS.md asks for management APIs to be exercised through an SDK client rather than handcrafted requests alone. Ec2Client.describeFlowLogs decodes logFormat as the field the create call set, and reports null when the flow log was created without one. * test(ec2): tolerate a null id when cleaning up the flow log test List.of rejects a null, so a failed CreateFlowLogs would have thrown from the finally block and left the VPC behind, masking the real failure. * fix(ec2): report the default log format when none was set CreateFlowLogs builds the flow log with the default format when LogFormat is omitted, so the flow log carries one from that point and DescribeFlowLogs reports it. Omitting the element left the same gap this branch set out to close, one step further in. DEFAULT_LOG_FORMAT is the version 2 fields in the order AWS documents. It is separate from DEFAULT_HEADER, which is the alphabetised superset written as the header line of a generated log file. * docs(ec2): restore the DEFAULT_HEADER javadoc the new constant displaced The new constant landed between DEFAULT_HEADER and its comment, leaving that comment attached to nothing. It also called the value a version 5 field order, which it is not. It is every available field in alphabetical order. |
||
|
|
41d07f6e3b |
fix(apigateway): register native VTL map reflection (#4405)
* fix(apigateway): register native VTL map reflection * fix(apigateway): package VTL reflection metadata for native build * test(apigateway): cover native VTL collection methods * chore(ci): retry flaky test shard * chore(ci): retry timed out test shard --------- Co-authored-by: Vamsi Akavarapu <16164447+vamsiak@users.noreply.github.com> |
||
|
|
49f253d0ec |
fix(ec2): report an unknown subnet id from DescribeSubnets as an error (#4408)
* fix(ec2): report an unknown subnet id from DescribeSubnets as an error A requested SubnetId that does not exist was dropped from the result instead of raising. An empty list tells the caller the subnet is gone when the id may simply be wrong, and a waiter polling for a subnet it just created cannot tell not-yet from never. describeVpcs already reads its own requested ids this way, so this is the same shape applied to subnets. A describe naming no ids still lists the region. * fix(ec2): raise the unknown subnet id from the query handler, not the service describeSubnets is shared with ELB, ELBv2, DMS, ElastiCache, RDS and others, each of which reads an absent id as its own error. ElbV2Service raises SubnetNotFound and DmsService raises InvalidSubnet, and both are the codes those APIs owe their callers. Raising InvalidSubnetID.NotFound in the service replaced them. Move the per-id check to handleDescribeSubnets so only the EC2 query surface changes, and reuse the existing requireSubnet helper. Assertions now read the XML elements rather than the response text. * test(ec2): validate the unknown subnet id with SDK clients AGENTS.md asks for management APIs to be exercised through an SDK client rather than handcrafted requests alone. Ec2Client.describeSubnets raises InvalidSubnetID.NotFound for a missing id, on its own and mixed with a good one, and resolves the known id. The ELBv2 case pins the regression the query handler placement avoids. With the check in describeSubnets, CreateLoadBalancer answers a missing subnet with InvalidSubnetID.NotFound rather than the SubnetNotFound that API owes its callers, and this test fails. * test(ec2): delete the VPC even when subnet creation fails Creating the subnet outside the try meant a failure there left the VPC behind, which accumulates against persistent storage. |
||
|
|
14ae1dfbdb |
feat(glue): start, read and stop job runs, and list and batch get jobs (#4382)
A job could be created but never run: StartJobRun and the other run actions answered InvalidAction. Add StartJobRun, GetJobRun, GetJobRuns, BatchStopJobRun, ListJobs and BatchGetJobs. Runs follow Glue's state machine without executing the script. They are settled on read, so floci.services.glue.job-run-duration-seconds (default 0, succeed at once) can keep a run RUNNING long enough to stop it or hit MaxConcurrentRuns. DeleteJob also removes the job's runs. Part of #4380 |
||
|
|
59fda495a6 |
fix(sts): Reject SAML signature transforms that AWS rejects (bonus: native image shrunk by 7 MB) (#4372)
* perf(sts): drop the XSLT and XPath signature transforms from the native image AWS answers AssumeRoleWithSAML with InvalidIdentityToken "Response signature invalid" when the signature reference uses an XPath, XPath Filter 2.0 or inclusive canonicalization transform, even though the signature itself is valid. It accepts the enveloped signature transform alone or with exclusive canonicalization, which is what SAML 2.0 core 5.4.4 allows. The verifier now rejects the other transforms the same way. These transforms can no longer run, but every registered transform is reachable through one virtual call in the JDK XML signature code, so the XSLT compiler and the XPath engine were still compiled into the native image. Substitutions cut them out. * chore(sts): cover the exclusive canonicalization with comments transform AWS accepts a SAML signature whose reference uses the enveloped signature transform with exclusive canonicalization with comments. * fix(sts): check SAML signature transforms before unmarshalling the signature In the native image, unmarshalling an XPath Filter 2.0 transform throws MissingReflectionRegistrationError for XPathType[], so AssumeRoleWithSAML returned 500 instead of InvalidIdentityToken "Response signature invalid". The transform algorithms are now read from the DOM before the JDK parses their parameters. |
||
|
|
08c6ce0768 |
feat(ses): add v2 export jobs (#4327)
* feat(ses): add v2 export jobs CreateExportJob, GetExportJob, ListExportJobs and CancelExportJob render the per-recipient timelines already stored at send time as CSV or JSON, through the same aggregation BatchGetMetricData serves, so an export and a query of one window cannot disagree. Real SES writes the file into a bucket it owns and refuses a caller-chosen S3Url, so Floci does the same and writes into its own S3 emulation, which is what the presigned URL on a finished job resolves against. The VDM gate answers BadRequestException here where message insights and metric data answer NotFoundException, so SesAccountService takes the caller's error shape and keeps one copy of the probed sentence. * fix(ses): use the published concurrent-export quota and prove the reset test parks * fix(ses): scope the export bucket per account and fix two row-count bugs * fix(ses): make the reset drain test deterministic and document the presigner limit * test(ses): assert the reset thread finished, since join returns on timeout too |
||
|
|
4abba5a218 |
fix(lambda): preserve CloudFormation event source mapping options (#4316)
AWS::Lambda::EventSourceMapping now forwards MaximumBatchingWindowInSeconds, MaximumRetryAttempts, MaximumRecordAgeInSeconds, BisectBatchOnFunctionError, FilterCriteria, DestinationConfig and ScalingConfig to LambdaService, so a stack-created mapping matches an API-created one. On UpdateStack each of these that the template omits is sent as null, which clears it. ParallelizationFactor and TumblingWindowInSeconds are not modeled and remain ignored; the resource-type table notes this. Fixes #4313 |
||
|
|
76cc27f2f1 |
fix(ecs): retry teardown of redeployed task containers (#4280)
* fix(ecs): retry teardown of redeployed task containers * test(ecs): wait for explicit task stop in SDK compatibility test * fix(ecs): serialize teardown and align stop compatibility test * test(ecs): observe blocked concurrent stop without delay * fix(ecs): preserve unknown exits and serialize startup transition |
||
|
|
b658c5f020 | feat(ecr): update and validate pull-through cache rules (#4342) | ||
|
|
4a51c0e814 |
feat(dlm): manage lifecycle policies (#4335)
* feat(dlm): manage lifecycle policies * fix(dlm): use shared partition regex |
||
|
|
1952ba4052 |
feat(ecr): manage pull through cache rules (#4304)
Signed-off-by: XuJian <265865031+xujiantop-crypto@users.noreply.github.com> |
||
|
|
34be03b334 |
feat(ses): add v2 BatchGetMetricData (#4302)
Aggregates the per-recipient timelines already stored at send time, so the batch metrics and GetMessageInsights cannot disagree about what a send produced. Buckets are whole UTC days, the series is sparse rather than zero filled, the end of the range is exclusive, and counting is per recipient. SentEmail gains the configuration set the send resolved to, which the CONFIGURATION_SET dimension filters on. The VDM gate moves into a shared SesVdmGate so the two gated operations keep one copy of the probed message. Metrics that need a real mailbox to act stay empty, as does TRANSIENT_BOUNCE, since every bounce Floci derives is permanent. |
||
|
|
bae7e0316a |
feat(s3): enforce Block Public Access on the data plane (#4253)
* feat(s3): enforce Block Public Access on the data plane The four Block Public Access flags were stored and returned but never read by any authorization path, so put-public-access-block was accepted and changed nothing: a bucket left public by a policy or an ACL stayed readable. Enforce all four, combining a bucket's configuration with its owner account's and taking the most restrictive of the two, as AWS does. BlockPublicPolicy and BlockPublicAcls reject the write that would introduce public access, which AWS applies whoever the caller is, so they do not sit behind enforce-auth. RestrictPublicBuckets and IgnorePublicAcls suppress access an existing policy or ACL grants, which only has meaning once anonymous authorization runs, so they take effect under enforce-auth. Deciding what counts as public follows the documented AWS rules: an ACL is public when it grants any permission to AllUsers or AuthenticatedUsers, and a policy is assumed public unless a wildcard-principal statement pins a recognised condition key to a fixed value. A single public statement makes the whole policy public, so RestrictPublicBuckets also withholds the cross-account delegation a separate non-public statement grants. Enabling a setting never rewrites stored state; an existing public policy or ACL is left exactly as written. * test(s3): pin the Block Public Access contract at the wire Cover the write-time flags under the default configuration and the read-time flags under enforce-auth, including the reproduction that motivated the fix: put-public-access-block followed by an anonymous GetObject on a bucket whose policy is public. Each enforcing assertion is paired with a negative control that must keep passing without the fix, so a test cannot pass vacuously: the without-BPA case still returns 200, and the owner's signed access is never affected. Reverting the S3Service change fails the 11 enforcing assertions and leaves the 10 controls green. Unit tests cover the settings record's parsing and most-restrictive merge, the ACL public-status rule, and the policy public-status rule against the examples in the AWS documentation. * test(s3): validate Block Public Access through the AWS SDK Drives BlockPublicPolicy and BlockPublicAcls with S3Client so the rejection is seen the way an SDK caller sees it: a 403 carrying the AccessDenied error code, not just a status line. Both apply without enforce-auth, which is the configuration this suite runs against. * test(s3): drop the em-dash from the Block Public Access display name * fix(s3): recognize scoped access point ARN in bucket policies * fix(s3): honor ForAnyValue in public policy checks |
||
|
|
babb43ac3d |
fix(cloudwatch): return storedBytes on DescribeLogGroups (#4202)
* fix(cloudwatch): return storedBytes on DescribeLogGroups AWS reports log-group storedBytes as the sum of stream sizes. Floci always returned 0, which breaks SDK clients that read the field. * style(cloudwatch): import collection test helpers |
||
|
|
a450cdc9b0 |
feat(redshift): support Redshift Spectrum phase one (#4184)
* feat: add Redshift Spectrum metadata catalog * feat: parse Redshift Spectrum DDL * feat: read Redshift Spectrum CSV data from S3 * feat: classify and rewrite Redshift Spectrum queries * feat: materialize Spectrum rows into PostgreSQL * feat: intercept Redshift Spectrum queries * test: cover Redshift Spectrum wire integration * docs: document Redshift Spectrum phase one * fix: handle Spectrum extended queries * fix: preserve Spectrum query protocol state * fix: resolve Spectrum cursor paging and extended query race condition - Await prior backend queries before streaming local Spectrum Extended Query frames - Drop synthetic Spectrum Parse/Bind/Describe/Close frames from coordinator pending queue - Support server-side cursor pagination with PortalSuspended across multiple Execute cycles - Add cascade cleanup for unexhausted portal cursors when prepared statement is closed * fix(redshift): register SpectrumMaterializer for GraalVM runtime initialization * fix(redshift): forward non-Spectrum queries and register storage models for reflection * docs(redshift): clarify Spectrum temp table lifecycle across protocols * docs(redshift): note that Simple Query Spectrum creates a temp table per query --------- Signed-off-by: Vũ Thế Huy <31652864+vuthehuyht@users.noreply.github.com> |
||
|
|
f2d6710b24 |
fix(rds): apply DBInstanceClass, AllocatedStorage and EngineVersion on ModifyDBInstance (#4214)
* fix(rds): apply DBInstanceClass, AllocatedStorage and EngineVersion on ModifyDBInstance ModifyDBInstance parsed the password, IAM auth, subnet group, option group, security groups and the backup and monitoring settings, but never read DBInstanceClass, AllocatedStorage or EngineVersion. A resize or an engine upgrade returned 200 while DescribeDBInstances kept reporting the values the instance was created with, so a caller that diffs its configuration against a read-back saw the same pending change on every run. The three members move into a DbInstanceScalingChanges record that the handler fills from the request and the service applies, with the rules the AWS API reference states for them: - AllocatedStorage below the current size fails with InvalidParameterCombination - an increase under 10% is rounded up to 10% greater on PostgreSQL, MySQL and MariaDB, and taken as given on SQL Server - the same size is not a change and is left alone - a different major EngineVersion needs AllowMajorVersionUpgrade Floci applies the change immediately rather than deferring it to the preferred maintenance window: it runs no maintenance window and models no PendingModifiedValues, so a deferred change would never be applied at all. * fix(rds): reject a ModifyDBInstance scaling change before applying any member The scaling members were validated as they were assigned: the class was set, then the storage was resolved, which can refuse a shrink, then the engine version was checked, which can refuse a major upgrade. The instance a modify works on is the stored object rather than a copy, so a request refused at the second or third step had already written the earlier ones, and a read-back reported a class the 400 said it never got. The checks now run in resolveFor, ahead of every setter in modifyDbInstance, including the password rotation that reaches the running container. applyTo is left as pure assignment of an already-resolved record. |
||
|
|
d214144c86 |
chore(compat): bump the pinned AWS SDKs for the compatibility suites (#4237)
The SES tenant-level deliverability launch on 2026-09-17 added a TENANT_NAME metric dimension to BatchGetMetricData and a TenantName filter to the message insights export. Both reached the Java SDK in 2.55.0 and botocore in a release after the pinned one, so the suites could not express either against the versions pinned here. Java moves 2.52.0 to 2.55.3 and Python 1.43.69 to 1.43.100, the current releases of each. |