New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stronger check for DM password during server install #443
Conversation
|
Function check_password_fips_nssdb_compatible looks like a great candidate for unit test. |
ipaserver/install/server/install.py
Outdated
| gotnumeric = any(c.isdigit() for c in password[:-1]) | ||
| gotupper = any(c.isupper() for c in password[1:]) | ||
| gotlower = any(c.islower() for c in password) | ||
| gotspecial = password.isalnum() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should be negated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, was editing this right before pushing but forgot how to logic :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned, a unit test for the function would be great as well. Especially covering the NSS-specific edge cases - at least we'd have the expected behavior documented with a test.
| """ | ||
| Check whether the given password can be used for NSSDB setup in FIPS mode | ||
| """ | ||
| gotnumeric = any(c.isdigit() for c in password[:-1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could use a comment that the :-1 and 1: is a NSSDB-specific requirement.
|
IMHO you got it backwards - DM password may not comply to NSS requirements for passwords, therefore it must not be used as a password for any NSS database during server install. |
|
@HonzaCholasta: +1, you're right, I should investigate more on how to change this behavior, either we or Dogtag don't behave correctly here. |
|
Closing as REJECTED, this will be sorted out in another way. |
DM password is used as an NSS database password during server installation, therefore it must comply to NSS database requirements for password in FIPS.
https://fedorahosted.org/freeipa/ticket/5695