Repository navigation
Conversation
|
The jobs will most possibly fails ofc as twisted is not yet compatible with FIPS mode. |
Merging this PR will improve performance by 2.74%
Performance Changes
Comparing |
|
It looks that it works as intended. FIPS is found as active, and there are 14 failures and 506 errors from various md5 calls. |
f3b6e46 to
219dc0e
Compare
Run the test suite under FIPS-enabled OpenSSL on CentOS Stream 9 with Python 3.9 and 3.14. Tests that currently fail under FIPS are excluded. With each subsequent fix remove entries from the exclusion list.
|
@glyph changed the approach here to be exclusion based. There are a lot of tests that are skipped on the FIPS jobs, however many are cascading to other tests, so one fix, should cascade to others. Also I've added CentOS Stream 9 here as a testing environment as this is the environment I'm working on. I can also add CentOS Stream 10, any other FIPS supporting environment or let it as is, to have a minimal environment at the beginning. |
|
Is this ready for review ? I see that this is mentioned to be ralated #11866 ... but I think that we need a dedicated/separate issue for enabling FIPS mode. I have created issue #12631 to discuss how we can support FIPS mode. I guess that we also need to update the installation docs to inform what FIPS environment are supported and how to install that. |
| TOXENV: alldeps-nocov-posix | ||
| TRIAL_ARGS: '-j 4' | ||
| run: | | ||
| tox -- $(python${{ matrix.python-version }} -c " |
There was a problem hiding this comment.
We need to add a comment with the links to all the issues that will target fixing these tests.
Like for example #11866
Once we work on that particular issue we can remove the tests from this exception list and remove the reference to the issue
There was a problem hiding this comment.
Yup, I can do that, but maybe I should follow a more structured approach by identifying all the issues around compliance, required code changes and also figure out the duplicates. Should I start on this? Although I'm not very familiar with twisted processes and on the best way to approach this on having a higher level discussion.
| # See https://github.com/twisted/twisted/pull/12585 | ||
| fips-testing: | ||
| name: ${{ matrix.python-version }}-FIPS OpenSSL | ||
| runs-on: ubuntu-22.04 |
There was a problem hiding this comment.
Just asking.
Why not use Ubuntu 24.04 ?
My understanding is that OPENSSL_FORCE_FIPS_MODE is implemented in Ubuntu 24.04 and then we can run the tests without the need for a separate container.
There was a problem hiding this comment.
The reasoning is that basically I work myself on RHEL/CentOS and Python's support of FIPS mode there, maintaining some downstream patches for years and also collaborated with upstreaming various parts on CPython. Plus I maintain some FIPS Python buildbots for upstream CPython (where I had to patch twisted for buildbot to work correctly).
Plus I don't know how FIPS works on ubuntu or how it's implemented, RHEL/CentOS is fully FIPS compliant when configured.
So it boils down to the use case that I have experience with.
| steps: | ||
| - name: Install system dependencies | ||
| run: | | ||
| dnf install -y git python${{ matrix.dnf-pkg-suffix }}-pip python${{ matrix.dnf-pkg-suffix }}-devel gcc libffi-devel openssl-devel |
There was a problem hiding this comment.
Just asking.
Why do we need to use OS Python version?
I guess that the answer is: because actions/setup-python does not support FIPS mode.
In this case, I think that we should at least create a GitHub Issue upstream and ask for this...
It might be rejected.... but we tried.
There is also the Python distribution from astral-sh/python-build-standalone ... I see some FIPS related work so maybe see if we can use that.
The goal is to see if we can get support for Twisted for FIPS, on a more generic Python distribution... not only CentOS.
But if CentOS is the only OS that provides FIPS mode for Python, this is fine... but at least we tried to get support for more platforms :)
There was a problem hiding this comment.
FIPS mode is more of a compliance thing than strictly security, from vendors who are selling to specific jurisdictions. It's a nice thing to support but it really depends if the distributor has put the work. The upstream Python is not fully FIPS compliant last I checked (but hoping to get there at some point).
So in the end, from my POV, I see the RHEL/CentOS system pythons as the main FIPS enabled interpreters, the main CPython as halfway there and the rest just having bits and pieces (ofc I'm making assumptions here about other distributors, I could be very wrong).
|
I left a comment on #12631 ... we need to see if we want to really support FIPS mode... or just ignore FIPS non-compliace errors. Any option is ok... but we need to state this somewhere in the docs, so that end-users will know what to expect We can implement FIPS ignore and work on FIPS compliance later. |
I can update the issue to reference that.
Hmm the docs should be part of a PR implementing fix compliance (or ignoring MD5), what do you think? |
Scope and purpose
Fixes #12631
Related to #11866
This PR provides the basic blocks for testing with FIPS mode on C9S
Additionally I've added testing for Python 3.9 (the main system python in C9s) and Python3.14 which is newly added there.