-
-
Notifications
You must be signed in to change notification settings - Fork 954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ETag checksum fails on FIPS-enabled systems when using MD5 #1365
Comments
Ref.: https://unit.nginx.org/configuration/#static-files I've found this article stating the same problem for Django. Which lead me to https://code.djangoproject.com/ticket/28401, and finally to this PR (merged 2 months ago) that solves the problem above. We should probably follow the same path? As we're not on stable release, we can also change the algorithm. Check more about it here. |
What I can review, prior discussion, is a PR that supports "Red Hat Enterprise Linux when FIPS mode is enabled" using the same solution as Django, i.e. checking As for changing the algorithm, we need further discussion, and other members should be involved. I'm going to share this on our Gitter. |
@landtuna could you clarify is this is a statement of fact that you are making based on your expertise in security or if this is just something that you think may be true? My understanding (which I believe is also what @Kludex is getting at above) is that ETags may be used for caching and such, but should not be considered secure / foolproof (for such a use case, the client should get the data and hash it with a secure hash algorithm). But I'm happy to be wrong, so just checking. |
@adriangb sorry, you're right. "Should" was too strong, but if you don't change the algorithm, you'll have to wrap or monkey patch |
We probably want to add the |
This will be available on Starlette 0.18.0. |
Indeed. I'll highlight again that it's only supported on Python 3.9+, so if you're using FIPs mode you need that. |
@tomchristie I think that's not quite accurate. I believe RHEL was the first implementer and backported this feature, and it's on the RHEL family where everything has this problem. I know it's in some of the RHEL Python 2.7 libs, but I'm not positive about the others. Since the implementation didn't check the Python version but did use try/except, I think this fix works for everyone who needs it to to work. |
Yep indeed, I believe you are right. That said, could you test off of master on Python 3.6 and confirm @landtuna? I'd be good to know! |
@adriangb Almost a month later, and I don't have an answer for you yet. The customer who was running in FIPS mode turned it off for a while, but I think they're going to turn it back on soon. 🤷 |
@adriangb Finally was able to test this, and the fix doesn't work. What happens is that the check uses
|
Ah yes I see. |
Confirmed that version 0aef172 with |
Checklist
master
.Describe the bug
The ETag checksum fails when using MD5. This is causing Starlette to not work at all under Red Hat Enterprise Linux when FIPS mode is enabled.
Debugging material
Here's the exception that's thrown:
Environment
The text was updated successfully, but these errors were encountered: