Documentation ¶
Index ¶
- func AddSecret(ctx context.Context, secstore SecretStore, secret secret.Secret, ...) error
- func CheckSecretID(ctx context.Context, secstore SecretStore, secretID string) bool
- func CreateToken(ctx context.Context, secstore SecretStore, policies []string) (string, error)
- func DeleteSecret(ctx context.Context, secstore SecretStore, secretId string) error
- func GetSecret(ctx context.Context, secstore SecretStore, secretID string) (secret.Secret, error)
- func ListCubbyhole(ctx context.Context, secstore SecretStore) (string, error)
- func ListSecrets(ctx context.Context, secstore SecretStore) error
- func RenewToken(ctx context.Context, secstore SecretStore, token string) error
- func RevokeToken(ctx context.Context, secstore SecretStore, token string) error
- func SetServiceSecretCubbyhole(ctx context.Context, secstore SecretStore, s map[string]secret.Secret) error
- func UnWrappeSecret(ctx context.Context, secstore SecretStore, token string) (map[string]secret.Secret, error)
- func UnWrappeSecretJSON(ctx context.Context, secstore SecretStore, token string) (string, error)
- func UnWrappeToken(ctx context.Context, secstore SecretStore, token string) (string, error)
- func WrapCubbyhole(ctx context.Context, secstore SecretStore, path string, ttl time.Duration) (string, error)
- func WrapSecret(ctx context.Context, secstore SecretStore, secretID string, ttl time.Duration) (string, error)
- func WrapSecretList(ctx context.Context, secstore SecretStore, secList []string, storePath string, ...) (string, error)
- func WrapToken(ctx context.Context, secstore SecretStore, token 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 CreateToken ¶ added in v1.0.0
create a new token with a given policy
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 ListCubbyhole ¶ added in v1.0.0
func ListCubbyhole(ctx context.Context, secstore SecretStore) (string, error)
this function will retur all Cubbyhole entries
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 RenewToken ¶ added in v1.0.0
func RenewToken(ctx context.Context, secstore SecretStore, token string) error
function renew the token
func RevokeToken ¶ added in v1.0.0
func RevokeToken(ctx context.Context, secstore SecretStore, token string) error
function to revoke the token
func SetServiceSecretCubbyhole ¶ added in v1.0.0
func SetServiceSecretCubbyhole(ctx context.Context, secstore SecretStore, s map[string]secret.Secret) error
this function will set a cubyhole for the list of secretsId
func UnWrappeSecret ¶ added in v0.5.1
func UnWrappeSecret(ctx context.Context, secstore SecretStore, token string) (map[string]secret.Secret, error)
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 UnWrappeToken ¶ added in v1.0.0
this function will unwrap a token and return the Access token from it
func WrapCubbyhole ¶ added in v0.5.1
func WrapCubbyhole(ctx context.Context, secstore SecretStore, path 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