Class GoogleSecretManagerV1AccessStrategy
java.lang.Object
org.springframework.cloud.config.server.environment.secretmanager.GoogleSecretManagerV1AccessStrategy
- All Implemented Interfaces:
GoogleSecretManagerAccessStrategy
public class GoogleSecretManagerV1AccessStrategy
extends Object
implements GoogleSecretManagerAccessStrategy
-
Constructor Summary
ConstructorsConstructorDescriptionGoogleSecretManagerV1AccessStrategy(org.springframework.web.client.RestTemplate rest, GoogleConfigProvider configProvider, com.google.cloud.secretmanager.v1.SecretManagerServiceClient client) Deprecated, for removal: This API element is subject to removal in a future version.GoogleSecretManagerV1AccessStrategy(org.springframework.web.client.RestTemplate rest, GoogleConfigProvider configProvider, com.google.cloud.secretmanager.v1.SecretManagerServiceClient client, GcpProjectResolutionSupport projectResolutionSupport) Constructs a new instance ofGoogleSecretManagerV1AccessStrategy.GoogleSecretManagerV1AccessStrategy(org.springframework.web.client.RestTemplate rest, GoogleConfigProvider configProvider, String serviceAccountFile) Deprecated, for removal: This API element is subject to removal in a future version.GoogleSecretManagerV1AccessStrategy(org.springframework.web.client.RestTemplate rest, GoogleConfigProvider configProvider, String serviceAccountFile, GcpProjectResolutionSupport gcpProjectResolutionSupport) Constructs a new instance ofGoogleSecretManagerV1AccessStrategy. -
Method Summary
Modifier and TypeMethodDescriptiongetSecretName(com.google.cloud.secretmanager.v1.Secret secret) List<com.google.cloud.secretmanager.v1.Secret> getSecretValue(com.google.cloud.secretmanager.v1.Secret secret, Comparator<com.google.cloud.secretmanager.v1.SecretVersion> comparator)
-
Constructor Details
-
GoogleSecretManagerV1AccessStrategy
@Deprecated(forRemoval=true) public GoogleSecretManagerV1AccessStrategy(org.springframework.web.client.RestTemplate rest, GoogleConfigProvider configProvider, String serviceAccountFile) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new instance ofGoogleSecretManagerV1AccessStrategy. This constructor is deprecated and marked for removal.- Parameters:
rest- theRestTemplateinstance used for making HTTP requestsconfigProvider- theGoogleConfigProviderinstance providing configuration valuesserviceAccountFile- the path to the Google Cloud service account JSON file- Throws:
IOException- if an I/O error occurs while reading the service account file
-
GoogleSecretManagerV1AccessStrategy
public GoogleSecretManagerV1AccessStrategy(org.springframework.web.client.RestTemplate rest, GoogleConfigProvider configProvider, String serviceAccountFile, GcpProjectResolutionSupport gcpProjectResolutionSupport) throws IOException Constructs a new instance ofGoogleSecretManagerV1AccessStrategy.- Parameters:
rest- the RestTemplate instance used for making HTTP requestsconfigProvider- the GoogleConfigProvider instance providing configuration valuesserviceAccountFile- the path to the Google Cloud service account JSON file. If this parameter is non-empty, credentials will be loaded using the specified file.gcpProjectResolutionSupport- the GcpProjectResolutionSupport instance providing support for resolving the Google Cloud project to use- Throws:
IOException- if an I/O error occurs while reading the service account file
-
GoogleSecretManagerV1AccessStrategy
@Deprecated(forRemoval=true) public GoogleSecretManagerV1AccessStrategy(org.springframework.web.client.RestTemplate rest, GoogleConfigProvider configProvider, com.google.cloud.secretmanager.v1.SecretManagerServiceClient client) Deprecated, for removal: This API element is subject to removal in a future version.Constructor for the GoogleSecretManagerV1AccessStrategy class. This constructor is deprecated and will be removed in a future release. Use a constructor that passesGcpProjectResolutionSupport.- Parameters:
rest- the RestTemplate instance used for making HTTP requestsconfigProvider- the GoogleConfigProvider instance providing configuration valuesclient- the SecretManagerServiceClient instance used for interacting with Google Secret Manager
-
GoogleSecretManagerV1AccessStrategy
public GoogleSecretManagerV1AccessStrategy(org.springframework.web.client.RestTemplate rest, GoogleConfigProvider configProvider, com.google.cloud.secretmanager.v1.SecretManagerServiceClient client, GcpProjectResolutionSupport projectResolutionSupport) Constructs a new instance ofGoogleSecretManagerV1AccessStrategy.- Parameters:
rest- theRestTemplateinstance used for making HTTP requestsconfigProvider- theGoogleConfigProviderinstance providing configuration valuesclient- theSecretManagerServiceClientinstance used for interacting with Google Secret ManagerprojectResolutionSupport- theGcpProjectResolutionSupportinstance providing support for resolving the Google Cloud project to use
-
-
Method Details
-
getSecrets
- Specified by:
getSecretsin interfaceGoogleSecretManagerAccessStrategy
-
getSecretValue
public String getSecretValue(com.google.cloud.secretmanager.v1.Secret secret, Comparator<com.google.cloud.secretmanager.v1.SecretVersion> comparator) - Specified by:
getSecretValuein interfaceGoogleSecretManagerAccessStrategy
-
getSecretName
- Specified by:
getSecretNamein interfaceGoogleSecretManagerAccessStrategy
-
checkRemotePermissions
- Specified by:
checkRemotePermissionsin interfaceGoogleSecretManagerAccessStrategy
-