identity

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 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_credentials.AuthCredentials
	// contains filtered or unexported fields
}

func NewApiKeyIdentity

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

NewApiKeyIdentity creates a new instance of APIKey

func (*APIKey) Call

func (apiKey *APIKey) Call(pipeline common.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_credentials.AuthCredentials

	Secret string `yaml:"secret"`
}

func (*HMAC) Call

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

type KubernetesAuth

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

func NewKubernetesAuthIdentity

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

func (*KubernetesAuth) Call

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

type MTLS

type MTLS struct {
	auth_credentials.AuthCredentials

	PEM string `yaml:"pem"`
}

func (*MTLS) Call

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

type OAuth2

type OAuth2 struct {
	auth_credentials.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_credentials.AuthCredentials) *OAuth2

func (*OAuth2) Call

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

type OIDC

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

func NewOIDC

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

func (*OIDC) Call

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

func (*OIDC) Clean added in v0.6.0

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

Clean ensures the shutdown channel is closed and any go routines setup by configureProviderRefresh are cleaned up

func (*OIDC) GetURL

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

Jump to

Keyboard shortcuts

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