authz

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "envoy-authz"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Providers []OIDCProvider `yaml:"providers"`
}

func ConfigFromXmlFile

func ConfigFromXmlFile(filename string) (*Config, error)

func (*Config) Match

func (c *Config) Match(headerName, headerValue string) *OIDCProvider

type HeaderMatch

type HeaderMatch struct {
	Name   string `yaml:"name"`
	Exact  string `yaml:"exact"`
	Regex  string `yaml:"regex"`
	Prefix string `yaml:"prefix"`
}

type OIDCProvider

type OIDCProvider struct {
	IssuerURL        string      `yaml:"issuerURL"`
	CallbackURI      string      `yaml:"callbackURI"`
	ClientID         string      `yaml:"clientID"`
	ClientSecret     string      `yaml:"clientSecret"`
	Scopes           []string    `yaml:"scopes"`
	CookieNamePrefix string      `yaml:"cookieNamePrefix"`
	SecureCookie     bool        `yaml:"secureCookie"`
	OPAEnabled       bool        `yaml:"opaEnabled"`
	AllowAuthHeader  bool        `yaml:"allowAuthHeaderPassThrough"`
	HeaderMatch      HeaderMatch `yaml:"headerMatch"`
	// contains filtered or unexported fields
}

type Service

type Service struct {
	authv3connect.UnimplementedAuthorizationHandler
	// contains filtered or unexported fields
}

func NewService

func NewService(cfg *Config, opaURL, secretKey string) *Service

func (*Service) Check

func (*Service) Name

func (s *Service) Name() string

func (*Service) NewHandler

func (s *Service) NewHandler() (string, http.Handler)

Jump to

Keyboard shortcuts

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