[Packaging] Add SHA256 digest for RPM#20852
Conversation
on FIPS enabled systems where MD5 checksums are not permitted
|
Thank you for your contribution aghassemlouei! We will review the pull request and get back to you soon. |
|
Packaging |
|
Thanks for the contribution, and the description is very helpful! However, this PR does not qualify as a Hotfix. The next release is pretty near anyway: https://github.com/Azure/azure-cli/milestone/113 |
|
By the way, @aghassemlouei, @archoversight, any idea how I can use an RPM that checks |
I have no idea how to get it to do explicitly. The tests above was run on a Red Hat 8.4 system in FIPS mode. |
|
@archoversight, are you pulling Also, your result shows I checked https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening#enabling-fips-mode-in-a-container_using-the-system-wide-cryptographic-policies, but can't find a way to enable "Red Hat 8.4 system in FIPS mode" on a Windows docker container using WSL 2. Any way I can do this easily without a "Red Hat 8.4 system in FIPS mode" physical machine? |
|
I also tried to create an Azure VM with However, after following https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening#switching-the-system-to-fips-mode_using-the-system-wide-cryptographic-policies and running the VM won't start anymore 🙁 |
|
Gen 1 VM works correctly: Now CentOS 7 which the build pipeline uses only has RPM 4.11.3: According to https://www.starlab.io/blog/adding-sha256-digests-to-rpms
|
|
We did some additional testing today and as @jiasli mentioned above Cent OS 7 default rpm version 4.11.3 will simply ignore the global parameters to generate SHA256 digest. We need rpm version >= 4.14.3, which is the default on RedHat 8.4, to generate the correct SHA256 digest. I think the most straightforward solution would be to generate a new rpm package based on an RedHat 8.x binary-compatible Linux distribution like Alma or Rocky as Cent OS 8 is already deprecated. This would make this PR obsolete. |
|
As explained in #20852 (comment), this PR won't work. Closing and will continue the work in #20918. |

Description
This pull request allows for RPM packages to be signed with SHA256 digests given that #11325 reverted CentOS8 changes that would've negated this request. This should address #20719 and unblock installation on Red Hat Enterprise Linux (RHEL) 8 systems.
Testing Guide
On RHEL 8.4 systems, when the
azure-cliis installed via Yum/RPM the current behavior without this change results in the following output:External References
History Notes
[Packaging] Add SHA256 digest for RPM: Ensure that all RPMs include SHA256 digest to enable installation on operating systems that do not accept SHA1 checksums