79344942

Date: 2025-01-10 07:52:59
Score: 0.5
Natty:
Report link

Finally, I found a solution to this.

As of date, it is not possible to match on a "substring" in Istio's AuthorizationPolicy. You can either match with a prefix (e.g "abc*") or suffix ("*abc") but not something in the middle (e.g * abc *).

To solve this, I used an envoyFilter to generate a custom header which only contains the exact header value to match against and then used the same in the AuthorizationPolicy.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: pep8