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

[DOCS] Conflicting information on grains and storing passwords: Deprecate salt.modules.grains.get_or_set_hash #59425

Closed
ScriptAutomate opened this issue Feb 4, 2021 · 2 comments · Fixed by #59538
Assignees
Labels
Deprecation doc-rework confusing, misleading, or wrong doc-rst-update .rst file edits Documentation Relates to Salt documentation
Milestone

Comments

@ScriptAutomate
Copy link
Contributor

Description

Salt best practices direct users to use the pillar or SDB for storing sensitive data, such as passwords. Outside of documentation, we explicitly advise users not to store passwords in grains on minions, but this is only implied by the documentation.

This gets more complicated with the existence of this execution module function:

Suggested Fix

The warning admonition could be along the lines of:

.. warning::

   Grains can be set by users that have access to the minion configuration files on
   the local system, making them less secure than other identifiers in Salt. Avoid
   storing sensitive data, such as passwords or keys, on minions. Instead, make
   use of :ref:`pillar` and/or :ref:`sdb`.

Type of documentation

  • Salt documentation
  • Salt modules

Additional context

Related issues:

@ScriptAutomate ScriptAutomate added Documentation Relates to Salt documentation doc-deprecated docs are becoming irrelevant doc-rework confusing, misleading, or wrong Deprecation doc-rst-update .rst file edits labels Feb 4, 2021
@ScriptAutomate ScriptAutomate removed the doc-deprecated docs are becoming irrelevant label Feb 4, 2021
@sagetherage sagetherage added this to the Approved milestone Feb 11, 2021
@OrangeDog
Copy link
Contributor

Just seen this in the release notes. What's the alternative when you want every minion to have a random unique value, and someone with root access to the minion changing it is not an issue?

get_or_set_hash is the only way I can see to do it automatically at scale.

@OrangeDog
Copy link
Contributor

Never got any answer for this, and it's a bit late now.

You now have to replace a very simple system that was perfectly secure in many models with an entirely separate external database.

I'm just going to re-add get_or_set_hash as a custom module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecation doc-rework confusing, misleading, or wrong doc-rst-update .rst file edits Documentation Relates to Salt documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants