forward-auth: validate using forwarded uri header (#600)

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
Co-authored-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
branchmispredictor 2020-04-20 13:56:30 -04:00 committed by GitHub
parent 262d35d482
commit 0de3c431a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 62 additions and 18 deletions

View file

@ -133,7 +133,7 @@ func (p *Proxy) authorize(w http.ResponseWriter, r *http.Request) error {
Bool("allow", authz.GetAllow()).
Bool("expired", authz.GetSessionExpired()).
Msg("proxy/authorize: deny")
return httputil.NewError(http.StatusUnauthorized, errors.New("request denied"))
return httputil.NewError(http.StatusForbidden, errors.New("request denied"))
}
r.Header.Set(httputil.HeaderPomeriumJWTAssertion, authz.GetSignedJwt())