* 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.