extauthz

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderForwardedClientCert = "x-forwarded-client-cert"
	HeaderAuthorization       = "authorization"
	HeaderCookie              = "cookie"
	SessionCookieName         = "__Host-Http-SESSION"
)
View Source
const (
	UNKNOWN checkResultCode = iota
	ALWAYS_ALLOW
	ALLOWED
	DENIED
	UNAUTHENTICATED
)
View Source
const (
	DefaultCMKPathPrefix = "/cmk/v1/"
)

Variables

View Source
var (
	ReExSubject        = regexp.MustCompile(`Subject="([^"]+)"`)
	ErrSubjectNotFound = errors.New("subject not found")
)

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts ...ServerOption) (*Server, error)

NewServer creates a new server and applies the given options.

func (*Server) Check

Check authorizes the request based on either client certificate, bearer token or session cookie.

func (*Server) Close added in v0.5.0

func (s *Server) Close() error

Close starts any internal processes required by the server.

func (*Server) Start added in v0.5.0

func (s *Server) Start() error

Start starts any internal processes required by the server.

type ServerOption

type ServerOption func(*Server) error

ServerOption is used to configure a server.

func WithCMKPathPrefix added in v0.5.0

func WithCMKPathPrefix(cmkPathPrefix string) ServerOption

func WithClientDataSigner added in v0.5.0

func WithClientDataSigner(cdp *clientdata.Signer) ServerOption

func WithFeatureGates added in v0.3.0

func WithFeatureGates(fg *commoncfg.FeatureGates) ServerOption

func WithOIDCHandler added in v0.5.0

func WithOIDCHandler(hdl oidcHandlerInterface) ServerOption

func WithPolicyEngine

func WithPolicyEngine(pe policies.Engine) ServerOption

func WithSessionCache added in v0.5.0

func WithSessionCache(sessionCache sessionLoaderInterface) ServerOption

func WithTrustedSubjects

func WithTrustedSubjects(m map[string]string) ServerOption

Jump to

Keyboard shortcuts

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