#49643 Issue 49642 - lib389 should generate a more complex password
Closed by spichugi. Opened by spichugi.
spichugi/389-ds-base pwd_gen  into  master

Download 49643.patch

Bug description: New NSS versions require a password to be more complex.
The password should be at least 7 characters long,
and should consist of at least three character classes.
The available character classes are: digits (0-9), ASCII
lowercase letters, ASCII uppercase letters, ASCII
non-alphanumeric characters, and non-ASCII characters.

Fix description: Refactor password_generate function
so it fullfils the minimal requirements. Also, make
the fuction generate more secure password.
Add the docstrings to the passwd.py module.

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

Reviewed by: ?

rebased onto 4b68ef07dd86b5cfa2bdaa20578d00b343b33206

Looks good

rebased onto d357888dc6aee353c9a3c9d17b0b7f174431bad5

Pull-Request has been merged by spichugi

Just want to point out, this isn't really a needed change. Password length matters more than "complexity". Even knowing this is all lowercase, at 64 chars long, that's 36893488147419103232 possible combinations just of lower case letters.

Sure, I agree.
The main reason for the patch was that we need 'at least three character classes.' in the password now. The tests were failing.

And regarding the rest of the change, as I've mentioned in the comment:

# Maybe it is an overkill for our case but it can come handy one day
# (especially consider the fact we can use it for CLI tools)

So I can imagine that one day someone can use the code or the function for the generating his own password (Directory Manager, for instance, and the password will have less charaters because it will be for personal use).

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/2702

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