1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/docs/docsite/rst/user_guide
Matthias Fuchs 7871027c9d Share the implementation of hashing for both vars_prompt and password_hash (#21215)
* Share the implementation of hashing for both vars_prompt and password_hash.
* vars_prompt with encrypt does not require passlib for the algorithms
  supported by crypt.
* Additional checks ensure that there is always a result.
  This works around issues in the crypt.crypt python function that returns
  None for algorithms it does not know.
  Some modules (like user module) interprets None as no password at all,
  which is misleading.
* The password_hash filter supports all parameters of passlib.
  This allows users to provide a rounds parameter, fixing #15326.
* password_hash is not restricted to the subset provided by crypt.crypt,
  fixing one half of #17266.
* Updated documentation fixes other half of #17266.
* password_hash does not hard-code the salt-length, which fixes bcrypt
  in connection with passlib.
  bcrypt requires a salt with length 22, which fixes #25347
* Salts are only generated by ansible when using crypt.crypt.
  Otherwise passlib generates them.
* Avoids deprecated functionality of passlib with newer library versions.
* When no rounds are specified for sha256/sha256_crypt and sha512/sha512_crypt
  always uses the default values used by crypt, i.e. 5000 rounds.
  Before when installed passlibs' defaults were used.
  passlib changes its defaults with newer library versions, leading to non
  idempotent behavior.

  NOTE: This will lead to the recalculation of existing hashes generated
        with passlib and without a rounds parameter.
        Yet henceforth the hashes will remain the same.
        No matter the installed passlib version.
        Making these hashes idempotent.

Fixes #15326
Fixes #17266
Fixes #25347 except bcrypt still uses 2a, instead of the suggested 2b.

* random_salt is solely handled by encrypt.py.
  There is no _random_salt function there anymore.
  Also the test moved to test_encrypt.py.
* Uses pytest.skip when passlib is not available, instead of a silent return.
* More checks are executed when passlib is not available.

* Moves tests that require passlib into their own test-function.

* Uses the six library to reraise the exception.

* Fixes integration test.

When no rounds are provided the defaults of crypt are used.
In that case the rounds are not part of the resulting MCF output.
2018-08-27 08:40:41 -07:00
..
shared_snippets Add docs detailing how to convert many with_X style loops to use loop and filters (#40964) 2018-06-01 10:37:21 -04:00
become.rst Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
command_line_tools.rst Followup to docs refactor pull request #36067 - fixes gitignore and c… (#36120) 2018-02-13 10:52:13 -08:00
index.rst Core Docs Refactor and Redesign (#36067) 2018-02-13 07:23:55 -08:00
intro.rst Fixes more rST errors (#39042) 2018-04-19 17:02:48 -07:00
intro_adhoc.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
intro_bsd.rst Remove use of simplejson throughout code base (#43548) 2018-08-10 11:13:29 -05:00
intro_dynamic_inventory.rst Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
intro_getting_started.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
intro_inventory.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
intro_patterns.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
intro_windows.rst Core Docs Refactor and Redesign (#36067) 2018-02-13 07:23:55 -08:00
module_defaults_config.rst Extend module_defaults by adding default groups for cloud modules (#44127) 2018-08-22 21:33:27 -04:00
modules.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
modules_intro.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
modules_support.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbook_pathing.rst Core Docs Refactor and Redesign (#36067) 2018-02-13 07:23:55 -08:00
playbooks.rst Doc build warning/broken link clean-a-palooza (#37382) 2018-03-14 12:44:21 -07:00
playbooks_advanced_syntax.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_async.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_best_practices.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_blocks.rst Update playbooks_blocks.rst (#40951) 2018-08-22 14:07:24 -05:00
playbooks_checkmode.rst docs: Document disabling diff on task level (#37998) 2018-04-05 11:08:30 -07:00
playbooks_conditionals.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_debugger.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_delegation.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_environment.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_error_handling.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_filters.rst Share the implementation of hashing for both vars_prompt and password_hash (#21215) 2018-08-27 08:40:41 -07:00
playbooks_filters_ipaddr.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_intro.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_lookups.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_loops.rst doc: minor language corrections to loop docs (#42854) 2018-08-22 15:00:25 -04:00
playbooks_module_defaults.rst Docs for module_defaults feature (#39932) 2018-05-25 04:15:44 -04:00
playbooks_prompts.rst Share the implementation of hashing for both vars_prompt and password_hash (#21215) 2018-08-27 08:40:41 -07:00
playbooks_python_version.rst Core Docs Refactor and Redesign (#36067) 2018-02-13 07:23:55 -08:00
playbooks_reuse.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_reuse_includes.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_reuse_roles.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_roles.rst Reduce warnings (#39254) 2018-04-25 11:18:52 -07:00
playbooks_special_topics.rst Docs for module_defaults feature (#39932) 2018-05-25 04:15:44 -04:00
playbooks_startnstep.rst Core Docs Refactor and Redesign (#36067) 2018-02-13 07:23:55 -08:00
playbooks_strategies.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_tags.rst Update tags documentation to explain newer tags behavior (#44274) 2018-08-23 09:46:54 -04:00
playbooks_templating.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
playbooks_tests.rst Describe subset and superset as "set theory tests" (#43926) 2018-08-22 15:22:10 -04:00
playbooks_variables.rst Fix a typo in docs: s/patent/parent/ (#44529) 2018-08-22 23:05:42 +02:00
playbooks_vault.rst Add anchors to some guides and all module categories (#36642) 2018-02-23 17:10:47 -06:00
plugin_filtering_config.rst Fix more docs errors. (#39051) 2018-04-20 00:24:47 -07:00
quickstart.rst Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
vault.rst Fix places in docs that refer to modules without namespace 2018-04-18 08:43:34 -07:00
windows.rst Core Docs Refactor and Redesign (#36067) 2018-02-13 07:23:55 -08:00
windows_dsc.rst doc: fixes the the repetitions (#43937) 2018-08-22 21:53:30 +02:00
windows_faq.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
windows_setup.rst Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
windows_usage.rst Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
windows_winrm.rst Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00