Apply different policies to specific paths for a pod

I have a quite common requirement and I’m just wondering if it is possible. So far I have had no luck.

Take a pod which serves the paths /base/path1 and /base/path2

The first path is a web application, the second is a REST service. I need to add JWT authorisation to the REST path but not the web application. I’m struggling to see how this can be done. Any ideas?

I have a more detailed description at stack overflow


Apologies, I’m a newbie to Istio. The way I was approaching the problem was completely wrong. I simply need to route all traffic to the service and apply a trigger rule in the policy to only apply for a specific path.

I’ve updated my stackoverflow question with more detail.

This may help