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

Enforce host policies when using per-endpoint routes #13121

Closed
11 of 13 tasks
pchaigno opened this issue Sep 8, 2020 · 1 comment
Closed
11 of 13 tasks

Enforce host policies when using per-endpoint routes #13121

pchaigno opened this issue Sep 8, 2020 · 1 comment
Assignees
Labels
area/host-firewall Impacts the host firewall or the host endpoint. kind/feature This introduces new functionality. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Milestone

Comments

@pchaigno
Copy link
Member

pchaigno commented Sep 8, 2020

The host firewall currently doesn't work with per-endpoint routes (global.endpointRoutes & --enable-endpoint-routes) because host policies are only enforced in the bpf_host program attached to cilium_host/cilium_net (for hostns<->local pods) and native devices (for hostns<->remote pods/remote nodes/world). When per-endpoint routes are enabled, the first two devices do not exist. Allowing the host firewall to be enabled with per-endpoint routes would thus result in a bypass of policies on paths hostns<->local pods.

High-level idea is to perform a tail call to a BPF program in bpf_host from bpf_lxc when packets ingress and egress of local pods. On egress from pods, we need to jump to bpf_host program, enforce ingress host policies and deliver as usual. On ingress to pods, we need to jump to bpf_host program, enforce egress host policies, then jump back to bpf_lxc program.

@pchaigno pchaigno added kind/feature This introduces new functionality. area/host-firewall Impacts the host firewall or the host endpoint. labels Sep 8, 2020
@pchaigno pchaigno self-assigned this Nov 26, 2020
@borkmann borkmann added the sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. label Jan 12, 2021
@aanm aanm added this to the 1.10.0 milestone Apr 16, 2021
@pchaigno
Copy link
Member Author

All release blocker items have been addressed. I'm not planning to implement the optimization item at this time since it's unclear whether it would make a big difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/host-firewall Impacts the host firewall or the host endpoint. kind/feature This introduces new functionality. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
None yet
Development

No branches or pull requests

3 participants