-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Support egress CIDR-dependent L4 policies #1684
Copy link
Copy link
Closed
Labels
area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.kind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.priority/highThis is considered vital to an upcoming release.This is considered vital to an upcoming release.roadmapThis functionality is planned for a future release of Cilium.This functionality is planned for a future release of Cilium.
Metadata
Metadata
Assignees
Labels
area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.Impacts bpf/ or low-level forwarding details, including map management and monitor messages.kind/enhancementThis would improve or streamline existing functionality.This would improve or streamline existing functionality.priority/highThis is considered vital to an upcoming release.This is considered vital to an upcoming release.roadmapThis functionality is planned for a future release of Cilium.This functionality is planned for a future release of Cilium.
We don't currently support specifying policies that have both "ToCIDR" and "ToPorts" on egress. This should allow only traffic that matches both of these conditions.
Alternatively (and less importantly), on ingress we should be able to filter on "FromCIDR" + "ToPorts" (See #4129).
Related: #1599
Design
Daemon
10/8except10.0/10=>cidr:10.128.0.0/9+cidr:10.64.0.0/10AllocateIdentity("cidr:10.0.0.0/8")10/8+10.1/16Becomes two identities:10.1/16is associated with all cidr labels that cover the prefix:[]string{"cidr:10.1.0.0/16", "cidr:10.0.0.0/15","cidr:10.0.0.0/14", ...}10/8would need CIDR labels for all prefixes that cover it:[]string{"cidr:10.0.0.0/8", "cidr:10.0.0.0/7", ... "cidr:0.0.0.0/0"}Evaluate radix implementations to update labels on insert/removePrevent Cilium from allocating/32addresses for which there is already a CIDR identityOtherwise, the CIDR => identity mapping would conflict with a CiliumEndpoint => identity mapping0/0- "world" (Want to usereserved:worldidentity, not a random allocated identity)hostcluster?CIDR->KVstore sync controller?CIDRPolicyMap?CreateL4Filter():Set the up Endpoints wildcard selectors properly depending on CIDR/fromEndpoints wildcardsOnly CiliumEndpointsOnly non-CiliumEndpoints ("Entities"?)All EndpointsL4Filter.Endpointsis documented to imply that it represents any network endpoint, not just Cilium endpoints.Datapath
Egress
ipcacheto become LPM (or LPM-like)Ingress