local

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdapterHookHandler

func NewAdapterHookHandler(authClient versionedclientset.Interface, enforcer *casbin.SyncedEnforcer, versionedInformers versionedinformers.SharedInformerFactory, reloadInterval time.Duration) genericapiserver.PostStartHookProvider

NewAdapterHookHandler creates a new adapterHookHandler object.

Types

type Authorizer

type Authorizer struct {
	// contains filtered or unexported fields
}

Authorizer implement the authorize interface that use local repository to authorize the subject access review.

func NewAuthorizer

func NewAuthorizer(authClient authinternalclient.AuthInterface, enforcer *casbin.SyncedEnforcer, privilegedUsername string) *Authorizer

NewAuthorizer creates a local repository authorizer and returns it.

func (*Authorizer) Authorize

func (a *Authorizer) Authorize(ctx context.Context, attr authorizer.Attributes) (authorized authorizer.Decision, reason string, err error)

Authorize to determine the subject access.

Jump to

Keyboard shortcuts

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