<div dir="ltr">Hi Ade,<div><br></div><div>We discussed this at our cinder meeting yesterday[1].</div><div>We do have occurrences of paramiko in our code[2] but they are mostly in our driver code where we are not testing compliance with FIPS.</div><div>Currently, most of our third party CIs runs on Ubuntu and AFAIR, FIPS only works on CentOS so we can think about this when we start supporting FIPS for Ubuntu (as also discussed in Cinder PTG[3]).</div><div>For the core cinder code, we don't have any usage of paramiko and the current jobs proposed[4] doesn't deal with third party drivers that are using paramiko.</div><div>In conclusion, the FIPS compliance looks good from the Cinder side and we are planning to add documentation for new drivers about FIPS compliance so they're aware about it.</div><div><br></div><div>[1] <a href="https://meetings.opendev.org/meetings/cinder/2022/cinder.2022-04-20-14.00.log.html#l-44">https://meetings.opendev.org/meetings/cinder/2022/cinder.2022-04-20-14.00.log.html#l-44</a></div><div>[2] <a href="https://github.com/openstack/cinder/search?q=paramiko">https://github.com/openstack/cinder/search?q=paramiko</a></div><div>[3] <a href="https://etherpad.opendev.org/p/zed-ptg-cinder#L547">https://etherpad.opendev.org/p/zed-ptg-cinder#L547</a></div><div>[4] <a href="https://review.opendev.org/c/openstack/cinder/+/790535">https://review.opendev.org/c/openstack/cinder/+/790535</a></div><div><br></div><div>Thanks and regards</div><div>Rajat Dhasmana</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 20, 2022 at 2:36 AM Ade Lee <<a href="mailto:alee@redhat.com">alee@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_2681404822792206303gmail-magicdomid51"><span>Hi all,</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid9"><br></div><div id="gmail-m_2681404822792206303gmail-magicdomid53"><span>As many have already seen, a number of changes have been merged in OpenStack as part of the effort to allow OpenStack to run on FIPS enabled systems. This effort has been captured in a proposed community goal. [1].</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid12"><br></div><div id="gmail-m_2681404822792206303gmail-magicdomid57"><span>One of the requirements for this effort is that md5sum() not be used in a security related context. In fact, python 3.9 has been modified to raise an exception of hashlib.md5sum() is called on a FIPS enabled system, unless it is explicitly annotated with a usedforsecurity=False attribute [2]. We added a wrapper for md5sum in oslo.config to take advantage of this attribute. [3,4,5]</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid58"><span> </span></div><div id="gmail-m_2681404822792206303gmail-magicdomid61"><span>Where we have less control is in libraries used by Openstack - and in particular, paramiko. Paramiko fails on FIPS enabled systems
because of a call to md5sum() in get_fingerprint(). A patch has been
submitted to fix this problem. [6]. Unfortunately, it takes a very long time for paramiko to fix issues. </span></div><div id="gmail-m_2681404822792206303gmail-magicdomid62"><span> </span></div><div id="gmail-m_2681404822792206303gmail-magicdomid64"><span>In
order for us to make progress on FIPS testing, a small monkey-patch for
paramiko was checked into tempest. [7]. Because this change was made to a test tool, this patch was relatively uncontroversial.</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid65"><span> </span></div><div id="gmail-m_2681404822792206303gmail-magicdomid69"><span>A
similar change has been found to be needed for manila [8]. I would
expect that a similar change will be needed in other components that use paramiko to SSH to other systems (eg. cinder, neutron?) I suspect that the only reason this has not been detected in FIPS testing more widely yet is because the components that use paramiko for SSH are being tested in third party tests that do not, as yet, test FIPS.</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid29"><br></div><div id="gmail-m_2681404822792206303gmail-magicdomid71"><span>At the request of the manila team, I am bringing this monkey-patch to the attention of the wider OpenStack community to get feedback on the pros and cons of applying this monkey-patch.</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid32"><br></div><div id="gmail-m_2681404822792206303gmail-magicdomid72"><span>A couple things to note:</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid73"><span>1. This monkey patch is quite small in scope and only needed until paramiko fixes the issue.</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid75"><span>2.
paramiko is not FIPS compliant, and so we will ultimately need to fix
paramiko or replace it with a different library on FIPS enabled systems. When we do this, we would remove the monkey patch.</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid37"><br></div><div id="gmail-m_2681404822792206303gmail-magicdomid76"><span>Thanks,</span></div><div id="gmail-m_2681404822792206303gmail-magicdomid77"><span>Ade Lee<br></span></div><div id="gmail-m_2681404822792206303gmail-magicdomid41"><br></div><div id="gmail-m_2681404822792206303gmail-magicdomid78"><span>[1] </span><span><a href="https://opendev.org/openstack/governance/src/branch/master/goals/proposed/fips.rst" rel="noreferrer noopener" target="_blank">https://opendev.org/openstack/governance/src/branch/master/goals/proposed/fips.rst</a></span></div><div id="gmail-m_2681404822792206303gmail-magicdomid79"><span>[2] </span><span><a href="https://bugs.python.org/issue9216" rel="noreferrer noopener" target="_blank">https://bugs.python.org/issue9216</a></span></div><div id="gmail-m_2681404822792206303gmail-magicdomid80"><span>[3] </span><span><a href="https://review.opendev.org/c/openstack/oslo.utils/+/750031" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/oslo.utils/+/750031</a></span></div><div id="gmail-m_2681404822792206303gmail-magicdomid81"><span>[4] Patches to various projects to use oslo.utils adapter for hashlib.md5 (as examples): glance: </span><span><a href="https://review.opendev.org/c/openstack/glance/+/756158" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/glance/+/756158</a></span><span> nova: </span><span><a href="https://review.opendev.org/c/openstack/nova/+/756434" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/nova/+/756434</a></span><span> nova: </span><span><a href="https://review.opendev.org/c/openstack/nova/+/777686" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/nova/+/777686</a></span><span> os-brick: </span><span><a href="https://review.opendev.org/c/openstack/os-brick/+/756151" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/os-brick/+/756151</a></span><span> oslo: </span><span><a href="https://review.opendev.org/c/openstack/oslo.versionedobjects/+/756153" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/oslo.versionedobjects/+/756153</a></span><span> tooz: </span><span><a href="https://review.opendev.org/c/openstack/tooz/+/756432" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/tooz/+/756432</a></span><span> opensdk: </span><span><a href="https://review.opendev.org/c/openstack/openstacksdk/+/767411" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/openstacksdk/+/767411</a></span><span> octavia: </span><span><a href="https://review.opendev.org/c/openstack/octavia/+/798146" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/octavia/+/798146</a></span><span> designate: </span><span><a href="https://review.opendev.org/c/openstack/designate/+/798157" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/designate/+/798157</a></span><span> glance_store: </span><span><a href="https://review.opendev.org/c/openstack/glance_store/+/756157" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/glance_store/+/756157</a></span></div><div id="gmail-m_2681404822792206303gmail-magicdomid82"><span>[5] Swift patch to handle hashlib.md5 </span><span><a href="https://review.opendev.org/c/openstack/swift/+/751966" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/swift/+/751966</a></span></div><div id="gmail-m_2681404822792206303gmail-magicdomid83"><span>[6] </span><span><a href="https://github.com/paramiko/paramiko/pull/1928" rel="noreferrer noopener" target="_blank">https://github.com/paramiko/paramiko/pull/1928</a></span></div><div id="gmail-m_2681404822792206303gmail-magicdomid84"><span>[7] </span><span><a href="https://review.opendev.org/c/openstack/tempest/+/822560" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/tempest/+/822560</a></span></div><div id="gmail-m_2681404822792206303gmail-magicdomid85"><span>[8] </span><span><a href="https://review.opendev.org/c/openstack/manila/+/819375" rel="noreferrer noopener" target="_blank">https://review.opendev.org/c/openstack/manila/+/819375</a></span></div></div>
</blockquote></div>