authorization

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONPatternMatching

type JSONPatternMatching struct {
	Rules []common.JSONPatternMatchingRule
}

func (*JSONPatternMatching) Call

func (jsonAuth *JSONPatternMatching) Call(pipeline common.AuthPipeline, ctx context.Context) (bool, error)

type KubernetesAuthz added in v0.5.0

type KubernetesAuthz struct {
	User               common.JSONValue
	Groups             []string
	ResourceAttributes *KubernetesAuthzResourceAttributes
	// contains filtered or unexported fields
}

func NewKubernetesAuthz added in v0.5.0

func NewKubernetesAuthz(user common.JSONValue, groups []string, resourceAttributes *KubernetesAuthzResourceAttributes) (*KubernetesAuthz, error)

func (*KubernetesAuthz) Call added in v0.5.0

func (k *KubernetesAuthz) Call(pipeline common.AuthPipeline, ctx context.Context) (bool, error)

type KubernetesAuthzResourceAttributes added in v0.5.0

type KubernetesAuthzResourceAttributes struct {
	Namespace   common.JSONValue
	Group       common.JSONValue
	Resource    common.JSONValue
	Name        common.JSONValue
	SubResource common.JSONValue
	Verb        common.JSONValue
}

type OPA

type OPA struct {
	Rego              string `yaml:"rego"`
	OPAExternalSource OPAExternalSource
	// contains filtered or unexported fields
}

func NewOPAAuthorization

func NewOPAAuthorization(policyName string, rego string, externalSource OPAExternalSource, nonce int, ctx context.Context) (*OPA, error)

func (*OPA) Call

func (opa *OPA) Call(pipeline common.AuthPipeline, ctx context.Context) (bool, error)

type OPAExternalSource added in v0.5.0

type OPAExternalSource struct {
	Endpoint     string
	SharedSecret string
	auth_credentials.AuthCredentials
}

Jump to

Keyboard shortcuts

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