You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it is not possible to set automountServiceAccountToken: false for Kafka and Zookeeper pods or their associated service accounts in Strimzi. This limitation is a blocker for environments with strict security policies, such as those on Azure or other secured clusters, where automounting service account tokens is not permitted by default.
Enforcing automountServiceAccountToken: false is a common security requirement in certain managed environments (e.g., Azure). Other frameworks and tools such as Snyk or ARMO have recently added this vulnerability. Finally existing tools like Cert-manager, Linkerd, and Kubernetes Ingress, allow you to set the value to false and use volume-based configurations for accessing service account tokens.
Here is the picture with the warning for the running pods with automount as true.
Suggested solution
Set the automountServiceAccountToken to false for those pods that don't need access to Kubernetes API. This is backward compatible and easy to do.
Allow users to define volume and volumeMount along with automountServiceAccountToken in the CRD or automatically add the volumes if the CRD has the flag as false.
TBH, I'm not sure I follow the motivation. The token is in many cases needed so why should it be mounted separately in a complicated way? The idea to let the users do it just means that there will be a huge support load on us with people who are able to disable some flag but are unable to configure it properly. So I think the first point is relatively feasible, but will affect only few pods. The second point is IMHO not realistic. If you want to use some tooling to check on these things, you need to be able to configure it to know where it is ok and where it is not.
If we do (1) and disable it where it’s not needed, we would at least move closer to the principle of least privilege. Using volumes instead of the automatic service account could come later.
Which pods actually need access to the Kube API? I imagine the main operator needs the token. Do Kafka or Zookeeper containers need it?
Related problem
Currently, it is not possible to set
automountServiceAccountToken: false
for Kafka and Zookeeper pods or their associated service accounts in Strimzi. This limitation is a blocker for environments with strict security policies, such as those on Azure or other secured clusters, where automounting service account tokens is not permitted by default.Enforcing
automountServiceAccountToken: false
is a common security requirement in certain managed environments (e.g., Azure). Other frameworks and tools such as Snyk or ARMO have recently added this vulnerability. Finally existing tools like Cert-manager, Linkerd, and Kubernetes Ingress, allow you to set the value to false and use volume-based configurations for accessing service account tokens.Here is the picture with the warning for the running pods with automount as true.
Suggested solution
automountServiceAccountToken
tofalse
for those pods that don't need access to Kubernetes API. This is backward compatible and easy to do.volume
andvolumeMount
along withautomountServiceAccountToken
in the CRD or automatically add the volumes if the CRD has the flag as false.Alternatives
No response
Additional context
Relevant References
The text was updated successfully, but these errors were encountered: