@Bean
    @ConditionalOnMissingBean(name = "googleCloudSecretsManagerTemplate")
    public SecretManagerTemplate googleCloudSecretsManagerTemplate(
        @Qualifier("googleCloudSecretsManagerCredentialProvider")
        final CredentialsProvider googleCloudSecretsManagerCredentialProvider,
        final GcpSecretManagerProperties properties) throws Exception {
        val settings = SecretManagerServiceSettings.newBuilder()
            .setCredentialsProvider(googleCloudSecretsManagerCredentialProvider)
            .setHeaderProvider(new UserAgentHeaderProvider(getClass()))
            .build();
        val serviceClient = SecretManagerServiceClient.create(settings);
        val projectIdProvider = getProjectIdProvider(properties);
        val secretManagerTemplate = new SecretManagerTemplate(serviceClient, projectIdProvider);
        secretManagerTemplate.setAllowDefaultSecretValue(properties.isAllowDefaultSecret());
        return secretManagerTemplate;
    }
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