Commit Graph
2211 Commits
Author SHA1 Message Date
Vũ Thế Huy c3ec3819ae fix(ec2): attach Docker-hosted Floci to VPC networks (#3862) 2026-09-18 10:17:20 -04:00
luiseterc fdec637c27 fix(eks): preserve worker webhook scope in the URL path (#3849)
* fix(eks): preserve worker webhook scope in the URL path

* docs(eks): clarify scoped and legacy webhook routes
2026-09-18 09:35:00 -04:00
Vũ Thế Huy bd9700db0d fix(autoscaling): prevent reconciler resurrecting deleted groups (#3818)
* fix(autoscaling): prevent reconciler resurrecting deleted groups

* fix(autoscaling): narrow reconciler group locking
2026-09-18 09:29:44 -04:00
Matheus Oliveira eb787672b8 feat(timestream-influxdb): add Timestream for InfluxDB backed by InfluxDB 2.x containers (#3683)
* feat(timestream-influxdb): add Timestream for InfluxDB backed by InfluxDB 2.x containers

Implements all 24 AmazonTimestreamInfluxDB operations; DB instances and
read replica clusters run real influxdb:2.7 containers.

* Fix #2566

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

* fix(timestream-influxdb): reject unsupported RestoreFromDbBackup parameters

Point-in-time restore needs a continuous backup, and REPLACE_EXISTING
accepts no configuration overrides, so both are rejected instead of
silently restoring on-demand data or dropping the overrides.

* Fix #2566

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

* style(timestream-influxdb): import the classes used instead of naming them inline

Replaces the inline fully-qualified LinkedHashMap, Comparator, Predicate
and TimestreamInfluxDbService references with imports.

* Fix #2566

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

---------

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
2026-09-18 09:09:51 -04:00
Priamo Germosen 918a09f54a fix(appsync): move the GraphQL engine to a sidecar, out of the native image (#3534)
graphql-java (~3.8MB with transitive deps) was an unconditional dependency,
so it and its schema/execution/parser classes were reachable in every
native image regardless of whether AppSync was ever used (issue #2917),
the same systemic pattern already fixed for Kubernetes (#2914) and Kafka
(#2916).

Schema parsing and query execution now run in floci/floci-sidecar-graphql,
published from floci-io/floci-sidecars, the same model #3799 already moved
Cedar onto: GraphqlSidecarManager lazily starts the pinned image and checks
the contract version it reports on /health, refusing a sidecar speaking
another contract major with a message naming the image and the variable to
change. GraphqlSidecarClient talks to it over plain HTTP. graphql-java is
no longer a dependency of this repository at all, not even test-scoped:
its schema/execution/parser classes, the query planner, and the 17 AWS
scalar coercions now live entirely in the sidecar's own repository.

The sidecar itself carries zero AppSync-specific knowledge, and zero AWS
vocabulary: its scalars are generic named coercion kinds a caller maps its
own scalar names onto, so SidecarSchemaCompiler now sends a scalars mapping
(AWSDateTime -> date-time, and so on for all 17) alongside every SDL, or
AWS scalar validation would silently degrade to pass-through coercion. It
exposes three endpoints: schema validate/compile, a query planner that
lists every (typeName, fieldName) coordinate a query would visit plus the
directives on each (with zero interpretation of what they mean), and
execute, which accepts an opaque denyFields list and nulls those
coordinates out with the caller-supplied error. All @aws_auth/IAM/
Cognito/Lambda-authorizer interpretation stays in Floci
(SidecarFieldAuthorizationPlanner, AppSyncAuthRequirements), computed from
the planner's output before /v1/execute is ever called, so a query the
planner can't fully analyze fails closed (refuses the request) instead of
silently running unauthorized. SidecarSchemaCompiler replaces
AppSyncSchemaParser: it still injects AppSync's directive declarations and
the 17 scalar type declarations into the customer's SDL (pure string work)
before handing the SDL to the sidecar.

While the scalar coercion logic was still being ported to the sidecar's
repository, testing surfaced a real bug: every scalar's parseLiteral()
delegated to parseValue(), which throws CoercingParseValueException;
graphql-java's literal validator only catches CoercingParseLiteralException,
so an invalid literal argument (as opposed to an invalid variable) escaped
as an unhandled exception instead of a spec-correct GraphQL
ValidationError. Fixed in the sidecar before it was ever published.

QueryRegistry, QueryExecutor, AuthFieldWrapper, AuthorizationDataFetcher's
live DataFetcher wrapper, and AppSyncFieldUnauthorizedException are
deleted: their in-process execution role no longer exists. The directive
interpretation half of AuthorizationDataFetcher survives as
AppSyncAuthRequirements, now taking generic data instead of live
graphql-java objects, shared rather than duplicated.

Verified end to end against the published image: pulled
floci/floci-sidecar-graphql:0.2.0 fresh and ran the full AppSync suite
(190 integration tests across schema lifecycle, auth, and execution)
through the real GraphqlSidecarManager, including the sidecar starting
and stopping as a real sibling container over the mounted Docker socket.
2026-09-18 07:57:15 -05:00
Vũ Thế Huy 6f87973649 feat(ecs): add FireLens task logging support (#3768)
* feat(ecs): add FireLens task logging support

* fix(docker): omit extra hosts for container network mode

* fix(ecs): bind FireLens router port to loopback
2026-09-18 08:57:02 -04:00
XuJianandxujiantop-crypto 172bfb32b0 fix(cognito): align pre-authentication trigger events and errors (#3861)
* fix(cognito): include user status in pre-authentication events

* fix(cognito): preserve pre-authentication trigger errors

* fix(cognito): constrain pre-authentication payload handling

---------

Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-18 08:53:35 -04:00
luiseterc 5ec3fb67a8 fix(ec2): resolve instance profile names through IAM (#3856) 2026-09-18 08:46:22 -04:00
Hector Ventura 6e034837ad fix(cloudformation): tolerate an already-gone EC2 instance or security group on stack delete (#3842)
Ec2InstanceCfnProvisioner.delete and Ec2SecurityGroupCfnProvisioner.delete called terminateInstances / deleteSecurityGroup directly, so a group or instance removed out of band turned DeleteStack into DELETE_FAILED. Wrap both in CfnDeletes.safeDelete with the specific not-found code (InvalidInstanceID.NotFound, InvalidGroup.NotFound), per AGENTS.md step 5, so already-gone is tolerated while a real error such as DependencyViolation still propagates.
2026-09-18 07:41:10 -05:00
Kenshin Okinaka 938eca1fe9 refactor(ses): drop the tenant-free suppression overloads from SesService (#3860)
The four short signatures of putSuppressedDestination,
getSuppressedDestination, deleteSuppressedDestination and
listSuppressedDestinations only passed null as the TenantName to the
tenant-aware version, which then forwarded straight to SesSuppressionService.
The v2 controller always passes a TenantName, so nothing in src/main called
them; the only callers were tests seeding or reading suppression entries.

SesSuppressionService already exposes those exact three-argument signatures,
so the tests reach it through the builder accessor instead, the way
SesSuppressionServiceTest already did. They keep the facade for what is
actually facade behavior: sendEmail and resolveSuppressionReason.

Retitle the suppression section and fold its two comment paragraphs into one.
The heading still claimed "account attributes + list" although the account
attributes moved to SesSuppressionService in the store split and are read and
written by the v2 controller; only the tenant-routed list operations remain.

Also squash the four runs of consecutive blank lines in the file, including
the one the earlier inspection cleanup left before the Templates section
comment.
2026-09-18 08:32:32 -04:00
Kenshin Okinaka 6e53c5275a refactor(ses): clean up what the controller split left behind (#3841)
Four leftovers from splitting SesController by domain, none of them changing
behavior.

SesInspectionController now injects SesSentEmailService and calls listAll and
clear on it. SesService.getEmails and clearEmails were one-line forwards to
that service, the last pure delegations the split missed, so they go; the
field comment and the class Javadoc that still claimed inspection read through
the facade are corrected. SesServiceTestBuilder gains a sentEmailService
accessor and SesServiceSmtpTest reads through it, matching how the other
domain services are reached from tests.

Three test classes are renamed to the service they actually drive:
SesServiceDkimLookupCacheTest and SesServiceLegacyDkimTokensTest become
SesIdentityDkimLookupCacheTest and SesIdentityLegacyDkimTokensTest, and
SesServiceSuppressionLegacyKeyTest becomes SesSuppressionLegacyKeyTest. None
of them was referenced from anywhere else.

SesSendController imports JsonProcessingException instead of writing it out
inline, and SesService drops six imports left unused by earlier steps.
2026-09-18 06:59:25 -04:00
Priamo Germosen 18a2f36eda refactor(s3): dedupe Filter grammar between IntelligentTiering and Metrics (#3836)
S3IntelligentTieringConfiguration and S3MetricsConfiguration each
independently implemented the S3 Filter sub-resource grammar
(Prefix/Tag/And) and shared an identical tagsXml helper, found via
CPD as an 18-35 line overlapping block (#3835). MetricsFilter
additionally accepts AccessPointArn as a conjunct, which
IntelligentTieringFilter does not (verified against botocore's
service-2.json: MetricsFilter/MetricsAndOperator carry AccessPointArn,
IntelligentTieringFilter/IntelligentTieringAndOperator don't), so the
two weren't byte-identical.

Extracted the shared skeleton into S3FilterGrammar.filterXml(xml,
extraConjuncts) in core.common, parameterized by which extra
conjuncts a caller's Filter type supports: IntelligentTiering passes
List.of(), Metrics passes List.of("AccessPointArn"). tagsXml and
requireText, which were fully identical, moved with it.

S3AnalyticsConfiguration and S3InventoryConfiguration also parse a
Filter grammar, but through a different XmlElement-based parser, not
the XmlParser string-based approach these two share, so they're a
different implementation and out of scope here.

No behavior change: verified against both configuration types'
existing unit and integration test suites, which directly exercise
Prefix/Tag/And/AccessPointArn and every malformed-filter case.
2026-09-17 22:37:34 -05:00
XuJianandxujiantop-crypto 313f91e06c fix(ec2): return and filter image tags (#3808)
* fix(ec2): return and filter image tags

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>

* fix(ec2): persist refreshed image tags

---------

Signed-off-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-17 23:12:19 -04:00
Hector Ventura 180aef5e44 refactor(cloudformation): move the EC2 SecurityGroup and Instance types into per-service provisioners (#3810)
* refactor(cloudformation): move the EC2 SecurityGroup and Instance types into per-service provisioners

AWS::EC2::SecurityGroup moves out of CloudFormationResourceProvisioner into a
new Ec2SecurityGroupCfnProvisioner with its six helpers, and AWS::EC2::Instance
into a new Ec2InstanceCfnProvisioner. The code moves as written: the only
changes are the ProvisionContext helpers in place of the monolith's identical
private ones, explicit types and imports in place of var and inline qualified
names, and a comment reworded around an em-dash.

SecurityGroup gets its own class rather than joining
Ec2SecurityGroupRuleCfnProvisioner: the schema coverage gate attributes
attributes per type only through a statement switch on the resource type,
and the rule provisioner has one shared path, so joining it would have meant
restructuring that class too. The rule provisioner's shared rule mapping is
still the one both use.

Leaving the legacy switch puts both types under CfnSchemaCoverageTest. The
read-only attributes neither arm set before are recorded as gaps rather than
published, which would change what Fn::GetAtt returns: SecurityGroup Id, and
Instance VpcId and State.

The legacy switch goes from 23 to 21 types, the monolith from 3,413 to 3,133
lines, and its constructor loses ec2Service.

* fix(cloudformation): guard EC2 instance provisioning when Properties is absent

Ec2InstanceCfnProvisioner read props.path("NetworkInterfaces") without the props != null guard the rest of provision() uses, so an Instance declared with no Properties (valid: the registry schema has no required properties) threw an NPE and the resource went CREATE_FAILED. Guard the NetworkInterfaces block like the LaunchTemplate, SecurityGroupIds and Tags accesses above it. A carried-over gap from the monolith, surfaced by the move in this PR.
2026-09-17 22:12:14 -05:00
Chris Jovanovski 33a95e92f2 fix(iam): evaluate policies against real request resources and conditions (#3765)
* fix(iam): evaluate real request resources and S3 sub-resource actions

* fix(iam): add global context to managed policy evaluation
2026-09-17 22:42:06 -04:00
Kenshin Okinaka 1d009b9614 refactor(ses): rename SesController to SesSendController (#3837)
The controller kept its generic name while it held every v2 endpoint. After
the per-domain split it serves only the three /v2/email/outbound-* routes, so
the name now says what it holds. Pure rename: no endpoint, path, status or
body changes.

Drop two leftovers from the days when this was the only SES v2 controller.
The ten domain controllers opened their Javadoc with "split out of
SesController", which the rename would have made misleading, since those
endpoints were never send endpoints, and which documented history git already
records while coupling ten files to one class for nothing else. This class
claimed to follow LambdaController in throwing AwsExceptions directly, but it
catches and remaps them in three places, LambdaController documents no such
pattern, and AwsExceptionMapper is a global provider that covers every JAX-RS
resource anyway.

Add the class Javadoc the split left missing. SesSendController records which
three endpoints it keeps and why the send path stayed behind the facade.
SesService had no class Javadoc at all; it now states the survival rule that
decides what lives on the facade, the categories that rule leaves behind, and
that its name is historical rather than a claim to own SES as a whole.
2026-09-17 22:27:22 -04:00
Kenshin Okinaka 00e94d84f0 refactor(ses): split the identity endpoints into SesIdentityController (#3834)
* refactor(ses): split the identity endpoints into SesIdentityController

The thirteen /v2/email/identities endpoints, sending authorization
policies included, and their seven helpers move byte-for-byte out of
SesController into SesIdentityController. The reads and the
single-domain attribute writes call SesIdentityService directly, and so
do the v1 handler's fourteen identity actions and its four policy
actions through SesPolicyService, so SesService drops eighteen
delegations and its verified-domain probe reads the service directly.
Create, delete, the v2 policy operations and the default configuration
set stay on the facade for their cross-domain checks. The two DKIM unit
tests now drive SesIdentityService through the builder. The new class is
registered on the SES descriptor. No wire behavior changes.

* refactor(ses): brace the null guard moved into SesIdentityController
2026-09-17 20:43:07 -04:00
Chris Jovanovski cf235cfb81 fix(cloudformation): resolve SecretTargetAttachment targets in the stack region (#3740)
Use the provisioning context region for RDS and DocumentDB target lookups.
2026-09-17 18:36:48 -05:00
Chris Jovanovski 573094720d fix(cloudformation): resolve intrinsics in IAM policy documents before storing them (#3739)
Fail stacks when IAM policy document references cannot be resolved.
2026-09-17 18:36:31 -05:00
Attila Kis ad20699a6b fix(apigateway): complete API Gateway API key responses (#3817)
Return timestamps, stage keys, tags, and customer ID across create, get, list,
and update operations to prevent Terraform provider crashes and state drift.
Generate opaque IDs by default while preserving legacy generateDistinctId=false behavior.
Keep API key values hidden unless explicitly requested.
Add REST, SDK, and CloudFormation regression coverage.
2026-09-17 16:01:43 -04:00
David 30b491a546 feat(glue): table version reads and deletes, batch partition delete, SearchTables (#3828)
GetTableVersion answers one archived version by VersionId, or the
current table when none is given; an unknown version is
EntityNotFoundException and a non-integer one InvalidInputException.
DeleteTableVersion and BatchDeleteTableVersion drop archived versions,
the batch form reporting per-version Errors; the current version is
refused, as AWS refuses it on the console and the API, since DeleteTable
is the way to drop it.

BatchDeletePartition deletes up to 25 partitions and reports the ones
not found in Errors, the shape the other batch partition calls use.

SearchTables searches every table of the catalog: SearchText as a
substring of name, database, description, owner, columns and parameter
values (exact when quoted), Filters with the API reference's tokenised
match for string keys and a Comparator for the time fields, SortCriteria
on the same fields, and MaxResults with NextToken paging.

Closes #3826
2026-09-17 14:43:10 -04:00
David 54a5cf3e9c feat(rds): global clusters and FailoverDBCluster (#3819)
CreateGlobalCluster creates an Aurora global database, empty or with an
existing Aurora cluster as its primary, in which case engine, version,
database name and encryption come from that cluster and may not be
given. CreateDBCluster with GlobalClusterIdentifier joins a cluster: the
first becomes the primary, every later one a secondary in a region that
holds no member yet, with the primary's credentials and database name and
a point-in-time copy of its data through the pg_dumpall mechanism that
snapshots and read replicas use. DescribeGlobalClusters answers the real
records for RDS, with IsWriter and Readers per member; DocumentDB and
Neptune keep the shared empty answer.

SwitchoverGlobalCluster and FailoverGlobalCluster promote the named
secondary and demote the current primary to a secondary, the topology
AWS keeps on switchover and restores after a managed failover.
RemoveFromGlobalCluster detaches a member into a standalone cluster and
the primary goes last; DeleteGlobalCluster needs an empty, unprotected
global cluster; ModifyGlobalCluster renames, protects or upgrades, with
members following.

DBCluster now carries the writer role: the first instance is the writer,
IsClusterWriter reports it instead of true for every member, deleting the
writer promotes a remaining member, and FailoverDBCluster moves the role
to the named reader or the first one; a cluster without a reader is
refused with InvalidDBClusterStateFault.

Closes #3778
2026-09-17 14:35:01 -04:00
Mario Toffia 22b0627245 test(compat): assert recorded metric filter publishing through the SDK modules (#3809)
* feat(logs): add metric filters with per-event metric publication

Implements PutMetricFilter, DescribeMetricFilters, DeleteMetricFilter and
TestMetricFilter on the CloudWatch Logs JSON 1.1 handler, backed by a filter
pattern engine for term, space-delimited and JSON patterns. The grammar is
checked against 148 TestMetricFilter cases recorded from AWS, kept as
fixtures under src/test/resources/cloudwatchlogs and recaptured with the
opt-in script under tools/aws-capture/cloudwatchlogs.

Validation follows the observed AWS wire behavior: the five regex-bearing
filters per log group quota is shared with subscription filters through one
canonical backend monitor, a filter pattern may hold at most two regular
expressions, defaultValue must be a JSON number, DescribeMetricFilters
requires metricName and metricNamespace together in both directions, and
TestMetricFilter reports one-based event numbers with an empty public
extractedValues map for JSON patterns.

Ingested events publish samples into CloudWatch Metrics per event at the
event timestamp: matching events contribute the extracted or literal value,
non-matching events contribute defaultValue, dimensions are all-or-none, and
system dimensions only attach to matching events. Failed publications are
retried from a bounded queue of 10,000 samples with stable publication ids.

Resettable gains beforeReset and afterReset default hooks so the metric
filter publisher can pause and drain before a state reset wipes storage and
resume afterwards. EmulatorInfoController.performReset is serialized and
calls the hooks around the existing container teardown and storage wipe,
running afterReset in a finally block so a failed wipe cannot leave a
publisher paused. The GetMetricStatistics and GetMetricData Query responses
now carry the CloudWatch namespace so both read paths return the same
samples.

* feat(cloudformation): provision AWS::Logs::MetricFilter

Adds LogsMetricFilterCfnProvisioner for creates, in-place updates, name
changes and deletes. Ref and PhysicalResourceId are the filter name alone,
as observed on AWS; the log group is kept as private resource metadata.
A replacement deletes the old filter before creating the new one, matching
the DELETE then CREATE event order AWS emits, and a failed replacement
recreates the previous definition on rollback.

Every mutation records an APPLIED, NOT_APPLIED or UNKNOWN outcome under the
service lock so a failed or ambiguous call can never authorize deleting or
overwriting a filter the stack does not own. Ownership that cannot be proven
is resolved conservatively before the next mutation.

The engine gains three small provisioner hooks that this type needs and
others may reuse:

- ProvisionContext carries a progress consumer so a provisioner can emit
  the intermediate DELETE_IN_PROGRESS and DELETE_COMPLETE events of a
  delete-first replacement while provision is still running.
- rollbackUpdate(resource, progress) lets a provisioner restore its own
  previous state during UPDATE_ROLLBACK and report the steps as events.
- hasPendingRollbackCleanup and retainsFailedUpdateState let a provisioner
  tell the engine that an UPDATE_FAILED resource still holds its own
  rollback snapshot, so the engine neither restores the previous resource
  over it nor refuses a later DeleteStack. Both default to false; only this
  provisioner overrides them.

The type is listed in supported-resource-types.tsv, the generated resource
table and CfnProvisionerFixture, with unit, integration, storage reload and
SDK coverage.

* docs(logs): document metric filters and the AWS verification record

Describes the metric filter operations, publication semantics and
CloudFormation support in docs/services/cloudwatch.md and adds
cloudwatch-metric-filters-verification.md, the record of what was observed
on AWS in eu-west-1, with which tools, and where each recorded fixture came
from. Registers the handler and the verification page with the docs tooling
and teaches the service inventory test to count facet pages.

* feat(logs): publish metric filter samples off the PutLogEvents thread

PutLogEvents evaluated each filter and wrote one CloudWatch Metrics sample
per filter and event on the request thread while holding the filter-store
monitor, up to a million writes for a maximal request, so ingestion latency
depended on the Metrics sink and every PutMetricFilter waited behind the
whole batch.

The request thread now only evaluates the group's filters as they are at
ingestion and hands the resulting immutable samples, with their stable
publication ids, to a bounded queue of 100,000 samples. The existing single
worker drains it and writes one sample per monitor acquisition, so a
PutMetricFilter or a reset waits for at most one write. A batch that does
not fit the queue is written inline on the request thread rather than
dropped. Failed writes still land in the 10,000 sample retry map with the
same ids and cadence as before.

Reset pauses the worker, discards queued and failed samples and bumps a
generation counter so a batch taken before the reset is never written into
the wiped store. Shutdown drains the queue before storage shuts down and
clears the retry map only after the worker has terminated. Samples ingested
while Metrics is disabled are discarded at startup.

Integration and SDK tests poll for the sample, as they would against AWS.

* test(compat): assert recorded metric filter publishing through the SDK modules

Extends the Java compatibility module with the publishing scenarios recorded
from AWS: mixed defaults and quiet traffic, extraction and ordinary dimension
series, system dimensions on matches only, and a Sum alarm driven by quiet
defaults. Each series is read through the SDK's CloudWatch JSON protocol and
again as a signed legacy Query request, so GetMetricStatistics and
GetMetricData agree on every sample, timestamp, unit and dimension set.

Expected values come from module-local copies of the root fixture
metric-filter-publishing-aws.json. MetricFilterFixturePackagingTest checks
the Java copy loads from the classpath and the root
CloudWatchLogsMetricFilterFixturePackagingTest fails when either SDK module
copy drifts from the root file.

The Python module gains tests/metric_filter_replay.py, an opt-in replay of
the same scenarios against a Floci endpoint or, with explicit profile,
region and write acknowledgement, against AWS. Its logic is covered offline
by tests/test_metric_filter_replay.py with the network blocked. Both module
Dockerfiles are unchanged: the Java image already runs the whole suite and
the Python image already copies tests/.

* test(compat): assert every recorded statistic and poll for published samples

The SDK publishing assertions compared only Sum and SampleCount although the
AWS fixture also records Minimum and Maximum for the default-value scenarios.
Both the SDK JSON reads and the signed legacy Query reads now assert every
statistic the fixture carries, on GetMetricStatistics and GetMetricData.

Publication now happens shortly after PutLogEvents returns, so present series
are polled and absent series are asserted only after a later positive control
of the same filter is visible, which the publisher's ordering guarantees. The
read window ends at second 59 so a sample stamped on the following minute is
never in scope.

The live replay's Region check names the commercial partition explicitly.
botocore already defaults get_available_regions to partition_name="aws", so
GovCloud and China Regions were rejected before; the offline test now pins it.

* test(compat): keep the metric filter SDK test on the Java 17 API of the compat image

List.getLast() is Java 21; the sdk-test-java image compiles with Temurin 17.
2026-09-17 13:53:35 -04:00
Vũ Thế Huy a3da2a3767 feat(rds): add SQL Server support to RDS (#3752)
* feat(rds): add SQL Server support

* fix(rds): align SQL Server master handling

* fix(rds): reject SQL Server DBName

* fix(test): import Mockito matchers
2026-09-17 13:42:15 -04:00
Mohamed Amine ALOUINI 7e539155e1 fix(ec2): report the calling account as resource owner (#3814)
EC2 froze every resource's owner to the configured default account at
construction time, so OwnerId came back as 000000000000 no matter which
account the request resolved to. Per-account isolation itself worked, but
the reported owner contradicted what STS returns for the same credentials
and what SQS embeds in its ARNs.

The visible consequence was DescribeImages --owners: the filter was honored
but matched against the frozen value, so filtering on the account actually
in use returned nothing, and the common Terraform pattern of pinning an AMI
to a known owner account failed with "Your query returned no results".

Resolve the owner per request through callerAccountId() instead, for the
ownerId fields, the generated ARNs and the self owner alias. Callers outside
a request scope (startup seeding, internal provisioning) still fall back to
the configured default account.

Closes #3775
2026-09-17 13:36:30 -04:00
Vũ Thế Huy 5cb1453f4e fix(lambda): preserve owner account for execution logs (#3787)
* fix(lambda): preserve owner account for execution logs

* test(lambda): cover account-aware log streaming
2026-09-17 13:18:29 -04:00
David 008aa9ba35 feat(rds): read replicas with a point-in-time copy of the source (#3813)
CreateDBInstanceReadReplica creates a standalone instance with its own
container and endpoint that inherits the source's engine, version,
credentials, database name and, unless overridden, class, storage and
minor version upgrades; a same-region replica also inherits the parameter,
option, subnet and security groups, a cross-region one (source named by
ARN) gets the region's defaults, as the API reference states. The replica
starts with automated backups off, and both ends report the link the way
DescribeDBInstances does: ReadReplicaSourceDBInstanceIdentifier plus a
"read replication" StatusInfos entry on the replica,
ReadReplicaDBInstanceIdentifiers on the source, identifier within a region
and ARN across regions. A subnet group with a plain identifier source is
refused with DBSubnetGroupNotAllowedFault.

The replica's database is initialised from a pg_dumpall of the source taken
at creation, the mechanism RestoreDBInstanceFromDBSnapshot already uses, so
only PostgreSQL sources are accepted (CreateDBSnapshot draws the same
line). Writes after creation are not streamed; the docs say so.

PromoteReadReplica clears the link on both ends, turns backups on with the
requested retention (one day when omitted) and window, and reboots the
instance as RDS does. Deleting a source promotes its same-region replicas
and leaves a cross-region replica with replication terminated, as the user
guide documents for PostgreSQL; deleting a replica drops it from the
source.
SwitchoverReadReplica is refused with InvalidDBInstanceState, the only
state error the API reference lists, since AWS supports it for Oracle and
SQL Server only. PromoteReadReplicaDBCluster answers
InvalidDBClusterStateFault because no cluster here is created as a replica.

Refs #3778
2026-09-17 11:04:53 -04:00
Vũ Thế Huy 75d1c2ae62 feat(lambda): support custom Docker flags (#3751) 2026-09-17 10:57:42 -04:00
Jordi Vidal de LLobatera 9740b32b51 fix(athena): read Iceberg-format Glue tables via iceberg_scan (#3738)
* feat(athena): read Iceberg-format Glue tables via iceberg_scan

Glue tables written by pyiceberg's GlueCatalog (Parameters.table_type=
ICEBERG) never populate StorageDescriptor.InputFormat/SerializationLibrary,
so GlueViewDdlBuilder's format-sniffing heuristic always fell through to
read_csv_auto and failed parsing the table's binary Parquet data files.

Detect Iceberg tables via Parameters.table_type and build the view from
iceberg_scan(Parameters.metadata_location) instead, following the table's
real manifest list rather than globbing every Parquet file physically
present under its location -- which also fixes silently wrong results for
any table with more than one snapshot (updates, deletes, repeated
appends), not just the CSV-parse failure on a single-snapshot table.

The iceberg extension is installed/loaded once, only when the DDL batch
actually contains an Iceberg table. A table flagged ICEBERG but missing
metadata_location falls back to the existing format-sniffed heuristic.

Verified against a live build: pyiceberg write -> Athena SELECT returns
correct rows for both a single-snapshot and a two-snapshot table; full
athena + glue test suites (352 tests) pass with no regressions.

Fixes #3737

This change was implemented by Claude (Anthropic's AI coding assistant),
working on behalf of @maurice1979 who filed the linked issue.

* docs(athena): fix formatting and clarify Iceberg handling explanation

Corrected formatting and clarified the explanation regarding Iceberg
tables and their handling in DuckDB.

Signed-off-by: Jordi Vidal de LLobatera <is.maurice@protonmail.com>

* docs(glue): cross-reference Iceberg handling from glue.md; fix em dash

docs/services/glue.md still described only the InputFormat/SerdeInfo
format-sniffing heuristic for choosing a DuckDB read function, without
mentioning that Iceberg-format tables (Parameters.table_type=ICEBERG)
bypass it entirely via iceberg_scan, per the change in the previous
commit. Added a short cross-reference to Athena's format-inference docs
so glue.md doesn't describe stale, pre-fix behavior.

Also removed an em dash from GlueViewDdlBuilder's new Javadoc, per this
repo's own AGENTS.md style rule (no em dashes; colons, commas, or
periods instead). The matching instance in docs/services/athena.md was
already fixed via the Copilot autofix suggestion.

Both findings came from the Copilot pull request review on #3738.

This change was implemented by Claude (Anthropic's AI coding assistant),
working on behalf of @maurice1979.

---------

Signed-off-by: Jordi Vidal de LLobatera <is.maurice@protonmail.com>
2026-09-17 10:54:20 -04:00
Austin W dfbb0ee756 feat(docker): support explicit GPU device requests (#3789)
Floci's container launcher has no way to ask a daemon for an accelerator, so
every container it starts is CPU-only. Services that need a GPU, such as
SageMaker training and hosting, have nowhere to express the request.

Adds optional device requests to the shared container layer:

- withGpuCount(int) / withAllGpus() build Docker's count form
- withGpuDeviceIds(List) pins specific devices by index or vendor UUID
- withCdiDevices(List) selects Container Device Interface devices by name

Count, device ids and CDI names are alternatives, and passing more than one is
rejected: a Docker request carrying both a count and explicit ids is refused by
the daemon.

CDI is included because Floci already documents rootless Podman as a supported
host, and CDI is how a Podman daemon exposes accelerators over its
Docker-compatible API. It is also not GPU-specific, so the same primitive
reaches any device the host's CDI specs describe. The two forms are not
interchangeable: Podman accepts Docker's count form and then starts the
container with no device attached (containers/podman#22645), so the javadoc
steers a caller that may be talking to Podman toward CDI, whose failure mode is
a refused start rather than a silent CPU-only container.

Default behavior is unchanged. A spec that asks for no device sets no
DeviceRequests on the HostConfig, so a daemon configured with an accelerator
runtime as its default does not start handing devices to every container Floci
launches. Existing ContainerSpec constructors keep working through a delegating
overload that defaults the new component to empty.

Tests cover the exact request built for each form, the absence of any request
by default, the validation rules, and that requests reach the HostConfig.
ContainerGpuDockerIntegrationTest exercises real hardware and is opt-in via
-Dgpu.integration.enabled=true, skipping cleanly where no GPU exists, so CI
still covers request construction without needing one.

Verified on an RTX 5060 Ti against Podman 5.8.2 with NVIDIA Container Toolkit
1.19.1: a container requesting the device by CDI name reported exactly that
UUID from nvidia-smi, and a container requesting nothing failed to start
rather than reaching a GPU.
2026-09-17 10:52:59 -04:00
David 0f4865e554 feat(rds): copy and reset parameter groups and copy option groups (#3781)
Add CopyDBParameterGroup, CopyDBClusterParameterGroup, CopyOptionGroup,
ResetDBParameterGroup and ResetDBClusterParameterGroup. The groups, their
overrides and options were already modelled and served by the create,
modify, describe and delete actions; these five answered
UnsupportedOperation.

A copy resolves its source by name or ARN, creates the target through the
existing create path so the already-exists check and the ARN come from one
place, and copies the family and overrides, or the engine, major version
and options for an option group, with any Tags applied. Source and target
names must pass AWS's identifier rule, which is how AWS refuses to copy a
managed default group: its name carries periods, and the answer is
InvalidParameterValue with the identifier message. A reset drops the named overrides or all of
them; ResetAllParameters together with a Parameters list is
InvalidParameterCombination, and a managed default cluster group answers
InvalidDBParameterGroupState as Modify does. Responses use the model's
result wrappers and shapes. The action table in docs/services/rds.md is
regenerated and its note that CopyOptionGroup is unimplemented removed.

Closes #3777
2026-09-17 10:47:57 -04:00
Chris Jovanovski ebb79ed3c2 fix(docker): follow adopted sidecar containers from now instead of replaying their log history (#3612) 2026-09-17 10:46:22 -04:00
XuJian a2de4ac8a2 fix(elb): populate source security group (#3807)
* fix(elb): populate source security group

Signed-off-by: XuJian <xujian.top@gmail.com>

* test(elb): cover source security group

Signed-off-by: XuJian <xujian.top@gmail.com>

* test(elb): cover source security group over HTTP

Signed-off-by: XuJian <xujian.top@gmail.com>

---------

Signed-off-by: XuJian <xujian.top@gmail.com>
2026-09-17 10:30:45 -04:00
Ovidiu (Ovi) d348686744 feat(sfn): support ItemReader InputType CSV (#3603)
* feat(sfn): support ItemReader InputType CSV

A Distributed Map can read a CSV dataset through ItemReader. Field names come
from the first row, or from ReaderConfig.CSVHeaders when CSVHeaderLocation is
GIVEN, and each data row becomes an object of string values.

Every value is a string, a row shorter than the headers pads with empty
strings, and a longer one drops the surplus, as AWS documents.

Drops the assertion that CSV is not implemented, which this replaces.

* feat(sfn): honour CSVDelimiter and quoted newlines in ItemReader CSV

ReaderConfig.CSVDelimiter selects COMMA, PIPE, SEMICOLON, SPACE or TAB. An
unsupported value fails the state with States.ItemReaderFailed.

CsvParser.parseAll gained a delimiter overload and now tracks quotes across
line breaks, so a quoted field may carry the delimiter or a newline without
ending the record. The single argument overload keeps comma behaviour for the
existing callers.

* fix(sfn): apply the documented CSV quote and backslash escaping

AWS preserves a doubled quote as a single quote whether or not the field is
quoted, so the reference dataset's {""MyKey"":""MyValue""} has to reach
States.StringToJson as {"MyKey":"MyValue"}. The reader dropped both quotes
instead: only a quote opening a field starts a quoted run, and the unquoted
case fell through to the toggle that consumed the pair.

Backslash escaping was missing as well. A backslash escapes another backslash,
a quote or the configured delimiter, and a backslash before anything else is
dropped.

parseLine and parseAll now share one scanner so the rules live in one place.
The backslash rules stay off for parseLine, which S3 Select and Athena use,
where a lone backslash is ordinary data.
2026-09-17 10:14:45 -04:00
luiseterc 6b389c33eb feat(eks): authenticate EC2 workers through access entries (#3805) 2026-09-17 10:09:21 -04:00
XuJianandxujiantop-crypto 5340e88605 fix(dynamodb): escape composite key segments (#3804)
Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-17 09:52:57 -04:00
David 958c5d9be0 fix(rds): read the Parameters list the way every SDK sends it on ModifyDBParameterGroup (#3780)
The RDS service model declares the Parameters list with locationName
Parameter, so the CLI and every SDK serialise it as
Parameters.Parameter.N.ParameterName. ModifyDBParameterGroup and
ModifyDBClusterParameterGroup only read Parameters.member.N, the plain Query
encoding, so a real client's overrides were never seen: the call returned
200 and DescribeDBParameters stayed empty. Terraform's parameter blocks were
dropped the same way while the apply reported success.

Parse both encodings through one helper, keeping the member form for
hand-built callers as ModifyOptionGroup does for OptionsToInclude.

Closes #3779
2026-09-17 09:51:25 -04:00
Hector Ventura 892927ceb5 feat(verifiedpermissions): run Cedar from the floci-sidecar-cedar image (#3799)
* feat(verifiedpermissions): run Cedar from the floci-sidecar-cedar image

The Cedar sidecar now comes from floci-io/floci-sidecars as
floci/floci-sidecar-cedar, pinned to an exact version because a cached
:latest is never re-pulled. CedarSidecarManager reads the contract JSON
that the image's /health returns: a sidecar speaking another contract
major is refused immediately with a message naming the image and the
FLOCI_SERVICES_VERIFIEDPERMISSIONS_CEDAR_IMAGE and _CEDAR_URL settings
to change, instead of polling for thirty seconds or failing later on a
request. A pre-configured URL is probed the same way. A sidecar whose
health body is not JSON predates the contract and is accepted with a
one-time warning.

* test(verifiedpermissions): exercise the published Cedar image

VerifiedPermissionsIntegrationTest no longer boots the in-tree sidecar in
process: CedarSidecarManager starts the pinned image through Docker, the
same path production takes, under a vp-test resource namespace so the
manager's remove-before-start cannot kill a developer's live sidecar. It
is skipped without Docker, and locally when the image is not present; in
CI a missing image fails. VerifiedPermissionsServiceTest keeps its
reject-before-persist coverage against a fake sidecar answering 400, and
CedarSidecarClientTest pins the request shapes and the 200/400/other
mapping Floci owns.

* chore(build): drop the in-tree Cedar sidecar

sidecars/cedar now lives in floci-io/floci-sidecars as cedar/ with its
history. The build-helper test source root and the test-scoped cedar-java
dependency existed only to boot that server inside the test JVM; the
tests now run against the published image, so both go, along with the
.dockerignore allowlist entry that let the sidecar Dockerfile see its
sources from the repository root context.

* ci: stop publishing the Cedar sidecar from this repository

The release, nightly and reusable image workflows no longer build a
Cedar image or record it in the provenance manifest; the sidecar is
released from floci-io/floci-sidecars on its own cadence. The
compatibility workflow no longer builds and starts the sidecar by hand:
Floci pulls the pinned image itself over the mounted socket onto
compat-net, exactly as it already does for floci-duck. The unit-test
shards prefetch the pinned image, reading the tag from application.yml
so the two cannot drift.

The floci/floci:*-cedar tags stop at this change; whether the next
release cut retags the sidecar image under the old name for a
deprecation window is a release decision, not a workflow default.

* docs(verifiedpermissions): document the external Cedar sidecar image

The Verified Permissions page names floci/floci-sidecar-cedar, why it is
pinned to an exact version, how to pre-pull it, where its API and the
sidecar contract are documented, and what a contract mismatch looks
like. The README's Docker integration table gains the Verified
Permissions row it never had. AGENTS.md records the sidecar rule: own
repository, no tag suffix on the Floci image, no :latest default, the
sidecar releases first, and how a sidecar is tested from here.
2026-09-17 09:16:20 -04:00
Vũ Thế Huy f004aeaad5 feat(cognito): implement federated sign-in (#3748)
* feat(cognito): add federation transaction stores

* fix(cognito): atomically consume federation state

* feat(cognito): support OIDC provider exchange

* fix(cognito): validate OIDC federation providers

* fix(cognito): validate OIDC endpoint schemes

* feat(cognito): add federated oauth routes

* fix(cognito): preserve oauth state and codes

* feat(cognito): implement federated sign-in coverage

* chore: remove internal task report

* fix(cognito): use Cognito IdP callback for federation

* fix(cognito): use provider callback for token exchange
2026-09-17 09:00:11 -04:00
Kenshin Okinaka d0d787d8a3 refactor(ses): split the configuration-set endpoints into SesConfigurationSetController (#3795)
The fifteen /v2/email/configuration-sets endpoints, event destinations
included, and their six option parsers move byte-for-byte out of
SesController into SesConfigurationSetController. Eleven of them call
SesConfigurationSetService directly and so do the v1 handler's eight
matching actions, so SesService drops twelve delegations and reads the
store through the service internally. Create, the tracking and delivery
option setters and delete stay on the facade, which supplies the
verified-domain and dedicated-pool probes and guards the delete against
tenant associations. The new class is registered on the SES descriptor.
No wire behavior changes.
2026-09-17 07:54:52 -05:00
XuJianandxujiantop-crypto b3d46d5024 fix(codepipeline): preserve external actions while stopping (#3726)
* fix(codepipeline): preserve external actions while stopping

* fix(codepipeline): publish stop mode across threads

---------

Co-authored-by: xujiantop-crypto <265865031+xujiantop-crypto@users.noreply.github.com>
2026-09-17 07:44:49 -05:00
Priamo Germosen b38a2c8c3b refactor(rekognition): dedupe Geometry builder with Textract (#3794)
RekognitionService and TextractService each carried a byte-for-byte
identical buildGeometry/addPoint pair (BoundingBox plus 4-point
Polygon construction), found via CPD as a 26-line block (#3792).
Rekognition's own Javadoc already documented this as known,
intentional duplication: "the same shape Textract uses (Rekognition's
Geometry shape is structurally identical)".

Extracted it into AwsGeometry.buildGeometry in core.common, and
pointed both services at it.

No behavior change: the response shape is identical to both copies
before this, only its location changed. Both RekognitionIntegrationTest
and TextractIntegrationTest already assert directly on the Geometry/
BoundingBox/Polygon shape, so that path is covered.
2026-09-17 00:57:15 -05:00
Priamo Germosen 8ef8f786b1 refactor(cur): use S3DestinationValidation in ParquetEmitter (#3793)
ParquetEmitter.validatePathSegment was byte-for-byte identical to
S3DestinationValidation.requireSafeKeySegment (#3791), which #3651/
#3666 already created for exactly this logic, originally shared
between BCM Data Exports and CUR. ParquetEmitter was never migrated
to it.

Deleted the private copy and pointed both call sites at the shared
utility instead.

No behavior change: the validation rule and error message are
identical, only their location changed. validateBucketName is left
alone: its error messages differ from S3DestinationValidation's
bucket-name check, so replacing it would be a separate change, not
covered by this issue.
2026-09-17 00:57:01 -05:00
Hector Ventura 9cd27190ff refactor(cloudformation): move AWS::Route53::RecordSet into Route53CfnProvisioner (#3724)
* refactor(cloudformation): move AWS::Route53::RecordSet into Route53CfnProvisioner

The record set leaves CloudFormationResourceProvisioner for the provisioner that
already owns AWS::Route53::HostedZone, which gains a type switch in provision and
delete; the hosted-zone path is untouched. The record-set arm keeps the legacy
behaviour exactly, a name-only resource whose Ref is the resolved Name or a
generated record- id, and now also publishes Id, the registry schema's only
read-only property, which Fn::GetAtt could never resolve before. Its delete logs
the same warning the legacy default arm did, since nothing was ever written for
the record. Writing the record through ChangeResourceRecordSets and enforcing the
schema's required Type and Name are follow-ups, not part of the move.

The legacy switch goes from 24 to 23 types and the monolith loses its last
Route53 reference.

* refactor(cloudformation): keep AWS::Route53::RecordSet free of GetAtt attributes

The move published Id because the schema coverage gate asks for every
read-only property in the registry schema. That schema has no handlers:
RecordSet is a legacy type, and the CloudFormation resource specification
gives it no attributes, so Ref stays its only reference, as it was in the
legacy provisioner. Id is recorded in getatt-attribute-gaps.tsv instead.
2026-09-17 00:36:54 -05:00
Abhigya f7565dff3e feat(apigateway): honour the remaining REST integration settings (#3434)
* feat(apigateway): honour the remaining REST integration settings

PutIntegration persisted 6 of the 16 fields AWS documents. The rest were
accepted without error and silently dropped, so an integration could be created
exactly as intended and then behave as though the configuration were absent.

- timeoutInMillis is applied to the backend call and defaults to AWS's 29,000ms
  rather than the previously hardcoded 30s. Values below AWS's 50ms floor are
  rejected; the 29s ceiling is an edge-optimized limit, so Regional APIs may
  exceed it.
- tlsConfig.insecureSkipVerification skips backend certificate and hostname
  verification. Without it an HTTPS backend behind a private CA or a self-signed
  certificate was unreachable with no way to opt out.
- contentHandling converts payloads in both directions: CONVERT_TO_TEXT
  base64-encodes a binary request for mapping templates, CONVERT_TO_BINARY
  decodes a base64 text request before it is sent. Integration responses accept
  it too, applied as an output conversion after response templates.
- binaryMediaTypes on the RestApi marks content types as binary. A binary body
  now reaches an AWS_PROXY integration base64-encoded with isBase64Encoded set;
  previously it was read as a UTF-8 string, which corrupted it.
- connectionType VPC_LINK requires connectionId to name a link that exists and
  is available. The five REST VPC Link operations are implemented at /vpclinks.
  Floci has no real VPC, so a valid link routes straight to the integration URI;
  what is enforced is the misconfiguration AWS also rejects.
- cacheNamespace and cacheKeyParameters drive response caching, gated on both
  switches AWS requires: cacheClusterEnabled on the stage and caching/enabled on
  the method. Only successful responses are cached, expiring after the method's
  ttlInSeconds.
- credentials is persisted and returned. Floci does not enforce IAM, so the role
  is not actually assumed.

The same fields are now carried through an OpenAPI import, which previously
dropped them from x-amazon-apigateway-integration.

* fix(apigateway): align TLS, cache keys and VPC link patches with AWS

Three review findings on the REST integration settings, all cases where the
local behaviour was looser than the contract AWS documents.

tlsConfig.insecureSkipVerification installed a trust-all X509TrustManager, so an
expired certificate, a broken chain or a chain with no root reached the backend
happily. AWS skips only the check that the certificate was issued by a supported
certificate authority; it still performs basic validation of the expiration
date, the hostname and the presence of a root certificate authority. A backend
that would fail in AWS therefore worked here, which is the direction that hides
a production TLS misconfiguration. The trust manager now verifies validity,
checks that the chain holds together and terminates in a self-signed root, and
requires cA=true on that root when it actually issued a leaf. Hostname
verification is now requested explicitly rather than being switched off: note
that java.net.http.HttpClient always applies HTTPS endpoint identification and
ignored the previous null algorithm, so the hostname was in fact still checked,
but the code and its documentation both claimed otherwise.

The response cache key appended the method and request path to cacheNamespace.
AWS allows one cacheNamespace across several resources exactly so those
resources return the same cached data, and no two resources share a path, so the
setting could never do what it exists for. The key is now the namespace plus the
declared cacheKeyParameters. The namespace still defaults to the resource id, so
resources that did not opt into sharing stay separate.

UpdateVpcLink never looked at op. Any operation on /name or /description was
applied, so op=remove,path=/name set the name instead of being rejected, and
every other path was silently ignored and reported as success. AWS's patch table
supports only replace on those two paths; anything else is now a
BadRequestException.

Also removes the em dashes AGENTS.md disallows from the test files this branch
adds, which the Documentation Style check flagged.

* fix(apigateway): enforce keyCertSign and name constraints under insecureSkipVerification

The comment on CaIssuanceSkippingTrustManager claimed the root check matched
AWS's two requirements on a private root, cA=true together with a keyUsage
including keyCertSign, but only getBasicConstraints() was ever consulted. A root
with CA:TRUE and no keyCertSign was accepted here and rejected by real API
Gateway, which is the direction that hides a broken certificate authority until
deployment. The keyUsage bit is now checked alongside basicConstraints. An
absent keyUsage extension is still accepted: RFC 5280 leaves the key
unrestricted when it is missing, and PKIX reads it the same way.

The rest of the chain walk is now the platform's PKIX validator, anchored on the
chain's own root, which is exactly the "stop checking that the root is one we
trust, keep checking everything else" semantic this setting has in AWS. That
brings X509v3 name constraints with it, which the hand-rolled walk did not
implement at all, along with basicConstraints and keyCertSign on intermediates
and pathLenConstraint. The anchor's own extensions are not examined by PKIX, so
the root's checks stay explicit, and its NameConstraints extension is passed
through to the TrustAnchor. Expiration stays explicit too, because PKIX exempts
a trust anchor from it and AWS does not.

A lone self-signed certificate keeps its own path: it is its own root and is the
plain self-signed-server case the setting exists to enable, so CA extensions are
not demanded of it.

Three tests against real HTTPS backends: a well-formed private CA chain is
reached, a root declaring CA:TRUE without keyCertSign is rejected, and a root
that permits itself only internal.example while issuing for localhost is
rejected. The latter two return 200 without this change.

* fix(apigateway): require keyUsage on a private root and evaluate name constraints properly

Two corrections to the previous round's TLS work.

AWS states the root constraint as "x509 extension keyUsage must have
keyCertSign", which a root carrying no keyUsage extension at all does not
satisfy. The previous commit read a missing extension as leaving the key
unrestricted, which is generic RFC 5280 semantics but not this API
Gateway-specific requirement, and so accepted a certificate authority real API
Gateway turns away. A root without the extension is now rejected.

The name constraints handling was also wrong, in a way its own test hid.
Constraints were unwrapped from the root and handed to the TrustAnchor, but the
platform validator refuses to process anchor-supplied constraints and fails with
"name constraints in trust anchor not supported". So a root carrying the
extension was rejected blindly, never evaluated, and the test asserting a
violated constraint passed on that unrelated error.

Root-level constraints are now rejected deliberately, with an error that says
so, rather than as a side effect of a validator limitation. That is also the
documented behaviour: AWS tells operators hitting validation errors under
insecureSkipVerification to check their CA certificates for Name Constraints
extensions and reissue without them. Constraints on an intermediate sit inside
the certification path, where the validator does read them, and those are
enforced for real: the log now shows "name constraints check failed" rather than
"not supported".

Tests follow the same split. A three-certificate chain whose intermediate
permits only internal.example while issuing for localhost is rejected, a chain
whose intermediate permits localhost is reached, so the first is failing on the
constraint rather than on chain length, and a root carrying constraints is
rejected as its own documented case. Plus a root with CA:TRUE and no keyUsage
extension, which returns 200 without this change.

* fix(apigateway): match binaryMediaTypes literally apart from the catch-all

The matcher expanded a subtype wildcard, so an image/* entry covered
image/png. Nothing in the AWS documentation establishes that as a
pattern: */* is documented concretely ("To support all binary media
types, specify */*"), while every other example names one exact media
type at a time, and the browser walkthrough tells you to register the
concrete image/webp even though the request's Accept header carries
image/*. Expanding it made Floci treat a payload as binary where AWS
would compare the entry as a literal string and treat it as text.

Entries are now compared literally, ignoring the charset parameter,
with */* as the one wildcard. The wildcard branch keeps its coverage
through a */* test, and a second test pins the subtype wildcard as
not expanded so the behaviour cannot drift back silently.
2026-09-17 00:18:49 -04:00
Hector Ventura 08656347c7 fix(lifecycle): keep SageMaker and ECS background work running after a state reset (#3797)
A state reset and nuke run every container teardown (#3718), a hook written
for process shutdown. The SageMaker training runner and endpoint manager shut
their worker pools down there and never created new ones, so after one reset
every CreateTrainingJob, CreateEndpoint and UpdateEndpoint returned 500 with
RejectedExecutionException until Floci restarted. The ECS service stopped its
reconciler the same way, so services were never reconciled again.

The three services now implement Resettable and restore the pool or the
reconciler in clear(), which a reset runs after the teardown and the storage
wipe and shutdown never runs. Teardown itself is unchanged, so the ECS
reconciler still stops before the final flush on shutdown.

A reset also interrupts in-flight training runs, and an interrupted run wrote
its failure back unconditionally, which could bring a wiped job back.
updateTrainingJob now writes only while the stored job is the same one, by
ARN and creation time, as finalizeEndpointStart already does for endpoints.

CI only showed this when EmulatorInfoControllerIntegrationTest and
SageMakerDockerIntegrationTest shared a shard, which the deterministic
partitioner does for some class lists, so it failed every rerun on those PRs.
2026-09-16 23:09:57 -05:00
Kenshin Okinaka bdabb16fd4 refactor(ses): split the tenant endpoints into SesTenantController (#3788)
The nine /v2/email/tenants, /v2/email/tenant and /v2/email/resources
endpoints and their JSON helper move byte-for-byte out of SesController
into SesTenantController. Creating, reading and listing tenants and
setting their suppression attributes call SesTenantService directly, so
SesService drops those four delegations; the resource associations stay
on the facade because they check that the associated identity,
configuration set or template exists, and the tenant delete stays for
its suppression cascade. The new class is registered on the SES
descriptor. No wire behavior changes.
2026-09-16 22:39:07 -04:00
Vũ Thế Huy d624988ff8 feat(appconfig): implement ListDeployments (#3749)
* feat(appconfig): add deployment listing service

* feat(appconfig): expose ListDeployments

* docs(appconfig): document ListDeployments

* chore(appconfig): clean controller imports

* fix(appconfig): make deployment pagination cursor-based
2026-09-16 22:31:48 -04:00
Priamo Germosen 66bcdaf675 feat(codeartifact): add CodeArtifact control-plane support (#3713)
Floci had zero CodeArtifact support: no service package, no docs, nothing.
Any terraform apply touching aws_codeartifact_domain, aws_codeartifact_repository,
or either permissions-policy resource failed outright. This adds the full
CodeArtifact control plane: domain and repository CRUD, resource policies with
optimistic-locking revisions, tags, and the fixed set of real AWS-hosted
external (upstream) connections (public:npmjs, public:pypi, public:maven-central,
etc.).

Package publish/fetch endpoints per format (npm, PyPI, Maven, NuGet, generic)
are intentionally out of scope here: this closes the terraform apply gap, not
real package serving.

ListTagsForResource (POST /v1/tags?resourceArn=) is CodeArtifact's one tag
operation that addresses the resource with a query parameter on the bare path
rather than a path segment, unlike every other V1TagsController/SharedTagsController
handler. That method lives on V1TagsController itself rather than the shared
AbstractTagsController base: SharedTagsController (mounted at /tags) already
declares its own bare POST (tagResourceByBody, for TagResource), so a bare POST
on the shared base collides with it and Quarkus refuses to start. CodeArtifact's
handler is @V1Tags-qualified and only ever registered against V1TagsController,
so the method belongs there. core/common stays service-free: CodeArtifactTagHandler
registers itself as a bean the same way MskTagHandler does, and TagHandler gained
a default for the lowercase key/value entry names CodeArtifact uses instead of
AWS's usual capitalized Key/Value.

Known, documented limitations (see docs/services/codeartifact.md): no cycle
detection across upstream chains, no referential-integrity check when deleting
a repository other repositories reference as an upstream, and no authorization
check on cross-account domainOwner addressing (consistent with Floci's opt-in
IAM enforcement elsewhere).

Verified against the real botocore codeartifact service-2.json (protocol, exact
querystring vs. body placement per operation, exact ARN format, epoch-seconds
timestamps, real error shapes) and the live AWS API docs for behavioral rules
not in the wire model (DeleteDomain blocked while repositories exist, the real
fixed external-connection name/format list, PutDomainPermissionsPolicy's
all-body field placement vs. the sibling repository operation's querystring
placement).

Live-verified three ways:
- Unit tests including a concurrent-create race test proving the synchronized
  guard actually holds under contention, plus full-stack QuarkusTest/RestAssured
  integration tests.
- A real terraform init/apply/plan/destroy cycle against a running Floci
  instance, independently confirming destroy actually tore the domain down via
  a follow-up describe-domain call.
- A live AWS SDK v2 Java test exercising the real CodeartifactClient against a
  live instance.
2026-09-16 22:01:34 -04:00
Kenshin Okinaka f83341e013 refactor(ses): split the suppression-list and tag endpoints out of SesController (#3786)
The four /v2/email/suppression/addresses endpoints move byte-for-byte
into SesSuppressionController and the three /v2/email/tags endpoints
into SesTagController. Both keep calling the SesService facade: an
optional TenantName routes each suppression operation to that tenant's
own list across the suppression and tenant domains, and tagging parses
the resource ARN and dispatches to whichever of the seven taggable
domains owns it, so the facade loses nothing and both moves are pure
size splits in the shape of LambdaTagController. Both classes are
registered on the SES descriptor. No wire behavior changes.
2026-09-16 21:58:07 -04:00