Repository navigation
Conversation
Contributor
|
We are no longer accepting bug fixes on the 3006.x branch. Please rebase against the 3008.x branch. |
This was referenced Oct 17, 2026
Closed
Closed
Contributor
Author
|
@dwoz 3006.x has entered security only. Please rebase these changes on 3008.x |
Contributor
Author
|
Closing — 3006.x has entered security-only and this change doesn't apply or port cleanly to 3008.x. Reopen a fresh PR against 3008.x if you'd like to continue. |
2 of 3 tasks
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NEEDS MAINTAINER REVIEW
This PR contains security guidance. Wrong security guidance is
actively dangerous and the docs claims should be reviewed by the
security WG before this leaves draft. The full list is in
agents/reports/docs-pr7-security/evidence.md; the highlightsthat need explicit eyes:
doc/security/threat-model.rstdescribes what Salt'swire protocol does not guarantee (e.g. minion ID is not bound
to a host; rejected keys do not protect against replay; encrypted
pillar does not protect against a compromised master). Each
claim is cited to the source file, but please confirm the
wording does not imply more or less than the code does.
@runnerto a non-root user can invokesalt.cmdto re-publish as the master and bypass other ACLrules" warning in both the publisher_acl page and the threat
model. This is true in code but is a strong claim; please
confirm we want it phrased as a warning.
sign_pub_messagestriple — master, minion, andrequire_minion_sign_messages+drop_messages_signature_fail— is documented in the RST reference for the first time. Please
confirm the master-side option names are stable.
doc/topics/tutorials/aws_kms_pillar.rstcallsaws kms decrypt --output textto get the plaintext data key forre-encryption. Depending on AWS CLI v1 vs v2 the form may need
an extra
base64.urlsafe_b64encode(). The docs note this; themaintainer should confirm which form Salt's release engineering
uses today.
This PR stays in draft until a maintainer signs off on the
items above.
Summary
Security, auth, key-lifecycle, and ACL documentation rewrite. The
PR introduces two new reference pages
(
doc/security/threat-model.rst,doc/security/key-lifecycle.rst),a new aws_kms walkthrough
(
doc/topics/tutorials/aws_kms_pillar.rst), parser-pinned ACLexample tests under
tests/pytests/unit/test_acl_examples.py, anda pre-commit helper (
tools/check_new_config_opts.py) that gatesnew config options against the doc + sample config triple. It also
clarifies several long-standing surprise behaviours in
rejected_retry,saltutil.regen_keys,sign_pub_messages, themaster_job_cachefigure, and the non-root master grain set.This lands on 3006.x (Sulphur). The auth, key, ACL and config
syntax has not changed in any of these areas between 3006.x and
master, so a bulk merge-forward to 3007.x → 3008.x → master after
this is merged should apply cleanly.
Linked issues
Closes:
@wheel/@runner/@jobssyntax under publisher_aclsaltutil.regen_keysrequires restartrejected_retrydenied keysminion_sign_messagesclarificationmaster_job_cacheimpossible config captionSkipped per spec (already handled by docs-pr1-links):
What's in this PR
Reference pages (new):
doc/security/threat-model.rst— trust boundaries (minion ↔ master,master-side ACL, pillar/renderers, external sources, filesystem/process),
onedir packaging implications.
doc/security/key-lifecycle.rst— accept / reject / rotate / regen /denied flows,
rejected_retry, thesign_pub_messagestrio.doc/topics/tutorials/aws_kms_pillar.rst— end-to-end recipe.Reference docs touched:
doc/ref/publisheracl.rst— quoted glob targets, regex-vs-glob warning,cmd.*warning,@wheel/@runner/@jobssection.doc/topics/eauth/access_control.rst,doc/topics/eauth/index.rst—same fixes;
@<modname>and function-list forms.doc/ref/configuration/master.rst—sign_pub_messages,require_minion_sign_messages,drop_messages_signature_fail(firsttime in the RST).
doc/ref/configuration/minion.rst—sign_pub_messages(minion side,with naming-collision note);
rejected_retryextended to cover deniedkeys.
doc/ref/configuration/nonroot.rst— grains affected when the masteris non-root.
doc/topics/jobs/external_cache.rst— caption note for themaster_job_cache figure.
doc/topics/tutorials/intro_scale.rst— AES rotation triggered bysalt-key -ras well assalt-key -d.doc/topics/hardening.rst— cross-link to the new pages.Code docstrings:
salt/renderers/aws_kms.py— fixed YAML example, link to walkthrough.salt/modules/saltutil.py—regen_keysrequires restart.salt/modules/haproxyconn.py— upstream-bug note.Tests (new):
tests/pytests/unit/test_acl_examples.py(9 tests) — every documentedpublisher_acl / external_auth YAML is loaded with
yaml.safe_loadandthen driven through
CkMinions.auth_check/wheel_check/runner_check/spec_check. Drift between docs and parser failsthe test.
tests/pytests/unit/tools/test_check_new_config_opts.py(9 tests) —unit tests for the new pre-commit helper.
Tools (new):
tools/check_new_config_opts.py— AST-scanssalt/config/__init__.pyfor
DEFAULT_*_OPTSkeys and verifies they appear in both thematching
conf/<daemon>sample and the matchingdoc/ref/configuration/<daemon>.rstreference. Supports--baselineso the hook only gates new drift, not the historicalundocumented backlog. The pre-commit wiring (
.pre-commit-config.yamlentry) is intentionally not added in this PR — a maintainer
should decide which baseline file to start the gate from. The script
is callable today and the test suite pins its behaviour.
Process:
CONTRIBUTING.rst— "New configuration options" section documentingthe three-place rule and the helper.
Test plan
cd doc && sphinx-build -b html -W --keep-going— clean (theonly output is two pre-existing paramiko
TripleDESCryptographyDeprecationWarnings and the"Unable to load range library" log line on 3006.x; both predate
this PR).
pytest tests/pytests/unit/test_acl_examples.py tests/pytests/unit/tools/test_check_new_config_opts.py tests/pytests/unit/test_acl.py tests/pytests/unit/renderers/test_aws_kms.py -v— 36 passed.pre-commit run --files <every staged file>— every hookpasses.
make linkcheckis informational on 3006.x; verifier-agent will runthis).
Branch matrix
Strategy is oldest-first on 3006.x with a bulk merge-forward. Every
file touched here exists on 3006.x, 3007.x, 3008.x, and master;
auth, key, and ACL syntax has not changed between branches in the
affected areas. The full file-by-file matrix is in
agents/reports/docs-pr7-security/branch-matrix.md(out of tree).Notes for reviewers
master_sign_pubkeytutorial link indoc/ref/configuration/master.rststill points at the publicdocs.saltproject.ioURL because there is no in-tree equivalent;out of scope for this PR.
tools/check_new_config_opts.pyis not wired into.pre-commit-config.yaml. Wiring it in this PR would either(a) need to ship a baseline file containing every currently
undocumented opt (which we have not generated) or (b) fail every
commit until that backlog is paid down. Both are out of scope.
The script + tests are in place so a follow-up PR can flip the
switch by generating a baseline and adding the hook entry.
second-pass verifier passes and a maintainer signs off on the
HUMAN-REVIEW items at the top.