Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type CredsBackend ¶
type CredsBackend struct {
Dir string
// Command is the systemd-creds executable; tests replace it.
Command string
}
CredsBackend keeps each secret in a file encrypted with `systemd-creds --user` (systemd 256 or later). systemd binds the file to this user and to the machine: to the host key in /var/lib/systemd, and also to the TPM when there is one, which the user does not need access to. It is the fallback for Linux without a Secret Service, such as a server, a container or WSL. The secret passes through stdin and stdout only.
func (*CredsBackend) Delete ¶
func (c *CredsBackend) Delete(service, key string) error
func (*CredsBackend) Probe ¶
func (c *CredsBackend) Probe() error
Probe encrypts a throwaway value, which fails before systemd 256, without the user's credential service, or without a host key.
type KeyringBackend ¶
type KeyringBackend struct{}
func (*KeyringBackend) Delete ¶
func (k *KeyringBackend) Delete(service, key string) error
func (*KeyringBackend) Probe ¶
func (k *KeyringBackend) Probe() error
Probe checks access without writing a key or waiting indefinitely for a locked or missing Secret Service.
type TextBackend ¶
type TextBackend struct{}
func (*TextBackend) Delete ¶
func (t *TextBackend) Delete(service, key string) error