public class AwsEc2Authentication extends Object implements ClientAuthentication, AuthenticationStepsFactory
AWS-EC2 login uses the EC2 identity document and a nonce to login into Vault. AWS-EC2
login obtains the PKCS#7 signed EC2 identity document and generates a
nonce
. Instances of this class are immutable once constructed.
AwsEc2AuthenticationOptions
,
RestOperations
,
Auth Backend:
aws-ec2Constructor and Description |
---|
AwsEc2Authentication(AwsEc2AuthenticationOptions options,
RestOperations vaultRestOperations,
RestOperations awsMetadataRestOperations)
Create a new
AwsEc2Authentication specifying
AwsEc2AuthenticationOptions , a Vault and an AWS-Metadata-specific
RestOperations . |
AwsEc2Authentication(RestOperations vaultRestOperations)
Create a new
AwsEc2Authentication . |
Modifier and Type | Method and Description |
---|---|
static AuthenticationSteps |
createAuthenticationSteps(AwsEc2AuthenticationOptions options)
Creates a
AuthenticationSteps for AWS-EC2 authentication given
AwsEc2AuthenticationOptions . |
protected static AuthenticationSteps |
createAuthenticationSteps(AwsEc2AuthenticationOptions options,
AtomicReference<char[]> nonce,
Supplier<char[]> nonceSupplier) |
protected char[] |
createNonce() |
AuthenticationSteps |
getAuthenticationSteps()
Get the
AuthenticationSteps describing an authentication flow. |
protected Map<String,String> |
getEc2Login() |
VaultToken |
login()
Return a
VaultToken . |
public AwsEc2Authentication(RestOperations vaultRestOperations)
AwsEc2Authentication
.vaultRestOperations
- must not be null.public AwsEc2Authentication(AwsEc2AuthenticationOptions options, RestOperations vaultRestOperations, RestOperations awsMetadataRestOperations)
AwsEc2Authentication
specifying
AwsEc2AuthenticationOptions
, a Vault and an AWS-Metadata-specific
RestOperations
.options
- must not be null.vaultRestOperations
- must not be null.awsMetadataRestOperations
- must not be null.public static AuthenticationSteps createAuthenticationSteps(AwsEc2AuthenticationOptions options)
AuthenticationSteps
for AWS-EC2 authentication given
AwsEc2AuthenticationOptions
.options
- must not be null.AuthenticationSteps
for AWS-EC2 authentication.protected static AuthenticationSteps createAuthenticationSteps(AwsEc2AuthenticationOptions options, AtomicReference<char[]> nonce, Supplier<char[]> nonceSupplier)
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 char[] createNonce()
Copyright © 2016–2021 Pivotal Software, Inc.. All rights reserved.