Documentation
¶
Index ¶
- func AddSecret(ctx context.Context, secstore SecretStore, secret secret.Secret, ...) error
- func CheckSecretID(ctx context.Context, secstore SecretStore, secretID string) bool
- func DeleteSecret(ctx context.Context, secstore SecretStore, secretId string) error
- func GetSecret(ctx context.Context, secstore SecretStore, secretID string) (secret.Secret, error)
- func ListSecrets(ctx context.Context, secstore SecretStore) error
- func UnWrappeSecret(ctx context.Context, secstore SecretStore, token string) (secret.Secret, error)
- func UnWrappeSecretJSON(ctx context.Context, secstore SecretStore, token string) (string, error)
- func WrapCubbyhole(ctx context.Context, secstore SecretStore, secretID string, ttl time.Duration) (string, error)
- func WrapSecret(ctx context.Context, secstore SecretStore, secretID string, ttl time.Duration) (string, error)
- type SecretStore
- func ConnectVault(ctx context.Context) (SecretStore, error)
- func ConnectVaultWithTLSConfig(ctx context.Context, tlsConfig *tls.Config) (SecretStore, error)
- func ConnectVaultWithToken(ctx context.Context, token string) (SecretStore, error)
- func ConnectVaultWithUsernamePassword(ctx context.Context, username, password string) (SecretStore, error)
- func ConnectVaulwithYubikey(ctx context.Context, yubikey *piv.YubiKey, pin string) (SecretStore, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSecret ¶
func AddSecret(ctx context.Context, secstore SecretStore, secret secret.Secret, secretID string) error
this function add a Secret to vault for the given secstore and secretID
func CheckSecretID ¶
func CheckSecretID(ctx context.Context, secstore SecretStore, secretID string) bool
check if SecretId already exist in vault
func DeleteSecret ¶
func DeleteSecret(ctx context.Context, secstore SecretStore, secretId string) error
this function will update a secret in vault for a given secstore, secret and secretID
func ListSecrets ¶
func ListSecrets(ctx context.Context, secstore SecretStore) error
this function list all secrets in vault for the given mountpath and readAPPNAME() and display them in tabuuar format
func UnWrappeSecret ¶ added in v0.5.1
this function will unwrap a cubbyhole and return the secret
func UnWrappeSecretJSON ¶ added in v0.5.2
this function will unwrap a secret and return a json string
func WrapCubbyhole ¶ added in v0.5.1
func WrapCubbyhole(ctx context.Context, secstore SecretStore, secretID string, ttl time.Duration) (string, error)
take a cubbyhole and wrap the secret and return the wrapped token
func WrapSecret ¶ added in v0.5.1
func WrapSecret(ctx context.Context, secstore SecretStore, secretID string, ttl time.Duration) (string, error)
create a wrap secret for a given appname and return the token
Types ¶
type SecretStore ¶
func ConnectVault ¶ added in v0.5.1
func ConnectVault(ctx context.Context) (SecretStore, error)
connect to vault in annonymous mode
func ConnectVaultWithTLSConfig ¶
connect to vault with specific tls config
func ConnectVaultWithToken ¶ added in v0.5.1
func ConnectVaultWithToken(ctx context.Context, token string) (SecretStore, error)
connect to vault using token
func ConnectVaultWithUsernamePassword ¶
func ConnectVaultWithUsernamePassword(ctx context.Context, username, password string) (SecretStore, error)
connect to vault using username and password and return the client
func ConnectVaulwithYubikey ¶
func ConnectVaulwithYubikey(ctx context.Context, yubikey *piv.YubiKey, pin string) (SecretStore, error)
connect to vault with yubikey