saltstack / saltstack/salt

publisher_acl does not work for salt-key

Open
#68,097 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
publisher_acl does not work for salt-key

salt-deploy@salt:/srv/salt$ salt-key -L
Traceback (most recent call last):
  File "/usr/local/bin/salt-key", line 5, in 
    from salt.scripts import salt_key
ModuleNotFoundError: No module named 'salt'

Setup

salt-deploy@salt:/srv/salt$ salt -d --version
salt 3007.4 (Chlorine)

Steps to Reproduce the behavior

--- a/salt-master/master
+++ b/salt-master/master
+publisher_acl:
+  salt-deploy:
+    - .*

Expected behavior
salt-key -L works without sudo

workaround:

salt-deploy@salt:/srv/salt$ cat ~/.profile 
alias sr="cd /srv/salt"
alias salt-key="sudo -u salt /usr/bin/salt-key"
salt-deploy@salt:~$ salt-key -L |less |head -n5
Accepted Keys:
3add24d603f9
DESKTOP-67PC6CO
DESKTOP-PJ0LR8J.tok.ipp.cas.cz
Pavel-PC.tok.ipp.cas.cz

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the salt-key entry point, imported as salt.scripts.salt_key, and reproduce the failure using the publisher_acl configuration shown in salt-master/master. Trace why salt-deploy cannot run salt-key -L without sudo; done means the command works for that user and lists the accepted keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authorization, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.