authz

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 31 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"`
	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"`
	ClientID         string       `yaml:"clientID"`
	CallbackURI      string       `yaml:"callbackURI"`
	ClientSecret     string       `yaml:"clientSecret"`
	CookieNamePrefix string       `yaml:"cookieNamePrefix"`
	PreAuthPolicy    string       `yaml:"preAuthPolicy"`
	PostAuthPolicy   string       `yaml:"postAuthPolicy"`
	IssuerURL        string       `yaml:"issuerURL"`
	Scopes           []string     `yaml:"scopes"`
	SecureCookie     bool         `yaml:"secureCookie"`
	// 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, redisAddrs []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