accesscontroller

package
v0.0.0-...-0e4f5d7 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterAdapter

func FilterAdapter(controller AccessController) cache.ObjectFilter

Types

type AccessControlledResource

type AccessControlledResource interface {
	GetControllingResourceAttributes() *authv1.ResourceAttributes
}

type AccessController

type AccessController interface {
	CanRead(obj interface{}) (bool, error)
	ViewFilter() cache.ObjectFilter
	GetState() (bool, interface{})
}

Access controllers make decisions concerning access to objects. An instance must not be shared between threads.

func NewAllowAllAccessController

func NewAllowAllAccessController() AccessController

func NewKubernetesRBACAccessController

func NewKubernetesRBACAccessController(clientSet kubernetes.Interface, existingState interface{}) AccessController

Creates a RBAC-based access controller with the given authentication state. The authentication state may be nil or that returned by the GetState method of a previous instance.

Jump to

Keyboard shortcuts

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