SIGN IN SIGN UP

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>
A
Aashish Sharma committed
7927cf51e04177d73f6cb836338f7540c1f629c5
Parent: 2d4a87a