Bug 1702454 - [RHEL 7.6] Enabling FIPS mode breaks python-novaclient
Summary: [RHEL 7.6] Enabling FIPS mode breaks python-novaclient
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-novaclient
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z4
: 14.0 (Rocky)
Assignee: Artom Lifshitz
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-23 19:56 UTC by Alberto Rivera Laporte
Modified: 2023-03-21 19:14 UTC (History)
8 users (show)

Fixed In Version: python-novaclient-11.0.0-0.20180809174650.f1005ce.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-06 16:51:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 664025 0 'None' MERGED Use SHA256 instead of MD5 in completion cache 2021-01-28 18:20:40 UTC
Red Hat Product Errata RHBA-2019:3746 0 None None None 2019-11-06 16:51:55 UTC

Description Alberto Rivera Laporte 2019-04-23 19:56:02 UTC
Description of problem:  


When the host has FIPS enabled both the nova and cinder clients fail. This is reflected in the attached stack trace during a 'server list` operations as an example.  The similar issue is encountered during a 'volume list' [0]. 


Example of the failures:

----------
[root@openshift-jump-1 ~]# openstack server list
error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips

[root@openshift-jump-1 ~]# openstack volume list
error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips
----------


Host Details:

----------
[cloud-user@openshift-jump-1 openstack]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.6 (Maipo)


[cloud-user@openshift-jump-1 openstack]$ sysctl crypto.fips_enabled
crypto.fips_enabled = 1

[cloud-user@openshift-jump-1 openstack]$ cat /proc/sys/crypto/fips_enabled 

1


Packages: 

python2-cinderclient-4.0.1-0.20180809133302.460229c.el7ost.noarch
python2-novaclient-11.0.0-0.20180809174649.f1005ce.el7ost.noarch


----------


This appears to be the result in one of the functions under the completion_cache in the {nova,cinder}client/base.py:314 file [1] which uses md5 hashing function and fails as a result of md5 not an approved hashing function under the FIPS [2]. This is reproducible 100% of the time on a FIPS enabled host. 



[0]
----------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 281, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 175, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 402, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/openstackclient/compute/v2/server.py", line 1266, in take_action
    limit=parsed_args.limit)
  File "/usr/lib/python2.7/site-packages/novaclient/v2/servers.py", line 858, in list
    "servers")
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 271, in _list
    with self.completion_cache('human_id', obj_class, mode="w"):
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/lib/python2.7/site-packages/novaclient/base.py", line 314, in completion_cache
    url.encode('utf-8')).hexdigest()
ValueError: error:060800A3:digital envelope routines:EVP_DigestInit_ex:disabled for fips

END return value: 1
----------



[1]
----------
File: /usr/lib/python2.7/site-packages/novaclient/base.py
----------
---
313             uniqifier = hashlib.md5(username.encode('utf-8') +
314                                     url.encode('utf-8')).hexdigest()
---



[2]
https://csrc.nist.gov/projects/hash-functions

Comment 5 errata-xmlrpc 2019-11-06 16:51:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:3746


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