Class GcpKmsAutoConfiguration
java.lang.Object
com.google.cloud.spring.autoconfigure.kms.GcpKmsAutoConfiguration
@AutoConfiguration
@EnableConfigurationProperties(GcpKmsProperties.class)
@ConditionalOnClass({com.google.cloud.kms.v1.KeyManagementServiceClient.class,KmsTemplate.class})
@ConditionalOnProperty(value="spring.cloud.gcp.kms.enabled",
matchIfMissing=true)
public class GcpKmsAutoConfiguration
extends Object
Autoconfiguration for GCP KMS which enables data encryption and decryption.
-
Constructor Summary
ConstructorDescriptionGcpKmsAutoConfiguration
(GcpProjectIdProvider coreProjectIdProvider, GcpKmsProperties properties, com.google.api.gax.core.CredentialsProvider credentialsProvider) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.kms.v1.KeyManagementServiceClient
keyManagementClient
(com.google.api.gax.core.CredentialsProvider googleCredentials) kmsTemplate
(com.google.cloud.kms.v1.KeyManagementServiceClient client)
-
Constructor Details
-
GcpKmsAutoConfiguration
public GcpKmsAutoConfiguration(GcpProjectIdProvider coreProjectIdProvider, GcpKmsProperties properties, com.google.api.gax.core.CredentialsProvider credentialsProvider) throws IOException - Throws:
IOException
-
-
Method Details
-
keyManagementClient
@Bean @ConditionalOnMissingBean public com.google.cloud.kms.v1.KeyManagementServiceClient keyManagementClient(com.google.api.gax.core.CredentialsProvider googleCredentials) throws IOException - Throws:
IOException
-
kmsTemplate
@Bean @ConditionalOnMissingBean public KmsTemplate kmsTemplate(com.google.cloud.kms.v1.KeyManagementServiceClient client)
-