@Override
    public PropertySource<?> locate(final Environment environment) {
        val props = new Properties();
        try {
            val builder = new AmazonEnvironmentAwareClientBuilder(CAS_CONFIGURATION_PREFIX, environment);
            try (val client = builder.build(SsmClient.builder(), SsmClient.class)) {
                val profiles = new ArrayList<String>();
                profiles.add(StringUtils.EMPTY);
                profiles.addAll(List.of(environment.getActiveProfiles()));

                profiles.forEach(profile -> {
                    var nextToken = (String) null;
                    do {
                        val prefix = String.format("/cas/%s", profile);
                        val request = GetParametersByPathRequest.builder()
                            .path(prefix)
                            .withDecryption(Boolean.TRUE)
                            .nextToken(nextToken)
                            .build();
                        val result = client.getParametersByPath(request);
                        nextToken = result.nextToken();
                        LOGGER.trace("Fetched [{}] parameters with next token as [{}]", result.parameters().size(), result.nextToken());

                        result.parameters().forEach(p -> {
                            var propKey = StringUtils.removeStart(p.name(), prefix);
                            propKey = StringUtils.removeStart(propKey, "/");
                            val key = StringUtils.removeEnd(propKey, "/");
                            props.put(key, p.value());
                        });
                    } while (nextToken != null);
                });
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        LOGGER.debug("Located [{}] settings(s)", props.size());
        return new PropertiesPropertySource(getClass().getSimpleName(), props);
    }
Configuration prefix for amazon secrets manager.
support/cas-server-support-configuration-cloud-aws-ssm/src/main/java/org/apereo/cas/config/CasAmazonSimpleSystemsManagementCloudConfigBootstrapAutoConfiguration.java