CIS Cilium Benchmark

Security configuration benchmark for Cilium eBPF-based networking and security

v1.0.0 03-2025

Overview

▶

This benchmark provides prescriptive guidance for establishing a secure configuration posture for Cilium. It covers network policy enforcement, WireGuard encryption, Hubble observability, host firewall, identity-based security, and L7 policy enforcement for Kubernetes environments.

14Recommendations
7Sections
2Profile Levels
SectionAreaFocus
1Installation & RBACAgent deployment, role-based access control
2Network PolicyDefault-deny, ingress/egress enforcement
3EncryptionWireGuard transparent encryption, node keys
4ObservabilityHubble network visibility, metrics export
5Host SecurityHost firewall, BPF masquerading
6Identity & L7 PolicyIdentity-based security, HTTP-aware policies
7Maintenance & ValidationVersion management, connectivity testing

Profile Definitions

▶
ProfileDescriptionIntended Use
L1Level 1 — StandardEssential security for all Cilium deployments; minimal performance impact.
L2Level 2 — HardenedAdvanced hardening for PCI-DSS, HIPAA, or high-security environments.

1 — Installation & RBAC

▶

1.1 Agent & Permissions

▶
1.1.1 Ensure Cilium agent is running and healthy (Automated)
L1 Auto
Description

This recommendation verifies that Cilium agent is running and healthy on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify Cilium agent is running
cilium status
kubectl -n kube-system get pods -l k8s-app=cilium
Remediation
# Install/upgrade Cilium
helm repo add cilium https://helm.cilium.io/
helm upgrade --install cilium cilium/cilium --namespace kube-system --version 1.15
1.1.2 Ensure Cilium RBAC follows least privilege (Manual)
L1 Manual
Description

This recommendation verifies that Cilium RBAC follows least privilege on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check Cilium RBAC configuration
kubectl get clusterrole cilium -o yaml
kubectl get clusterrolebinding cilium -o yaml
Remediation
# Ensure minimal RBAC for Cilium
# Review ClusterRole permissions and remove any unnecessary API group access
# Restrict to required resources: pods, nodes, endpoints, services, ciliumnetworkpolicies

2 — Network Policy

▶

2.1 Ingress & Egress Controls

▶
2.1.1 Ensure default-deny ingress policy is applied (Automated)
L1 Auto
Description

This recommendation verifies that default-deny ingress policy is applied on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify default-deny network policy exists
kubectl get ciliumnetworkpolicy -A
kubectl get ciliumclusterwidenetworkpolicy
Remediation
# Apply default-deny ingress policy
apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
  name: default-deny-ingress
spec:
  endpointSelector: {}
  ingress:
    - {}
2.1.2 Ensure egress policies restrict outbound traffic (Automated)
L2 Auto
Description

This recommendation verifies that egress policies restrict outbound traffic on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify egress policies are in place
kubectl get ciliumnetworkpolicy -A -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'
cilium policy get
Remediation
# Apply default-deny egress with DNS allowance
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: default-deny-egress
spec:
  endpointSelector: {}
  egress:
    - toEndpoints:
        - matchLabels:
            k8s:io.kubernetes.pod.namespace: kube-system
            k8s-app: kube-dns
      toPorts:
        - ports:
            - port: '53'
              protocol: UDP

3 — Encryption

▶

3.1 WireGuard & Node Encryption

▶
3.1.1 Ensure WireGuard transparent encryption is enabled (Automated)
L2 Auto
Description

This recommendation verifies that WireGuard transparent encryption is enabled on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check if WireGuard encryption is enabled
cilium config view | grep enable-wireguard
kubectl -n kube-system get configmap cilium-config -o jsonpath='{.data.enable-wireguard}'
Remediation
# Enable WireGuard transparent encryption
helm upgrade cilium cilium/cilium --namespace kube-system --set encryption.enabled=true --set encryption.type=wireguard
3.1.2 Ensure all nodes have active encryption keys (Automated)
L2 Auto
Description

This recommendation verifies that all nodes have active encryption keys on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify node-to-node encryption status
cilium encrypt status
cilium node list
Remediation
# Ensure all nodes have encryption keys
cilium encrypt status
# If nodes show 'no key', restart Cilium agent:
kubectl -n kube-system delete pod -l k8s-app=cilium

4 — Observability

▶

4.1 Hubble Monitoring

▶
4.1.1 Ensure Hubble is enabled for network observability (Automated)
L1 Auto
Description

This recommendation verifies that Hubble is enabled for network observability on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check Hubble observability status
cilium hubble status
kubectl -n kube-system get pods -l k8s-app=hubble-relay
Remediation
# Enable Hubble for network observability
helm upgrade cilium cilium/cilium --namespace kube-system --set hubble.enabled=true --set hubble.relay.enabled=true --set hubble.ui.enabled=true
4.1.2 Ensure Hubble metrics are exported (Automated)
L2 Auto
Description

This recommendation verifies that Hubble metrics are exported on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify Hubble metrics are exported
cilium hubble metrics list
kubectl -n kube-system get svc hubble-metrics
Remediation
# Enable Hubble metrics export
helm upgrade cilium cilium/cilium --namespace kube-system \
  --set hubble.metrics.enabled='{dns,drop,tcp,flow,icmp,http}'

5 — Host Security

▶

5.1 Firewall & Masquerading

▶
5.1.1 Ensure host firewall is enabled (Automated)
L2 Auto
Description

This recommendation verifies that host firewall is enabled on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check if host firewall is enabled
cilium config view | grep enable-host-firewall
kubectl -n kube-system get configmap cilium-config -o jsonpath='{.data.enable-host-firewall}'
Remediation
# Enable host firewall
helm upgrade cilium cilium/cilium --namespace kube-system --set hostFirewall.enabled=true
5.1.2 Ensure BPF masquerading is configured (Automated)
L1 Auto
Description

This recommendation verifies that BPF masquerading is configured on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify BPF masquerading is configured
cilium config view | grep enable-bpf-masquerade
cilium bpf nat list
Remediation
# Enable BPF masquerading (replaces iptables)
helm upgrade cilium cilium/cilium --namespace kube-system --set bpf.masquerade=true

6 — Identity & L7 Policy

▶

6.1 Workload Security

▶
6.1.1 Ensure workload identities are properly labeled (Manual)
L1 Manual
Description

This recommendation verifies that workload identities are properly labeled on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check Cilium identity-based security labels
cilium identity list
cilium endpoint list
Remediation
# Ensure workload identities are properly labeled
kubectl label namespace production app.kubernetes.io/part-of=production
# Verify identity allocation:
cilium identity list | grep -i production
6.1.2 Ensure L7 policy enforcement is configured (Automated)
L2 Auto
Description

This recommendation verifies that L7 policy enforcement is configured on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify L7 policy enforcement
cilium policy get | grep -A5 'l7Rules'
kubectl get ciliumnetworkpolicy -A -o yaml | grep -A5 'http'
Remediation
# Configure L7 HTTP-aware policy
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: l7-policy
spec:
  endpointSelector:
    matchLabels:
      app: web
  ingress:
    - toPorts:
        - ports:
            - port: '80'
          rules:
            http:
              - method: GET
                path: '/api/.*'

7 — Maintenance & Validation

▶

7.1 Updates & Health

▶
7.1.1 Ensure Cilium is running the latest stable version (Manual)
L1 Manual
Description

This recommendation verifies that Cilium is running the latest stable version on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Check Cilium version
cilium version
kubectl -n kube-system get pods -l k8s-app=cilium -o jsonpath='{.items[0].spec.containers[0].image}'
Remediation
# Update Cilium to latest stable
helm repo update
helm upgrade cilium cilium/cilium --namespace kube-system --version <latest_stable>
7.1.2 Ensure Cilium connectivity tests pass (Automated)
L1 Auto
Description

This recommendation verifies that Cilium connectivity tests pass on the Cilium eBPF networking platform. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to implement this control may leave the Cilium eBPF networking platform vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify Cilium health status
cilium status --verbose
cilium connectivity test
Remediation
# Run Cilium connectivity validation
cilium connectivity test
# Fix any failing tests by reviewing agent logs:
kubectl -n kube-system logs -l k8s-app=cilium --tail=100