-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Enhancement]: Add Support for Configuring automountServiceAccountToken #10970
Comments
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? |
ZooKeeper is already gone. So pretty much the Kafka Exporter and I guess Cruise Control. Kafka needs it for rack awareness or node port access. |
Triaged on 9.1.2025: Based on the discussion during the community call, @ShubhamRwt is currently working on proposal for the self-healing feature with CC and one of the components will need the access token for its operations. So we can end up with just Kafka Exporter needing this kind of option. Anyway, this needs a proposal - @germanattanasio are you interested in writing the proposal and working on the implementation? |
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: