public class GcpIamCredentialsAuthentication extends GcpJwtAuthenticationSupport implements ClientAuthentication
projects.serviceAccounts.signJwt method.
This authentication method uses Googles IAM Credentials API to obtain a signed token
for a specific Credential. Service account
details are obtained from a GoogleCredentials that can be retrieved either from
a JSON file or the runtime environment (GAE, GCE).
GcpIamCredentialsAuthentication uses Google Java API that uses synchronous API.GcpIamCredentialsAuthenticationOptions,
HttpTransport,
GoogleCredentials,
GoogleCredentials.getApplicationDefault(),
RestOperations,
Auth Backend: gcp
(IAM),
GCP:
projects.serviceAccounts.signJwt| Constructor and Description |
|---|
GcpIamCredentialsAuthentication(GcpIamCredentialsAuthenticationOptions options,
org.springframework.web.client.RestOperations restOperations)
Create a new instance of
GcpIamCredentialsAuthentication given
GcpIamCredentialsAuthenticationOptions and RestOperations. |
GcpIamCredentialsAuthentication(GcpIamCredentialsAuthenticationOptions options,
org.springframework.web.client.RestOperations restOperations,
com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider)
Create a new instance of
GcpIamCredentialsAuthentication given
GcpIamCredentialsAuthenticationOptions, RestOperations and
TransportChannelProvider. |
| Modifier and Type | Method and Description |
|---|---|
VaultToken |
login()
Return a
VaultToken. |
protected String |
signJwt() |
public GcpIamCredentialsAuthentication(GcpIamCredentialsAuthenticationOptions options, org.springframework.web.client.RestOperations restOperations)
GcpIamCredentialsAuthentication given
GcpIamCredentialsAuthenticationOptions and RestOperations. This
constructor initializes InstantiatingGrpcChannelProvider for Google API
usage.options - must not be null.restOperations - HTTP client for for Vault login, must not be null.public GcpIamCredentialsAuthentication(GcpIamCredentialsAuthenticationOptions options, org.springframework.web.client.RestOperations restOperations, com.google.api.gax.rpc.TransportChannelProvider transportChannelProvider)
GcpIamCredentialsAuthentication given
GcpIamCredentialsAuthenticationOptions, RestOperations and
TransportChannelProvider.options - must not be null.restOperations - HTTP client for for Vault login, must not be null.transportChannelProvider - Provider for transport channel Google API use, must
not be null.public VaultToken login() throws VaultException
ClientAuthenticationVaultToken. This method can optionally log into Vault to obtain a
token.login in interface ClientAuthenticationVaultToken.VaultExceptionprotected String signJwt()
Copyright © 2016–2024 Pivotal Software, Inc.. All rights reserved.