# The following policy selects the workload

apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
  name: policy-{{ .To.ServiceName }}
spec:
  selector:
    matchLabels:
      "app": "{{ .To.ServiceName }}"
  rules:
  - to:
    - operation:
        paths: [ "/policy-{{ .To.Config.Namespace.Prefix }}-{{ .To.ServiceName }}" ]
