-
Notifications
You must be signed in to change notification settings - Fork 8
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
password change functionality #50
Conversation
re: MIT Heimdal does not use magic markers, this is MIT specific. |
re: Heimdal testing: current Several attempts were made to run UPD: when also: there is a typo in realm.py |
re: prompts: I was under impression that the expired password can be changed using callback prompts of But it does not work. But after collecting prompts, |
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 for the in depth implementation here. I've done a single passthrough and added some initial comments.
CI failed the new tests on the original 0.6.0 code until I changed the version metadata in f823923. It looks like pip downloaded and used the original 0.6.0 version otherwise. |
Thanks for working on this. |
The three new calls
change_password()
,set_password()
andset_password_using_ccache()
allow changing the passwords for the credential owner and/or for the other principals (if enough privileges are obtained).The primary use case is to handle the user password expiration and/or requirement to change on the first logon.
This is achieved by:
get_init_creds_password()
with the principal.Krb5Error
exception with error code ofKRB5KDC_ERR_KEY_EXP
.kadmin/changepw
usingget_init_creds_password()
and the expired principal.change_password()
.All three new functions return 3-value tuples:
(result_code, result_code_string, server_response)
The non-zero result code means error.
The server response may contain additional information about password policy violations or other errors.
Prompter functionality does not work when password requires changing (with MIT
k5test
it always complains the new password is too short, even if policy minimal length is set to 1). Anyhow, prompter is a library wrapper for the same functionality that is available directly with this PR.Known issues:
k5test
with Heimdal password services. Apart fromkadmind(8)
, Heimdal uses a separatekpasswdd(8)
daemon. Some attempts to deal with Heimdal are recorded in the commits but removed from the final code. Each new attempt introduced a new error and that was just endless...Open for comments.