apiVersion: "config.istio.io/v1alpha2"
kind: denier
metadata:
  name: handler
  namespace: istio-system
spec:
  status:
    code: 7
    message: Not allowed
---
apiVersion: "config.istio.io/v1alpha2"
kind: checknothing
metadata:
  name: denyrequest
  namespace: istio-system
spec:
 
---
apiVersion: "config.istio.io/v1alpha2"
kind: rule
metadata:
  name: denyingress
  namespace: istio-system
spec:
  match: destination.labels["istio"] == "ingress" && request.headers["x-user"] == ""
  actions:
  - handler: handler.denier.istio-system
    instances: [ denyrequest.checknothing.istio-system ]
