githubupstreamwatcher

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: Apache-2.0 Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package githubupstreamwatcher implements a controller which watches GitHubIdentityProviders.

Index

Constants

View Source
const (
	HostValid                    string = "HostValid"
	TLSConfigurationValid        string = "TLSConfigurationValid"
	OrganizationsPolicyValid     string = "OrganizationsPolicyValid"
	ClientCredentialsSecretValid string = "ClientCredentialsSecretValid" //nolint:gosec // this is not a credential
	GitHubConnectionValid        string = "GitHubConnectionValid"
	ClaimsValid                  string = "ClaimsValid"
)

Variables

This section is empty.

Functions

func New

New instantiates a new controllerlib.Controller which will populate the provided UpstreamGitHubIdentityProviderICache.

func ProbeURL added in v0.34.0

func ProbeURL(ctx context.Context, client *http.Client, url string) error

ProbeURL is the production code for how to probe a GitHub URL to test our connection to the GitHub API. It can be replaced via constructor injection for testing. Implements ProbeURLFunc.

Types

type GitHubValidatedAPICache added in v0.33.0

type GitHubValidatedAPICache struct {
	// contains filtered or unexported fields
}

func (*GitHubValidatedAPICache) IsValid added in v0.33.0

func (g *GitHubValidatedAPICache) IsValid(address string, caBundleHash tlsconfigutil.CABundleHash) bool

func (*GitHubValidatedAPICache) MarkAsValidated added in v0.33.0

func (g *GitHubValidatedAPICache) MarkAsValidated(address string, caBundleHash tlsconfigutil.CABundleHash)

type GitHubValidatedAPICacheI added in v0.33.0

type GitHubValidatedAPICacheI interface {
	MarkAsValidated(address string, caBundleHash tlsconfigutil.CABundleHash)
	IsValid(address string, caBundleHash tlsconfigutil.CABundleHash) bool
}

func NewGitHubValidatedAPICache added in v0.33.0

func NewGitHubValidatedAPICache(cache *cache.Expiring) GitHubValidatedAPICacheI

type GitHubValidatedAPICacheKey added in v0.33.0

type GitHubValidatedAPICacheKey struct {
	// contains filtered or unexported fields
}

type ProbeURLFunc added in v0.34.0

type ProbeURLFunc func(ctx context.Context, client *http.Client, url string) error

type UpstreamGitHubIdentityProviderICache

type UpstreamGitHubIdentityProviderICache interface {
	SetGitHubIdentityProviders([]upstreamprovider.UpstreamGithubIdentityProviderI)
}

UpstreamGitHubIdentityProviderICache is a thread safe cache that holds a list of validated upstream GitHub IDP configurations.

Jump to

Keyboard shortcuts

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