ansible/docs/docsite/rst
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
..
community Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
dev_guide doc: fixed typo (#44685) 2018-08-26 21:36:11 +02:00
installation_guide Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
inventory ansible/docs/docsite/rst/inventory/implicit_localhost.rst typo 2018-07-23 10:33:47 -04:00
network fix variable names in vars file example (#44643) 2018-08-24 12:06:06 -04:00
plugins Prefer https:// links in the docs site 2018-08-01 08:20:40 -07:00
porting_guides Share the implementation of hashing for both vars_prompt and password_hash (#21215) 2018-08-27 08:40:41 -07:00
reference_appendices restore task arg splatting (#43798) 2018-08-14 12:58:00 -07:00
roadmap Remove from roadmap, thing that aren't going to make it for 2.7 (#44481) 2018-08-23 19:32:27 -07:00
scenario_guides Fixed links to the CLI clients (#35792) 2018-08-24 08:40:53 -05:00
user_guide Share the implementation of hashing for both vars_prompt and password_hash (#21215) 2018-08-27 08:40:41 -07:00
vmware Update documentation based on 301 permanent redirects (#43675) 2018-08-13 14:54:14 -05:00
conf.py Fixed opensearch double slash issue (#44137) 2018-08-16 16:28:58 -05:00
index.rst Update index.rst (#43490) 2018-08-16 18:53:47 -04:00