Documentation
¶
Index ¶
Constants ¶
View Source
const ( // EnvBackend selects the secret persistence backend. Unset defaults to the // OS keyring. There is no silent fallback: an explicit local-vault choice // never degrades to the keyring, and a keyring failure never creates a vault. EnvBackend = "SSHX_SECRET_BACKEND" // EnvVaultPassphrase unlocks the local vault for unattended use. // #nosec G101 -- environment variable name, not a credential. EnvVaultPassphrase = "SSHX_VAULT_PASSPHRASE" //nolint:gosec // EnvVaultKeyFile is a 0600 file whose contents are the vault passphrase. // When set, it takes precedence over EnvVaultPassphrase. EnvVaultKeyFile = "SSHX_VAULT_KEY_FILE" BackendKeyring = "keyring" BackendVault = "local-vault" UnlockNone = "none" UnlockEnv = "env" UnlockKeyFile = "keyfile" UnlockMissing = "missing" )
Variables ¶
View Source
var ErrListUnsupported = errors.New("secret backend cannot list keys")
ErrListUnsupported reports that the selected backend cannot enumerate keys.
View Source
var ErrNotFound = errors.New("secret not found")
ErrNotFound reports that a key has no value in the selected backend.
View Source
var ErrRevealDenied = errors.New("local vault is write-only")
ErrRevealDenied reports that the selected backend never emits secret values on the CLI display path. Internal Get still works for stdin injection.
Functions ¶
func Accounts ¶ added in v0.10.0
Accounts lists account names stored under service. The OS keyring backend cannot enumerate keys and returns ErrListUnsupported.
func Backend ¶ added in v0.10.0
Backend returns the canonical backend name or an error for unknown values.
func CanReveal ¶ added in v0.10.0
func CanReveal() bool
CanReveal reports whether CLI --password-get may emit a secret value. The local vault is write-only; the OS keyring (and its E2E stand-in) may emit on a pipe for human capture.
Types ¶
Click to show internal directories.
Click to hide internal directories.