authz

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 33 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 {
	SessionExpiration        string         `yaml:"sessionExpiration"`
	ErrorTemplate            string         `yaml:"errorTemplate"`
	ErrorTemplateContentType string         `yaml:"errorTemplateContentType"`
	Providers                []OIDCProvider `yaml:"providers"`
}

func ConfigFromYamlFile added in v0.1.0

func ConfigFromYamlFile(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 LogoutConfig added in v0.1.0

type LogoutConfig struct {
	RedirectURI string `yaml:"redirectURI"`
	Path        string `yaml:"path"`
}

type OIDCProvider

type OIDCProvider struct {
	HeaderMatch                    HeaderMatch  `yaml:"headerMatch"`
	Logout                         LogoutConfig `yaml:"logout"`
	CookieNamePrefix               string       `yaml:"cookieNamePrefix"`
	CallbackURI                    string       `yaml:"callbackURI"`
	ClientSecret                   string       `yaml:"clientSecret"`
	ClientID                       string       `yaml:"clientID"`
	PreAuthPolicy                  string       `yaml:"preAuthPolicy"`
	PostAuthPolicy                 string       `yaml:"postAuthPolicy"`
	IssuerURL                      string       `yaml:"issuerURL"`
	Scopes                         []string     `yaml:"scopes"`
	DisableSecureCookie            bool         `yaml:"disableSecureCookie"`
	DisablePassAuthorizationHeader bool         `yaml:"disablePassAuthorizationHeader"`
	DisableSourceAddressCheck      bool         `yaml:"disableSourceAddressCheck"`
	// contains filtered or unexported fields
}

type Service

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

func NewService

func NewService(cfg *Config, secretKey string, redisURL *url.URL) *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