.istio.io/v1
kind: AuthorizationPolicy
metadata:
  namespace: default
  name: ap-ineffective
spec:
  selector:
    matchLabels:
      gateway.networking.k8s.io/gateway-name: bookinfo-gateway
  action: DENY
  rules:
  - from:
    - source:
      namespaces: [&#34;dev&#34;]
    to:
    - operation:
      methods: [&#34;POST&#34;]
</code></pre><p>如果您在策略中同时设置了 <code>targetRef</code> 和 <code>selector</code>，将不会出现此消息。例如：</p><pre><code class=language-yaml data-ex