Authentication policy with okta is not working

Hi We are using aws -> istio -> okta for authentication. we configured our services with aws and istio. Wanted to apply OKTA authtication policy i.e, JWT verification similar to auth0. Even if we applied the policy, requests are not getting authenticated.

Below is the configuration
apiVersion: authentication.istio.io/v1alpha1
kind: Policy
metadata:
name: ingressgateway-policy
namespace: test
spec:
targets:

  • name: studio-beffe
    peers:
  • mtls: {}
    origins:
  • jwt:
    audiences:
    • “api://default”
      issuer: “https://{okta-url}/oauth2/default”
      jwksUri: “https://{okta-url}oauth2/default/v1/keys”
      principalBinding: USE_ORIGIN

Let us know if we miss anything or anything needs to be changed?

Policy looks correct to me. Did you take a look at operation guide https://istio.io/docs/ops/common-problems/security-issues/#end-user-authentication-fails ?