Repository navigation
RFE: Minion Authenticated Roles with salt-key & Auto Accept #70529
Replies: 12 comments
|
@saltstack/team-core Looking for feedback on this idea? Thanks, |
|
@thatch45 gave some feedback in the PR #44324 I added roles into the accepted key process as these roles can be request by a minion but they can not be changed once accepted. And the master has alternate control to accept all, some, none or add some roles. Unlike grains these are secure, and the idea is to use them in the top.sls for states and pillars. They can also be used on the minion (sent back as pillar data) Outstanding questions are:
|
|
Just some food for thought: Puppet uses custom CSR attributes to attach metadata to signed agent (minion) certificates. See here. Puppet then exposes this metadata as trusted facts that can be used to target clients (minions) in a secure way. The lack of this feature really makes it quite difficult/cumbersome to manage a multi-tenant Saltstack environment with differing levels of privilege in a secure way. I would hazard a guess that most people run Salt in such a way that the compromise of one node could lead to the compromise of even more nodes/components via extraction of sensitive pillar data. Almost every example you see uses (insecure) grains to target nodes for pillar data (e.g. a TL;DR: Please implement this feature! |
|
HI @damon-atkins - we are moving towards using an RFC template, which is documented here for these types of discussions. Would you be willing to give that template and process a try? FYI @saltstack/team-suse ^ |
|
Leave this open until I have done the RFC |
|
@damon-atkins I would suggest you to reference this issue in your RFC PR. |
|
. |
|
Some more thoughts on this are support for minion running as normal users. e.g. a 3rd party supports the OS and so Salt can not run as root and people would like to use salt still for application deployment. Allow salt keys to also have the format of |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
|
Sorry still have not written up an RFC pls re-open |
|
This feature request was moved out of the issue tracker as part of a backlog cleanup — there is no active development commitment behind it. If you intend to implement this, please leave a comment and a maintainer can convert the discussion back to an issue to track the PR. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description of Issue/Question
Part A)
Example of what salt-key could look like
(IP address is not stored its used for auto acceptance, or give the user a bit more info)
Roles are not gains or pillars they are a new data type which can be used in a top.sls And because the master stores the roles and the saltenv with the key (pki dir or a role dir), they can be considered secure. i.e some developers may have access to the pillar dir or pillar git repo, but the roles and saltenv are safe in the pki dir (or its own dir).
Part B)
The master running a script to see if it should accept or reject, allows a person to do anything they want.
Secure or Insecure. Here are examples of what a script could do (Various levels of security):
Something along the lines of
command <minion id> <input data filename> <return data filename>everything else is passed as environment variables. e.g. salt conf dir, location of the minions data receive (json) by the master (e.g. grains, IP etc)Exit Codes Returned:
10 = Accept
11 = Reject
12 = Manual i.e. let the human decide. with
salt-keyOR Pass it on to the next script (if more then one provided)13 = No Decision Yet, i.e. Ask again. e.g. The data need to make a decision with, might be slow at getting populated (e.g. Windows system as not reach the stage it joins AD, or registered in consul). So script would like to be able to ask again, in a minute or two. The script can implement a count of tries and change the exit code to 12 or 11 if the re-try count is too high. The minion connecting again would be a good way to trigger auto accept script again.
<input data filename>would be a json file containing secure/verified data and insecure data like grains.<return data filename>would be a json file allowing saltenv to be changed or the roles to be changed.Also no reason why salt package can not include a few example scripts. e.g. autosign_grains_dir that parts of PR #44324 is talking about doing. Maybe the script can receive saltenv and roles, check them and then return final saltenv and roles (could add roles or even change the saltenv). i.e. JSON feed into the script and JSON
All reactions