Skip to content

Commit

Permalink
Skip Istio AuthorizationPolicy rules for GWAPI PathMatchRegularExpres…
Browse files Browse the repository at this point in the history
…sion and HeaderMatchRegularExpression
  • Loading branch information
guicassolato committed Oct 2, 2023
1 parent f5691e8 commit 32b1ce4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/authpolicy_istio_authorization_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func istioAuthorizationPolicyRulesFromHTTPRouteRule(rule gatewayapiv1beta1.HTTPR
case gatewayapiv1beta1.PathMatchExact:
operator = ""
case gatewayapiv1beta1.PathMatchRegularExpression:
// TODO(@guicassolato): skip this rule as it is not supported by Istio
// skip this rule as it is not supported by Istio - Authorino will check it anyway
continue
}
}
Expand All @@ -396,7 +396,8 @@ func istioAuthorizationPolicyRulesFromHTTPRouteRule(rule gatewayapiv1beta1.HTTPR
for idx := range match.Headers {
header := match.Headers[idx]
if header.Type != nil && *header.Type == gatewayapiv1beta1.HeaderMatchRegularExpression {
// TODO(@guicassolato): skip this rule as it is not supported by Istio
// skip this rule as it is not supported by Istio - Authorino will check it anyway
continue
}
headerCondition := &istiosecurity.Condition{
Key: fmt.Sprintf("request.headers[%s]", header.Name),
Expand Down

0 comments on commit 32b1ce4

Please sign in to comment.