sourceauth

package
v0.51.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 5 Imported by: 0

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

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL