public class GcpComputeAuthentication extends GcpJwtAuthenticationSupport implements ClientAuthentication, AuthenticationStepsFactory
GcpComputeAuthenticationOptions
,
Auth Backend: gcp
(IAM),
Google
Compute Engine: Verifying the Identity of InstancesModifier and Type | Field and Description |
---|---|
static String |
COMPUTE_METADATA_URL_TEMPLATE |
Constructor and Description |
---|
GcpComputeAuthentication(GcpComputeAuthenticationOptions options,
RestOperations vaultRestOperations)
Create a new
GcpComputeAuthentication instance given
GcpComputeAuthenticationOptions and RestOperations for Vault and
Google API use. |
GcpComputeAuthentication(GcpComputeAuthenticationOptions options,
RestOperations vaultRestOperations,
RestOperations googleMetadataRestOperations)
Create a new
GcpComputeAuthentication instance given
GcpComputeAuthenticationOptions and RestOperations for Vault and
Google API use. |
Modifier and Type | Method and Description |
---|---|
static AuthenticationSteps |
createAuthenticationSteps(GcpComputeAuthenticationOptions options)
Creates a
AuthenticationSteps for GCE authentication given
GcpComputeAuthenticationOptions . |
AuthenticationSteps |
getAuthenticationSteps()
Get the
AuthenticationSteps describing an authentication flow. |
VaultToken |
login()
Return a
VaultToken . |
protected String |
signJwt() |
public static final String COMPUTE_METADATA_URL_TEMPLATE
public GcpComputeAuthentication(GcpComputeAuthenticationOptions options, RestOperations vaultRestOperations)
GcpComputeAuthentication
instance given
GcpComputeAuthenticationOptions
and RestOperations
for Vault and
Google API use.options
- must not be null.vaultRestOperations
- must not be null.public GcpComputeAuthentication(GcpComputeAuthenticationOptions options, RestOperations vaultRestOperations, RestOperations googleMetadataRestOperations)
GcpComputeAuthentication
instance given
GcpComputeAuthenticationOptions
and RestOperations
for Vault and
Google API use.options
- must not be null.vaultRestOperations
- must not be null.googleMetadataRestOperations
- must not be null.public static AuthenticationSteps createAuthenticationSteps(GcpComputeAuthenticationOptions options)
AuthenticationSteps
for GCE authentication given
GcpComputeAuthenticationOptions
.options
- must not be null.AuthenticationSteps
for cubbyhole authentication.public VaultToken login() throws VaultException
ClientAuthentication
VaultToken
. This method can optionally log into Vault to obtain a
token
.login
in interface ClientAuthentication
VaultToken
.VaultException
public AuthenticationSteps getAuthenticationSteps()
AuthenticationStepsFactory
AuthenticationSteps
describing an authentication flow.getAuthenticationSteps
in interface AuthenticationStepsFactory
AuthenticationSteps
describing an authentication flow.protected String signJwt()
Copyright © 2016–2020 Pivotal Software, Inc.. All rights reserved.