vault

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyRoleId       = "role_id"
	KeySecretId     = "secret_id"
	KeySecretIdFile = "secret_id_file"
)

Variables

This section is empty.

Functions

func FetchCert added in v1.1.0

func FetchCert(vaultAddress, pkiMount string, binary bool) ([]byte, error)

func FetchCertChain added in v1.1.0

func FetchCertChain(vaultAddress, pkiMount string) ([]byte, error)

func FetchCrl added in v1.2.0

func FetchCrl(vaultAddress, pkiMount string, binary bool) ([]byte, error)

Types

type AppRoleAuth

type AppRoleAuth struct {
	// contains filtered or unexported fields
}

func NewAppRoleAuth

func NewAppRoleAuth(client *api.Client, loginData map[string]string, mountPath string) (*AppRoleAuth, error)

func (*AppRoleAuth) Authenticate

func (t *AppRoleAuth) Authenticate() (string, error)

func (*AppRoleAuth) Cleanup

func (t *AppRoleAuth) Cleanup() error

type AuthMethod

type AuthMethod interface {
	Authenticate() (string, error)
	Cleanup() error
}

type TokenAuth

type TokenAuth struct {
	// contains filtered or unexported fields
}

func NewTokenAuth

func NewTokenAuth(token string) (*TokenAuth, error)

func (*TokenAuth) Authenticate

func (t *TokenAuth) Authenticate() (string, error)

func (*TokenAuth) Cleanup

func (t *TokenAuth) Cleanup() error

type VaultClient

type VaultClient struct {
	// contains filtered or unexported fields
}

func NewVaultPki added in v1.2.0

func NewVaultPki(client *api.Client, auth AuthMethod, config conf.Config) (*VaultClient, error)

func (*VaultClient) Cleanup

func (c *VaultClient) Cleanup() error

func (*VaultClient) Issue

func (c *VaultClient) Issue(opts conf.IssueArguments) (*pki.CertData, error)

func (*VaultClient) Revoke

func (c *VaultClient) Revoke(serial string) error

func (*VaultClient) Sign added in v1.4.0

func (c *VaultClient) Sign(csr string, opts conf.SignArguments) (*pki.Signature, error)

func (*VaultClient) Tidy

func (c *VaultClient) Tidy() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL