Fix Content-MD5 in FIPS environments - #48241
Conversation
|
Thank you for your contribution @JensWehner! We will review the pull request and get back to you soon. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 8 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Updates Blob Content-MD5 calculation for FIPS environments and adds regression coverage.
Changes:
- Marks MD5 as non-security usage.
- Adds a FIPS-policy regression test.
- Sibling Storage packages remain unaddressed.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/test_content_validation.py |
Tests non-security MD5 usage. |
_shared/validation.py |
Passes usedforsecurity=False to MD5. |
|
@JensWehner, thanks for the contribution! We are good to take this change but please address the comment from Copilot and bring this change to all four of our base packages. While it may not be used in all packages, we like to keep the |
This comment has been minimized.
This comment has been minimized.
e949264 to
11a7c3e
Compare
[Pilot] PR Pipeline Failure AnalysisA CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green. What failedThe mypy validation stage failed for 2 packages in the
The storage packages ( Error (identical in both packages): Build: https://dev.azure.com/azure-sdk/public/_build/results?buildId=6618602 Recommended next steps
Raw pipeline analysis (azsdk ci analyze)
|
2620977 to
1429cae
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
sdk/storage/azure-storage-queue/azure/storage/queue/_shared/validation.py:80
- The regression test added in this PR imports only Blob's
validationmodule, so it does not exercise this separate Queue implementation. A future omission or regression here would still pass that test; add the same FIPS simulation againstazure.storage.queue._shared.validation.calculate_content_md5.
md5 = hashlib.md5(usedforsecurity=False) # nosec
sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/validation.py:80
- The new regression test executes only Blob's copy of this helper, not the File Share module changed here. Please add equivalent coverage in File Share's existing
tests/test_content_validation.pyso its independently shipped implementation is verified under the simulated FIPS policy.
md5 = hashlib.md5(usedforsecurity=False) # nosec
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/validation.py:80
- The Blob-only regression test does not execute this independently shipped Data Lake helper. Add the equivalent FIPS simulation to Data Lake's existing
tests/test_content_validation.py; otherwise this package can regress to plainhashlib.md5()without any package test failing.
md5 = hashlib.md5(usedforsecurity=False) # nosec
Content-MD5useshashlib.md5()and fails under FIPS policy. Mark the protocol checksum as non-security use and add a regression test.