authorization

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeForChart added in v1.4.0

func AuthorizeForChart(w http.ResponseWriter, req *http.Request, authzer authorizer.Authorizer, verb string, cg registryv1.ChartGroup, chartName string) (passed bool, err error)

AuthorizeForChart check if chart resource is authorized

func AuthorizeForChartGroup added in v1.4.0

func AuthorizeForChartGroup(w http.ResponseWriter, req *http.Request, authzer authorizer.Authorizer, verb string, cg registryv1.ChartGroup) (passed bool, err error)

AuthorizeForChartGroup check if chartgroup resource is authorized

func ChartNameVersionFromFile

func ChartNameVersionFromFile(file string) (name, version string, ok bool)

ChartNameVersionFromFile returns chart name and version from chart filename.

func WithAuthorization

func WithAuthorization(handler http.Handler, opts *Options) (http.Handler, error)

WithAuthorization creates an http handler that tries to authorized requests on to handler, and returns a forbidden error otherwise.

Types

type Options

type Options struct {
	AdminUsername  string
	ExternalScheme string
	LoopbackConfig *restclient.Config
	Authorizer     authorizer.Authorizer
}

Jump to

Keyboard shortcuts

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