Skip to content

Commit

Permalink
httpproxy: fix the order for filter: AuthZ & AuthN (#5840)
Browse files Browse the repository at this point in the history
Signed-off-by: gang.liu <[email protected]>
  • Loading branch information
izturn authored Nov 15, 2023
1 parent 9b4f666 commit 42ee2b4
Show file tree
Hide file tree
Showing 6 changed files with 390 additions and 1,270 deletions.
3 changes: 3 additions & 0 deletions changelogs/unreleased/5840-izturn-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## JWT Authentication happens before External Authorization

Fixes a bug where when the external authorization filter and JWT authentication filter were both configured, the external authorization filter was executed _before_ the JWT authentication filter. Now, JWT authentication happens before external authorization when they are both configured.
4 changes: 2 additions & 2 deletions internal/envoy/v3/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,9 +815,9 @@ func FilterExternalAuthz(externalAuthorization *dag.ExternalAuthorization) *http
}
}

// FilterJWTAuth returns a `jwt_authn` filter configured with the
// FilterJWTAuthN returns a `jwt_authn` filter configured with the
// requested parameters.
func FilterJWTAuth(jwtProviders []dag.JWTProvider) *http.HttpFilter {
func FilterJWTAuthN(jwtProviders []dag.JWTProvider) *http.HttpFilter {
if len(jwtProviders) == 0 {
return nil
}
Expand Down
Loading

0 comments on commit 42ee2b4

Please sign in to comment.