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

Use new Salt mine's ACL features to share private data between minions #2535

Open
gdemonet opened this issue May 8, 2020 · 0 comments
Open
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

Comments

@gdemonet
Copy link
Contributor

gdemonet commented May 8, 2020

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":

  • those keys are first generated during bootstrap
  • they are mounted (actually, all of /etc/kubernetes/pki) in the Salt master container
  • they are shared in a pillar key (metalk8s:private) to minions with the master role

The 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 other master 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.

@gdemonet gdemonet added topic:security Security-related issues topic:deployment Bugs in or enhancements to deployment stages kind:debt Technical debt complexity:medium Something that requires one or few days to fix labels May 8, 2020
@gdemonet gdemonet added this to the MetalK8s 2.6.0 milestone May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant