Documentation
¶
Index ¶
- Constants
- type Config
- type Provider
- func (p *Provider) CreateSecret(ctx context.Context, req contracts.CreateSecretRequest) (contracts.Secret, error)
- func (p *Provider) Definition() contracts.ProviderDefinition
- func (p *Provider) GetSecretPayload(ctx context.Context, path string) ([]byte, error)
- func (p *Provider) ListSecrets(ctx context.Context) (map[string]contracts.Secret, error)
- type SecretPath
Constants ¶
View Source
const ( EnvAuthTokenPath = "VAULT_AUTH_TOKEN" //nolint:gosec // false-positive EnvAuthAppRoleRoleID = "VAULT_AUTH_APPROLE_ROLE_ID" EnvAuthAppRoleSecretID = "VAULT_AUTH_APPROLE_SECRET_ID" //nolint:gosec // false-positive )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Addr is Vault HTTP API endpoint.
Addr url.URL `env:"ADDR,required"`
Auth api.AuthConfig `envPrefix:"AUTH_"`
// MountPath is KV v2 mount path.
MountPath string `env:"MOUNT_PATH" envDefault:"secret"`
}
Config defines Vault provider settings.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider reads secrets from HashiCorp Vault KV v2.
func (*Provider) CreateSecret ¶ added in v0.5.2
func (p *Provider) CreateSecret(ctx context.Context, req contracts.CreateSecretRequest) (contracts.Secret, error)
CreateSecret creates a new key in a Vault KV v2 document.
func (*Provider) Definition ¶
func (p *Provider) Definition() contracts.ProviderDefinition
func (*Provider) GetSecretPayload ¶
type SecretPath ¶
Click to show internal directories.
Click to hide internal directories.