* fix(rds): align subnet group placement handling with AWS behavior
* fix(rds): align DB subnet group wire responses with AWS model
* fix(rds): align subnet group placement validation with AWS
* fix(rds): tighten subnet group placement validation
* chore: rerun ci
The storage backend hands every caller the same entity instance, and
IamService mutates that entity's collections in place before storing it
back (getInlinePolicies().put(...), getAttachedPolicyArns().add(...), etc.)
with no synchronization. When two requests touch the same entity at once -
e.g. Terraform applying many aws_iam_role_policy resources under
-parallelism - the plain HashMap/ArrayList lose entries and corrupt their
internal tables. PutRolePolicy returns success but the immediate
GetRolePolicy then reports NoSuchEntity (so the provider's create-waiter
exhausts and the apply fails), and listRolePolicies can throw
ArrayIndexOutOfBoundsException off the corrupted map.
Make the shared collections concurrency-safe across all IAM entities:
ConcurrentHashMap for tag and inline-policy maps, CopyOnWriteArrayList for
the user/group/role/instance-profile lists, with defensive setters so a
Jackson rehydrate from disk can't swap a plain collection back in.
Policy versions keep insertion order via a synchronized LinkedHashMap, and
the compound check-then-act paths that a thread-safe collection alone can't
make atomic are guarded explicitly: createPolicyVersion (version id derived
from size()+1), delete/setDefaultPolicyVersion, listPolicyVersions, and the
single-role cap in addRoleToInstanceProfile.
Add concurrency tests that drive each collection from many threads and
assert no entry is lost or corrupted; they fail reliably before the fix.
* fix(s3): serve custom error document for missing keys in static website hosting
When a bucket has a website configuration with an ErrorDocument, requests
to missing keys now return the error document with a 404 status instead
of the default XML NoSuchKey error.
* fix(test): handle null output in waitForExecution to prevent flaky CI failures
* fix(s3): address review feedback on static website hosting
* fix(s3): recognize s3-website hostnames in virtual host filter
* fix(s3): gate website error document on website endpoint host
* fix(s3): restore validateRawUri inside try block after rebase
CloudFrontService hardcoded the ".cloudfront.net" suffix when generating
distribution domain names, so the existing floci.services.cloudfront.domain-suffix
config (FLOCI_SERVICES_CLOUDFRONT_DOMAIN_SUFFIX) had no effect.
Read config.services().cloudfront().domainSuffix() into the service and use it
in createDistribution() and createStreamingDistribution(). The default remains
cloudfront.net via @WithDefault, so existing behaviour is unchanged.
Adds CloudFrontServiceTest covering the default suffix and a configured override
for both distributions and streaming distributions.
Wire SetIdentityNotificationTopic into the send path so a verified
identity (or its parent domain) with a Bounce/Complaint/Delivery topic
receives an Amazon SNS notification when a matching event occurs,
independently of any configuration set. Previously the topic ARN was
stored and only echoed back by GetIdentityNotificationAttributes.
The notification uses the legacy notificationType payload format, which
shares the mail/bounce/complaint/delivery blocks with event publishing
but differs in three spec-mandated ways: the top-level discriminator is
named notificationType instead of eventType; the mail object omits the
tags field; and the original headers (headers/commonHeaders/
headersTruncated) are included only when the identity has
headers-in-notifications enabled for the notification type.
The sending identity is resolved from the bare email address (so a
display-name Source yields a valid identity/<email> ARN), and SendRawEmail
falls back to the MIME From header when Source is omitted, using that
effective source consistently for the stored message, SMTP relay, and
event publishing. RawMessageHeaders now parses the From address.
Docs: documented the behavior in docs/services/ses.md.
* fix: return XML error for missing action and add volume action fallbacks
* fix(eventbridge): sync EventBridge tags to ResourceGroupsTaggingService
EventBridge stored tags on rules, buses, and archives in its own stores but never propagated them to the central ResourceGroupsTaggingService. This caused GetResources with --resource-type-filters events:rule to return an empty list.
Inject ResourceGroupsTaggingService into EventBridgeService (following the existing GlueService pattern) and sync tags during putRule, tagResource, untagResource, and deleteRule operations.
Closes#1343
* fix(lambda): populate SQS messageAttributes in Lambda event payload
buildSqsEvent() was calling record.putObject("messageAttributes") which
creates an empty JSON object node and discards msg.getMessageAttributes()
entirely. Lambda functions receiving SQS events always saw an empty
messageAttributes map regardless of what was sent with the message.
Fix serializes each MessageAttributeValue into the AWS-specified shape:
{ dataType, stringValue, binaryValue, stringListValues, binaryListValues }
Binary values are base64-encoded per the Lambda SQS event contract.
md5OfMessageAttributes is now forwarded to the record when present.
Added four new unit tests covering: String, Number, and Binary attribute
types, multiple messages each with independent attributes, and the
no-attributes case (backward compat: empty object, no md5 field).
Fixes#1411
* fix: serialize only populated SQS message attribute values
* fix: omit null scalar fields from SQS message attributes in Lambda event payload
- Stop emitting explicit JSON nulls for absent stringValue/binaryValue
fields in SqsEventSourcePoller.buildSqsEvent(); AWS Lambda omits
these entirely rather than sending null.
- Align serialization order with PipesPoller: check binaryValue first,
then stringValue via else-if.
- Update test assertions to expect key-absent (assertNull) instead of
null-JSON-node (isNull) for the unpopulated scalar field.
RotateSecret invoked the Lambda rotation function without first
registering the ClientRequestToken as an AWSPENDING version. Standard
rotation handlers (including the AWS-provided templates) call
DescribeSecret and expect to find their token in VersionIdsToStages,
causing rotation to fail with:
ValueError: Secret version <token> has no stage for rotation.
Create an empty AWSPENDING placeholder version keyed by the
ClientRequestToken before invoking the Lambda's createSecret step.
This matches the behavior of real AWS and Moto.
Also allow PutSecretValue to overwrite an AWSPENDING placeholder that
has no secret value yet, since the Lambda's createSecret step needs to
populate it.
Pressing 'Open Floci UI' under Podman (docker-socket compat) reports every
failure as a missing image and tells the user to 'docker pull floci-ui' — even
when the image is present. The real causes (an unreachable Docker/Podman socket,
a port clash, a daemon error) are hidden, which is especially confusing on
SELinux hosts where the bind-mounted socket connect fails with
'java.net.BindException: Permission denied'.
Classify the failure in FlociUiManager.describeStartFailure:
- only a genuinely unavailable image (NotFoundException / docker-java's
'Could not pull image: ...' wrapper) keeps the 'docker pull' guidance;
- an unreachable runtime (SocketException/BindException/ConnectException) points
at the socket mount and SELinux relabeling;
- any other daemon error is surfaced as-is (e.g. 'address already in use').
Also fix the Podman docs: use ':z' (shared relabel) rather than ':Z' on the
shared Podman API socket, note it applies to the UI sidecar, and mention the
'--security-opt label=disable' fallback.
Add unit tests for the four classifications.
- emit routeTableIdSet/subnetIdSet items as plain text (AWS SDK for Go could not
deserialize the wrapped form)
- add DescribePrefixLists returning managed S3/DynamoDB prefix lists
- honor private_dns_enabled (default true for interface endpoints)
Adds Ec2IntegrationTest coverage and documents the new actions.
* fix(floci-ui): resolve readiness probe URL from container endpoint
Resolve the floci-ui readiness probe URL once at start/adopt time from the
sidecar's resolved EndpointInfo instead of branching on container detection
each probe. EndpointInfo already returns a Floci-reachable address —
localhost:hostPort natively, or the sidecar's container IP on the shared
Docker network when Floci runs in a container, where the published host port
is unreachable from inside.
* fix(floci-ui): set hostPort from bound endpoint natively, keep configured port in container
Address PR review: EndpointInfo.port() is the real host binding only in native
mode (and reflects dynamic port=0 allocation there). In container mode it is the
sidecar's internal port (4500), so the configured published port stays
authoritative for the browser redirect. Extract resolveHostPort() and use it in
both ensureStarted() and adoptExisting().
* fix(ec2): added user data output streaming to cloud watch
* fix(ec2): deleted dead code after merging
* fix(ec2): adjust comments position
* fix(ec2): fixed userdata logging and added mockito tests
Back the durable AWS Config maps with StorageFactory so they survive a restart
instead of living only in memory. configRules and conformancePacks use the
nested-region pattern (re-put after inner-map mutation); configurationRecorders,
deliveryChannels and tags swap to flat StorageBackedMaps with tag inner-map
write-backs. Recorder run-state stays in memory. Storage key is config. Wire
ConfigStorageConfig + catalog descriptor + application.yml.
Back the region-nested projects, report groups and source credentials maps
with StorageFactory-backed maps (ELBv2 nested-region pattern) so they survive
a restart instead of living only in memory. Re-put the region entry after
inner-map create/update/delete so the periodic flush captures the change.
Builds and build counters stay in memory as runtime state. Wire
CodeBuildStorageConfig + catalog descriptor + application.yml.
Back clusters, task definitions, latest revisions, services, capacity
providers, attributes and account settings with StorageFactory-backed
maps so they survive a restart instead of living only in memory. Add
write-backs at in-place mutation sites (cluster config/counters, service
config/status, task-definition status, tags, attributes) so the periodic
flush captures them; transient runtime state (tasks, task sets,
deployments, container instances) stays in memory. Wire EcsStorageConfig
+ catalog descriptor + application.yml.
* fix: return XML error for missing action and add volume action fallbacks
* fix(eventbridge): sync EventBridge tags to ResourceGroupsTaggingService
EventBridge stored tags on rules, buses, and archives in its own stores but never propagated them to the central ResourceGroupsTaggingService. This caused GetResources with --resource-type-filters events:rule to return an empty list.
Inject ResourceGroupsTaggingService into EventBridgeService (following the existing GlueService pattern) and sync tags during putRule, tagResource, untagResource, and deleteRule operations.
Closes#1343
* feat(secretsmanager): implement automatic secret rotation lifecycle
* fix(secretsmanager): correct RotationLambdaARN validation in tests and rotation rules parsing
* fix(secretsmanager): avoid implicit unboxing NPE when parsing rotation rules
* fix: remove debug print, drop camelCase rotation parameters fallback, and revert unrelated eventbridge changes
* fix: align PutSecretValue error code and resolve NPE in JSON handler tests
* fix(test): create Lambda function before rotateSecret to fix ResourceNotFoundException
rotateSecretStub failed because SecretsManagerService validates the
rotation Lambda exists synchronously. The test was passing an ARN for a
function that had never been created in the emulator.
Create a real Lambda function via LambdaClient before calling
rotateSecret, and clean it up afterwards. Uses
Runtime.fromValue(nodejs20.x) for SDK compatibility.
* fix: non-immediate rotation runs testSecret only
Per AWS RotateSecret docs, when RotateImmediately is false Secrets
Manager tests the rotation configuration by running only the testSecret
step. Remove the createSecret invocation from the non-immediate path.
* fix(test): align rotateSecretNotImmediate with non-immediate rotation path
The non-immediate rotation path only invokes testSecret (not createSecret),
so the test should expect 1 lambda invocation instead of 2.
Implements CreateNetworkAcl, DescribeNetworkAcls (with vpc-id / default /
association.subnet-id filters), CreateNetworkAclEntry, ReplaceNetworkAclEntry,
DeleteNetworkAclEntry, ReplaceNetworkAclAssociation, and DeleteNetworkAcl.
Every VPC is provisioned with a default NACL and each subnet is associated with
it, so aws_network_acl and aws_default_network_acl work via Terraform.
Adds Ec2IntegrationTest coverage and documents the new actions.
* fix(rds): postgres proxy ignores requested database name
* fix(rds): assert-auththread and backendthread are terminated
* fix(rds): assert-auththread and backendthread are terminated again
* feat(ses): support v1 ConfigurationSet tracking and reputation-metrics options
Implement the SES v1 (Query) ConfigurationSet option operations that previously
returned UnsupportedOperation: CreateConfigurationSetTrackingOptions,
UpdateConfigurationSetTrackingOptions, DeleteConfigurationSetTrackingOptions, and
UpdateConfigurationSetReputationMetricsEnabled.
Tracking options require a verified domain identity, matching real AWS: an
unverified CustomRedirectDomain yields InvalidTrackingOptions, checked before
configuration-set existence. The domain-verification check is shared with the v2
PutConfigurationSetTrackingOptions path so the two surfaces stay aligned. Lifecycle
conflicts surface as TrackingOptionsAlreadyExistsException /
TrackingOptionsDoesNotExistException, matching the AWS SDK error mapping.
A v1-created configuration set now defaults reputation metrics to disabled, matching
real AWS (the v2 create path leaves them enabled). DescribeConfigurationSet now
returns ReputationMetricsEnabled and the trackingOptions block.
Add integration and AWS SDK v2 compatibility tests.
* fix(ses): match AWS errors for missing/blank tracking-options redirect domain
CreateConfigurationSetTrackingOptions / UpdateConfigurationSetTrackingOptions now
distinguish the two AWS validation outcomes instead of returning a single
InvalidParameterValue: an absent CustomRedirectDomain (no TrackingOptions member on
the wire) yields a framework ValidationError ("Member must not be null"), while a
present-but-empty CustomRedirectDomain yields InvalidTrackingOptions ("At least one
field of TrackingOptions must contain a value."). The Smithy member is optional, so
the previous required-field rejection was incorrect.
Add integration coverage for both cases.
* test(ses): renumber tracking-options test order to match source order
Align the @Order values so file order equals execution order (the missing/blank
domain validation cases now run at 11-12, the reputation-metrics cases at 13-14),
making the intended sequence easier to follow.
* refactor(kms) use enums for type-safety. add algorithms to keymetadata
Signed-off-by: Mark Hayen <mark.hayen@edsn.nl>
* refactor(kms): use enums for type-safety. add algorithms to keymetadata
Signed-off-by: Mark Hayen <mark.hayen@edsn.nl>
* refactor(kms): update missing algorithms handling and add tests to cover all combinations of keySpec,KeyUsage
Signed-off-by: Mark Hayen <mark.hayen@edsn.nl>
---------
Signed-off-by: Mark Hayen <mark.hayen@edsn.nl>
Co-authored-by: Mark Hayen <mark.hayen@edsn.nl>
* feat(s3-vector-store): add S3Vectors service support with storage configuration and integration testing
* feat(s3-vector-store): implement S3 Vectors service API with controller, service, and integration tests
* fix: return XML error for missing action and add volume action fallbacks
* fix(eventbridge): sync EventBridge tags to ResourceGroupsTaggingService
EventBridge stored tags on rules, buses, and archives in its own stores but never propagated them to the central ResourceGroupsTaggingService. This caused GetResources with --resource-type-filters events:rule to return an empty list.
Inject ResourceGroupsTaggingService into EventBridgeService (following the existing GlueService pattern) and sync tags during putRule, tagResource, untagResource, and deleteRule operations.
Closes#1343
* fix(apigateway): add support for SQS path-style integration URIs
- Enhanced AwsServiceRouter to parse both action/ and path/ style integration URIs
- Updated ApiGatewayExecuteController to handle form-urlencoded SQS requests
- Added comprehensive integration tests covering end-to-end functionality
- Maintains backward compatibility with existing action/ style integrations
Fixes issue with API Gateway AWS integrations failing when using path-style
SQS ARNs like arn:aws:apigateway:region:sqs:path/account/queue instead of
action-style URIs.
* fix(cognito): implement token revocation for AdminUserGlobalSignOut
Previously AdminUserGlobalSignOut was a stub that only logged a message
and did not invalidate any tokens, allowing previously issued refresh and
access tokens to remain fully usable after a global sign-out.
Changes:
- Add RevokedTokenInfo model to track revoked token state
- Add revokedTokenStore (StorageBackend) to CognitoService
- Add jti and origin_jti claims to all generated JWT tokens
- Implement revokeAllUserTokens() using a global revocation record keyed
by pool + username, checked at every token validation point
- Add validateRefreshTokenNotRevoked() accessible from the auth flow handler
- Add validateUserNotGloballySignedOut() checked in getUser, changePassword,
updateUserAttributes, deleteUserAttributes, and getTokensFromRefreshToken
- Fix CognitoAuthFlowHandler.handleRefreshToken() to call the revocation
check before issuing new tokens from REFRESH_TOKEN_AUTH flow
- Update package-private constructor (used in tests) to accept the new store
- Add AdminUserGlobalSignOutIntegrationTest covering the full sign-in →
sign-out → token-reuse scenario (9 test cases)
Closes#1395
* fix(cognito): only revoke tokens issued before global sign out instant
* fix(cognito): correct time precision for global sign-out token invalidation
* fix(apigatewayv2): cascade-delete child resources and 404 references on DeleteApi
Closes#1218.
DeleteApi removed only the Api row, leaving routes, integrations, stages,
deployments, authorizers, models, route responses, and integration responses
orphaned under their region::apiId::* keys. The list endpoints also silently
returned empty lists for unknown apiIds instead of 404. Both diverge from
real AWS (children deleted; subsequent reads return NotFoundException).
- deleteApi now cascades through every api-scoped child store, mirroring
the existing apigateway v1 deleteRestApi pattern (api row first, then
inline stream-based deletes per store, then LOG.infov).
- VpcLink is region-scoped (region::vpcLinkId — shared across APIs) and
intentionally excluded from the cascade.
- getRoutes / getStages / getIntegrations / getAuthorizers / getModels /
getDeployments / getRouteResponses / getIntegrationResponses now call
getApi(region, apiId) first so they 404 when the API doesn't exist,
matching real AWS behavior.
Verified end-to-end with boto3 against running Floci: the reproduction from
#1218 went from 6 leaked child types on main to 0 with this branch.
* refactor(apigatewayv2): extract deleteByPrefix helper, consolidate cascade tests
* feat(ses): support v2 dedicated IP pool APIs
Add SES v2 dedicated IP pool management — CreateDedicatedIpPool,
GetDedicatedIpPool, ListDedicatedIpPools and DeleteDedicatedIpPool — backed by
a per-region store.
Validation matches real AWS SES V2 (verified 2026-06-18): ScalingMode defaults
to STANDARD and must be STANDARD or MANAGED; a duplicate pool returns
AlreadyExistsException; an unknown pool returns NotFoundException.
Add integration tests, an AWS SDK v2 compatibility test, and document the
endpoints.
* feat(ses): support v2 configuration-set option groups
Add SES v2 ConfigurationSet support for the ReputationOptions, TrackingOptions,
DeliveryOptions, ArchivingOptions, and VdmOptions option groups. Each group can
be set through its dedicated Put...Options endpoint or supplied inline to
CreateConfigurationSet (validated before the set is stored), and is read back
through GetConfigurationSet.
Validation matches real AWS SES V2:
- TrackingOptions: HttpsPolicy enum; a present CustomRedirectDomain must be
non-blank and a verified domain identity, is required when HttpsPolicy is set,
and is checked before the enum.
- DeliveryOptions: TlsPolicy enum; MaxDeliverySeconds must be an integer in
[300, 50400]; any SendingPoolName is rejected since Floci models no
dedicated-IP pools, with distinct blank vs non-existent messages.
- ArchivingOptions: ArchiveArn must match the Mail Manager archive ARN pattern
(existence/ownership not modelled).
- ReputationOptions: always returned by GetConfigurationSet (enabled by
default); an empty-body PUT disables it.
- VdmOptions: nested DashboardOptions/GuardianOptions [ENABLED, DISABLED] enums;
accepted independently of account-level VDM.
Option members are type-checked, an all-null block clears the options, and the
response blocks are shaped via Jackson. Add integration tests and an AWS SDK v2
compatibility test, and document the endpoints.
* feat(ses): validate SendingPoolName against dedicated IP pools
Now that dedicated IP pool management is available, DeliveryOptions
SendingPoolName is validated against the pool store instead of being rejected
unconditionally: a pool created via CreateDedicatedIpPool is accepted (and
echoed by GetConfigurationSet), while an unknown pool still returns
'SendingPool <name> doesn't exist' and a blank one 'sendingPoolName can't be
blank.' (verified against real AWS).
Add integration and SDK compatibility tests for referencing an existing pool.
* fix(ses): stop validating ArchiveArn format
Floci does not model Mail Manager archives, so the ArchiveArn format is not
validated — any provided value is stored and echoed (matching the store-only
behaviour of other local AWS emulators). The JSON-string type check is kept.
Replace the malformed-ARN rejection test with one asserting an arbitrary
ArchiveArn round-trips.
* feat(memorydb): add MemoryDB service with mock mode
Adds Amazon MemoryDB for Redis as a Docker-backed service, modelled on
the existing ElastiCache and DocumentDB services.
Control plane is AWS JSON 1.1 (X-Amz-Target: AmazonMemoryDB.*) dispatched
from AwsJson11Controller, supporting CreateCluster, DescribeClusters,
UpdateCluster, DeleteCluster, ListTags, TagResource and UntagResource.
The data plane reuses ElastiCache's RESP proxy and SigV4 validator, since
MemoryDB is Redis wire-compatible: each cluster starts a real Valkey/Redis
container and an auth proxy forwards client connections to it.
A mock mode (FLOCI_SERVICES_MEMORYDB_MOCK, default false) tracks clusters
as control-plane-only resources without starting a container, so IaC tools
like Terraform and OpenTofu can run where no Docker socket is available.
This mirrors the existing DocumentDB mock flag.
Includes service unit tests and documentation.
* fix(memorydb): return UnknownOperationException for unsupported actions
Unrecognised JSON 1.1 actions returned InvalidParameterValueException,
which mis-signals the error category and can break SDK/CLI probing.
Use UnknownOperationException to match CloudMap and the shared
JsonErrorResponseUtils.createUnknownOperationErrorResponse helper.
* docs(memorydb): drop service-count bump from this PR
The 55->56 edit was built on a stale baseline (main's count does not
reflect already-merged services) and conflicts with a separate docs
branch. Keep the MemoryDB matrix row; leave the headline count to a
dedicated docs PR. No functional change.
* fix(memorydb): use InternalFailure for unexpected errors
Align the generic exception path with Floci's JSON 1.1 convention and the
shared JsonErrorResponseUtils.createErrorResponse helper, which emit
InternalFailure for unexpected server errors. SDKs commonly key on this.
* fix(memorydb): copy AuthToken onto cluster spec on CreateCluster
CreateCluster resolved AuthMode.PASSWORD from the presence of AuthToken
but never copied the token onto the spec, so the service stored a null
token and password auth always failed. Copy AuthToken onto the spec and
add MemoryDbHandlerTest covering token propagation and the NO_AUTH default.
* fix(memorydb): validate cluster name to avoid NPE on null key
getCluster passed the name straight to the ConcurrentHashMap-backed
storage, so a null/blank name (reachable via UpdateCluster/DeleteCluster
without ClusterName) threw a NullPointerException surfaced as a 500.
Guard with an AWS-style InvalidParameterValueException (400), matching
CreateCluster, and add a regression test.
* fix(memorydb): roll back proxy port and container on failed provisioning
If container or proxy startup failed after allocating a proxy port, the
port stayed reserved (and any started container orphaned), eventually
exhausting the range with InsufficientClusterCapacity. Extract backend
startup into startBackend with best-effort rollback that stops the proxy
and container and always releases the port. Add a regression test proving
the port is reclaimed after a failed create.
* fix(memorydb): stop proxies and containers on emulator shutdown
MemoryDbProxyManager.stopAll and MemoryDbContainerManager.stopAll were
never invoked from EmulatorLifecycle.onStop, so MemoryDB clusters left
bound TCP proxy ports and running containers after shutdown. Wire both
managers into onStop alongside the existing ElastiCache and RDS cleanup.
No test: shutdown DI wiring is not meaningfully testable in isolation.
* test(memorydb): update EmulatorLifecycleTest for new constructor params
The shutdown-wiring change added MemoryDb container/proxy managers to the
EmulatorLifecycle constructor; update the direct constructor call in the
unit test to pass the two new mocks.
* test(memorydb): add Docker-backed integration test
End-to-end coverage mirroring ElastiCacheIntegrationTest: JSON 1.1 control
plane (CreateCluster/DescribeClusters/DeleteCluster) plus the real RESP
data plane through a Valkey container and the auth proxy. Covers no-auth
connectivity (PING/SET/GET), password auth (AUTH token accepted, wrong
token and unauthenticated commands rejected), and proxy-port reuse after
delete. Gated on Docker availability via an assumption.
* docs(memorydb): clarify mock endpoint uses configured hostname
Mock mode reports <hostname>:6379 (from floci.hostname / FLOCI_HOSTNAME,
defaulting to localhost), not always localhost. Update the Mock Mode note
so users with a custom hostname aren't surprised.
* fix(memorydb): use correct InsufficientClusterCapacityFault error code
* feat(neptune): support neo4j backend for openCypher via NEPTUNE_DB_TYPE
Neptune emulation always started a TinkerPop Gremlin Server, which only
speaks Gremlin. Add a global db-type selector (FLOCI_SERVICES_NEPTUNE_DB_TYPE,
mirroring LocalStack's NEPTUNE_DB_TYPE) so clusters can be backed by Neo4j and
served over the Bolt protocol for openCypher.
- Add NeptuneDbType enum (gremlin -> 8182, neo4j -> 7687) with alias parsing
- Add db-type and default-neo4j-image config (default neo4j:5-community)
- Resolve image/port per engine in NeptuneService and NeptuneContainerManager
- Run Neo4j with NEO4J_AUTH=none and probe readiness via the Bolt handshake
- Add openCypher/Bolt integration test and NeptuneDbType unit test
- Document the new option in README and docs/services/neptune.md
* test(neptune): assert DeleteDBCluster cleanup and clarify docs
Assert the openCypher integration test's DeleteDBCluster cleanup returns
200 so a failed delete surfaces instead of silently leaking a backend
container and proxy port into later tests.
Also drop the misleading backend ports from the db-type table (users
connect via the proxy port range, not the container-native port) and
correct the SigV4 auth-header comment to reference the management
request routing.
* fix(neptune): treat all-zero Bolt handshake reply as not-ready
The Neo4j readiness probe accepted any non-empty response, but Neo4j
answers the Bolt handshake with 0x00000000 when it rejects every
proposed version (Bolt disabled, wrong port, or an unsupported server
version). That made the probe report ready for a backend whose sessions
would then fail. Require a non-zero agreed version for the neo4j
db-type so such a backend times out with a clear error instead.
* fix(neptune): fall back to default db-type on unknown config value
A server-side typo in FLOCI_SERVICES_NEPTUNE_DB_TYPE shouldn't fail the
client's CreateDBCluster. Make NeptuneDbType.fromConfig return an
Optional and have NeptuneService fall back to GREMLIN with a WARN for an
unrecognised value, instead of throwing InvalidParameterValue. The
cluster still comes up on the default engine.
Apply top-level Globals (e.g. Function Handler / Runtime / Timeout,
Api settings) onto each matching SAM resource's properties before
expansion. Resource-level properties take precedence over Globals and
nested maps are deep-merged. Globals is stripped from the template on
every return path.
* feat(cloudformation): generate implicit API Gateway from SAM Api events
Synthesize an implicit AWS::ApiGateway RestApi (RestApi / Resource /
Method / AWS_PROXY Integration / Deployment / Stage) from SAM function
Api events, matching SAM/CloudFormation behavior so a template that
relies on the implicit API can be deployed and served.
Routes are deduped by (path, method); a route whose RestApiId is
explicitly set (non-null) is left untouched; the generated RestApi
uses a collision-safe logical id.
* fix(cloudformation): harden implicit API route generation
- skip Api routes whose Path is a non-literal intrinsic (Ref/Fn::Sub)
instead of registering them as the API root
- default Method to ANY when given as a non-literal value
- make the Deployment and Stage logical ids collision-safe via uniqueId
* fix(dynamodb): Limit caps scanned items and index scans carry full cursor
Scan Limit now bounds items read (not matched), returning a cursor when items
remain. Index scans build a LastEvaluatedKey that includes the index key
attributes alongside the base table key, so paging across tied index sort keys
walks every item exactly once. Closes 2 conformance failures.
* feat(dynamodb): TableId, TableClass, OnDemandThroughput; fix deletion-protection error
Generate a stable TableId per table; parse and round-trip TableClass
(TableClassSummary) and OnDemandThroughput on Create/UpdateTable. DeleteTable
under deletion protection now returns ValidationException (protected against
deletion) matching AWS. Closes 7 conformance failures.
* test(dynamodb): expect ValidationException for deletion-protected DeleteTable
This change makes DeleteTable on a deletion-protected table return a
ValidationException to match AWS, so update deletionProtectionEnabled,
which still asserted ResourceInUseException.
Verified against moto/AWS DDB parity: DeletionProtectedException is a
ValidationException.
onStop() only tore down ElastiCache and RDS; the DocDb/Neptune managers
expose stopAll() but were never called, leaking containers and proxy
ports across runs. Wire them in (proxies before containers) and verify
in EmulatorLifecycleTest.
* fix(core): use self-closing tags for empty XmlBuilder values
XmlBuilder.elem(name, "") produced <name></name> for empty string values, which caused some XML consumers (e.g. Terraform AWS provider) to crash with nil pointer dereference.
Now empty string values render as self-closing <name/> instead, which is semantically identical but avoids the parser crash. Null values remain skipped entirely.
* fix(ec2): conditionally omit stateReason instead of self-closing empty tags
The previous approach (self-closing tags for empty XmlBuilder values)
was wrong for two reasons:
1. AWS emits <tag></tag> (paired tags), not <tag/> — verified against
botocore rest-xml protocol fixtures (XmlEmptyStrings, XmlEmptyBlobs).
2. Go's encoding/xml tokenizes both forms identically (StartElement +
EndElement, no CharData), so the Terraform crash persisted either way.
Real fix: stop hardcoding <stateReason><code></code><message></message>
in Ec2QueryHandler for every instance. AWS omits stateReason entirely
when there is none (e.g. a running instance). Now it is only emitted
when stateReasonCode or stateReasonMessage is present.
XmlBuilder.elem() reverted to its original paired-tag behavior.
Added Instance.stateReasonCode/stateReasonMessage model fields.
Updated Ec2InstanceResponseShapeTest to assert null for running
instances (matching real AWS behavior).
Query and Scan now reject an ExclusiveStartKey whose attribute set does not
exactly match the paged key schema (table primary key, plus index keys when an
IndexName is given), with the distinct messages each operation returns. Closes
5 conformance failures.
* fix(dynamodb): reject redundant parens, contains() dup operand, begins_with non-string
Add ExpressionEvaluator.validateExpression for structural/semantic checks
DynamoDB rejects at parse time, wired into Put/Delete/Update/Query/Scan
handlers with the correct Invalid <ExprType> prefix. Closes 11 conformance
failures across tier1 paren tests and tier3 exact error-message tests.
* test(dynamodb): expect ValidationException for redundant double parens
scanFilterDoubleNestedParens asserted that ((category = :a)) returns 200,
but real AWS DynamoDB rejects redundant (doubled) parentheses with a
ValidationException at parse time. The new validateExpression() check now
correctly returns 400, so update the test to assert the rejection.
Verified against moto/AWS DDB parity: ((a < b)) fails while
((a = :b) OR (c = :d)) is allowed.
The /_floci/ui/status endpoint returned HTTP 500 under the native image
because Jackson could not serialize UiController.StatusResponse (no
reflection metadata was registered). The interstitial page served by
GET /_floci/ui polls /status and only redirects to the floci-ui sidecar
once it reads {ready:true,url:...}, so a 500 there left the UI stuck on
the loading page even though the floci-ui container was up and healthy.
Register the record for reflection, matching the existing pattern used
by other controller response types (e.g. AwsErrorResponse).