Skip to content
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

Replace kadmin.py with python-kadmin #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tdorianh
Copy link
Member

@tdorianh tdorianh commented Jul 5, 2017

No description provided.

Copy link
Member

@the-maldridge the-maldridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My $0.02.

self.kadmin = kadmin.KAdmin(config["krb5"]["aprinc"],
config["krb5"]["atab"])
self.kadm = kadmin.init_with_keytab(config["krb5"]["aprinc"],
config["krb5"]["atab"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be keytab, and should default if unset to the system keytab.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by "this should be keytab"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/atab/keytab/

But really it shouldn't be set at all. Its pretty standard to just use the system keytab for applications that are binding with machine level access.

@@ -113,7 +113,7 @@ def connectLDAP(self):
return conn

def chPassword(self, username, password):
return self.kadmin.chPassword(username, password)
return self.kadm.get_princ(username).change_password(password)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be split into 2 calls with a try/except. If the get_princ() call fails you'll be trying to call a method on None.

@kulinacs
Copy link
Contributor

kulinacs commented Sep 8, 2017

Merged.

@kulinacs kulinacs closed this Sep 8, 2017
@kulinacs kulinacs reopened this Sep 8, 2017
@kulinacs
Copy link
Contributor

kulinacs commented Sep 8, 2017

Reopened due to issues with kadmin. Will retest and reconsider at a later date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants