Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.jspecify.annotations.NonNull;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.EnvironmentPostProcessor;
import org.springframework.boot.SpringApplication;
import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.EnumerablePropertySource;
Expand Down Expand Up @@ -58,8 +58,9 @@
* <p>SSM initialization also runs when {@code context.awsParameterStore.prefix} is explicitly
* configured (even with no {@code ssm:} values), so that the CloudServices module can create its
* own {@code SsmClient} for on-demand {@code SecretService} lookups. When active, this processor
* publishes {@code labkey.aws.ssm.region} and optionally {@code labkey.aws.ssm.secretsPrefix} as
* JVM system properties without any cross-classloader reflection.
* publishes {@code labkey.aws.ssm.enabled}, {@code labkey.aws.ssm.region}, and
* {@code labkey.aws.ssm.secretsPrefix} as JVM system properties without any cross-classloader
* reflection.
*
* <p>{@code context.awsParameterStore.secretsPrefix} controls where {@code SecretProperty}
* values are looked up at runtime. A relative value (no leading {@code /}) is resolved against
Expand Down Expand Up @@ -146,7 +147,9 @@ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringAp
Region region = resolveRegion(regionOverride);

// Publish config as system properties so the CloudServices module can create its own
// SsmClient for on-demand SecretProperty lookups via SecretService at runtime.
// SsmClient for on-demand SecretProperty lookups via SecretService at runtime. The enabled
// flag carries the hasExplicitConfig decision above for use in SsmSecretProvider
System.setProperty("labkey.aws.ssm.enabled", "true");
System.setProperty("labkey.aws.ssm.region", region.id());
System.setProperty("labkey.aws.ssm.secretsPrefix", secretsPrefix);

Expand Down