public class AwsEc2Authentication extends Object implements ClientAuthentication
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
,
Auth Backend: aws-ec2Constructor and Description |
---|
AwsEc2Authentication(AwsEc2AuthenticationOptions options,
VaultClient vaultClient,
RestTemplate restTemplate)
Creates a new
AwsEc2Authentication specifying AwsEc2AuthenticationOptions , VaultClient and
a RestTemplate . |
AwsEc2Authentication(VaultClient vaultClient)
Creates a new
AwsEc2Authentication . |
Modifier and Type | Method and Description |
---|---|
protected char[] |
createNonce() |
protected Map<String,String> |
getEc2Login() |
VaultToken |
login()
Return a
VaultToken . |
public AwsEc2Authentication(VaultClient vaultClient)
AwsEc2Authentication
.vaultClient
- must not be null.public AwsEc2Authentication(AwsEc2AuthenticationOptions options, VaultClient vaultClient, RestTemplate restTemplate)
AwsEc2Authentication
specifying AwsEc2AuthenticationOptions
, VaultClient
and
a RestTemplate
.options
- must not be null.vaultClient
- must not be null.restTemplate
- must not be null.public VaultToken login() throws VaultException
ClientAuthentication
VaultToken
. This method can optionally log into Vault to obtain a token
.login
in interface ClientAuthentication
VaultToken
.VaultException
protected char[] createNonce()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.