 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
const ( // RequestTokenEnvKey is the environment variable for the GitHub Actions OIDC token request token RequestTokenEnvKey = "ACTIONS_ID_TOKEN_REQUEST_TOKEN" // RequestURLEnvKey is the environment variable for the GitHub Actions OIDC token request URL RequestURLEnvKey = "ACTIONS_ID_TOKEN_REQUEST_URL" )
const CIServerURLEnv = "CI_SERVER_URL"
    CIServerURLEnv is the environment variable name for Gitlab CI server URL.
const ExpectedAudience = "chainloop"
    ExpectedAudience is the expected audience for the Gitlab OIDC token.
const GitlabTokenEnv = "GITLAB_OIDC"
    GitlabTokenEnv is the environment variable name for Gitlab OIDC token. #nosec G101 - This is just the name of an environment variable, not a credential
const SelfHostedRunner = "self-hosted"
    Variables ¶
var DefaultActionsProviderURL = "https://token.actions.githubusercontent.com"
    DefaultActionsProviderURL is the default URL for GitHub Actions OIDC provider
var DefaultGitHubAudience = []string{"nobody"}
    DefaultGitHubAudience is the default audience for GitHub Actions OIDC
Functions ¶
This section is empty.
Types ¶
type GitHubOIDCClient ¶
type GitHubOIDCClient struct {
	// contains filtered or unexported fields
}
    func NewGitHubClient ¶
func NewGitHubClient(logger *zerolog.Logger, opts ...Option) (*GitHubOIDCClient, error)
NewGitHubClient returns new GitHub OIDC provider client.
type GitlabToken ¶
type Option ¶
type Option func(*GitHubOIDCClient)
Option is a functional option for configuring a GitHubOIDCClient.
func WithAudience ¶
WithAudience sets the audience for the OIDC token.
type Token ¶
type Token struct {
	oidc.IDToken
	// JobWorkflowRef is a reference to the current job workflow.
	JobWorkflowRef string `json:"job_workflow_ref"`
	// RunnerEnvironment is the environment the runner is running in.
	RunnerEnvironment string `json:"runner_environment"`
	// RawToken is the raw token string (for testing)
	RawToken string `json:"-"`
}
    Token represents the contents of a GitHub OIDC JWT token.