mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
With TLS on, every container Floci launches gets the CA bundle and the SSL_CERT_FILE family of variables, but the JVM reads none of them. So in the docker runner mode a Spark job's own SDK clients that ignore AWS_ENDPOINT_URL, the AWS SDK for Java 1.x's or an older 2.x's, failed with "PKIX path building failed" against Floci's HTTPS, even with FLOCI_DNS_SPOOF_AWS_ENDPOINTS sending AWS's endpoint names to Floci. A job could only reach Floci over its HTTP endpoint. Floci now also writes the bundle's certificates as a PKCS12 trust store at boot, floci-ca-bundle.p12 beside the bundle. A launcher whose workload is Java can copy it into a container before the container starts (ContainerLifecycleManager.copyJavaTrustStore) and point the container's JVMs at it through JAVA_TOOL_OPTIONS, with a shell line that does so only when the file is there. The store has no password and the line gives only its path, so a trust store a job or an image names itself replaces Floci's, with that store's own type and password. EMR Serverless job runs and EMR steps copy it into the driver's container ahead of spark-submit or the step's command, and the bootstrap actions' container gets it for its actions, then drops it before the image is kept. Other services' containers are unchanged. JAVA_TOOL_OPTIONS rather than spark.driver.extraJavaOptions, since setting that key would replace what the image's spark-defaults.conf gives it, and a job's own value would drop Floci's. Each JVM prints "Picked up JAVA_TOOL_OPTIONS: ..." on its standard error, as the docs now say.