RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2220890 - healthcheck tool needs to be updated for new default password storage scheme
Summary: healthcheck tool needs to be updated for new default password storage scheme
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2023-07-17
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.9
Assignee: mreynolds
QA Contact: LDAP QA Team
URL:
Whiteboard: sync-to-jira
: 2220877 (view as bug list)
Depends On:
Blocks: 2209172
TreeView+ depends on / blocked
 
Reported: 2023-07-06 12:50 UTC by mreynolds
Modified: 2023-11-14 16:50 UTC (History)
6 users (show)

Fixed In Version: 389-ds-1.4-820230816162424-17499975
Doc Type: Bug Fix
Doc Text:
.The `dsctl healthcheck` command now uses the password storage scheme `PBKDF2-SHA512` by default Previously, the `dsctl healthcheck` command used `SSHA512` password storage scheme by default. Consequently, the command reported a warning because it did not detect the new password storage scheme `PBKDF2-SHA512`. With this update, the `dsctl healthcheck` command now uses `PBKDF2-SHA512` password storage scheme by default and no warnings occur.
Clone Of:
Environment:
Last Closed: 2023-11-14 15:32:25 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker IDMDS-3341 0 None None None 2023-07-06 12:56:46 UTC
Red Hat Issue Tracker IDMDS-3342 0 None None None 2023-07-06 20:09:47 UTC
Red Hat Issue Tracker RHELPLAN-161684 0 None None None 2023-07-06 12:52:55 UTC
Red Hat Product Errata RHBA-2023:6965 0 None None None 2023-11-14 15:33:08 UTC

Description mreynolds 2023-07-06 12:50:50 UTC
Description of problem:

Healthcheck tool is reporting a warning because it does not recognize the new default password storage scheme in 1.4.3 (PBKDF2-SHA512).  

Upstream tickets:

https://github.com/389ds/389-ds-base/issues/2375
https://github.com/389ds/389-ds-base/issues/5825

Comment 1 mreynolds 2023-07-06 13:24:38 UTC
*** Bug 2220877 has been marked as a duplicate of this bug. ***

Comment 4 Viktor Ashirov 2023-07-17 11:23:29 UTC
Build tested:
389-ds-base-1.4.3.36-2.module+el8.9.0+19332+3ffa8e10.x86_64

Automated test passed (had to comment out instance.config.set('nsslapd-accesslog-logbuffering','off') in /usr/lib/python3.6/site-packages/lib389/topologies.py, otherwise healthcheck would also fail):

===================================================================================================================== test session starts =====================================================================================================================
platform linux -- Python 3.6.8, pytest-3.4.2, py-1.5.3, pluggy-0.6.0 -- /usr/libexec/platform-python
cachedir: ../../.pytest_cache
389-ds-base: 1.4.3.36-2.module+el8.9.0+19332+3ffa8e10
nss: 3.79.0-11.el8_7
nspr: 4.35.0-1.el8_8
openldap: 2.4.46-18.el8
cyrus-sasl: not installed
FIPS: disabled
rootdir: /root/ds/dirsrvtests, inifile: pytest.ini
plugins: flaky-3.7.0
collected 1 item

healthcheck/health_security_test.py::test_healthcheck_insecure_pwd_hash_configured PASSED                                                                                                                                                               [100%]

================================================================================================================== 1 passed in 35.73 seconds ==================================================================================================================



But when running in FIPS mode manually, healthcheck fails:
# dsctl slapd-localhost healthcheck --check config:passwordscheme
Beginning lint report, this could take a while ...
Checking config:passwordscheme ...
Healthcheck complete.
2 Issues found!  Generating report ...


[1] DS Lint Error: DSCLE0002
--------------------------------------------------------------------------------
Severity: HIGH
Check: config:passwordscheme
Affects:
 -- cn=config

Details:
-----------
Password storage schemes in Directory Server define how passwords are hashed via a
one-way mathematical function for storage. Knowing the hash it is difficult to gain
the input, but knowing the input you can easily compare the hash.

Many hashes are well known for cryptograhpic verification properties, but are
designed to be *fast* to validate. This is the opposite of what we desire for password
storage. In the unlikely event of a disclosure, you want hashes to be *difficult* to
verify, as this adds a cost of work to an attacker.

In Directory Server, we offer one hash suitable for this (PBKDF2-SHA512) and one hash
for "legacy" support (SSHA512).

Your configured scheme (SSHA512) for 'nsslapd-rootpwstoragescheme' is not secure


Resolution:
-----------
Perform a configuration reset of the values:

IE, stop Directory Server, and in dse.ldif delete this line (nsslapd-rootpwstoragescheme). When Directory Server
is started, they will use the server provided defaults that are secure.

You can also use 'dsconf' to replace these values.  Here is an example:

    # dsconf slapd-localhost config replace nsslapd-rootpwstoragescheme=PBKDF2-SHA512


[2] DS Lint Error: DSCLE0002
--------------------------------------------------------------------------------
Severity: HIGH
Check: config:passwordscheme
Affects:
 -- cn=config

Details:
-----------
Password storage schemes in Directory Server define how passwords are hashed via a
one-way mathematical function for storage. Knowing the hash it is difficult to gain
the input, but knowing the input you can easily compare the hash.

Many hashes are well known for cryptograhpic verification properties, but are
designed to be *fast* to validate. This is the opposite of what we desire for password
storage. In the unlikely event of a disclosure, you want hashes to be *difficult* to
verify, as this adds a cost of work to an attacker.

In Directory Server, we offer one hash suitable for this (PBKDF2-SHA512) and one hash
for "legacy" support (SSHA512).

Your configured scheme (SSHA512) for 'passwordStorageScheme' is not secure


Resolution:
-----------
Perform a configuration reset of the values:

IE, stop Directory Server, and in dse.ldif delete this line (passwordStorageScheme). When Directory Server
is started, they will use the server provided defaults that are secure.

You can also use 'dsconf' to replace these values.  Here is an example:

    # dsconf slapd-localhost config replace passwordStorageScheme=PBKDF2-SHA512


Since SSHA512 is considered "insecure" in a non-FIPS environment, but in FIPS mode this is the best pwd storage scheme that we can set, should the healthcheck tool take this into consideration?

Comment 5 mreynolds 2023-07-17 13:37:28 UTC
We now have Rust password hashers using openssl instead of NSS.  So we can now have PBKDF2 in Fips environment.

Comment 6 Viktor Ashirov 2023-07-17 13:41:58 UTC
Should it be enabled at the instance creation time by default? Or there some compatibility issues that prevent us to make it default in FIPS mode?

Comment 7 mreynolds 2023-07-17 13:52:21 UTC
(In reply to Viktor Ashirov from comment #6)
> Should it be enabled at the instance creation time by default? Or there some
> compatibility issues that prevent us to make it default in FIPS mode?

Oh wait.  Ok in RHEL 8 in fips we do use SSHA512 as default.  But we do support PBKDF2 (Rust version) in RHEL 8 now with fips.  In 2.x we always use PBKDF2-SHA512.

Comment 12 Viktor Ashirov 2023-08-21 13:04:02 UTC
Automated test passes in FIPS mode too:
=============================================================================================== test session starts ================================================================================================
platform linux -- Python 3.6.8, pytest-3.4.2, py-1.5.3, pluggy-0.6.0 -- /usr/libexec/platform-python
cachedir: dirsrvtests/.pytest_cache
389-ds-base: 1.4.3.37-1.module+el8.9.0+19689+7d653af8
nss: 3.90.0-3.el8_8
nspr: 4.35.0-1.el8_8
openldap: 2.4.46-18.el8
cyrus-sasl: not installed
FIPS: enabled
rootdir: /root/ds/dirsrvtests, inifile: pytest.ini
collected 1 item

dirsrvtests/tests/suites/healthcheck/health_security_test.py::test_healthcheck_insecure_pwd_hash_configured PASSED                                                                                           [100%]

============================================================================================ 1 passed in 40.61 seconds =============================================================================================

Marking as VERIFIED:Tested.

Comment 17 errata-xmlrpc 2023-11-14 15:32:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (389-ds:1.4 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6965


Note You need to log in before you can comment on or make changes to this bug.