Skip to content

Commit

Permalink
apply jwt auth filters before rbacfilters
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodingenthusiast committed Jul 5, 2023
1 parent ba1a2c3 commit c3fa78b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions agent/xds/listeners.go
Original file line number Diff line number Diff line change
Expand Up @@ -1381,12 +1381,11 @@ func (s *ResourceGenerator) makeInboundListener(cfgSnap *proxycfg.ConfigSnapshot
if err != nil {
return nil, err
}

filterOpts.httpAuthzFilters = []*envoy_http_v3.HttpFilter{rbacFilter}

filterOpts.httpAuthzFilters = []*envoy_http_v3.HttpFilter{}
if jwtFilter != nil {
filterOpts.httpAuthzFilters = append(filterOpts.httpAuthzFilters, jwtFilter)
}
filterOpts.httpAuthzFilters = append(filterOpts.httpAuthzFilters, rbacFilter)

meshConfig := cfgSnap.MeshConfig()
includeXFCC := meshConfig == nil || meshConfig.HTTP == nil || !meshConfig.HTTP.SanitizeXForwardedClientCert
Expand Down

0 comments on commit c3fa78b

Please sign in to comment.