MD5 not supported without usedforsecurity=False in FIPS 140-2 environment #8608
Description
What happened:
In a FIPS 140-2 enabled CentOS 7 VM I got an error much like the one described here: paramiko/paramiko#396
I had to effectively perform this monkey patch: https://stackoverflow.com/a/70232502
Changed .env/lib/python3.6/site-packages/dask/base.py
:
855 return md5(str(tuple(map(normalize_token, args))).encode()).hexdigest()
to
855 return md5(str(tuple(map(normalize_token, args))).encode(), usedforsecurity=False).hexdigest()
Anything else we need to know?:
Tried to reproduce on my M1 Macbook but unfortunately the Mac's OpenSSL md5 has a different hashlib implementation that doesn't support multiple arguments. https://stackoverflow.com/questions/54717862/how-do-i-know-if-the-usedforsecurity-flag-is-supported-by-hashlib-md5
Environment:
- Python version: 3.8.9
- Operating System: CentOS 7
- Install method (conda, pip, source): pip