istio.io icon indicating copy to clipboard operation
istio.io copied to clipboard

Add note about istio-cni security

Open keithmattix opened this issue 8 months ago • 10 comments

Description

Add note about Istio CNI's security implications in ambient mode

Reviewers

  • [ ] Ambient
  • [ ] Docs
  • [ ] Installation
  • [ ] Networking
  • [ ] Performance and Scalability
  • [ ] Extensions and Telemetry
  • [ ] Security
  • [ ] Test and Release
  • [ ] User Experience
  • [ ] Developer Infrastructure
  • [ ] Localization/Translation

keithmattix avatar Aug 04 '25 21:08 keithmattix

Left 2 comments that may be worthwhile pointing out. Otherwise LGTM.

linsun avatar Aug 05 '25 02:08 linsun

@craigbox @linsun Updated the doc; PTAL when you get a chance

keithmattix avatar Aug 07 '25 22:08 keithmattix

@jaellio When you get a chance, can you let me know how/when to proceed with this

keithmattix avatar Aug 26 '25 19:08 keithmattix

meaning that policies won't be enforced until after the CNI comes up and that pod is restarted.

@keithmattix @jaellio If we run into such an issue, is there a straightforward way to identify the pods where traffic is being bypassed? For example, if we run istioctl zc workloads, would the affected pods show HBONE or TCP?

sridhargaddam avatar Sep 18 '25 10:09 sridhargaddam

@sridhargaddam it won't be based on config; it would be a lack of iptables rules in the pod netns. @jaellio can correct me if I'm wrong

keithmattix avatar Sep 18 '25 12:09 keithmattix

@sridhargaddam it won't be based on config; it would be a lack of iptables rules in the pod netns. @jaellio can correct me if I'm wrong

It’d be useful to have a command that shows pods marked for the mesh but bypassing it (due to missing iptables rules). Maybe istioctl analyze... could be extended with an option to catch and report this situation?

sridhargaddam avatar Sep 19 '25 12:09 sridhargaddam

Hmm that could work if the person running the command had kubectl debug permission

keithmattix avatar Sep 19 '25 17:09 keithmattix

it is possible that a pod that is labeled for mesh enrollment may come up before the CNI's traffic redirection rules are applied, meaning that policies won't be enforced until after the CNI comes up and that pod is restarted.

I don’t expect this issue to occur in sidecar mode with istio-cni (since the istio-validation container checks that traffic redirection rules are in place). Can someone please confirm?

sridhargaddam avatar Sep 22 '25 17:09 sridhargaddam

Correct, the istio-validation init container prevents this from happening in sidecar mode

keithmattix avatar Sep 22 '25 19:09 keithmattix

Correct, the istio-validation init container prevents this from happening in sidecar mode

Cool, thanks for confirming, Keith.

sridhargaddam avatar Sep 23 '25 06:09 sridhargaddam