Documentation
¶
Index ¶
- Constants
- Variables
- func Decrypt(encodedValue string, masterKey []byte) ([]byte, error)
- func Encrypt(plainText []byte, masterKey []byte) (string, error)
- func FormatSecretForStdout(key string, value string, raw bool) string
- func GetSecretKeys(vault *Vault, requestedKeys []string) []string
- func HashPasswordForWorkspace(password string) (string, error)
- func NormalizeEncrypted(encrypted string) string
- func ProcessEnvSecret(envVarName string, value []byte, force bool) error
- func ProcessVault(vault *Vault, opts ProcessOptions) (map[string]string, error)
- func ResolveDestination(secret VaultSecret) (string, error)
- func ResolveEncryptedValue(encrypted string) (string, error)
- func ResolveMasterKey(flagValue string) ([]byte, error)
- func ResolveVaultPath(inputFlag string) (string, error)
- func ValidateSecret(name string, secret VaultSecret) error
- type ProcessOptions
- type SecretTypeConfig
- type Vault
- type VaultSecret
Constants ¶
View Source
const ( Argon2Time = 3 Argon2Memory = 64 * 1024 // 64MB Argon2Threads = 4 Argon2KeyLen = 32 SaltLen = 16 NonceLen = 12 )
View Source
const ( TypeGeneric = "generic" TypeSSH = "ssh" TypeEnv = "env" TypeKubeconfig = "kubeconfig" TypeDockerConfigJSON = "dockerconfigjson" )
Variables ¶
View Source
var SecretTypeConfigs = map[string]SecretTypeConfig{ TypeGeneric: { DefaultMode: "0o600", DefaultDirectory: "", }, TypeSSH: { DefaultMode: "0o600", DefaultDirectory: "~/.ssh", }, TypeEnv: { DefaultMode: "0o644", DefaultDirectory: "", }, TypeKubeconfig: { DefaultMode: "0o600", DefaultDirectory: "~/.kube", }, TypeDockerConfigJSON: { DefaultMode: "0o600", DefaultDirectory: "~/.docker", }, }
Functions ¶
func FormatSecretForStdout ¶ added in v0.0.38
func GetSecretKeys ¶ added in v0.0.38
func HashPasswordForWorkspace ¶ added in v0.0.41
func NormalizeEncrypted ¶ added in v0.0.38
func ProcessEnvSecret ¶ added in v0.0.38
func ProcessVault ¶ added in v0.0.38
func ProcessVault(vault *Vault, opts ProcessOptions) (map[string]string, error)
func ResolveDestination ¶ added in v0.0.40
func ResolveDestination(secret VaultSecret) (string, error)
func ResolveEncryptedValue ¶ added in v0.0.44
func ResolveMasterKey ¶
func ResolveVaultPath ¶ added in v0.0.38
func ValidateSecret ¶ added in v0.0.38
func ValidateSecret(name string, secret VaultSecret) error
Types ¶
type ProcessOptions ¶ added in v0.0.38
type SecretTypeConfig ¶ added in v0.0.40
type Vault ¶ added in v0.0.38
type Vault struct {
Secrets map[string]VaultSecret `yaml:"secrets"`
}
Click to show internal directories.
Click to hide internal directories.