feat(tls): serve HTTPS on 443 and trust Floci's cert in Lambda containers (#1595)

* feat(lambda): trust Floci's TLS cert and serve HTTPS on 443 for CDK callbacks

CDK/CloudFormation custom resources (LogRetention, the provider framework,
AwsCustomResource, ...) PUT their result to the cfn-response ResponseURL using
aws-cdk-lib's bundled cfn-response code. That code parses only the URL's hostname
and path and then calls require("https").request(...) — it ignores the scheme and
port. So even though Floci hands the resource an http://...:4566 ResponseURL, the
callback always goes to https://<host>:443. Against Floci that fails — so every
custom resource rolls back, even though its own AWS SDK calls (on 4566) succeed.

This makes Floci reachable, and trusted, where the callback actually connects,
without touching the CDK-owned handler:

- TlsProxyServer binds the same protocol-detecting handler on a configurable
  floci.tls.aws-https-port (default 443, 0 to disable, deduped against the public
  port) in addition to the public Floci port. The first byte still selects the
  HTTP (4510) or HTTPS (4511) backend, so 443 serves both like the main port.

- CertificateGenerator gains generateSelfSignedCertificate(): a genuinely
  self-signed cert (issuer == subject, CA:true, keyCertSign) that can be a trust
  anchor. The existing generateCertificate() is unchanged — it still stamps the
  cosmetic Amazon issuer DN for ACM realism, which is NOT verifiable as an anchor.
  TlsConfigSource now uses the self-signed variant for Floci's HTTPS cert and
  regenerates legacy non-self-signed certs on upgrade.

- ContainerLauncher, when TLS is enabled, copies Floci's CA certificate into each
  Lambda container at /etc/floci-ca.crt and sets NODE_EXTRA_CA_CERTS, AWS_CA_BUNDLE,
  SSL_CERT_FILE and REQUESTS_CA_BUNDLE so the container trusts Floci's HTTPS
  endpoint. NODE_EXTRA_CA_CERTS adds to Node's built-in CAs, so public TLS still
  works.

All behaviors are gated on floci.tls.enabled (default false); non-TLS setups are
unchanged.

* fix(tls): guard TlsConfig access in launcher tests and soften 443 bind log

CI surfaced 18 NPEs in the existing ContainerLauncherTest and LambdaImageConfigTest:
ContainerLauncher.launch() now reads config.tls().enabled(), but those tests mock
EmulatorConfig without stubbing tls() (returns null). Fixes:
- launch() short-circuits so cert-path/storage config is only read when TLS is enabled.
- Both tests stub config.tls() with a TlsConfig whose enabled() is false.
- TlsProxyServer logs a failed bind of the extra AWS-HTTPS port (443, privileged) at
  WARN instead of ERROR — it is expected and non-fatal in unprivileged envs (CI/test);
  the public port still errors loudly.

* fix(tls): don't replace the Lambda's CA bundle; warn on a non-CA cert

flociCaEnv set SSL_CERT_FILE and REQUESTS_CA_BUNDLE to Floci's cert, which
REPLACE the OpenSSL / Python-requests trust store with only that cert — so a
Lambda's external HTTPS calls (curl, openssl, requests/botocore) to anything but
Floci failed certificate verification. Inject only the appending/AWS-scoped vars:
NODE_EXTRA_CA_CERTS (adds to Node's CAs) and AWS_CA_BUNDLE (AWS-SDK traffic is
redirected to Floci via AWS_ENDPOINT_URL anyway).

resolveFlociCaCertPath injects the resolved cert into containers as a trust
anchor (CA). A user-supplied floci.tls.cert-path pointing at a leaf/server cert
only pins that exact certificate; document that and log a warning when the
configured cert is not a self-signed CA (issuer != subject or no BasicConstraints
CA:true), via the new isSelfSignedCaCertificate helper.

Updates ContainerLauncherCaTrustTest for the trimmed env set and adds coverage
for self-signed-CA vs leaf-cert detection.
This commit is contained in:
Alex Banna authored and GitHub committed 2026-07-01 21:29:05 -05:00
1 parent dec3b6366e
commit 6223fc4a02
12 files changed
+653 -44

No files matched your search

@@ -1342,6 +1342,23 @@ public interface EmulatorConfig {
*/
@WithDefault("true")
boolean selfSigned();
/**
* Additional port the TLS proxy binds for AWS-style HTTPS traffic, alongside the
* public Floci {@link EmulatorConfig#port()}.
*
* <p>CDK/CloudFormation custom resources send their {@code cfn-response} callback with
* bundled code that hardcodes {@code https://} and ignores the port in the ResponseURL,
* so the PUT lands on the conventional 443 regardless of Floci's configured port. Binding
* 443 here (with the same HTTP/HTTPS protocol detection used on the main port) lets those
* callbacks — and any other client that assumes AWS lives on 443 — reach Floci.
*
* <p>Default {@code 443}. Set to {@code 0} to disable the extra binding (e.g. when Floci
* runs unprivileged or another process owns 443). When equal to {@link EmulatorConfig#port()}
* only a single listener is started. Env: FLOCI_TLS_AWS_HTTPS_PORT
*/
@WithDefault("443")
int awsHttpsPort();
}
/**
@@ -12,6 +12,7 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashSet;
@@ -80,9 +81,10 @@ public class TlsConfigSource implements ConfigSource {
"localhost.floci.io", "*.localhost.floci.io"));
currentHostnames.addAll(customHostnames);
// Check if hostname configuration has changed
if (hostnameConfigChanged(tlsDir, currentHostnames)) {
// Configuration changed or metadata missing - regenerate certificate
// Regenerate when the hostname config changed, or when the existing certificate
// is a legacy non-self-signed cert (issuer != subject) — those cannot serve as a
// trust anchor for clients that install them, so an upgrade must replace them.
if (hostnameConfigChanged(tlsDir, currentHostnames) || !isSelfSigned(certFile)) {
generateSelfSignedCert(tlsDir, certFile, keyFile);
} else {
// Configuration unchanged - reuse existing certificate
@@ -173,7 +175,7 @@ public class TlsConfigSource implements ConfigSource {
allSans.addAll(customHostnames);
CertificateGenerator gen = new CertificateGenerator();
CertificateGenerator.GeneratedCertificate generated = gen.generateCertificate(
CertificateGenerator.GeneratedCertificate generated = gen.generateSelfSignedCertificate(
"localhost",
allSans,
KeyAlgorithm.RSA_2048);
@@ -197,6 +199,21 @@ public class TlsConfigSource implements ConfigSource {
}
}
/**
* Returns {@code true} if the certificate at {@code certFile} is genuinely self-signed
* (issuer == subject) and therefore usable as a trust anchor. Legacy Floci certs carried a
* cosmetic Amazon issuer DN and return {@code false} here, triggering regeneration on upgrade.
*/
private boolean isSelfSigned(Path certFile) {
try {
X509Certificate cert = new CertificateGenerator().parseCertificate(Files.readString(certFile));
return cert.getIssuerX500Principal().equals(cert.getSubjectX500Principal());
} catch (Exception e) {
LOG.warnv("TLS: could not inspect existing certificate ({0}); regenerating", e.getMessage());
return false;
}
}
/**
* Extracts custom hostnames from FLOCI_HOSTNAME and FLOCI_BASE_URL configuration.
* Filters out default values like "localhost" and "127.0.0.1".
@@ -1,6 +1,7 @@
package io.github.hectorvent.floci.config;
import io.quarkus.runtime.Startup;
import io.vertx.core.Handler;
import io.vertx.core.Vertx;
import io.vertx.core.net.NetClient;
import io.vertx.core.net.NetServer;
@@ -11,6 +12,11 @@ import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import org.jboss.logging.Logger;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
/**
* A TCP proxy server that enables HTTP and HTTPS on the same port (LocalStack parity).
*
@@ -26,6 +32,12 @@ import org.jboss.logging.Logger;
* behavior where both {@code http://localhost:4566} and {@code https://localhost:4566}
* work simultaneously.
*
* <p>The same protocol-detecting handler is also bound on the configurable
* {@code floci.tls.aws-https-port} (443 by default). CDK/CloudFormation custom-resource
* {@code cfn-response} callbacks hardcode {@code https://} and ignore the ResponseURL port,
* so they PUT to 443 regardless of Floci's configured port; binding 443 lets those callbacks
* reach Floci. The extra binding is skipped when the port is {@code 0} or equals the public port.
*
* <p>This bean is only active when {@code floci.tls.enabled=true}. When TLS is disabled,
* Quarkus serves HTTP directly on port 4566 and this proxy is not started.
*/
@@ -43,13 +55,22 @@ public class TlsProxyServer {
private final Vertx vertx;
private final EmulatorConfig config;
private NetServer proxyServer;
private final int httpBackendPort;
private final int httpsBackendPort;
private final List<NetServer> proxyServers = new ArrayList<>();
private NetClient client;
@Inject
public TlsProxyServer(Vertx vertx, EmulatorConfig config) {
this(vertx, config, HTTP_BACKEND_PORT, HTTPS_BACKEND_PORT);
}
/** Visible for testing — lets tests point the proxy at backends on non-default ports. */
TlsProxyServer(Vertx vertx, EmulatorConfig config, int httpBackendPort, int httpsBackendPort) {
this.vertx = vertx;
this.config = config;
this.httpBackendPort = httpBackendPort;
this.httpsBackendPort = httpsBackendPort;
startIfTlsEnabled();
}
@@ -58,15 +79,57 @@ public class TlsProxyServer {
return;
}
int publicPort = config.port();
NetServerOptions options = new NetServerOptions()
.setHost("0.0.0.0")
.setPort(publicPort);
proxyServer = vertx.createNetServer(options);
client = vertx.createNetClient();
Handler<NetSocket> connectHandler = buildConnectHandler();
proxyServer.connectHandler(frontSocket -> {
for (int port : listenPorts()) {
NetServerOptions options = new NetServerOptions()
.setHost("0.0.0.0")
.setPort(port);
NetServer server = vertx.createNetServer(options);
server.connectHandler(connectHandler);
proxyServers.add(server);
server.listen().onComplete(ar -> {
if (ar.succeeded()) {
LOG.infov("TLS proxy: listening on port {0} (HTTP→{1}, HTTPS→{2})",
String.valueOf(port), String.valueOf(httpBackendPort), String.valueOf(httpsBackendPort));
} else if (port == config.port()) {
LOG.errorv("TLS proxy: failed to start on public port {0}: {1}",
String.valueOf(port), ar.cause().getMessage());
} else {
// The extra AWS-HTTPS port (443 by default) is privileged; binding it fails in
// unprivileged environments (e.g. CI/test). Non-fatal — HTTPS on that port is
// simply unavailable. Set floci.tls.aws-https-port=0 to skip the attempt.
LOG.warnv("TLS proxy: could not bind AWS-HTTPS port {0} ({1}); HTTPS on {0} unavailable. "
+ "Binding privileged ports needs elevated privileges — set floci.tls.aws-https-port=0 to disable.",
String.valueOf(port), ar.cause().getMessage());
}
});
}
}
/**
* The set of ports the proxy listens on: always the public Floci {@link EmulatorConfig#port()},
* plus {@code floci.tls.aws-https-port} (443 by default) so AWS-style HTTPS callbacks reach
* Floci. Deduplicated (a coinciding aws-https-port yields a single listener); a non-positive
* aws-https-port disables the extra binding.
*/
Set<Integer> listenPorts() {
Set<Integer> ports = new LinkedHashSet<>();
ports.add(config.port());
int awsHttpsPort = config.tls().awsHttpsPort();
if (awsHttpsPort > 0) {
ports.add(awsHttpsPort);
}
return ports;
}
/**
* Builds the shared connect handler that peeks the first byte to detect TLS and pipes the
* connection to the matching backend. A single instance is reused across all listen ports.
*/
private Handler<NetSocket> buildConnectHandler() {
return frontSocket -> {
// Pause incoming data until we've peeked at the first byte
frontSocket.pause();
@@ -79,9 +142,9 @@ public class TlsProxyServer {
// Inspect first byte to determine protocol
int backendPort;
if (buffer.length() > 0 && buffer.getByte(0) == TLS_HANDSHAKE) {
backendPort = HTTPS_BACKEND_PORT;
backendPort = httpsBackendPort;
} else {
backendPort = HTTP_BACKEND_PORT;
backendPort = httpBackendPort;
}
// Connect to the appropriate backend
@@ -108,23 +171,13 @@ public class TlsProxyServer {
// Resume to receive the first buffer
frontSocket.resume();
});
proxyServer.listen().onComplete(ar -> {
if (ar.succeeded()) {
LOG.infov("TLS proxy: listening on port {0} (HTTP→{1}, HTTPS→{2})",
String.valueOf(publicPort), String.valueOf(HTTP_BACKEND_PORT), String.valueOf(HTTPS_BACKEND_PORT));
} else {
LOG.errorv("TLS proxy: failed to start on port {0}: {1}",
String.valueOf(publicPort), ar.cause().getMessage());
}
});
};
}
@PreDestroy
void stop() {
if (proxyServer != null) {
proxyServer.close();
for (NetServer server : proxyServers) {
server.close();
}
if (client != null) {
client.close();
@@ -73,13 +73,33 @@ public class CertificateGenerator {
) {}
/**
* Generates a self-signed X.509 certificate for local emulation.
* Generates a certificate for local emulation that mimics an ACM-issued certificate:
* the subject is {@code CN=<domainName>} but the issuer is a cosmetic Amazon CA DN, matching
* what real ACM returns. It is signed by its own key, so it is <em>not</em> verifiable as a
* trust anchor (the issuer DN does not match any certificate a client could hold). Use this
* for ACM responses; use {@link #generateSelfSignedCertificate} for a cert clients must trust.
*
* <p>Note: RSA key generation (especially 4096-bit) can take 100-500ms.
* In production emulator usage, consider moving this to a worker thread
* or using virtual threads for concurrent certificate generation.</p>
*/
public GeneratedCertificate generateCertificate(String domainName, List<String> sans, KeyAlgorithm keyAlgorithm) {
return buildCertificate(domainName, sans, keyAlgorithm, ISSUER_DN, false);
}
/**
* Generates a genuinely self-signed certificate (issuer == subject, marked as a CA) suitable
* for use as a <em>trust anchor</em>: a client that adds this certificate to its CA store can
* verify a TLS connection that presents it. Used for Floci's own HTTPS server certificate so
* that containers (e.g. Lambdas making CDK {@code cfn-response} callbacks over HTTPS) can trust
* Floci once the certificate is installed in their CA bundle.
*/
public GeneratedCertificate generateSelfSignedCertificate(String domainName, List<String> sans, KeyAlgorithm keyAlgorithm) {
return buildCertificate(domainName, sans, keyAlgorithm, "CN=" + domainName, true);
}
private GeneratedCertificate buildCertificate(String domainName, List<String> sans, KeyAlgorithm keyAlgorithm,
String issuerDn, boolean asCa) {
try {
KeyPair keyPair = generateKeyPair(keyAlgorithm);
@@ -90,7 +110,7 @@ public class CertificateGenerator {
BigInteger serial = new BigInteger(128, SECURE_RANDOM);
String subjectDn = "CN=" + domainName;
X500Name issuer = new X500Name(ISSUER_DN);
X500Name issuer = new X500Name(issuerDn);
X500Name subject = new X500Name(subjectDn);
String signatureAlgorithm = keyAlgorithm.getAlgorithm().equals("EC")
@@ -119,22 +139,20 @@ public class CertificateGenerator {
GeneralNames generalNames = new GeneralNames(sanList.toArray(new GeneralName[0]));
certBuilder.addExtension(Extension.subjectAlternativeName, false, generalNames);
// Add Key Usage
certBuilder.addExtension(
Extension.keyUsage,
true,
new KeyUsage(KeyUsage.digitalSignature | KeyUsage.keyEncipherment)
);
// Add Key Usage — a trust-anchor self-signed cert also needs keyCertSign so it can
// act as its own issuer; an ACM-style leaf only needs digitalSignature/keyEncipherment.
int keyUsageBits = KeyUsage.digitalSignature | KeyUsage.keyEncipherment;
if (asCa) {
keyUsageBits |= KeyUsage.keyCertSign;
}
certBuilder.addExtension(Extension.keyUsage, true, new KeyUsage(keyUsageBits));
// Add Basic Constraints (not a CA)
certBuilder.addExtension(
Extension.basicConstraints,
true,
new BasicConstraints(false)
);
// Add Basic Constraints — a trust anchor must be a CA so clients accept it as one.
certBuilder.addExtension(Extension.basicConstraints, true, new BasicConstraints(asCa));
// Self-signed certificate for local emulation - signed with subject's own private key
// Real AWS ACM certificates are signed by Amazon's CA hierarchy
// Signed with the subject's own private key. For generateCertificate() the issuer DN is
// a cosmetic Amazon DN (mimicking ACM); for generateSelfSignedCertificate() issuer ==
// subject, so the cert is a valid self-signed trust anchor.
ContentSigner signer = new JcaContentSignerBuilder(signatureAlgorithm)
.setProvider(BouncyCastleProvider.PROVIDER_NAME)
.build(keyPair.getPrivate());
@@ -154,7 +172,7 @@ public class CertificateGenerator {
notBefore,
notAfter,
subjectDn,
ISSUER_DN,
issuerDn,
signatureAlgorithm
);
@@ -24,9 +24,12 @@ import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
@@ -51,6 +54,17 @@ public class ContainerLauncher {
private static final String TASK_DIR = "/var/task";
private static final String RUNTIME_DIR = "/var/runtime";
/**
* In-container location of Floci's CA certificate, injected when TLS is enabled so the
* container trusts Floci's self-signed HTTPS endpoint. {@code /etc} exists in every Lambda
* base image, so no directory needs to be created.
*/
private static final String FLOCI_CA_DIR = "/etc";
private static final String FLOCI_CA_FILE_NAME = "floci-ca.crt";
private static final String FLOCI_CA_CONTAINER_PATH = FLOCI_CA_DIR + "/" + FLOCI_CA_FILE_NAME;
/** Self-signed cert filename produced by {@code TlsConfigSource} under {persistent-path}/tls/. */
private static final String SELF_SIGNED_CERT_NAME = "floci-selfsigned.crt";
private static final DateTimeFormatter LOG_STREAM_DATE_FMT = DateTimeFormatter.ofPattern("yyyy/MM/dd");
private final ContainerBuilder containerBuilder;
@@ -158,6 +172,13 @@ public class ContainerLauncher {
String flociEndpoint = reachableEndpoint.baseUrl();
String flociHostname = java.net.URI.create(flociEndpoint).getHost();
// When TLS is on, the container must trust Floci's self-signed cert so HTTPS callbacks
// to Floci succeed (e.g. a CDK custom resource's cfn-response, which hardcodes https://).
// Short-circuit when TLS is off so cert-path/storage config isn't read needlessly.
Optional<Path> flociCaCert = config.tls().enabled()
? resolveFlociCaCertPath(true, config.tls().certPath(), config.storage().persistentPath())
: Optional.empty();
// Build env vars
List<String> env = new ArrayList<>();
env.add("AWS_LAMBDA_RUNTIME_API=" + runtimeApiEndpoint);
@@ -191,6 +212,7 @@ public class ContainerLauncher {
env.add("FLOCI_HOSTNAME=" + flociHostname);
env.add("FLOCI_ENDPOINT=" + flociEndpoint);
env.add("AWS_ENDPOINT_URL=" + flociEndpoint);
env.addAll(flociCaEnv(flociCaCert));
if (fn.getEnvironment() != null) {
fn.getEnvironment().forEach((k, v) -> env.add(k + "=" + v));
}
@@ -279,6 +301,12 @@ public class ContainerLauncher {
}
}
// 4. Copy Floci's CA cert so the container trusts Floci's HTTPS endpoint (TLS mode).
// Placed before start so NODE_EXTRA_CA_CERTS et al. resolve at runtime init.
flociCaCert.ifPresent(certPath ->
copyFileToContainer(dockerClient, containerId, certPath,
FLOCI_CA_DIR, FLOCI_CA_FILE_NAME, fn.getFunctionName()));
// Now start the container with code in place
lifecycleManager.startCreated(containerId, spec);
@@ -376,6 +404,83 @@ public class ContainerLauncher {
return runtime != null && runtime.startsWith("provided");
}
/**
* Resolves the host path of Floci's CA certificate to inject into Lambda containers, or
* empty when TLS is disabled or no readable certificate exists. Mirrors {@code TlsConfigSource}:
* a user-provided {@code floci.tls.cert-path} wins; otherwise the self-signed cert under
* {@code {persistent-path}/tls/}.
*
* <p>The resolved certificate is injected into containers as a <em>trust anchor</em> (CA), so it
* should be a self-signed CA certificate. The auto-generated Floci cert is one; a user-supplied
* {@code floci.tls.cert-path} that points at a leaf/server certificate is accepted but only pins
* that exact certificate (it cannot validate a chain it signs), so a warning is logged.
*/
static Optional<Path> resolveFlociCaCertPath(boolean tlsEnabled, Optional<String> userCertPath,
String persistentPath) {
if (!tlsEnabled) {
return Optional.empty();
}
Optional<String> trimmedUserPath = userCertPath.filter(s -> !s.isBlank());
Path certPath = trimmedUserPath
.map(Path::of)
.orElseGet(() -> Path.of(persistentPath, "tls", SELF_SIGNED_CERT_NAME));
if (!Files.isReadable(certPath)) {
LOG.warnv("TLS enabled but Floci CA certificate not readable at {0}; "
+ "Lambda containers will not trust Floci HTTPS callbacks", certPath);
return Optional.empty();
}
if (trimmedUserPath.isPresent() && !isSelfSignedCaCertificate(certPath)) {
LOG.warnv("Configured floci.tls.cert-path {0} is not a self-signed CA certificate; it is "
+ "injected into Lambda containers as a trust anchor (CA), which only validates "
+ "this exact certificate and not a chain it signs. Provide a self-signed CA "
+ "certificate for reliable HTTPS callbacks.", certPath);
}
return Optional.of(certPath);
}
/**
* Returns {@code true} only if {@code certPath} holds a genuinely self-signed CA certificate
* (issuer == subject and BasicConstraints {@code CA:true}) — the form usable as a trust anchor.
* A leaf/server certificate, or one that cannot be read/parsed as X.509, returns {@code false}.
*/
static boolean isSelfSignedCaCertificate(Path certPath) {
try (InputStream in = Files.newInputStream(certPath)) {
X509Certificate cert = (X509Certificate) CertificateFactory.getInstance("X.509")
.generateCertificate(in);
boolean selfSigned = cert.getSubjectX500Principal().equals(cert.getIssuerX500Principal());
boolean isCa = cert.getBasicConstraints() >= 0; // -1 == not a CA
return selfSigned && isCa;
} catch (Exception e) {
LOG.debugv("Could not inspect TLS certificate {0} for CA suitability: {1}",
certPath, e.getMessage());
return false;
}
}
/**
* Environment entries that make the container <em>add</em> Floci's CA to its trust, without
* replacing the system trust store (which would break the Lambda's external HTTPS calls):
* <ul>
* <li>{@code NODE_EXTRA_CA_CERTS} appends Floci's cert to Node's built-in CAs, so public TLS
* from the Lambda still works; and</li>
* <li>{@code AWS_CA_BUNDLE} is scoped to AWS SDK/CLI traffic, which Floci redirects to its own
* endpoint via {@code AWS_ENDPOINT_URL} — so pointing it at Floci's cert only affects
* calls that already target Floci.</li>
* </ul>
* {@code SSL_CERT_FILE} and {@code REQUESTS_CA_BUNDLE} are deliberately <em>not</em> set: each
* <em>replaces</em> the entire OpenSSL / Python-requests trust store with only Floci's cert,
* which breaks every external HTTPS call (curl, openssl, requests/botocore) the Lambda makes.
* Returns an empty list when no CA cert is available (TLS off).
*/
static List<String> flociCaEnv(Optional<Path> caCert) {
if (caCert.isEmpty()) {
return List.of();
}
return List.of(
"NODE_EXTRA_CA_CERTS=" + FLOCI_CA_CONTAINER_PATH,
"AWS_CA_BUNDLE=" + FLOCI_CA_CONTAINER_PATH);
}
private static String extractRegionFromArn(String arn, String defaultRegion) {
if (arn == null) {
return defaultRegion;