feat(apigateway): trust FLOCI_TLS_EXTRA_CA_PATH for HTTP and HTTP_PROXY integrations (#8285)

This commit is contained in:
Saim Zaib authored and GitHub committed 2026-11-14 10:45:45 -04:00
1 parent fdb2d7fe44
commit b2bdb2bbe9
20 files changed
+263 -33

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@ exposed headers. The disable-CORS switch above also disables this behavior.
| `FLOCI_TLS_ENABLED` | `false` | Enable TLS/HTTPS on all endpoints (HTTP remains available simultaneously) |
| `FLOCI_TLS_CERT_PATH` | _(none)_ | Path to a PEM certificate file. When set, disables auto-generation |
| `FLOCI_TLS_KEY_PATH` | _(none)_ | Path to a PEM private key file. Required when `FLOCI_TLS_CERT_PATH` is set |
| `FLOCI_TLS_EXTRA_CA_PATH` | _(none)_ | Path to a PEM file of extra CA certificates that Floci's own outbound HTTPS clients (EventBridge API destinations, SNS HTTPS subscriptions, JWT issuer fetch) trust on top of the JVM's roots. Works with TLS on or off; containers Floci launches do not receive them |
| `FLOCI_TLS_EXTRA_CA_PATH` | _(none)_ | Path to a PEM file of extra CA certificates that Floci's own outbound HTTPS clients (EventBridge API destinations, SNS HTTPS subscriptions, API Gateway HTTP and HTTP_PROXY integrations, JWT issuer fetch) trust on top of the JVM's roots. Works with TLS on or off; containers Floci launches do not receive them |
| `FLOCI_TLS_SELF_SIGNED` | `true` | Auto-generate and persist a server certificate signed by Floci's local CA when no cert/key paths are provided |
See [TLS / HTTPS](./tls.md) for SDK configuration examples and WebSocket (`wss://`) support.
+2 -2
View File
@@ -128,7 +128,7 @@ When custom certificate paths are provided, `FLOCI_TLS_SELF_SIGNED` is ignored a
## Trusting Your Own CAs for Outbound Calls
Some calls go out from Floci itself: an EventBridge API destination delivering an event, SNS posting to an HTTPS subscription, or Floci fetching a JWT issuer's keys. When the endpoint's certificate is issued by a private or corporate CA, Floci refuses it by default, because Floci trusts only the root CAs built into its Java runtime. Floci does not read the operating system's trust store, so adding the CA there (`update-ca-trust`, `update-ca-certificates`) has no effect.
Some calls go out from Floci itself: an EventBridge API destination delivering an event, SNS posting to an HTTPS subscription, an API Gateway HTTP or HTTP_PROXY integration calling its backend, or Floci fetching a JWT issuer's keys. When the endpoint's certificate is issued by a private or corporate CA, Floci refuses it by default, because Floci trusts only the root CAs built into its Java runtime. Floci does not read the operating system's trust store, so adding the CA there (`update-ca-trust`, `update-ca-certificates`) has no effect.
Point `FLOCI_TLS_EXTRA_CA_PATH` (config key `floci.tls.extra-ca-path`) at a PEM file holding those CA certificates:
@@ -145,7 +145,7 @@ services:
- It works whether or not `FLOCI_TLS_ENABLED` is set. Floci does not need to serve HTTPS itself.
- The CAs are added to what Floci already trusts: the JVM's root CAs, and Floci's own CA when TLS is enabled. Public endpoints keep working.
- Floci's own clients that use them: EventBridge API destination delivery, SNS HTTPS subscriptions (the subscription confirmation and notification delivery), and the JWT issuer fetch for HTTP API JWT authorizers and AppSync OIDC providers.
- Floci's own clients that use them: EventBridge API destination delivery, SNS HTTPS subscriptions (the subscription confirmation and notification delivery), API Gateway HTTP and HTTP_PROXY integrations (REST, HTTP and WebSocket APIs), and the JWT issuer fetch for HTTP API JWT authorizers and AppSync OIDC providers.
- Containers Floci launches do not receive these CAs. They keep `/etc/floci-ca-bundle.pem` exactly as described in [Containers Floci Launches](#containers-floci-launches); a workload that calls such an endpoint itself configures its own CAs.
- The file may hold several certificates. A private key kept in it is ignored.
- A file that is missing, unreadable, or holds no certificate stops Floci at startup with a message naming the path, however the setting is given.