Currently Authorization policy rules condition values are only supported with static string values, what I need is to verify the request header value with JWT claims. Is there any way I can check the same per http route
Looking for something like below
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: detail-auth
namespace: bookinfo
spec:
action: ALLOW
selector:
matchLabels:
app: details
rules:
- to:
- operation:
methods: ["GET"]
paths: ["/details/*"]
when:
- key: request.auth.claims[permissions]
values: request.headers[x-customer-id] -> is it possible to do like this?
- key: request.auth.claims[permissions]
values: [PAYMENTS_READ]