Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1064849 - python-pymongo uses FIPS unsafe md5 function
Summary: python-pymongo uses FIPS unsafe md5 function
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: python-pymongo
Version: python33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 2.0
Assignee: Bohuslav "Slavek" Kabrda
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On: 1064844
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-13 12:18 UTC by Robert Kuska
Modified: 2016-04-18 10:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1064844
Environment:
Last Closed: 2014-12-05 09:40:19 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Robert Kuska 2014-02-13 12:18:10 UTC
+++ This bug was initially created as a clone of Bug #1064844 +++

PyMongo uses md5 hash for authentification and md5 is not safe to use while FIPS mode is on. Using PyMongo authentification will result in failures with FIPS mode.


From pymongo/auth.py:

try:
    import hashlib
    _MD5 = hashlib.md5
except ImportError: # for Python < 2.5
    import md5
    _MD5 = md5.new
....

def __password_digest(username, password):

....

    md5hash = _MD5()
    data = "%s:mongo:%s" % (username, password)
    md5hash.update(data.encode('utf-8'))
    return unicode(md5hash.hexdigest())

I do not recommend to fix this issue, changing hash function to e.g sha256 may result into backward incompatible change.

Comment 2 Bohuslav "Slavek" Kabrda 2014-12-05 09:40:19 UTC
This bug is here only for purpose of documenting missing FIPS functionality, but as mentioned in the original report, this won't be fixed.


Note You need to log in before you can comment on or make changes to this bug.