diff --git a/main.go b/main.go index c17bfa926..d9f056437 100644 --- a/main.go +++ b/main.go @@ -265,6 +265,11 @@ func main() { for _, pathAllowed := range cfg.allowPaths { found, err = path.Match(pathAllowed, req.URL.Path) if err != nil { + http.Error( + w, + http.StatusText(http.StatusInternalServerError), + http.StatusInternalServerError, + ) return } if found { @@ -280,6 +285,11 @@ func main() { for _, pathIgnored := range cfg.ignorePaths { ignorePathFound, err = path.Match(pathIgnored, req.URL.Path) if err != nil { + http.Error( + w, + http.StatusText(http.StatusInternalServerError), + http.StatusInternalServerError, + ) return } if ignorePathFound { diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index 803029c87..7de39912c 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -127,7 +127,7 @@ type krpAuthorizerAttributesGetter struct { // GetRequestAttributes populates authorizer attributes for the requests to kube-rbac-proxy. func (n krpAuthorizerAttributesGetter) GetRequestAttributes(u user.Info, r *http.Request) []authorizer.Attributes { - apiVerb := "" + apiVerb := "*" switch r.Method { case "POST": apiVerb = "create"