Documentation
¶
Overview ¶
Package creds reads credentials.toml and materializes the secrets it points at.
Index ¶
Constants ¶
View Source
const CommandTimeout = 2 * time.Minute
CommandTimeout bounds a secret-fetching command. Generous, because a vault may wait on a hardware key tap.
View Source
const RequiredMode os.FileMode = 0o600
RequiredMode is the only permission blip will read a credentials file at.
Variables ¶
View Source
var ErrNoFile = errors.New("no credentials file")
ErrNoFile means the credentials file does not exist.
Functions ¶
This section is empty.
Types ¶
type Profile ¶
type Profile struct {
Type string `toml:"type"`
// Hosts pins this credential to the hosts it may be sent to. .blip.toml is
// committed and can come from anywhere, so without this a cloned repo picks
// both the destination and which of your secrets travels to it.
Hosts []string `toml:"hosts"`
Token string `toml:"token"`
TokenCommand string `toml:"token_command"`
Header string `toml:"header"`
Value string `toml:"value"`
ValueCommand string `toml:"value_command"`
Username string `toml:"username"`
Password string `toml:"password"`
PasswordCommand string `toml:"password_command"`
TokenURL string `toml:"token_url"`
ClientID string `toml:"client_id"`
ClientSecret string `toml:"client_secret"`
ClientSecretCommand string `toml:"client_secret_command"`
Scope string `toml:"scope"`
Audience string `toml:"audience"`
}
Profile is one named block in credentials.toml.
type Resolved ¶
type Resolved struct {
Name string
Kind Kind
Hosts []string
Token string
Header string
Value string
Username string
Password string
TokenURL string
ClientID string
ClientSecret string
Scope string
Audience string
}
Resolved is a profile with every secret materialized. It must never be printed.
func (*Resolved) SecretValues ¶
SecretValues lists everything in this profile that must never reach output.
type Resolver ¶
type Resolver struct {
Run Runner
}
Resolver materializes the secrets a profile points at.
Click to show internal directories.
Click to hide internal directories.