kubeauth

package
v0.0.0-...-100cc6e Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	KubeJWTAuthenticatorType = "KubeJWTAuthenticator"
)

Variables

This section is empty.

Functions

func ExtractClusterID

func ExtractClusterID(ctx context.Context) cluster.ID

Types

type KubeJWTAuthenticator

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

KubeJWTAuthenticator authenticates K8s JWTs.

func NewKubeJWTAuthenticator

func NewKubeJWTAuthenticator(
	meshHolder mesh.Holder,
	client kubernetes.Interface,
	clusterID cluster.ID,
	remoteKubeClientGetter RemoteKubeClientGetter,
) *KubeJWTAuthenticator

NewKubeJWTAuthenticator creates a new kubeJWTAuthenticator.

func (*KubeJWTAuthenticator) Authenticate

func (a *KubeJWTAuthenticator) Authenticate(authRequest security.AuthContext) (*security.Caller, error)

Authenticate authenticates the call using the K8s JWT from the context. The returned Caller.Identities is in SPIFFE format.

func (*KubeJWTAuthenticator) AuthenticatorType

func (a *KubeJWTAuthenticator) AuthenticatorType() string

type RemoteKubeClientGetter

type RemoteKubeClientGetter interface {
	GetRemoteKubeClient(clusterID cluster.ID) kubernetes.Interface
	ListClusters() []cluster.ID
}

Jump to

Keyboard shortcuts

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