Skip to content

Commit

Permalink
fix(translator): set ignoreCase for header matchers in extAuth (#3420)
Browse files Browse the repository at this point in the history
fix: set ignoreCase for header matchers in extAuth

Signed-off-by: haoqixu <hq.xu0o0@gmail.com>
  • Loading branch information
haoqixu committed May 20, 2024
1 parent dedc446 commit 8206e11
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/xds/translator/extauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ func extAuthConfig(extAuth *ir.ExtAuth) *extauthv3.ExtAuthz {
MatchPattern: &matcherv3.StringMatcher_Exact{
Exact: header,
},
IgnoreCase: true,
})
}

Expand Down Expand Up @@ -178,6 +179,7 @@ func httpService(http *ir.HTTPExtAuthService) *extauthv3.HttpService {
MatchPattern: &matcherv3.StringMatcher_Exact{
Exact: header,
},
IgnoreCase: true,
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
allowedHeaders:
patterns:
- exact: header1
ignoreCase: true
- exact: header2
ignoreCase: true
grpcService:
envoyGrpc:
authority: grpc-backend.default:9000
Expand All @@ -38,7 +40,9 @@
allowedUpstreamHeaders:
patterns:
- exact: header1
ignoreCase: true
- exact: header2
ignoreCase: true
pathPrefix: /auth
serverUri:
cluster: securitypolicy/default/policy-for-gateway-1/envoy-gateway/http-backend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
allowedUpstreamHeaders:
patterns:
- exact: header1
ignoreCase: true
- exact: header2
ignoreCase: true
pathPrefix: /auth
serverUri:
cluster: securitypolicy/default/policy-for-http-route-2/envoy-gateway/http-backend
Expand Down Expand Up @@ -86,7 +88,9 @@
allowedUpstreamHeaders:
patterns:
- exact: header1
ignoreCase: true
- exact: header2
ignoreCase: true
pathPrefix: /auth
serverUri:
cluster: securitypolicy/default/policy-for-http-route-2/envoy-gateway/http-backend
Expand Down

0 comments on commit 8206e11

Please sign in to comment.