Documentation
¶
Overview ¶
package: keysource / logic type: io job: the one grammar an app resolves a key argument through — a file, an environment variable, stdin or a prompt — with the rules that keep the material off disk and off the command line limits: yields bytes and reads nothing into a key; what a PEM means is the library's (-> ranke.ParseKeypair). Key-agnostic on purpose, so an age passphrase takes the same grammar
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrSpec = errors.New("keysource: unrecognised key source") ErrInline = errors.New("keysource: key material was passed where a source was expected, so it has reached the process table, the shell history and any CI log — treat this key as compromised and rotate it") ErrPermission = errors.New("keysource: key file is readable by others (chmod 600 it)") ErrNoTTY = errors.New("keysource: a prompt needs keysource.WithTTY, which a server must not grant") ErrEmpty = errors.New("keysource: the source held nothing") )
Functions ¶
Types ¶
type Spec ¶
type Spec struct {
Kind Kind
Name string // the path, or the environment variable's name; empty otherwise
// contains filtered or unexported fields
}
Spec is a checked key source with nothing read yet, so a caller validates its argument at startup and fetches a rotating secret where it signs.