policy

package
v0.0.0-...-200b26a Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

type Actions = map[Method]RoutePolicy

func NewActions

func NewActions() Actions

New creates a new Actions

type CrdKey

type CrdKey struct {
	Id      string
	CrdType v1.CrdType
}

CrdKey represents a CustomResourceDefinition ID

type Endpoint

type Endpoint struct {
	Service Service
	// Path holds a url path string
	Path string
	// Method holds an HTTP Method
	Method Method
}

Endpoint captures a request endpoint

type Method

type Method int
const (
	ALL Method = iota
	GET
	PUT
	POST
	DELETE
	PATCH
)

func NewMethod

func NewMethod(method string) Method

func (Method) String

func (m Method) String() string

type PolicyMapping

type PolicyMapping struct {
	Actions  []v1.PathPolicy
	Endpoint Endpoint
}

PolicyMapping captures information of created endpoints by policy

func NewPolicyMapping

func NewPolicyMapping(service Endpoint, actions []v1.PathPolicy) PolicyMapping

New creates a new ParsedPolicies

type RoutePolicy

type RoutePolicy struct {
	PolicyReference string
	Actions         []v1.PathPolicy
}

func NewRoutePolicy

func NewRoutePolicy() RoutePolicy

type Service

type Service struct {
	// Namespace is the group the service lives in
	Namespace string
	// Name is the name of the service
	Name string
}

Service identifies a Kubernetes service

type Type

type Type int

Type represents a policy types (WEB/API)

const (
	// JWT policy types specifies requests protected by API strategy
	JWT Type = iota
	// OIDC policy types specifies requests protected by WEB strategy
	OIDC
	// NONE policy specifies requests without protection
	NONE
)

func NewType

func NewType(t string) Type

func (Type) String

func (t Type) String() string

Directories

Path Synopsis
Package engine is responsible for making policy decisions Package engine is responsible for making policy decisions
Package engine is responsible for making policy decisions Package engine is responsible for making policy decisions
Package handler is responsible for monitoring and maintaining authn/z policies
Package handler is responsible for monitoring and maintaining authn/z policies
store

Jump to

Keyboard shortcuts

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