accesspolicy

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameKey  = "accessPolicy"
	RouteKey = "route"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessPolicy

type AccessPolicy struct {
	Name         string
	Oidc         Oidc
	Default      Route
	Routes       Routes
	VirtualHosts []string
}

func New

func New(ap *api.AccessPolicy, secret *core.Secret) (*AccessPolicy, error)
type Header struct {
	Name  string
	Value string
	Roles []string
}

type Headers

type Headers []Header

type Oidc

type Oidc struct {
	Provider     openidprovider.OpenIdProvider
	ClientId     string
	ClientSecret string
	TokenSecret  []byte
	Callback     url.URL
}

func (Oidc) IsCallback

func (oidc Oidc) IsCallback(url url.URL) bool

func (Oidc) OAuth2

func (oidc Oidc) OAuth2(url url.URL) *oauth2.Config

type Route

type Route struct {
	EnableAuthz bool
	Roles       []string
	Headers     Headers
}

type Routes

type Routes map[string]Route

type Store

type Store interface {
	Get(string) *AccessPolicy
	Update(context.Context, *AccessPolicy)
	Delete(context.Context, string)
	Stream() <-chan AccessPolicy
}

func NewAccessPolicyStore

func NewAccessPolicyStore() Store

Jump to

Keyboard shortcuts

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