auth

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VolumeContextKeyServiceAccountName = "csi.storage.k8s.io/serviceAccount.name"
	VolumeContextKeyPodNamespace       = "csi.storage.k8s.io/pod.namespace"
)

NodePublishVolume VolumeContext keys.

Variables

This section is empty.

Functions

func NewAltTokenSource added in v1.21.5

func NewAltTokenSource(ctx context.Context, tokenURL, tokenBody string) oauth2.TokenSource

NewAltTokenSource constructs a new alternate token source for generating tokens.

Types

type AltTokenSource added in v1.21.5

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

AltTokenSource is the structure holding the data for the functionality needed to generates tokens.

func (*AltTokenSource) Token added in v1.21.5

func (a *AltTokenSource) Token() (*oauth2.Token, error)

Token returns a token which may be used for authentication.

type FakeGCPTokenSource

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

func (*FakeGCPTokenSource) Token

func (ts *FakeGCPTokenSource) Token() (*oauth2.Token, error)

type GCPTokenSource

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

GCPTokenSource generates a GCP IAM SA token with a Kubernetes Service Account token.

func (*GCPTokenSource) FetchIdentityBindingToken added in v1.19.0

func (ts *GCPTokenSource) FetchIdentityBindingToken(ctx context.Context, k8sSAToken string, audience string) (*oauth2.Token, error)

fetch GCP IdentityBindingToken using the Kubernetes Service Account token by calling Security Token Service (STS) API.

func (*GCPTokenSource) Token

func (ts *GCPTokenSource) Token() (*oauth2.Token, error)

Token exchanges a GCP IAM SA Token with a Kubernetes Service Account token.

type TokenManager

type TokenManager interface {
	GetTokenSourceFromK8sServiceAccount(saNamespace, saName, saToken, audience string, fetchFromFile bool) oauth2.TokenSource
	GetIdentityProvider() string
	GetIdentityPool() string
}

func NewFakeTokenManager

func NewFakeTokenManager() TokenManager

func NewTokenManager

func NewTokenManager(meta metadata.Service, clientset clientset.Interface) TokenManager

Jump to

Keyboard shortcuts

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