Documentation ¶
Index ¶
- Variables
- func GetEC2InstanceIdentityPKCS7() (string, error)
- func GetMountVersion(client *vault.Client, mountPath string) (int, error)
- func LoginWithEC2InstanceProfile(client *vault.Client, role string, nonce string) (*vault.Secret, error)
- func NewClient(config *vault.Config) (*vault.Client, error)
- type EnvTokenProvider
- type KV
- type LoginTokenProvider
- type TlsCertTokenProvider
- type TokenChainProvider
- type TokenProvider
- type TokenValidFunc
- type VaultAwsStsCredentials
- type WriteOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTokenNotFound = errors.New("no token found")
)
Functions ¶
func GetMountVersion ¶
GetMountVersion determines the version of a mounted backend. Requires read access to /sys/mounts
Types ¶
type EnvTokenProvider ¶
type EnvTokenProvider struct{}
func (*EnvTokenProvider) RetrieveToken ¶
func (p *EnvTokenProvider) RetrieveToken() (string, error)
type KV ¶
KV is used for accessing kv data in vault. Only v2 compatible
func (*KV) DeleteLatest ¶
DeleteLatest deletes the latest version of a key
func (*KV) ReadLatest ¶
ReadLatest reads the latest version of a given secret
type LoginTokenProvider ¶
type LoginTokenProvider struct{}
LoginTokenProvider finds tokens output by `vault login`
func (*LoginTokenProvider) RetrieveToken ¶
func (p *LoginTokenProvider) RetrieveToken() (string, error)
type TlsCertTokenProvider ¶
func (*TlsCertTokenProvider) RetrieveToken ¶
func (p *TlsCertTokenProvider) RetrieveToken() (string, error)
type TokenChainProvider ¶
type TokenChainProvider struct { Providers []TokenProvider Validator TokenValidFunc }
func NewDefaultChainProvider ¶
func NewDefaultChainProvider(client *vault.Client) *TokenChainProvider
func (*TokenChainProvider) RetrieveToken ¶
func (p *TokenChainProvider) RetrieveToken() (string, error)
type TokenProvider ¶
type TokenValidFunc ¶
TokenExpiredFunc returns true if the token is valid
type VaultAwsStsCredentials ¶
type VaultAwsStsCredentials struct { VaultClient *vault.Client VaultRole string // contains filtered or unexported fields }
func (*VaultAwsStsCredentials) IsExpired ¶
func (v *VaultAwsStsCredentials) IsExpired() bool
func (*VaultAwsStsCredentials) Retrieve ¶
func (v *VaultAwsStsCredentials) Retrieve() (credentials.Value, error)
type WriteOptions ¶
type WriteOptions struct {
CasVersion int64 `json:"cas"`
}
WriteOptions see options for create/updates to the KV api
Click to show internal directories.
Click to hide internal directories.