Issue 6516 - Allow to configure the password scheme not updated on bind#6517
Conversation
|
|
||
| log.info('test_password_modify_non_utf8: PASSED') | ||
|
|
||
| def test_pwd_scheme_not_upgraded_on_bind(topology_st, crypt_scheme, request): |
There was a problem hiding this comment.
FYI: since test_pwd_scheme_not_upgraded_on_bind and test_pwd_scheme_crypt_upgraded_on_bind are very similar, I think you should rather have a single parametrized test
each parameter values being a tuple (no_upgrade_hash_value, expected_hash_after_bind)
| /* values are comma separated list. Add heading/ending commas | ||
| * to retrieve the exact current hash in that list | ||
| */ | ||
| no_upgrade_hashes = slapi_ch_smprintf(",%s,", slapdFrontendConfig->scheme_list_no_upgrade_hash); |
There was a problem hiding this comment.
Nice trick. FYI you could also keep the configuration parameter as is and use strtok_r to parse it:
char *saveptr = NULL;
no_upgrade_hashes = slapi_ch_strdup(slapdFrontendConfig->scheme_list_no_upgrade_hash);
for (char *hash = strtok_r(no_upgrade_hashes, ", \t\n", &saveptr);
hash;
hash = strtok_r(NULL, ", \t\n", &saveptr)) {
if strcasecmp(hash, curpwsp->pws_name) == )) {
ignore_upgrade = 1;
break;
}
}
slapi_ch_free_string(&no_upgrade_hashes);
Bug description: The configuration option 'nsslapd-enable-upgrade-hash: on' allows to update, during a user bind, the password storage hash of the user password. The update sets the password storage hash to the one defined in the password policy (passwordStorageScheme) If the current user password hash is 'CRYPT' or 'CLEAR' then the password storage hash is not updated. This is hardcoded. Fix description: Introduce a new configuration parameter that list the hashes that are *not* upgraded during a bind. 'nsslapd-scheme-list-no-upgrade-hash' fixes: 389ds#6516 Reviewed by: Pierre Rogier
…nd (#6517) Bug description: The configuration option 'nsslapd-enable-upgrade-hash: on' allows to update, during a user bind, the password storage hash of the user password. The update sets the password storage hash to the one defined in the password policy (passwordStorageScheme) If the current user password hash is 'CRYPT' or 'CLEAR' then the password storage hash is not updated. This is hardcoded. Fix description: Introduce a new configuration parameter that list the hashes that are *not* upgraded during a bind. 'nsslapd-scheme-list-no-upgrade-hash' fixes: #6516 Reviewed by: Pierre Rogier
…nd (#6517) Bug description: The configuration option 'nsslapd-enable-upgrade-hash: on' allows to update, during a user bind, the password storage hash of the user password. The update sets the password storage hash to the one defined in the password policy (passwordStorageScheme) If the current user password hash is 'CRYPT' or 'CLEAR' then the password storage hash is not updated. This is hardcoded. Fix description: Introduce a new configuration parameter that list the hashes that are *not* upgraded during a bind. 'nsslapd-scheme-list-no-upgrade-hash' fixes: #6516 Reviewed by: Pierre Rogier
Bug description:
The configuration option 'nsslapd-enable-upgrade-hash: on' allows
to update, during a user bind, the password storage hash of the
user password.
The update sets the password storage hash to the one defined in the
password policy (passwordStorageScheme)
Fix description:
Introduce a new configuration parameter that list the hashes
that are not upgraded during a bind.
'nsslapd-scheme-list-no-upgrade-hash'
fixes: #6516
Reviewed by: