@Bean
    @ConditionalOnMissingBean(name = "googleCloudSecretsManagerPropertySourceLocator")
    public PropertySourceLocator googleCloudSecretsManagerPropertySourceLocator(
        @Qualifier("googleCloudSecretsManagerTemplate")
        final SecretManagerTemplate googleCloudSecretsManagerTemplate,
        final GcpSecretManagerProperties properties) {
        return environment -> Unchecked.supplier(() -> {
            val projectIdProvider = getProjectIdProvider(properties);
            return new SecretManagerPropertySource(getClass().getSimpleName(), googleCloudSecretsManagerTemplate, projectIdProvider) {
                @Override
                public Object getProperty(final String name) {
                    var propertyValue = FunctionUtils.doAndHandle(() -> super.getProperty(name), e -> null).get();
                    return Optional.ofNullable(propertyValue)
                        .map(ByteString.class::cast)
                        .map(ByteString::toStringUtf8)
                        .orElse(null);
                }
            };
        }).get();
    }
Google cloud secrets manager property source.
The implementation here overrides the property fetching mechanism to
convert the final secret into a String. Otherwise, the actual
value of the secret is passed back to the environment
as {@code ByteString@abcdefg size=19 contents=...}.
This could possibly be a bug in Spring Cloud GCP where
{@link com.google.cloud.spring.autoconfigure.secretmanager.GcpSecretManagerEnvironmentPostProcessor}
is not doing its job correctly.
@param properties the properties
@return the property source locator
support/cas-server-support-configuration-cloud-gcp-secretsmanager/src/main/java/org/apereo/cas/config/CasGoogleCloudSecretsManagerCloudConfigBootstrapAutoConfiguration.java