Documentation
¶
Overview ¶
Package wif deals with obtaining ID tokens from provider VMs to be used as part of Workload Identity Federation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ObtainProviderToken ¶
ObtainProviderToken tries to detect what provider the client is running in and then tries to obtain an ID token for the audience that is passed as an argument To detect the environment, we do it in the following intentional order:
- GitHub Actions (strongest env signals; may run atop any cloud)
- AWS via IMDSv2 token endpoint (does not require env vars)
- GCP via metadata header semantics
- Azure via metadata endpoint
Types ¶
type Environment ¶
type Environment string
const ( EnvGitHub Environment = "github" EnvAWS Environment = "aws" EnvGCP Environment = "gcp" EnvNone Environment = "none" )
Click to show internal directories.
Click to hide internal directories.