Class GcpIamAuthentication
java.lang.Object
org.springframework.vault.authentication.GcpJwtAuthenticationSupport
org.springframework.vault.authentication.GcpIamAuthentication
- All Implemented Interfaces:
ClientAuthentication
@Deprecated
public class GcpIamAuthentication
extends GcpJwtAuthenticationSupport
implements ClientAuthentication
Deprecated.
GCP IAM login implementation using GCP IAM service accounts to legitimate its
authenticity via JSON Web Token using the deprecated IAM
projects.serviceAccounts.signJwt
method.
This authentication method uses Googles IAM API to obtain a signed token for a specific
Credential
. Project and service account
details are obtained from a GoogleCredential
that can be retrieved either from
a JSON file or the runtime environment (GAE, GCE).
GcpIamAuthentication
uses Google Java API that uses synchronous API.- Since:
- 2.1
- Author:
- Mark Paluch, Magnus Jungsbluth, Bruno Rodrigues
- See Also:
-
GcpIamAuthenticationOptions
HttpTransport
GoogleCredential
GoogleCredentials.getApplicationDefault()
RestOperations
- Auth Backend: gcp (IAM)
- GCP: projects.serviceAccounts.signJwt
-
Constructor Summary
ConstructorDescriptionGcpIamAuthentication
(GcpIamAuthenticationOptions options, RestOperations restOperations) Deprecated.GcpIamAuthentication
(GcpIamAuthenticationOptions options, RestOperations restOperations, com.google.api.client.http.HttpTransport httpTransport) Deprecated.Create a new instance ofGcpIamAuthentication
givenGcpIamAuthenticationOptions
,RestOperations
andHttpTransport
. -
Method Summary
Modifier and TypeMethodDescriptionlogin()
Deprecated.Return aVaultToken
.protected String
signJwt()
Deprecated.
-
Constructor Details
-
GcpIamAuthentication
Deprecated.Create a new instance ofGcpIamAuthentication
givenGcpIamAuthenticationOptions
andRestOperations
. This constructor initializesGoogleApacheHttpTransport
for Google API usage.- Parameters:
options
- must not be null.restOperations
- HTTP client for Vault login, must not be null.
-
GcpIamAuthentication
public GcpIamAuthentication(GcpIamAuthenticationOptions options, RestOperations restOperations, com.google.api.client.http.HttpTransport httpTransport) Deprecated.Create a new instance ofGcpIamAuthentication
givenGcpIamAuthenticationOptions
,RestOperations
andHttpTransport
.- Parameters:
options
- must not be null.restOperations
- HTTP client for Vault login, must not be null.httpTransport
- HTTP client for Google API use, must not be null.
-
-
Method Details
-
login
Deprecated.Description copied from interface:ClientAuthentication
Return aVaultToken
. This method can optionally log into Vault to obtain atoken
.- Specified by:
login
in interfaceClientAuthentication
- Returns:
- a
VaultToken
. - Throws:
VaultException
-
signJwt
Deprecated.
-
GcpIamCredentialsAuthentication
instead.