identity

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey

type APIKey struct {
	auth.AuthCredentials
	// contains filtered or unexported fields
}

func NewApiKeyIdentity

func NewApiKeyIdentity(name string, labelSelectors map[string]string, namespace string, authCred auth.AuthCredentials, k8sClient client.Reader, ctx context.Context) *APIKey

NewApiKeyIdentity creates a new instance of APIKey

func (*APIKey) Call

func (apiKey *APIKey) Call(pipeline auth.AuthPipeline, _ context.Context) (interface{}, error)

Call will evaluate the credentials within the request against the authorized ones

func (*APIKey) FindSecretByName

func (apiKey *APIKey) FindSecretByName(lookup types.NamespacedName) *v1.Secret

func (*APIKey) GetCredentialsFromCluster

func (apiKey *APIKey) GetCredentialsFromCluster(ctx context.Context) error

GetCredentialsFromCluster will get the k8s secrets and update the APIKey instance

type HMAC

type HMAC struct {
	auth.AuthCredentials

	Secret string `yaml:"secret"`
}

func (*HMAC) Call

func (self *HMAC) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)

type KubernetesAuth

type KubernetesAuth struct {
	auth.AuthCredentials
	// contains filtered or unexported fields
}

func NewKubernetesAuthIdentity

func NewKubernetesAuthIdentity(authCred auth.AuthCredentials, audiences []string) (*KubernetesAuth, error)

func (*KubernetesAuth) Call

func (kubeAuth *KubernetesAuth) Call(pipeline auth.AuthPipeline, ctx gocontext.Context) (interface{}, error)

type MTLS

type MTLS struct {
	auth.AuthCredentials

	PEM string `yaml:"pem"`
}

func (*MTLS) Call

func (self *MTLS) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)

type Noop

type Noop struct {
	auth.AuthCredentials
}

func (*Noop) Call

func (n *Noop) Call(pipeline auth.AuthPipeline, ctx context.Context) (interface{}, error)

type OAuth2

type OAuth2 struct {
	auth.AuthCredentials

	TokenIntrospectionUrl string `yaml:"tokenIntrospectionUrl"`
	TokenTypeHint         string `yaml:"tokenTypeHint,omitempty"`
	ClientID              string `yaml:"clientId"`
	ClientSecret          string `yaml:"clientSecret"`
}

func NewOAuth2Identity

func NewOAuth2Identity(tokenIntrospectionUrl string, tokenTypeHint string, clientID string, clientSecret string, creds auth.AuthCredentials) *OAuth2

func (*OAuth2) Call

func (oauth *OAuth2) Call(pipeline auth.AuthPipeline, ctx gocontext.Context) (interface{}, error)

type OIDC

type OIDC struct {
	auth.AuthCredentials
	Endpoint string `yaml:"endpoint"`
	// contains filtered or unexported fields
}

func NewOIDC

func NewOIDC(endpoint string, creds auth.AuthCredentials, ttl int, ctx gocontext.Context) *OIDC

func (*OIDC) Call

func (oidc *OIDC) Call(pipeline auth.AuthPipeline, ctx gocontext.Context) (interface{}, error)

func (*OIDC) Clean

func (oidc *OIDC) Clean(ctx gocontext.Context) error

Clean ensures the goroutine started by configureProviderRefresh is cleaned up

func (*OIDC) GetURL

func (oidc *OIDC) GetURL(name string, ctx gocontext.Context) (*url.URL, error)

Jump to

Keyboard shortcuts

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