auth

package
v2.11.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: Apache-2.0 Imports: 18 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanI

func CanI(ctx context.Context, verb, resource, namespace, name string) (bool, error)

func GetClaimSet

func GetClaimSet(ctx context.Context) *jws.ClaimSet

func GetKubeClient

func GetKubeClient(ctx context.Context) kubernetes.Interface

func GetWfClient

func GetWfClient(ctx context.Context) versioned.Interface

Types

type ContextKey

type ContextKey string
const (
	WfKey       ContextKey = "versioned.Interface"
	KubeKey     ContextKey = "kubernetes.Interface"
	ClaimSetKey ContextKey = "jws.ClaimSet"
)

type Gatekeeper

type Gatekeeper interface {
	Context(ctx context.Context) (context.Context, error)
	UnaryServerInterceptor() grpc.UnaryServerInterceptor
	StreamServerInterceptor() grpc.StreamServerInterceptor
}

func NewGatekeeper

func NewGatekeeper(modes Modes, wfClient versioned.Interface, kubeClient kubernetes.Interface, restConfig *rest.Config, ssoIf sso.Interface) (Gatekeeper, error)

type Mode

type Mode string
const (
	Client Mode = "client"
	Server Mode = "server"
	SSO    Mode = "sso"
)

func GetMode

func GetMode(authorisation string) (Mode, error)

type Modes

type Modes map[Mode]bool

func (Modes) Add

func (m Modes) Add(value string) error

Directories

Path Synopsis
sso

Jump to

Keyboard shortcuts

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