authz

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthorized = errors.New("unauthorized operation")

Functions

func WithAuthorization

func WithAuthorization(handler, failed http.Handler, permissionsClient v1.PermissionsServiceClient, watchClient v1.WatchServiceClient, workflowClient *client.Client, matcher *rules.Matcher, inputExtractor rules.ResolveInputExtractor) (http.Handler, error)

func WithAuthzData

func WithAuthzData(parent context.Context, info *AuthzData) context.Context

WithAuthzData returns a copy of parent in which the authzdata value is set

Types

type AuthzData

type AuthzData struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func AuthzDataFrom

func AuthzDataFrom(ctx context.Context) (*AuthzData, bool)

AuthzDataFrom returns the value of the authzdata key on the ctx

func (*AuthzData) FilterList

func (d *AuthzData) FilterList(body []byte) ([]byte, error)

func (*AuthzData) FilterObject

func (d *AuthzData) FilterObject(pom *metav1.PartialObjectMetadata, body []byte) ([]byte, error)

func (*AuthzData) FilterResp

func (d *AuthzData) FilterResp(resp *http.Response) error

func (*AuthzData) FilterTable

func (d *AuthzData) FilterTable(body []byte) ([]byte, error)

func (*AuthzData) FilterWatch

func (d *AuthzData) FilterWatch(resp *http.Response) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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