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

Potential [low severity] security issue due to calico-node having serviceaccount/token permission on itself #6421

Closed
mtaufen opened this issue Jul 23, 2022 · 3 comments

Comments

@mtaufen
Copy link

mtaufen commented Jul 23, 2022

This isn't urgent or critical, IMO, but it's worth fixing:

I commented post-merge on #6218 but filing an issue since it's more likely to be seen:

In that PR, the calico-node service account is granted serviceaccount/token permission on itself. This allows calico-node to mint tokens for calico-node. This creates a potential security issue where if an attacker could steal a token they could then prevent their access from ever expiring by sending periodic TokenRequests for the same service account whose token they stole. Instead, it would be better to grant calico-node permission to request tokens for a separate service account that the CNI is intended to run as. For example, grant calico-node permission to mint tokens for a calico-node-cni service account, and grant calico-node-cni the permissions that the CNI needs. That way, no tokens have the ability to self-perpetuate.

Expected Behavior

Service account tokens should not be granted permission to self-perpetuate.

Current Behavior

calico-node service account is granted such permission.

Possible Solution

Use a separate service account for the CNI.

@caseydavenport

@mtaufen
Copy link
Author

mtaufen commented Jul 23, 2022

@mikedanese in case you have thoughts on other solutions

@caseydavenport
Copy link
Member

Yep, I agree. I hadn't spotted this particular issue but already have a ticket tracking this enhancement for other reasons as well: #5921

@mtaufen
Copy link
Author

mtaufen commented Aug 5, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants