diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2017-06-27 06:00:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 06:00:15 -0700 |
commit | e238ae999b90b771f662ac15e6cceff8aa0b721f (patch) | |
tree | 4c2b5e884fe0361d8940f4c79ea0e957557a8fc7 /test/runner | |
parent | e7e091d1542fe598d7a7fbb2f51c360aaf9920cd (diff) | |
download | ansible-e238ae999b90b771f662ac15e6cceff8aa0b721f.tar.gz |
Cyptography pr 20566 rebase (#25560)
Make pyca/cryptography the preferred backend for cryptographic needs (mainly vault) falling back to pycrypto
pyca/cryptography is already implicitly a dependency in many cases
through paramiko (2.0+) as well as the new openssl_publickey module,
which requires pyOpenSSL 16.0+. Additionally, pyca/cryptography is
an optional dep for better performance with vault already.
This commit leverages cryptography's padding, constant time comparisons,
and CBC/CTR modes to reduce the amount of code ansible needs to
maintain.
* Handle wrong password given for VaultAES format
* Do not display deprecation warning for cryptography on python-2.6
* Namespace all of the pycrypto imports and always import them
Makes unittests better and the code less likely to get stupid mistakes
(like using HMAC from cryptogrpahy when the one from pycrypto is needed)
* Add back in atfork since we need pycrypto to reinitialize its RNG just in case we're being used with old paramiko
* contrib/inventory/gce: Remove spurious require on pycrypto
(cherry picked from commit 9e16b9db275263b3ea8d1b124966fdebfc9ab271)
* Add cryptography to ec2_win_password module requirements
* Fix python3 bug which would pass text strings to a function which
requires byte strings.
* Attempt to add pycrypto version to setup deps
* Change hacking README for dual pycrypto/cryptography
* update dependencies for various CI scripts
* additional CI dockerfile/script updates
* add paramiko to the windows and sanity requirement set
This is needed because ansible lists it as a requirement. Previously
the missing dep wasn't enforced, but cryptography imports pkg_resources
so you can't ignore a requirement any more
* Add integration test cases for old vault and for wrong passwords
* helper script for manual testing of pycrypto/cryptography
* Skip the pycrypto tests so that users without it installed can still run the unittests
* Run unittests for vault with both cryptography and pycrypto backend
Diffstat (limited to 'test/runner')
-rw-r--r-- | test/runner/requirements/constraints.txt | 1 | ||||
-rw-r--r-- | test/runner/requirements/integration.txt | 1 | ||||
-rw-r--r-- | test/runner/requirements/network-integration.txt | 2 | ||||
-rw-r--r-- | test/runner/requirements/sanity.txt | 2 | ||||
-rw-r--r-- | test/runner/requirements/units.txt | 3 | ||||
-rw-r--r-- | test/runner/requirements/windows-integration.txt | 2 |
6 files changed, 9 insertions, 2 deletions
diff --git a/test/runner/requirements/constraints.txt b/test/runner/requirements/constraints.txt index 76a6156cc0..d525d83e11 100644 --- a/test/runner/requirements/constraints.txt +++ b/test/runner/requirements/constraints.txt @@ -3,3 +3,4 @@ pywinrm >= 0.2.1 # 0.1.1 required, but 0.2.1 provides better performance pylint >= 1.5.3, < 1.7.0 # 1.4.1 adds JSON output, but 1.5.3 fixes bugs related to JSON output sphinx < 1.6 ; python_version < '2.7' # sphinx 1.6 and later require python 2.7 or later isort < 4.2.8 # 4.2.8 changes import sort order requirements which breaks previously passing pylint tests +pycrypto >= 2.6 # Need features found in 2.6 and greater diff --git a/test/runner/requirements/integration.txt b/test/runner/requirements/integration.txt index 478d15a13b..08a4cea39a 100644 --- a/test/runner/requirements/integration.txt +++ b/test/runner/requirements/integration.txt @@ -1,3 +1,4 @@ +cryptography jinja2 jmespath junit-xml diff --git a/test/runner/requirements/network-integration.txt b/test/runner/requirements/network-integration.txt index 5fa9cf8826..846d3ede9b 100644 --- a/test/runner/requirements/network-integration.txt +++ b/test/runner/requirements/network-integration.txt @@ -1,5 +1,5 @@ +cryptography jinja2 junit-xml paramiko -pycrypto pyyaml diff --git a/test/runner/requirements/sanity.txt b/test/runner/requirements/sanity.txt index 98a92117c6..adfeb47017 100644 --- a/test/runner/requirements/sanity.txt +++ b/test/runner/requirements/sanity.txt @@ -1,6 +1,8 @@ +cryptography jinja2 mock pep8 +paramiko pylint pytest rstcheck diff --git a/test/runner/requirements/units.txt b/test/runner/requirements/units.txt index 9a43516b1c..a064c2d271 100644 --- a/test/runner/requirements/units.txt +++ b/test/runner/requirements/units.txt @@ -1,11 +1,12 @@ boto boto3 placebo +cryptography +pycrypto jinja2 mock nose passlib -pycrypto pytest pytest-mock pytest-xdist diff --git a/test/runner/requirements/windows-integration.txt b/test/runner/requirements/windows-integration.txt index d6fcc566fc..df57d2a673 100644 --- a/test/runner/requirements/windows-integration.txt +++ b/test/runner/requirements/windows-integration.txt @@ -1,4 +1,6 @@ +cryptography jinja2 junit-xml +paramiko pywinrm pyyaml |