@Override
    public PropertySource<?> locate(final Environment environment) {
        val props = new Properties();
        try {
            val builder = new AmazonEnvironmentAwareClientBuilder(CAS_CONFIGURATION_PREFIX, environment);
            val secretsManager = builder.build(SecretsManagerClient.builder(), SecretsManagerClient.class);
            val listRequest = ListSecretsRequest.builder().build();
            val listResults = secretsManager.listSecrets(listRequest);
            val secretList = listResults.secretList();
            if (secretList != null && !secretList.isEmpty()) {
                LOGGER.debug("Fetched [{}] secret(s)", secretList.size());
                secretList
                    .stream()
                    .map(SecretListEntry::name)
                    .forEach(name -> {
                        LOGGER.debug("Fetching secret [{}]", name);
                        val getRequest = GetSecretValueRequest.builder().secretId(name).build();
                        val result = secretsManager.getSecretValue(getRequest);
                        if (result != null) {
                            props.put(name, result.secretString());
                        }
                    });
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        }
        LOGGER.debug("Located [{}] secret(s)", props.size());
        return new PropertiesPropertySource(getClass().getSimpleName(), props);
    }
Configuration prefix for amazon secrets manager.
support/cas-server-support-configuration-cloud-aws-secretsmanager/src/main/java/org/apereo/cas/config/CasAmazonSecretsManagerCloudConfigBootstrapAutoConfiguration.java