auth

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContextClientKey is the key used to identify the Client value in Context
	ContextClientKey key = iota
)

Variables

This section is empty.

Functions

func IsAuthorized

func IsAuthorized(c *v1.Client, namespace, verb, group, resource, name string) (allowed bool, err error)

func StreamingInterceptor

func StreamingInterceptor(kubeConfig *v1.Config, db *v1.DB, sysConfig v1.SystemConfig) grpc.StreamServerInterceptor

StreamingInterceptor provides an authentication wrapper around streaming requests.

func UnaryInterceptor

func UnaryInterceptor(kubeConfig *v1.Config, db *v1.DB, sysConfig v1.SystemConfig) grpc.UnaryServerInterceptor

UnaryInterceptor performs authentication checks. The two main cases are:

  1. Is the token valid? This is used for logging in.
  2. Is there a token? There should be a token for everything except logging in.

Types

This section is empty.

Jump to

Keyboard shortcuts

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