Use new Salt mine's ACL features to share private data between minions #2535
Labels
complexity:medium
Something that requires one or few days to fix
kind:debt
Technical debt
topic:deployment
Bugs in or enhancements to deployment stages
topic:security
Security-related issues
Milestone
Component: salt
Why this is needed:
We need to share some private keys between master nodes (namely, the ServiceAccount token signing key and the etcd encryption key). Currently, we achieve this through a "trick":
/etc/kubernetes/pki
) in the Salt master containermetalk8s:private
) to minions with themaster
roleThe issue is: this only works if the bootstrap node also has the
master
role, which is not an obligation (well, because of this behaviour, it currently is).What should be done:
Since Salt 3000.1, the Salt mine has implemented finer ACL features to control which minions can read which mine functions. We should let the first minion with
master
role generate these keys, publish them securely to the mine, and let othermaster
minions read from it to write the keys locally.More details:
Implementation proposal (strongly recommended):
Test plan:
We should make sure this approach works in case the original "owner" of the keys can die, in which case another minion should takeover and start publishing its own copy of the keys to the mine. In case all masters are lost, the first one brought back to highstate should regenerate the keys.
The text was updated successfully, but these errors were encountered: