]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: set MOTD fails on FIPS enabled systems 70216/head
authorAashish Sharma <aashish@li-e9bf2ecc-2ad7-11b2-a85c-baf05c5182ab.ibm.com>
Wed, 15 Jul 2026 10:51:31 +0000 (16:21 +0530)
committerAashish Sharma <aashish@li-e9bf2ecc-2ad7-11b2-a85c-baf05c5182ab.ibm.com>
Tue, 21 Jul 2026 06:18:28 +0000 (11:48 +0530)
commit7927cf51e04177d73f6cb836338f7540c1f629c5
treef9b888696d7e9d0c478c60fce1f660f09ff149ba
parent2d4a87a17879a0e60108b50fe29be1d768c841ec
mgr/dashboard: set MOTD fails on FIPS enabled systems

Root cause: On FIPS-compliant systems, the OpenSSL provider rejects hashlib.md5() calls that lack the usedforsecurity=False flag, because MD5 is not an approved algorithm for security-sensitive use. This causes the MOTD set command — and the /api/motd create endpoint — to raise a ValueError and crash whenever a new MOTD is saved.

Fix: Pass usedforsecurity=False to hashlib.md5(). This tells the FIPS provider that MD5 is being used only as a non-cryptographic checksum (to detect whether a user has already dismissed a specific MOTD message), which is a legitimate use-case that FIPS allows.

Fixes: https://tracker.ceph.com/issues/78233
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
src/pybind/mgr/dashboard/plugins/motd.py
src/pybind/mgr/dashboard/tests/test_motd.py [new file with mode: 0644]