Class TlsTrustEvaluator
java.lang.Object
com.cloudforgeci.api.core.TlsTrustEvaluator
Single source of truth for whether a deployment's ALB HTTPS listener uses a publicly trusted
certificate. Mirrors the three-way choice
FargateRuntimeConfiguration makes when
provisioning a certificate (imported ARN, DNS-validated public certificate, or the untrusted AWS
Private CA fallback) so that ContainerFactory can report the result to the application
(e.g. cloudforge-manager) without duplicating the logic.
A pure function of deployment-context values rather than CDK constructs or
SystemContext slots: FargateRuntimeConfiguration resolves its decision
asynchronously, but the outcome is fully determined by the inputs configured up front. This
lets ContainerFactory compute it synchronously and lets TlsTrustEvaluatorTest
verify it without synthesizing a stack.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisPubliclyTrusted(boolean sslEnabled, String domain, String fqdn, String certificateArn)
-
Method Details
-
isPubliclyTrusted
public static boolean isPubliclyTrusted(boolean sslEnabled, String domain, String fqdn, String certificateArn) - Parameters:
sslEnabled-enableSsldeployment-context valuedomain-domaindeployment-context valuefqdn-fqdndeployment-context value (subdomain+domain, or an explicit override — seeDeploymentConfig#fqdn's javadoc)certificateArn-certificateArndeployment-context value — an already-issued/ imported ACM certificate, seeDeploymentConfig#certificateArn- Returns:
trueonly when the resulting certificate would be one a real browser already trusts: an imported/existing ACM cert (assumed public — that's the documented contract of thecertificateArnfield), or ACM's own DNS-validated public path (SSL enabled with a domain, and a Route53 zone this deployment controls).falsefor SSL disabled entirely, AND for SSL-enabled-with-no-domain — that combination takesFargateRuntimeConfiguration's AWS Private CA fallback path, which the code that provisions it explicitly logs is NOT trusted by browsers.
-