Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update Documentation on Deny Policy Bug Fix #23468

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 7 additions & 37 deletions Documentation/security/policy/language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1241,43 +1241,13 @@ Deny policies do not support: policy enforcement at L7, i.e., specifically
denying an URL and ``toFQDNs``, i.e., specifically denying traffic to a specific
domain name.

Limitations and known issues
----------------------------

Deny policies for peers outside the cluster may be ineffectual due to
:gh-issue:`15198`.

One example of this would be a deny policy with ``toEntities`` "world" for
which a ``toFQDNs`` can cause traffic to be allowed if such traffic is
considered external to the cluster.

.. code-block:: yaml

apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: "deny-egress-to-world"
spec:
endpointSelector:
matchLabels:
k8s-app.guestbook: web
egressDeny:
- toEntities:
- "world"
egress:
- toEndpoints:
- matchLabels:
"k8s:io.kubernetes.pod.namespace": kube-system
"k8s:k8s-app": kube-dns
toPorts:
- ports:
- port: "53"
protocol: ANY
rules:
dns:
- matchPattern: "*"
- toFQDNs:
- matchName: "www.google.com"
Previous limitations and known issues
-------------------------------------

For Cilium versions prior to 1.14 deny-policies for peers outside the cluster
sometimes did not work because of :gh-issue:`15198`. Make sure that you are
using version 1.14 or later if you are relying on deny policies to manage
external traffic to your cluster.

.. _HostPolicies:

Expand Down