mirror of
https://github.com/floci-io/floci.git
synced 2026-12-06 11:38:06 -05:00
With TLS on, every launched container got AWS_ENDPOINT_URL and FLOCI_ENDPOINT as http://<host>:<port>, so the SDK in a Lambda function presigned http URLs, which a page served over https cannot use. On AWS a function's SDK talks https and presigns https. A Lambda function on a managed runtime (not provided.*, not a container image), launched in Docker, now names Floci over https when the server certificate names the host it reaches Floci by. ContainerBuilder gains withHttpsFlociEndpoint, and ContainerLifecycleManager switches the two variables to https only once the container trusts Floci's CA: - the CA bundle went in (a failed copy recreates the container with the spec's own environment, which stays http); - the Java trust store went in too when the spec asked for one; - no trust store of the container's own replaces Floci's: none of the bundle's variables in its environment, and no javax.net.ssl.trustStore in JAVA_TOOL_OPTIONS, JDK_JAVA_OPTIONS or _JAVA_OPTIONS, the container's own or, for a variable it does not set, its image's. Only Floci's own entry for each variable is switched, the first, so an endpoint the function sets itself, which comes after it and wins, is kept, even one naming Floci over http. Custom runtimes and container images keep http, since their binary may read none of the trust variables, and so do the process launcher, Kubernetes pods and every other launcher, whose containers run images the user chose. Closes #9228