authz

package
v0.17.3-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2019 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuthorizerNotEnabled = herodot.DefaultError{
	ErrorField:  "authorizer matching this route is misconfigured or disabled",
	CodeField:   http.StatusInternalServerError,
	StatusField: http.StatusText(http.StatusInternalServerError),
}

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	Authorize(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, rule pipeline.Rule) error
	GetID() string
	Validate() error
}

type AuthorizerAllow

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

func NewAuthorizerAllow

func NewAuthorizerAllow(c configuration.Provider) *AuthorizerAllow

func (*AuthorizerAllow) Authorize

func (a *AuthorizerAllow) Authorize(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error

func (*AuthorizerAllow) GetID

func (a *AuthorizerAllow) GetID() string

func (*AuthorizerAllow) Validate

func (a *AuthorizerAllow) Validate() error

type AuthorizerDeny

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

func NewAuthorizerDeny

func NewAuthorizerDeny(c configuration.Provider) *AuthorizerDeny

func (*AuthorizerDeny) Authorize

func (a *AuthorizerDeny) Authorize(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, _ pipeline.Rule) error

func (*AuthorizerDeny) GetID

func (a *AuthorizerDeny) GetID() string

func (*AuthorizerDeny) Validate

func (a *AuthorizerDeny) Validate() error

type AuthorizerKetoEngineACPORY

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

func (*AuthorizerKetoEngineACPORY) Authorize

func (*AuthorizerKetoEngineACPORY) GetID

func (*AuthorizerKetoEngineACPORY) ParseSubject

func (a *AuthorizerKetoEngineACPORY) ParseSubject(session *authn.AuthenticationSession, templateId, templateString string) (string, error)

func (*AuthorizerKetoEngineACPORY) Validate

func (a *AuthorizerKetoEngineACPORY) Validate() error

func (*AuthorizerKetoEngineACPORY) WithContextCreator

func (a *AuthorizerKetoEngineACPORY) WithContextCreator(f authorizerKetoWardenContext)

type AuthorizerKetoEngineACPORYConfiguration

type AuthorizerKetoEngineACPORYConfiguration struct {
	RequiredAction   string `json:"required_action" valid:",required"`
	RequiredResource string `json:"required_resource" valid:",required"`
	Subject          string `json:"subject"`
	Flavor           string `json:"flavor"`
}

type AuthorizerKetoEngineACPORYRequestBody

type AuthorizerKetoEngineACPORYRequestBody struct {
	Action   string                 `json:"action"`
	Context  map[string]interface{} `json:"context"`
	Resource string                 `json:"resource"`
	Subject  string                 `json:"subject"`
}

type Registry

type Registry interface {
	AvailablePipelineAuthorizers() []string
	PipelineAuthorizer(string) (Authorizer, error)
}

Jump to

Keyboard shortcuts

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