extauthz

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderForwardedClientCert = "x-forwarded-client-cert"
	HeaderAuthorization       = "authorization"
)
View Source
const (
	UNKNOWN checkResultCode = iota
	ALLOWED
	DENIED
	UNAUTHENTICATED

	ALWAYS_ALLOW = 100
)

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 processes the JWT token and/or client certificate to authorize the request.

type ServerOption

type ServerOption func(*Server) error

ServerOption is used to configure a server.

func WithClientDataFactory added in v0.4.0

func WithClientDataFactory(cdp *clientdata.Factory) ServerOption

func WithFeatureGates added in v0.3.0

func WithFeatureGates(fg *commoncfg.FeatureGates) ServerOption

func WithJWTHandler

func WithJWTHandler(hdl *jwthandler.Handler) ServerOption

func WithPolicyEngine

func WithPolicyEngine(pe policies.Engine) 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