Documentation
¶
Overview ¶
Package sourceauth resolves a config source's token through GTB's rungs: config.sources.<name>.auth.env names a variable, .auth.keychain a "service/account" entry, .auth.value holds the token itself (spec 0204 D18). It is the chain forges use, so a source reports its credential in the same vocabulary. None set is not an error: the provider's own variable (VAULT_TOKEN, CONSUL_HTTP_TOKEN) then applies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLiteralUnderCI = errors.NewSentinel("gtb.config.sources.literal_under_ci", "a literal source token is refused under CI")
ErrLiteralUnderCI is a token stored as a literal and read under CI, where a plaintext credential in a config file is refused.
Functions ¶
func Token ¶
func Token(ctx context.Context, settings credentialposture.Reader, b setup.ConfigBootstrap, source, fallback string) (string, error)
Token returns the source's token from the first rung that holds one, or "" when none does, and reports the rung to b; with none, fallback names the provider's own variable, which then applies.
Types ¶
This section is empty.