mirror of
https://github.com/cozystack/cozystack.git
synced 2026-10-27 23:27:58 +09:00
RBAC cannot name the caller's node, so the agent's role lets every agent write every GPUNode, and a compromised node could rewrite the inventory, and through resourceNames the cluster's GPU resource-name set, of any other node. The pod-bound service account token carries the node name as a user extra, which a ValidatingAdmissionPolicy can compare with the object name. A token without that extra is refused rather than let through: the policy matches only the agent's service account, so failing closed stops the agent and nobody else. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>