-
Notifications
You must be signed in to change notification settings - Fork 397
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
Update S3_SYNC module to be FIPS complaint #757
Comments
Files identified in the description:
If these files are inaccurate, please update the |
@nkalatho thx for contributing this FIPS issue. First, it would be awesome to know your ansible version and collection versions.
Because your python 2.7 runtime is very old, and the referencing error line 277 does not match with current code base. Furthermore, this is (imo) a false positive. FIPS does not allow md5 algorithm in context of cryptographic, because it is weak.
I'm sorry, but there is nothing we can do about it. |
Hi @nkalatho, are you using GovCloud region? If that is the case, unfortunately the Ansible community does not have access to GovCloud and can not test with s3-fips.us-gov-east-1.amazonaws.com endpoints so our support for this is best-effort and based on standard AWS regions and partitions. |
s3_sync - fix when running in FIPS mode SUMMARY fixes: #757 pass usedforsecurity=False (the MD5 sum isn't used as a cryptographic hash) and attempt to handle FIPS errors more gracefully. ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_sync ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis <None>
Summary
When running an Ansible task using the s3_sync module (https://docs.ansible.com/ansible/2.9/modules/s3_sync_module.html) on a Jenkins worker where FIPS is enabled, we got the following error.
ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips
Full error description below:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips
11:32:29 fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/opt/cms/data/jenkins/.ansible/tmp/ansible-tmp-1632324747.86-39306657754486/AnsiballZ_s3_sync.py", line 102, in \n _ansiballz_main()\n File "/opt/cms/data/jenkins/.ansible/tmp/ansible-tmp-1632324747.86-39306657754486/AnsiballZ_s3_sync.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/opt/cms/data/jenkins/.ansible/tmp/ansible-tmp-1632324747.86-39306657754486/AnsiballZ_s3_sync.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.cloud.amazon.s3_sync', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib64/python2.7/runpy.py", line 176, in run_module\n fname, loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code\n exec code in run_globals\n File "/tmp/ansible_s3_sync_payload_cpIDqe/ansible_s3_sync_payload.zip/ansible/modules/cloud/amazon/s3_sync.py", line 544, in \n File "/tmp/ansible_s3_sync_payload_cpIDqe/ansible_s3_sync_payload.zip/ansible/modules/cloud/amazon/s3_sync.py", line 525, in main\n File "/tmp/ansible_s3_sync_payload_cpIDqe/ansible_s3_sync_payload.zip/ansible/modules/cloud/amazon/s3_sync.py", line 347, in calculate_local_etag\n File "/tmp/ansible_s3_sync_payload_cpIDqe/ansible_s3_sync_payload.zip/ansible/modules/cloud/amazon/s3_sync.py", line 277, in calculate_multipart_etag\nValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Our code looks like this:
s3_sync:
bucket: "{{s3_bucket}}"
file_root: "{{ ambda_download_dir }}/package/dist"
mime_map: {
".svg": "image/svg+xml",
".json": "application/json",
}
region: "{{ lambda_region }}"
file_change_strategy: force
register: sync_output
The same works fine on Jenkins workers with FIPS disabled.
Issue Type
Feature Idea
Component Name
s3_sync
Additional Information
Our code looks like this:
s3_sync:
bucket: "{{s3_bucket}}"
file_root: "{{ ambda_download_dir }}/package/dist"
mime_map: {
".svg": "image/svg+xml",
".json": "application/json",
}
region: "{{ lambda_region }}"
file_change_strategy: force
register: sync_output
Code of Conduct
The text was updated successfully, but these errors were encountered: