Sign/Verify with MessageType=DIGEST and an RSASSA_PKCS1_V1_5_* algorithm fed
the bare digest to NONEwithRSA, which PKCS#1-pads only the bytes it is given.
Real KMS (and any external verifier) signs DigestInfo{hashOID, digest} per
RFC 8017 9.2, so floci's DIGEST signatures verified internally but failed with
openssl / python cryptography.
Wrap the digest in the ASN.1 DigestInfo structure before NONEwithRSA on both
sign and verify. ECDSA DIGEST (no DigestInfo) and the RAW path are unchanged.
Closes#1345
In a native image, Jackson could not serialize ReplicationGroup.configurationEndpoint because the Endpoint record lacked reflection metadata, so HybridStorage threw every flush and never wrote elasticache-groups.json. Annotate Endpoint with @RegisterForReflection (matching its sibling models) so persistence works.
Refs #1268
The AWS SDK v2 serialises Instant values via DateUtils.formatUnixTimestampInstant(),
producing decimal epoch-second strings (e.g. "1750000000.123"). The JSON handler
was using parseInstant(node.asText()), which failed for these values: Instant.parse()
rejects them (not ISO-8601) and Long.parseLong() rejects the decimal point.
This caused two silent failures:
- GetMetricStatistics: StartTime/EndTime parsed as null, defaulting the filter to
0..MAX_VALUE and returning all datapoints regardless of the requested time range
- PutMetricData: MetricDatum.Timestamp parsed as null, causing metrics to be stored
with the current time instead of the caller-supplied timestamp
Fix by switching to parseInstantNode(JsonNode), the existing helper that calls
node.asLong() for numeric nodes and already handles this correctly for GetMetricData.
AWS::ApiGateway::Deployment accepts an inline StageName; previously the deployment was created but the stage was not, so get-stages returned empty and invoking .../{stage}/_user_request_/... returned Stage not found. Now create the stage (with StageDescription.Description when present) bound to the new deployment.
Refs #1163
Inject FirehoseService and add provision + delete handling for AWS::KinesisFirehose::DeliveryStream. Maps DeliveryStreamName and the S3/ExtendedS3 destination configuration (BucketARN, Prefix, BufferingHints) plus Tags. Ref returns the delivery stream name; Fn::GetAtt Arn returns the stream ARN.
Move the UI service classes (FlociUiManager, UiPages) into services.floci.ui and the DuckDB helper (FlociDuckClient, FlociDuckManager) into services.floci.duck, with tests mirrored. Pure package move: importers updated, no behavior change.
Inject AutoScalingService and add provision + delete handling for
AWS::AutoScaling::LaunchConfiguration and AWS::AutoScaling::AutoScalingGroup.
Launch configurations map ImageId, InstanceType, KeyName, SecurityGroups,
UserData and IamInstanceProfile; groups map the launch configuration or launch
template, sizes, availability zones, target groups, load balancers, health check
and tags. Ref returns the resource name; Fn::GetAtt Arn returns the resource ARN.
Docker-free integration test: CreateStack -> DescribeAutoScalingGroups shows the
group referencing the launch configuration.
* feat(cognito): align CreateUserPoolClient and DescribeUserPoolClient with AWS behavior
* feat(cognito): align user pool client config APIs with AWS behavior
* fix(ses): canonicalize only the domain of suppression-list emails
The previous change lower-cased the whole EmailAddress, but real AWS SES V2
(verified 2026-06-15) is case-sensitive on the local-part and case-insensitive
only on the domain: PutSuppressedDestination for Foo@Example.COM stores and
reads back Foo@example.com, Foo@x and foo@x are two distinct entries, and a
GET/DELETE whose local-part case differs returns NotFound. Full lower-casing
wrongly merged local-part variants and altered the address on read-back.
normalizeSuppressionEmail now lower-cases only the part after the last '@'
and preserves the local-part. The integration tests are rewritten to pin the
verified behavior: domain-case-insensitive match and de-dup, local-part
case-sensitive (distinct entries), latest Reason wins on a domain-only
collision.
Suppression entries persisted by a pre-canonicalization Floci (trim-only key)
would otherwise become unreachable once the domain is normalized. All five
suppression lookups — PUT / GET / DELETE / send-time check / event resolution —
fall back to the legacy raw-trimmed key via existingSuppressionKey, and PUT
migrates the entry onto the canonical key, so older entries stay readable,
deletable, and still suppress sends, without a re-PUT leaving a stuck
duplicate. A unit test seeds a legacy-keyed entry directly to pin these paths.
* refactor(ses): single-read suppression lookup and safe legacy migration
Address review on the suppression-list case fix:
- existingSuppressionMatch returns the resolved entry with its storage key,
so GET/DELETE/send-time/event lookups read the store once instead of
probing with isPresent() and re-fetching (was 2 reads on a canonical hit,
3 on a legacy hit; per-address in collectSuppressedReasons).
- PutSuppressedDestination writes the canonical key before deleting the
legacy one it migrated from, so a failed write can't drop the entry.
- The domain-case GET test seeds its own entry, removing the dependency on
an earlier ordered test.
This commit addresses the XML parser error on clients when requests are made without the 'Action' parameter. Previously, it returned a 204 No Content response with an empty body; now it returns a 400 Bad Request status and a structured XML 'MissingAction' error. It also adds missing EC2 volume actions ('CreateVolume', 'DescribeVolumes', 'DeleteVolume') to the unauthenticated fallback list in the query controller.
Closes#1333
Inject EksService and add provision + delete handling for AWS::EKS::Cluster and
AWS::EKS::Nodegroup. Clusters are created via the EKS createCluster API
(RoleArn, ResourcesVpcConfig, version); node groups via createNodegroup under
their cluster. Ref returns the resource name; Fn::GetAtt exposes Arn (and the
cluster Endpoint). Stack deletion removes the cluster/node group.
ScheduleInvoker routed solely by substring-matching the target ARN, so a
universal target (arn:aws:scheduler:::aws-sdk:sns:publish) matched the
":sns:" branch and passed the universal-target ARN itself to SnsService as
the topic, failing at fire time with "Topic does not exist". The real
TopicArn carried in the target Input was never read.
Detect the aws-sdk:<service>:<action> form before the ARN routing and
dispatch sns:publish / sqs:sendMessage using the parameters parsed from
Input. Also add Target.SqsParameters so templated FIFO SQS targets honor
MessageGroupId instead of failing with "The request must contain the
parameter MessageGroupId".
Closes#1265
Inject RdsService and add provision + delete handling for AWS::RDS::DBInstance,
DBCluster, DBSubnetGroup, DBParameterGroup and DBClusterParameterGroup.
DBInstance/DBCluster start real RDS containers (same path as the direct API).
Ref returns the resource identifier; Fn::GetAtt exposes Endpoint.Address,
Endpoint.Port and the resource ARN (plus ReadEndpoint.Address for clusters).
Stack deletion removes each resource so create/delete is symmetric.
Add provision + delete handling for AWS::EC2::Instance: CreateStack runs a real
instance via Ec2Service.runInstances (ImageId, InstanceType, KeyName,
SecurityGroupIds, SubnetId, UserData, IAM instance profile, Tags) and stack
deletion terminates it. Ref returns the instance id; Fn::GetAtt exposes
AvailabilityZone, PrivateIp/PublicIp and PrivateDnsName. Docker-free integration
test isolated to ap-southeast-2 to avoid shared in-memory EC2 state.
Implements the Fn::GetAZs and Fn::Cidr (IPv4) intrinsic functions in
CloudFormationTemplateEngine. Fn::GetAZs returns the region's availability zones;
Fn::Cidr carves a CIDR block into equally sized subnets. A resolveList helper
lets Fn::Select compose with these list-returning intrinsics. Adds an end-to-end
test that drives subnet provisioning through Fn::Select(Fn::GetAZs)/Fn::Cidr.
Ec2Service kept all VPC/subnet/security-group/instance state in plain in-memory
maps, so in persistent storage mode it was lost on restart while CloudFormation
reloaded its stacks and exports. The persisted exports/stack then referenced EC2
ids that no longer existed: describe-subnets returned nothing and ELBv2 failed
with SubnetNotFound.
Migrate the in-memory maps to StorageBackend via StorageFactory (mirroring
RdsService) so all EC2 networking and instance metadata persists and reloads on
startup. In-place mutations (security group rules, routes, gateway attachments,
EIP associations, tags, instance state) put the entity back so changes persist
immediately. Default-resource seeding is skipped when a region already has
persisted resources to avoid duplicates after reload. Adds an ec2 per-service
storage override for parity with rds.
Closes#1297
* feat(docdb): add DocDbCluster model
* feat(docdb): add DocDbInstance model
* feat(docdb): add DocDbContainerHandler
* feat(docdb): add container manager and service config
* feat(docdb): add DocDbService with cluster and instance lifecycle
* feat(docdb): add DocDbQueryHandler
* feat(docdb): Register the service in ResolvedServiceCatalog and Dispatch in AwsQueryController
* test(docdb): add integration test for cluster and instance lifecycle
* fix(docdb): probe MongoDB readiness with a TCP connect instead of a Gremlin HTTP request
* fix(docdb): stop persisting the cluster master password at rest
* fix(docdb): return a generic AWS error envelope for unexpected failures
* feat(docdb): add mock mode to return responses without starting a container
* feat(ui): serve a landing page and launch the floci-ui console on demand
A browser hitting the Floci endpoint (GET / with Accept: text/html) now gets a
small embedded landing page; SDK/CLI traffic falls through to S3 ListBuckets
unchanged. The 'Open Floci UI' button hits /_floci/ui, which lazily starts the
floci-ui sidecar container, injects FLOCI_ENDPOINT so its API can reach Floci,
and serves an interstitial that polls /_floci/ui/status and redirects to the UI
once ready.
The sidecar is a single instance on one configured host port
(floci.services.ui.port, default 8080) and is adopted if already running. A
missing or unavailable image is reported as a friendly message instead of a 500.
Embedded ui/*.html is registered in quarkus.native.resources.includes so it is
present in the native image.
* feat(ui): branded landing dashboard, port 4500, reachable endpoint
Reskin the landing page to floci.io branding and surface live data from
/_floci/* (version, ready state, services grid). Publish the UI sidecar on a
fixed 4500 host+container port. Inject a self-discovered FLOCI_ENDPOINT via
DockerHostResolver so the UI reaches Floci over the Docker network instead of
hardcoded host.docker.internal logic; add FlociUiManagerTest.
* fix(s3): keep ListBuckets Content-Type as application/xml for non-HTML callers
The landing-page content negotiation listed text/html first in @Produces and
returned the ListBuckets XML without an explicit media type, so RESTEasy
negotiated Accept: */* (SDK/CLI default) to text/html and stamped that on the
response. Put application/xml first and pin the XML response type so non-browser
callers always receive application/xml; browser (Accept: text/html) callers
still get the landing page.
AWS::EC2::VPC and AWS::EC2::Subnet (and related networking resources) had no
provisioner case, so they fell through to the stub branch: CloudFormation
reported CREATE_COMPLETE and exported a fake "logicalId-<random>" physical id,
but the subnet was never created in EC2. ec2 describe-subnets did not return it
and elbv2 create-load-balancer failed with "The subnet ID '...' does not exist".
Inject Ec2Service into CloudFormationResourceProvisioner and add cases for VPC,
Subnet, SecurityGroup, InternetGateway, RouteTable, SubnetRouteTableAssociation,
Route, NatGateway and EIP. Each delegates to the existing Ec2Service create
methods and sets the physical id to the real vpc-/subnet-/... id so Ref/exports
resolve to resources EC2 and ELBv2 can use. Topological ordering already
guarantees parents are provisioned before children.
Adds a CloudFormation+EC2+ELBv2 integration test plus AWS CLI and CDK
compatibility coverage.
Closes#1297
The handler emitted a map entry with an empty <value> for every queried
identity, including ones that were never verified. Real AWS returns an
empty NotificationAttributes map for an unknown identity and drops it
from a mixed query, never an entry with missing fields (verified against
real AWS SES on 2026-06-13). The fabricated empty entry also violated the
response contract, since the entry's value lacked the required
ForwardingEnabled field. The handler now skips identities the service
doesn't know about.
* fix(sts): persist session secret key so RDS/ElastiCache IAM tokens validate
STS session credentials (ASIA... keys) issued by AssumeRole, GetSessionToken,
AssumeRoleWithWebIdentity, AssumeRoleWithSAML and GetFederationToken were
rejected by the RDS and ElastiCache SigV4 validators because the temporary
secret access key was never stored.
Root cause:
- StsQueryHandler generated a random secretKey and returned it to the caller
but only passed accessKeyId + roleArn to registerSession — the secret was
discarded.
- SessionCredential had no secretAccessKey field.
- IamService.findSecretKey only checked the accessKeys store (AKIA... keys);
the sessions store was never consulted.
- RdsSigV4Validator fell back to orElse(accessKeyId), using the key ID itself
as the signing secret, so every HMAC comparison failed with 28P01.
Fix:
1. Add secretAccessKey field to SessionCredential.
2. Add registerSession overload that accepts the secret and stores it.
3. Update all five STS handlers to call the new overload.
4. Make findSecretKey check sessions as a fallback after accessKeys.
5. Add IamServiceTestHelper.iamServiceWithSessionCredential helper and two
new RdsSigV4ValidatorTest cases covering the ASIA key path.
The same findSecretKey call is used by the ElastiCache SigV4Validator, so
both services benefit from this fix.
* fix: avoid IAM enforcement crash for identity sessions
* feat(cloudformation): provision Lambda-backed custom resources and layer versions
Custom::* and AWS::CloudFormation::CustomResource resources were stubbed in the
provisioner, so the ServiceToken Lambda was never invoked. Stacks reported
CREATE_COMPLETE while the custom resource's work silently never ran (e.g. CDK
BucketDeployment left the destination bucket empty).
Provision custom resources by invoking the ServiceToken Lambda synchronously
and capturing the response it PUTs to ResponseURL:
- CfnResponseController (PUT /cfn-response/{token}) receives the callback
- CustomResourceResponseStore correlates it to the waiting provisioner
- ContainerReachableEndpoint (extracted from ContainerLauncher) gives the
ResponseURL an address reachable from inside the Lambda container
ResourceProperties scalars are stringified to match CloudFormation (true ->
"true"); Data is exposed via Fn::GetAtt; ServiceToken + properties are stored so
teardown can re-invoke the handler with RequestType=Delete.
Also provision AWS::Lambda::LayerVersion (previously stubbed) so layer ARNs
resolve and layer content is copied into /opt — required for the common
BucketDeployment case, whose handler shells out to a bundled AwsCliLayer.
Covers the single-Lambda synchronous custom-resource pattern; the async CDK
Provider framework (onEvent/isComplete polling) is not emulated.
Closes#1145
* test: pass ecsService/elbV2Service args to provisioner constructor
The merge with main added two constructor params; update the
custom-resource test's direct instantiation to match.
* fix(cloudformation): match AWS custom-resource event shape
Keep ServiceToken inside ResourceProperties (it is also surfaced at the
top level) to match real CloudFormation events, verified against the moto
reference (cloudformation/custom_model.py). Previously it was stripped.
Also include OldResourceProperties on Update requests, which CloudFormation
marks required so handlers can diff against the previous properties. The
prior values are read from the existing stash before it is overwritten.
* test: pass stepFunctionsService arg to provisioner constructor
origin/main added a StepFunctionsService parameter to the
CloudFormationResourceProvisioner constructor; update the custom-resource
test to match after merging main.
---------
Co-authored-by: Hector Ventura <hectorvent@gmail.com>
GlueService.getPartitions returned partitions in storage-scan order, which is
not stable across runs because partition keys embed the table name. Sort by
partition values so GetPartitions is deterministic, matching the existing
sorted-list convention in GlueService and the moto reference, which preserves a
stable partition order.
De-flakes the sdk-test-awscli "Glue catalog: table and partition lifecycle"
compatibility test, whose assertions assume a stable partition order.
* fix(appconfig): stop AppConfig route hijacking S3 bucket named configuration
A path-style S3 request to a bucket named exactly "configuration" (e.g.
GET /configuration?list-type=2) matched AppConfigData's literal
GET /configuration route ahead of S3's /{bucket} template, so routine
list/read calls returned HTTP 500 (NullPointerException on a null
configuration_token).
Move AppConfigData GetLatestConfiguration to an internal path and add a
@PreMatching AppConfigConfigurationRouteFilter that rewrites genuine
requests (those carrying a configuration_token) onto it. Requests without
a token keep the bare /configuration path and fall through to S3's
/{bucket} route. This mirrors the existing SqsQueueUrlRouterFilter and
LambdaUrlRoutingFilter path-rewrite pattern and avoids one controller
depending on another.
Closes#1294
* fix(appconfig): drop unreachable configuration_token guard
The route is bound to the internal path and the @PreMatching filter only
rewrites onto it when a configuration_token is present, so the guard could
never fire. Remove it and the now-unused AwsException import.
* fix(ecs): add network mode and resources validation for fargate task definitions
* fix(ecs): add validation for ECS with fargate for task definition
* fix(ecs): add exact error messages and compatibilities default to EC2 when requiresCompatibilities not provided
Add the wafv2 (AWSWAF_20190729) JSON 1.1 service: Web ACLs, IP sets, regex
pattern sets, and rule groups, plus resource association, logging and permission
policies, and tagging. Uses LockToken optimistic concurrency and isolates the
CLOUDFRONT and REGIONAL scopes.
Covered by an in-repo RestAssured integration test and an AWS SDK v2
compatibility test.
Add the elasticmapreduce (ElasticMapReduce) JSON 1.1 service: cluster lifecycle
with a simulated state machine, job-flow steps, instance groups and fleets,
security configurations, and tags. Honours the ActionOnFailure legacy alias and
EMR's distinct error shapes.
Operations: RunJobFlow, DescribeCluster, ListClusters, TerminateJobFlows,
SetTerminationProtection, SetVisibleToAllUsers, SetKeepJobFlowAliveWhenNoSteps,
SetUnhealthyNodeReplacement, ModifyCluster, AddJobFlowSteps, DescribeStep,
ListSteps, CancelSteps, AddInstanceGroups, ListInstanceGroups, AddInstanceFleet,
ListInstanceFleets, ListInstances, CreateSecurityConfiguration,
DescribeSecurityConfiguration, DeleteSecurityConfiguration,
ListSecurityConfigurations, AddTags, RemoveTags.
EmrService holds a static SecureRandom, so it is registered under
quarkus.native.resources additional-build-args --initialize-at-run-time to keep
the GraalVM native build working.
Covered by an in-repo RestAssured integration test and an AWS SDK v2
compatibility test.
InitiateAuth with USER_SRP_AUTH returned a PASSWORD_VERIFIER challenge
whose ChallengeParameters carried USER_ID_FOR_SRP but not USERNAME. Real
AWS Cognito returns both, and the .NET Amazon.Extensions.CognitoAuthentication
SRP client reads ChallengeParameters["USERNAME"], so it threw
KeyNotFoundException against floci.
Add USERNAME alongside USER_ID_FOR_SRP and assert it in the SRP flow test.
Closes#1305
GetEmailIdentity dropped the entire MailFromAttributes block for an
identity with no MAIL FROM domain configured, so an SDK caller saw
mailFromAttributes() == null on the emulator but non-null on real AWS.
AWS keeps the block carrying BehaviorOnMxFailure and omits only the
inner MailFromDomain / MailFromDomainStatus fields.
Clearing the MAIL FROM domain also resets BehaviorOnMxFailure to
UseDefaultValue, matching AWS, so a cleared identity is indistinguishable
from one that was never configured.
RunInstances 500d on the native image because ec2/image-catalog.yaml was not
embedded: the app-local resource-config.json pattern is not reliably honored by
Quarkus' native build. Register the catalog via quarkus.native.resources.includes,
mirroring the pricing-snapshots entry.
Also load the catalog lazily instead of in the bean constructor so a missing or
unparseable resource no longer fails EC2 bean creation, which keeps mock mode
(which never reads the catalog) working.
Refs #1296