#50075 Ticket 50070 - new option to store unhashed password only in replication changelog
Closed by spichugi. Opened by tbordaz.
tbordaz/389-ds-base ticket_50070  into  master

Download 50075.patch

Bug Description:
The option 'nsslapd-unhashed-pw-switch: nolog' prevents to log
unhashed#user#password in the logs (replication changelog and retroCL).
It could be a security concern to, releasing unhashed password to a ldap
client. A new option is to prevent logging of unhashed password in the
retroCL.

Fix Description:
The fix is to not log in retroCL the unhashed password when the
nsslapd-unhashed-pw-switch is 'nolog' or 'on_only_repl'

https://pagure.io/389-ds-base/issue/50070

Reviewed by: ?

Platforms tested: F27

Flag Day: no

Doc impact: no

It can be deleted after you've created your test case

Let's name the test case with a human-readable name. And let's move it from dirsrvtests/tests/tickets/ticket50070_test.py
to some test suite because we're trying to get read of the 'tickets' dir

You can use M1.config.replace('nsslapd-unhashed-pw-switch', 'on') here. It is more human readable and it takes care about 'bytes' issue

Instead of the function you can add a generic test user. It will work okay for your test case because it has basically the same attributes and you don't need anything special here.

users = UserAccounts(inst, DEFAULT_SUFFIX)
user = users.create_test_user(uid=1000)
user.replace('userPassword', PASSWORD_ADD)

And this can be replaced with
user.replace('userPassword', CLEAR_TXT_PASSWORD)

The 'on_only_repl' looks a bit redundant to me...
Maybe 'only_repl' will work better? The same way we have 'nolog' (and not 'on_nolog') - it is assumed that the unhashed password is stored in the entry extension but not logged.

Don't use raw entry in tests, please use user type.

You have nolog and on_only_repl, but two lines below, we log valid values and we don't list "on_only_repl". I also think that this name is really confusing, because I'm not sure what "nolog" does by looking it at. I think a clearer configuration name is required.

@tbordaz if you something is unclear or you have any other blocker, please, reach me. :)

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3134

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata