apiVersion: "config.istio.io/v1alpha2"
kind: denier
metadata:
  name: denyall
spec:
  status:
    code: 7
    message: Not allowed
---
apiVersion: "config.istio.io/v1alpha2"
kind: checknothing
metadata:
  name: denyrequest
spec:
---
apiVersion: "config.istio.io/v1alpha2"
kind: rule
metadata:
  name: mixercachebuster
spec:
  # one direction 1->2 will use the cache, while 2->1 will not use the cache.
  # TODO: parametrize the namespace of find a way to get short names to work:
  # TODO: this appears to always bust the cache, even if dest is echosrv1 !
  match: destination.service == "echosrv1.istio.svc.cluster.local" && request.headers["x-request-id"] == "foo"
  # test that denial does work
  # match: destination.service == "echosrv1.istio.svc.cluster.local" && request.headers["x-forwarded-proto"] == "http" && source.service == "echosrv2.istio.svc.cluster.local"
  actions:
  # handler and instance names default to the rule's namespace.
  - handler: denyall.denier
    instances:
    - denyrequest.checknothing
