data:
  name: reject-ns-foo
spec:
  action: DENY
  rules:
  - from:
    - source:
        namespaces: [&#34;foo&#34;]
  # Add the following rule to explicitly reject plain text traffic.
  - from:
    - source:
        notNamespaces: [&#34;*&#34;]
</code></pre><p>Also check the <a href=/v1.10/docs/ops/configuration/security/security-policy-examples/#require-mtls-in-authorization-layer-defense-in-depth>security policy examples</a>
for more details about the above alternative solution.</p><h2 id=credit>Credit<