---
# Deny all requests to namespace default
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: allow-nothing
  namespace: default
spec:
  {}
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: byeworld-allow-from-istio-system
  namespace: istio-system
spec:
  selector:
    matchLabels:
      app: byeworld
  action: ALLOW
  rules:
    - from:
        - source:
            namespaces: ["istio-system"]
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: byeworld-allow-head-from-default
  namespace: istio-system
spec:
  action: ALLOW
  selector:
    matchLabels:
      app: byeworld
  rules:
    - from:
      - source:
          namespaces: ["default"]
      to:
      - operation:
          methods: ["HEAD"]
          notPaths: ["/secret*"]