Documentation
¶
Index ¶
- Constants
- Variables
- type Server
- type ServerOption
- func WithClientDataSigner(cdp *clientdata.Signer) ServerOption
- func WithFeatureGates(fg *commoncfg.FeatureGates) ServerOption
- func WithOIDCHandler(hdl oidcHandlerInterface) ServerOption
- func WithPolicyEngine(pe policies.Engine) ServerOption
- func WithSessionManager(sessionManager sessionManagerInterface) ServerOption
- func WithSessionPathPrefixes(sessionPathPrefixes []string) ServerOption
- func WithTrustedSubjects(m map[string]string) ServerOption
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 ¶
func (srv *Server) Check(ctx context.Context, req *envoy_auth.CheckRequest) (*envoy_auth.CheckResponse, error)
Check authorizes the request based on either client certificate, bearer token or session cookie.
type ServerOption ¶
ServerOption is used to configure a server.
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 WithSessionManager ¶ added in v0.9.8
func WithSessionManager(sessionManager sessionManagerInterface) ServerOption
func WithSessionPathPrefixes ¶ added in v0.9.8
func WithSessionPathPrefixes(sessionPathPrefixes []string) ServerOption
func WithTrustedSubjects ¶
func WithTrustedSubjects(m map[string]string) ServerOption
Click to show internal directories.
Click to hide internal directories.