saltstack / saltstack/salt

[DOCS] External Authentication System documentation incorrect example for runner module args

Open
#60,548 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

doc-rework documentation help-wanted severity-medium time-estimate-single-day
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
The External Authentication System documentation on limiting by function arguments gives an incorrect example for specifying runner module args:

external_auth:
  pam:
    my_user:
      - '@runner':
        - 'runner_mod.*':
            args:
            - 'a.*'
            - 'b.*'
            kwargs:
              'kwa': 'kwa.*'
              'kwb': 'kwb'

This is also contradicted by the rest_cherrypy documentation which states:

LocalClient also takes arg (array) and kwarg (dictionary) arguments because these values are sent to the Minions and used to execute the requested function there. RunnerClient and WheelClient are executed directly on the Master and thus do not need or accept those arguments.
"Runners do not support positional args"

Suggested Fix
I have tested this extensively and found that this config will work:

external_auth:
  pam:
    my_user:
      - '@runner':
        - 'runner_mod.*':
            'kwa': 'kwa.*'
            'kwb': 'kwb'

Type of documentation
Salt documentation

Location or format of documentation
https://docs.saltproject.io/en/master/topics/eauth/index.html#limiting-by-function-arguments

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

Open the External Authentication System documentation at the stated “Limiting by function arguments” location and compare its runner module example with the tested configuration in the issue. Update the example so runner arguments use the documented keyword mapping, and ensure it no longer contradicts the rest_cherrypy guidance about runner arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.