USER 1001 made the image start unprivileged, so the entrypoint skipped the branch that adds the socket's group and honours FLOCI_RUN_AS_ROOT. With a socket owned by a non-root group and mode 660, Docker-backed services could not launch containers, and FLOCI_RUN_AS_ROOT=true had no effect.
The image now starts as root like the standard one, and the entrypoint drops to uid 1001. HOME is set to /app because that drop keeps the environment: hooks would otherwise run with HOME=/root, which uid 1001 cannot write to, and pip install would fail.
docker exec now defaults to root on this image, as it does on the standard one.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* feat(core): translate LocalStack variables in Java instead of the entrypoint
The LocalStack-to-Floci variable mapping (PERSISTENCE, EDGE_PORT,
LOCALSTACK_HOST, GATEWAY_LISTEN, LS_LOG/DEBUG, the Lambda and Docker
variables, the DNS suffixes, USE_SSL, CUSTOM_SSL_CERT_PATH) lived in
docker/localstack-parity.sh, sourced by the image's entrypoint. A JVM run or
a native binary on the host never saw it.
LocalStackParity now computes the same mapping and LocalStackParityConfigSource
serves it at ordinal 301, just above environment variables, as the exported
variables did. A key is produced only when its Floci variable is unset, so an
explicit Floci setting still wins; the DNS suffixes are still appended to any
configured ones; LOCALSTACK_PARITY=false still turns it all off.
TlsConfigSource, which reads its properties before the configuration exists,
consults the mapping too.
The script, its shell test and every Dockerfile copy of it are removed; the
test cases move to LocalStackParityTest.
Refs #5767
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(core): keep TLS backends on loopback, keep configured DNS suffixes, and pass LocalStack settings to hooks
Review follow-ups for the Java LocalStack translation:
- Dockerfile.compat took docker-entrypoint.sh from the published native
image, which still sourced the removed localstack-parity.sh, so the compat
image never became healthy. It now copies the entrypoint from the build
context, as it already does healthcheck.sh.
- At ordinal 301 the parity source outranked TlsConfigSource's loopback pin
(300): with TLS on and GATEWAY_LISTEN set, the backends bound the gateway
address while the proxy dialled 127.0.0.1. It now sits at 299, below
environment variables and the TLS source and above .env and
config/application.yml, where the exported variables used to be.
- floci.dns.extra-suffixes is no longer a translated property, which on JVM
and native runs replaced suffixes set in application.yml. The five
readers append LocalStack's and Floci's suffixes to the configured list
through LocalStackParity.withDnsSuffixes instead.
- GATEWAY_LISTEN=0.0.0.0:4566 (or [::]:4566, or a list) gives the host to
quarkus.http.host and the port to floci.port when EDGE_PORT is unset,
instead of a host Floci rejects as malformed.
- Init hooks get the translation as FLOCI_*/QUARKUS_* variables again, as
they did when the entrypoint exported them.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(core): parse LOCALSTACK_HOST and GATEWAY_LISTEN the way LocalStack does
Both take LocalStack's host-and-port forms (HostAndPort.parse in its
config.py): host:port, host, :port, [v6]:port and [v6].
- LOCALSTACK_HOST is <hostname>:<port>, localhost.localstack.cloud:4566 by
default. Its port went into floci.hostname, so the base URL came out as
http://localhost.localstack.cloud:4566:4566. floci.hostname now gets the
host alone.
- GATEWAY_LISTEN=:4566, LocalStack's default host on 4566, did not match
and stopped startup with "Refusing to listen on malformed host". An empty
host now keeps Floci's own bind address and takes just the port.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* perf(docker): cut healthy wait from 5 s to 0.1 s
* fix(docker): wait up to 5 s for ready hooks before reporting healthy
* fix(docker): build without pulling a Dockerfile frontend from Docker Hub
The compat image's ubi9-minimal:9.7 ships openssl-libs-3.5.1-7.el9_7, which is below the 3.5.5-4.el9_8 that Red Hat fixed CVE-2026-45445 in. ubi9-minimal:9.8 ships 3.5.8-1.el9_8, so the bump is the remediation.
The native bases move with it for currency rather than for that CVE: ubi9-micro ships no openssl at either tag, on any architecture. It picks up glibc 2.34-231.el9_7.10 to 2.34-275.el9_8 plus libcap and tzdata, and keeps both images on one RHEL minor stream, which matters because the compat image builds on top of the native one.
Package contents were read from the Red Hat container catalog for every architecture the images publish.
* build: verify Maven distribution checksums
Pin distributionSha256Sum in the Maven wrapper so mvnw rejects a tampered
download, and check Apache's published SHA-512 before extracting Maven in
Dockerfile.native.
* build: require unzip when the Maven wrapper checksum is pinned
Without unzip, mvnw downloads the .tar.gz distribution and checks it
against the .zip checksum, reporting a possibly compromised download.
Stop with a clear message instead.
* fix(docker): re-own the configured persistent path, not only /app/data
The entrypoint's root phase re-owned /app/data, while the writability probe
and the boot-time check both use FLOCI_STORAGE_PERSISTENT_PATH. A named volume
mounted at any other path arrived root-owned, the chown never reached it, and
with non-memory storage the container refused to start.
The root phase now re-owns the same directory the probe checks. The path is
resolved physically first and never re-owned when it resolves to /, since it
now comes from an environment variable.
* test(docker): make the chown helper prove the root phase completed
An empty chown log also results from a root phase that stops before the
privilege drop, so the 'skips a missing dir' case could pass for the wrong
reason. The helper now reports when the drop was never reached.
* fix(docker): resolve the persistent path without CDPATH
A relative FLOCI_STORAGE_PERSISTENT_PATH was resolved with cd, which searches
CDPATH and prints the directory it picks, so a set CDPATH could send the chown
to another directory or corrupt its argument. The resolution now clears it.
The test stub also records chown's full arguments, so the owner and the
recursive flag are asserted, not only the target.
* fix(docker): compare the persistent path to / by inode
bash keeps a leading // through cd -P and pwd -P, so the string test let
FLOCI_STORAGE_PERSISTENT_PATH=// reach a recursive chown on the native images,
which run bash as sh. -ef compares device and inode and holds in every shell,
and chown --preserve-root refuses / on its own as a second guard. The test
harness can now run the entrypoint under a chosen shell, and a bash case pins
the // spelling that dash alone cannot reach.
The Quarkus container build of the native binary failed on Apple Silicon with
GraalVM's BranchTargetOutOfBoundsException in a generated AwsQueryController
invoker (Quarkus 3.39 turns on -H:+AOTSingleCallsiteInline for Mandrel 25.0.4+),
and the packaged image died at startup because the builder links zlib
dynamically while ubi9-micro ships no libz.so.1. `make native` passes the same
flags CI does (-Ob,-H:-AOTSingleCallsiteInline), stages native/<arch>/ like the
workflow, and copies libz.so.1 from the builder image next to the binary, which
Dockerfile.native-package now puts on LD_LIBRARY_PATH.
The Makefile becomes the entry point for development: help (default), dev,
build, test T=, native (container build), native-host (host GraalVM/Mandrel,
adding the Mandrel-only flag when native-image reports Mandrel), run-native,
native-install (PREFIX, default ~/.local), native-image, native-up/native-down/
native-logs against a new docker/compose.native.yml overlay that carries the
five CI compat env vars, clean-sidecars, clean-volumes (a leftover ECR registry
volume is re-adopted on start and breaks the CDK bootstrap), compat SUITES= and
docker-tests. docker/run-docker-tests.sh gains FLOCI_START=0 and COMPAT_SUITES,
validated against the suite list, and its shell test covers both. Docs:
installation (native section rewritten), docker-images, CONTRIBUTING, AGENTS.
The image installs the AWS CLI with pip, which ships only v1, and v1 treats a parameter value
that looks like a URL as a pointer to fetch rather than as the value. awscli/paramfile.py reads
cli_follow_urlparam with a default of true, so an init hook in /etc/floci/init/ready.d putting
an SSM parameter such as MY_API_URL=https://example.com fails with "Unable to retrieve
https://example.com", and a hook that backgrounds its calls loses that silently.
AWS CLI v2 dropped the behaviour, so this never reproduces when the same script is run from a
host with v2 installed, only inside the image. Disabling the setting in the profile the image
bakes fixes it for every hook; setting it at runtime does not work, because aws configure set
writes to a root-owned file while hooks run after the entrypoint's privilege drop.
Mirrored into docker/Dockerfile.jvm-package, whose runtime stage is a copy of this one and is
pinned to it by DockerfileRuntimeParityTest.
* fix: enforce safe default network binding
* fix(config): keep signed test authority stable
Pin the integration-test listener to the existing all-interface test bind and
opt into that bind only in the test profile. This preserves localhost-based
SigV4 fixtures while production keeps the loopback default.
* fix(config): keep compat image backward compatible
* chore: retrigger CI
* fix(config): mirror JVM image network binding
* chore(docker): add Dockerfile.jvm-package for the local dev loop
docker/Dockerfile runs Maven inside the build, so it re-resolves every dependency and wants
a couple of gigabytes. Iterating on a change through it is slow and can fall over on a
machine with little headroom.
This is the JVM counterpart to Dockerfile.native-package: it consumes the target/quarkus-app
an ordinary ./mvnw package already produced, which takes seconds. The runtime half is
identical to stage 2 of docker/Dockerfile, which stays the canonical definition.
* fix(docker): mirror the canonical runtime stage in Dockerfile.jvm-package
The new file said it mirrored stage 2 of docker/Dockerfile and did not. It dropped the
EXPOSE 6379-6399 block, which exists for the docker-java compatibility workaround in #2095,
so an image that looked equivalent published a different port set to anything reading image
metadata for those dynamically assigned Redis and ElastiCache ports.
Two smaller divergences went with it: an explicit bash install, which is redundant because
eclipse-temurin:25-jre-noble already ships bash 5.2.21, and a cli_follow_urlparam setting
that belongs to the canonical file and is not there yet.
The runtime stanza is now a copy of the canonical one with exactly two lines changed, the
version default and where the application directory is copied from, and
DockerfileRuntimeParityTest holds it there: it compares the two stages line for line,
comments included, and allows only those two substitutions. Removing a single EXPOSE line
fails it with the line that drifted.
* feat(docs): add a service inventory reconciler and fix what it found
"How many AWS services does Floci support?" had no answer anyone could defend.
Every source in the repo gave a different number, and two of them were written
down and contradicted each other: docker/localstack-parity.sh said Floci starts
"all 41 services" while migrate-from-localstack.md said "all 58". Neither is
close: the catalog registers 124 descriptors today.
tools/docs/service_inventory.py reconciles the five keyspaces that each answer a
slightly different question, and explains every delta rather than picking a
number: catalog descriptors, the config plane (EmulatorConfig accessors against
application.yml keys), Java packages under services/, the docs pages, and the
service matrix. It reports 119 documented services, 127 distinct API surfaces and
124 signing endpoints, and says which to quote for which question. 27 tests cover
the normalisation and the delta arithmetic.
It also enforces the rule that made this necessary: never write a count into
README.md or docs/, link to the Service Matrix instead. So the two stale counts
are removed rather than corrected, and the parity script and migration guide now
say "every service".
Three services the README's category table omitted are added: Lambda MicroVMs,
Cognito Identity and Bedrock AgentCore Control, each backed by a descriptor or a
docs page.
Two service-matrix corrections the reconciler surfaced:
- The sso alias pointed at iam, so the matrix resolved Identity Center's admin
API to the IAM page's facet. ResolvedServiceCatalog registers
descriptor("sso", "ssoadmin", ...) and docs/services/ssoadmin.md is its own
page, so the alias now points there.
- Both bedrock-agentcore deferrals are retired. bedrock-agentcore.md exists now,
so that entry has served its purpose; bedrock-agentcore-control has no page and
never needed one, because the control plane owns the shared page, so it becomes
an alias instead of a deferral that would expire and need renewing. The
deferred list is now empty.
check_service_matrix.py --strict passes before and after, so the matrix changes
are tidy-up rather than a fix for a failing gate.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* docs: add the STS README row the inventory tool still reported
The tool's own output at the previous head listed STS as the one service
with a Service Matrix row but no README category-table entry, the same
gap this branch closed for Lambda MicroVMs, Cognito Identity and Bedrock
AgentCore Control. Add it next to IAM, so section 5 of the report now
shows zero missing rows.
Also drop the unused pathlib import from the inventory test.
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* feat(verifiedpermissions): add full service emulation
* fix(verifiedpermissions): harden OIDC and schema validation
* test(verifiedpermissions): add service layer coverage
* fix(verifiedpermissions): support native Cedar runtime
* fix(verifiedpermissions): package Cedar native FFI
* fix(verifiedpermissions): register Cedar deserializers for native
* fix(verifiedpermissions): bound JWKS refreshes
* fix(verifiedpermissions): avoid Cedar entity reflection
* fix(verifiedpermissions): register Cedar native reflection
* fix(verifiedpermissions): refresh rotated OIDC keys safely
* fix(verifiedpermissions): retry failed JWKS refreshes
* refactor(verifiedpermissions): isolate Cedar in sidecar
* fix(verifiedpermissions): harden Cedar sidecar runtime
* fix(verifiedpermissions): build cedar sidecar in compatibility CI
* fix(verifiedpermissions): remove stale cedar jni config
* fix(verifiedpermissions): recover cedar sidecar
* fix(verifiedpermissions): bound OIDC document responses
* fix(verifiedpermissions): start cedar sidecar in native sdk CI
* fix(docker): build the native image on arm64
Dockerfile.native compiles inside the Mandrel builder image and passed no
extra build arguments, so on arm64 the compile stage ended with
BranchTargetOutOfBoundsException. It was the only native build left in the
repository without -H:-AOTSingleCallsiteInline; the workflow native builds
have passed it since #3175.
That option inlines a method reached from exactly one call site whatever its
size. Each Query handler is reached from one switch case, each switch from one
handle(), and each handle() from the single AwsQueryController.dispatch call
site, so the generated REST invoker for dispatch grows to about 1.2 MB. An
aarch64 conditional branch reaches 1 MB and the aarch64 backend has no long
branch fallback, so the branch cannot be encoded. x86_64 reaches 2 GB, which
is why amd64 builds.
* fix(docker): copy libz into the native image so the runner starts
The builder image carries zlib as a shared library only, so native-image
links zlib dynamically and the runner needs libz.so.1 at run time. The
ubi9-micro runtime base does not ship it, so the image built from this
Dockerfile exited at once with "error while loading shared libraries:
libz.so.1". The build stage now copies the library across.
This is not architecture specific; amd64 has the same gap. The published
images are unaffected: their binaries are compiled on the CI runners, where
zlib is available as a static library and is compiled into the binary.
The AWS CLI v2 install ships 26 MB of `aws <command> help` example pages
that were never viewable in this image: help rendering needs groff or
mandoc and ubi9-minimal has neither, so `aws sqs help` already failed
before this change. Tab completion has no user inside a container either,
so aws_completer (9 MB), its ac.index database (21 MB) and the /usr/bin
symlink the installer creates go with it. The command reference the CLI
reads at run time (dist/awscli/data) stays.
pip and setuptools stay: the image documents pip and init hooks use it to
install packages. The system Python loses only build-time extras nothing
imports at run time: the optimised .pyc variants, lib2to3 and ensurepip
(removed with a python3 one-liner, ubi9-minimal has no find). awslocal's
mode is set in the COPY instead of a chmod layer.
Measured on arm64 on top of #3085: compat image 924 to 839 MB on disk,
214.0 to 197.7 MB gzip; /usr/local/aws-cli 264 to 209 MB. Verified: aws
2.36.24, `aws sqs list-queues` still resolves its model, pip3 installs a
package, boto3 1.42.97 import with json, ssl and sqlite3, awslocal, init
hooks calling all three, the container healthy in 5 s, and the four
endpoint-resolution checks compatibility.yml runs against this image.
* perf(docker): move the native image to ubi9-micro
The binary needs only libc, and since #3037 the entrypoint needs only
bash and coreutils. ubi9-micro has both at 7 MB compressed instead of
ubi9-minimal's 40 MB. Measured on arm64 with the nightly-09042026
binary: 109 MB to about 78 MB compressed, 313 MB to 229 MB uncompressed.
ubi9-micro has no useradd and no curl, so the user is one /etc/passwd
line and the healthcheck is a bash /dev/tcp probe. Dockerfile.native
gets the same runtime stage and loses its unused gosu tools stage.
Dockerfile.compat needs microdnf, so it now starts from ubi9-minimal
and copies /app out of the native image.
* chore(docker): share the health probe and split the compat tools stage
The bash health probe is now docker/healthcheck.sh, used by all three
Dockerfiles. Dockerfile.compat gets a version independent tools stage;
the aws CLI shim test and the cache warm job build target: tools, so
they pull no floci image and their cached layers stay stable. ARG
VERSION and the native RUN steps move so only the binary copy changes
between builds.
* fix(docker): copy healthcheck.sh into the compat image from the build context
* ci(compat): build the whole compat image on pull requests and check it starts healthy
The native image's tools layer installed shadow-utils, which ubi9-minimal
9.7 already ships, and downloaded a gosu binary: 19 MB on disk, 3.66 MB
compressed, byte-identical on every release since 1.5.34. The entrypoint
still starts as root and still grants the bind-mounted Docker socket's
group to the floci user, but through coreutils, which the base image has:
`chroot --userspec=1001:0 --groups=0,<socket gid> --skip-chdir /` drops to
uid 1001 with the socket's gid as a supplementary group. The group is
passed by number, so no /etc/group entry is needed, and --skip-chdir keeps
/app as the working directory where the relative ./data paths resolve. The
layer is now 24.6 kB (one useradd). The JVM Dockerfile drops its gosu
download too: the entrypoint is shared, so once it execs chroot nothing
there calls gosu. Floci's release and nightly pipelines never publish that
image; build-images.yml is a reusable workflow a fork invokes to publish its
own copy, and its noble base carries the same coreutils chroot flags.
Two inputs to the native build go with it, neither changing a byte:
--allow-incomplete-classpath and --report-unsupported-elements-at-runtime
have been no-ops since GraalVM 22.1 (Quarkus passes --link-at-build-time
itself, so a missing reachable class already fails the build), and the
brotli4j platform JNI jars are excluded from quarkus-rest-jackson because
Floci never enables Brotli compression and the jar was never embedded
(resource count unchanged at 197). A native build without them produces
the same 232.25 MB image and the same reachable set.
Verified on the arm64 image: uid=1001 gid=0; a socket owned by gid 999
yields groups=0,999 end to end; /app/data writable; argv fallthrough
intact; sdk-test-java compat suite 1,667/1,667 against the native image
with the socket mounted.
* fix(compat): shim aws to inject --endpoint-url from AWS_ENDPOINT_URL, add CI smoke test
* fix(compat): migrate to AWS CLI v2, drop the endpoint-url shim
---------
Co-authored-by: doraemon2200 <106516578+doraemon2200@users.noreply.github.com>
* ci: add reusable image publishing
Provide a workflow_call contract that builds native amd64 and arm64 artifacts and publishes native and compat multi-architecture images for an exact caller-selected source revision. Keep registry authority in the caller and return immutable digest references plus provenance for downstream tests.
* fix(docker): use glibc in JVM development image
Use an Ubuntu-based Java 25 runtime so the JVM image can host glibc-linked integrations while preserving the existing entrypoint, tooling, and architecture behavior.
* ci: publish JVM images by default
* fix(ci): harden reusable image builds
* docs(ci): clarify image registry input
* fix(docker): locate the installed AWS CLI
* fix(ci): tag images by build time and revision
Both native Dockerfiles wrote the ~196 MB binary into the image twice. A RUN that
renames or chmods a large file rewrites the whole file into a new layer, so the
published image carried two copies of it:
110 MB ubi9-minimal base
18.8 MB microdnf install
196 MB COPY --chown=1001:root native/<arch>/ /app/
196 MB RUN mv /app/*-runner /app/application && chmod +x /app/application
Set the mode in the COPY itself and move the rename out of the image and into the
build pipeline, which now stages the binary as native/<arch>/application.
Dockerfile.native does the same with a single COPY --chmod=755 --from=build.
Measured on linux/arm64 against floci/floci:1.5.34, with a 196 MB binary on both
sides so the comparison is like for like:
uncompressed 521 MB -> 325 MB
compressed 168 MB -> 104 MB (sum of gzip -6 layer blobs; Docker Hub
reports 166.1 MB for 1.5.34)
layers 8 -> 6
No behaviour change. The only filesystem difference in the resulting image is
quarkus-artifact.properties, now 0755 rather than 0644, because --chmod applies to
every file in the staged directory. /app and /app/data keep 0775 and uid 1001:0 for
arbitrary-uid (OpenShift) runs, and /app/application keeps 0755 — docker/entrypoint.sh
gates its default command on [ -x /app/application ].
When the persistent path is not writable (read-only or root-owned bind
mounts), S3Service's constructor failed lazily and every S3 request
surfaced as an opaque plain-text 500 that REST-XML SDK parsers cannot
read.
- validate the persistent path at boot and refuse to start with an
actionable error when any enabled service uses non-memory storage
- add class-scoped exception mappers so unhandled failures on S3 and
S3-Control routes render the S3 InternalError XML contract instead of
Quarkus's plain-text error page
- warn loudly from the container entrypoint when the state dir is not
writable by the runtime user
Fixes#1664
* fix(docker): enable TLS and sync docker test runner with compatibility workflow
The local docker compose stack ran without FLOCI_TLS_ENABLED and the EC2 mock,
and run-docker-tests.sh lacked the hot-reload bind mount, so the node TLS/WSS
suites and the Java Lambda hot-reload test failed locally while passing in CI.
Mirror the compatibility workflow's configuration so local runs exercise the
same setup.
* fix: remove FLOCI_SERVICES_EC2_MOCK from docker-compose
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* test(iot): wait for broker port release in MQTT lazy-startup test
Vert.x MqttServer.close() can resolve before the OS releases the listening
socket, so a connect immediately after stop() may still succeed. @BeforeEach
now polls until the port refuses connections before each test asserts the
broker is not listening, fixing the IotMqttLazyStartupIntegrationTest flake
under the full ordered suite that was failing CI on main.
* chore(release): set version to 1.5.28
Align pom.xml with the 1.5.28 release commit and CHANGELOG header; it had
been left at 1.6.0.
* ci: make run-docker-tests.sh executable
The compat test runner lacked the execute bit, so ./docker/run-docker-tests.sh
failed with permission denied (exit 126).
Replace the in-container GraalVM build (docker/Dockerfile.native) with a
runner build via graalvm/setup-graalvm + Maven cache, using the -Ob quick
build (appended so application.yml native args are preserved). The prebuilt
binary is packaged through docker/Dockerfile.native-package, matching the
nightly/release pipeline. Both jobs run on ubuntu-24.04-arm.
Drop the JVM build/compat-test jobs and run the full 8-test matrix against
the native image (porting the compat-cdk Docker-socket case). Remove the now
orphaned docker/Dockerfile.jvm-package.
* chore(docker): add OCI image metadata labels
Add OCI image spec labels to Dockerfile.native-package, Dockerfile.jvm-package,
and Dockerfile.compat so published images carry standard metadata.
Static labels (title, description, url, source, licenses, vendor) are baked into
the Dockerfiles and are present in every build including local ones. Dynamic labels
(version, revision, created) are injected at publish time via the labels: input of
build-push-action in release.yml and nightly.yml.
Closes#851
* chore: setting not opencontainers labels
*.s3.localhost.floci.io, *.localhost.localstack.cloud, and
*.s3.localhost.localstack.cloud as virtual-hosted style regardless of
FLOCI_HOSTNAME — fixes 405 when SDK uses endpointOverride("http://localhost:4566")
without forcePathStyle (closes#801)
- EmbeddedDnsServer ships localhost.localstack.cloud and localhost.floci.io
as built-in suffixes so spawned containers resolve these domains to Floci's
IP without extra config
- Compatibility test S3VirtualHostStyleTest covers the full virtual-host path
end-to-end; TestFixtures.s3VirtualHostClient() prefers s3.localhost.floci.io,
falls back to s3.localhost.localstack.cloud, or uses FLOCI_S3_VHOST_ENDPOINT
in Docker
- run-docker-tests.sh and compatibility.yml inject --dns <floci-ip> and
FLOCI_S3_VHOST_ENDPOINT=http://floci:4566 into test containers
- S3 and migrate-from-localstack docs updated with virtual-hosted style details
* feat: optional TLS/HTTPS support with self-signed certificate generation
- Add TlsConfigSource (MicroProfile ConfigSource SPI) that injects Quarkus
TLS properties before the HTTP server starts
- Auto-generate self-signed certificates with correct SANs including custom
hostnames from FLOCI_HOSTNAME and FLOCI_BASE_URL
- Persist certificate metadata for change detection across restarts
- Fix CertificateGenerator to encode IP addresses as iPAddress SANs (RFC 5280)
- Serve HTTP + HTTPS simultaneously (LocalStack parity)
- Support user-provided certificates via FLOCI_TLS_CERT_PATH/KEY_PATH
- Add TLS configuration documentation
- Add Node.js SDK compatibility test for HTTPS connectivity
- Add comprehensive unit and integration tests (79 test cases)
Closes#711
* feat(tls): add TLS proxy server and WebSocket-over-TLS tests
- Add TlsProxyServer: TCP proxy on port 4566 that detects TLS ClientHello
and routes to HTTPS (4511) or HTTP (4510) backend accordingly
- Add apigatewayv2-websocket-tls.test.ts: WSS compatibility tests covering
connect/disconnect, route selection, broadcast, authorization,
@connections API, binary frames, and payload size limits
- Update CI workflow to enable FLOCI_TLS_ENABLED=true for compat tests
- Update sdk-test-node Dockerfile with NODE_TLS_REJECT_UNAUTHORIZED=0
- Update tls.test.ts for HTTPS SDK client tests
- Update README with WebSocket-over-TLS test documentation
* fix(tls): address review comments — LocalStack parity and floci.io SANs
- Add USE_SSL and CUSTOM_SSL_CERT_PATH mappings to localstack-parity.sh
- Add localhost.floci.io and *.localhost.floci.io to default certificate SANs
- Update affected tests and documentation
---------
Co-authored-by: Dixit R Jain <dixitrjain@Mac-379.lan>
Co-authored-by: Dixit R Jain <dixitrjain@Mac.lan>
* chore(docker): ship awslocal wrapper in the -compat image
bin/awslocal was added to the repo in #638 but is not COPYed into any of
the published Docker images. That makes existing LocalStack init scripts
mounted at /etc/localstack/init/ready.d/ — which overwhelmingly use
`awslocal kinesis …` rather than `aws --endpoint-url=… kinesis …` —
fail with "command not found" on the supposedly drop-in -compat image.
The script also needed an entry in .dockerignore: the file is allow-list
style ("*" + "!path") and bin/awslocal was not in the allow list, so it
never reached the build context. Without that line the COPY fails with
"file not found in build context".
Closes#744. The orthogonal SQS endpoint-resolver issue tracked in #745
is unaffected by this change — awslocal as written only exports
AWS_ENDPOINT_URL, which the bundled botocore silently ignores for SQS.
* fix(awslocal): pass --endpoint-url explicitly to honor hard-pin contract
LocalStack's awslocal idiom is "hard-pin the endpoint" — that's the whole
point of the wrapper. Setting AWS_ENDPOINT_URL alone is not sufficient:
the bundled aws-cli/1.44.87 + botocore/1.42.97 silently bypasses the env
var for SQS via service-specific endpoint resolvers, sending requests
to public AWS. With real credentials in CI/dev, that would silently
provision real SQS queues — surfacing as the InvalidClientTokenId error
documented in #745.
Inject --endpoint-url before "$@" so the user's own --endpoint-url (if
any) still wins via last-flag-wins. Verified: awslocal sqs create-queue
and list-queues now route to Floci; kinesis/s3 still work; awslocal env
subcommand unaffected; user override behaves correctly.
Addresses Copilot's review feedback on #746 and the awslocal arm of #745.
- Translate LocalStack env vars (LOCALSTACK_HOST, PERSISTENCE, LAMBDA_DOCKER_NETWORK, etc.)
to Floci equivalents automatically at startup; opt out with LOCALSTACK_PARITY=false
- Serve /_localstack/init and /_localstack/health alongside /_floci/* equivalents
- Report executed scripts with path, state, and return_code in /_floci/init response
- Add /_aws/sqs/messages GET (non-destructive peek) and DELETE (purge) inspection endpoint
- Add /_aws/execute-api/{apiId}/{stageName} LocalStack-compat path for REST API invocation
- Add four-phase init hook lifecycle (boot/start/ready/stop) with dual-path discovery
(/etc/floci/init/ and /etc/localstack/init/ compat paths)
- Install Python 3, AWS CLI, boto3 in standard image; wrap aws binary to pre-configure
--endpoint-url=http://localhost:4566 so init scripts need no extra flags
- Wire entrypoint.sh + gosu privilege drop into all Dockerfile variants
- Add migration guide and update README, docker-compose, docker-images, SQS, and
initialization-hooks docs
The published images run as USER 1001 with primary group root. On Docker
Desktop (macOS/Windows) /var/run/docker.sock is owned root:root inside
containers so the floci process can open it via the group-0 bit, but on
native Linux Docker (and Rootless/Podman) the socket is owned by
root:<docker-group> with mode 660 — and the floci user is not a member
of that group. This silently breaks ECR, Lambda, and RDS service
emulation on those hosts: floci's docker-java client gets BindException
/ SocketException and reports CREATE_FAILED on AWS::ECR::Repository.
Fix: ship a docker/entrypoint.sh modeled on the docker-library/postgres
pattern. It starts as root, stats the bind-mounted socket to learn the
host's docker GID, ensures a group with that GID exists, adds the floci
user to it, then `exec gosu floci` re-execs the same script as uid 1001
with the supplementary group set. The 'if id -u == 0' guard means
downstream `user:` overrides in compose files keep working unchanged.
Verified end-to-end on native Linux (Pop!_OS, docker GID 999) using a
minimal CDK bootstrap repro: AWS::ECR::Repository goes from CREATE_FAILED
to CREATE_COMPLETE and the registry:2 sidecar comes up cleanly. pid 1
runs as Uid:1001 Gid:0 Groups:999.
Implementation notes:
- All three Dockerfiles keep their original base images
(quarkus-micro-image, ubi9-minimal, eclipse-temurin alpine).
- Dockerfile.native gains a tools builder stage that uses the canonical
Red Hat pattern (`dnf install --installroot`) to install shadow-utils
into a stagable /toolsroot, which the runtime stage wholesale-copies
into quarkus-micro-image. Image growth: ~42 MB (quarkus-micro has no
package manager and lacks groupadd/usermod by itself).
- Dockerfile.native-package adds shadow-utils via microdnf (already had
the package manager).
- Dockerfile.jvm-package adds shadow + ca-certificates via apk so the
entrypoint can use the same useradd/groupadd/usermod syntax across
all three image variants.
- gosu 1.17 is downloaded and SHA256-pinned (rather than GPG-verified
as Postgres does) to avoid pulling gnupg2 into the runtime layers
and to sidestep a gpgme dependency conflict in ubi9-minimal.