Documentation ¶
Index ¶
- func AdmissionMiddleware(logger *zap.Logger, resource *authorization.Resource, ...) func(http.Handler) http.Handler
- func AuthenticationMiddleware(logger *zap.Logger, cookieAccessName string, cookieRefreshName string, ...) func(http.Handler) http.Handler
- func DenyMiddleware(logger *zap.Logger, ...) func(http.Handler) http.Handler
- func EntrypointMiddleware(logger *zap.Logger) func(http.Handler) http.Handler
- func ForwardAuthMiddleware(logger *zap.Logger, oAuthURI string) func(http.Handler) http.Handler
- func HmacMiddleware(logger *zap.Logger, encKey string) func(http.Handler) http.Handler
- func IdentityHeadersMiddleware(logger *zap.Logger, custom []string, cookieAccessName string, ...) func(http.Handler) http.Handler
- func LoggingMiddleware(logger *zap.Logger, verbose bool) func(http.Handler) http.Handler
- func MethodCheckMiddleware(logger *zap.Logger) func(http.Handler) http.Handler
- func ProxyDenyMiddleware(logger *zap.Logger) func(http.Handler) http.Handler
- func ProxyMiddleware(logger *zap.Logger, corsOrigins []string, headers map[string]string, ...) func(http.Handler) http.Handler
- func RequestIDMiddleware(header string) func(http.Handler) http.Handler
- func ResponseHeaderMiddleware(headers map[string]string) func(http.Handler) http.Handler
- func SecurityMiddleware(logger *zap.Logger, allowedHosts []string, browserXSSFilter bool, ...) func(http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdmissionMiddleware ¶
func AdmissionMiddleware( logger *zap.Logger, resource *authorization.Resource, matchClaims map[string]string, accessForbidden func(wrt http.ResponseWriter, req *http.Request) context.Context, ) func(http.Handler) http.Handler
AdmissionMiddleware is responsible for checking the access token against the protected resource
func AuthenticationMiddleware ¶
func AuthenticationMiddleware( logger *zap.Logger, cookieAccessName string, cookieRefreshName string, getIdentity func(req *http.Request, tokenCookie string, tokenHeader string) (*models.UserContext, error), httpClient *http.Client, enableIDPSessionCheck bool, provider *oidc3.Provider, skipTokenVerification bool, clientID string, skipAccessTokenClientIDCheck bool, skipAccessTokenIssuerCheck bool, accessForbidden func(wrt http.ResponseWriter, req *http.Request) context.Context, enableRefreshTokens bool, redirectionURL string, cookMgr *cookie.Manager, enableEncryptedToken bool, forceEncryptedCookie bool, encryptionKey string, redirectToAuthorization func(wrt http.ResponseWriter, req *http.Request) context.Context, newOAuth2Config func(redirectionURL string) *oauth2.Config, store storage.Storage, accessTokenDuration time.Duration, ) func(http.Handler) http.Handler
AuthenticationMiddleware is responsible for verifying the access token
func DenyMiddleware ¶
func DenyMiddleware( logger *zap.Logger, accessForbidden func(wrt http.ResponseWriter, req *http.Request) context.Context, ) func(http.Handler) http.Handler
DenyMiddleware
func EntrypointMiddleware ¶
entrypointMiddleware is custom filtering for incoming requests
func ForwardAuthMiddleware ¶
ForwardAuthMiddleware
func HmacMiddleware ¶
HmacMiddleware verifies hmac
func IdentityHeadersMiddleware ¶
func IdentityHeadersMiddleware( logger *zap.Logger, custom []string, cookieAccessName string, cookieRefreshName string, noProxy bool, enableTokenHeader bool, enableAuthzHeader bool, enableAuthzCookies bool, ) func(http.Handler) http.Handler
IdentityHeadersMiddleware is responsible for adding the authentication headers to upstream
func LoggingMiddleware ¶
loggingMiddleware is a custom http logger
func MethodCheckMiddleware ¶
MethodCheck middleware
func ProxyDenyMiddleware ¶
ProxyDenyMiddleware just block everything
func ProxyMiddleware ¶
func ProxyMiddleware( logger *zap.Logger, corsOrigins []string, headers map[string]string, endpoint *url.URL, preserveHost bool, upstream core.ReverseProxy, ) func(http.Handler) http.Handler
ProxyMiddleware is responsible for handles reverse proxy request to the upstream endpoint
func RequestIDMiddleware ¶
requestIDMiddleware is responsible for adding a request id if none found
func ResponseHeaderMiddleware ¶
ResponseHeaderMiddleware is responsible for adding response headers
func SecurityMiddleware ¶
func SecurityMiddleware( logger *zap.Logger, allowedHosts []string, browserXSSFilter bool, contentSecurityPolicy string, contentTypeNosniff bool, frameDeny bool, sslRedirect bool, accessForbidden func(wrt http.ResponseWriter, req *http.Request) context.Context, ) func(http.Handler) http.Handler
SecurityMiddleware performs numerous security checks on the request
Types ¶
This section is empty.