Skip to content

Replace kadmin.py with python-kadmin - #14

Open
tdorianh wants to merge 1 commit into
collegiumv:masterfrom
tdorianh:kadmin
Open

Replace kadmin.py with python-kadmin#14
tdorianh wants to merge 1 commit into
collegiumv:masterfrom
tdorianh:kadmin

Conversation

@tdorianh

@tdorianh tdorianh commented Jul 5, 2017

Copy link
Copy Markdown
Member

No description provided.

@the-maldridge the-maldridge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

My $0.02.

Comment thread accountServices.py
self.kadmin = kadmin.KAdmin(config["krb5"]["aprinc"],
config["krb5"]["atab"])
self.kadm = kadmin.init_with_keytab(config["krb5"]["aprinc"],
config["krb5"]["atab"])

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread accountServices.py

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

Copy link
Copy Markdown
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

kulinacs commented Sep 8, 2017

Copy link
Copy Markdown
Contributor

Merged.

@kulinacs kulinacs closed this Sep 8, 2017
@kulinacs kulinacs reopened this Sep 8, 2017
@kulinacs

kulinacs commented Sep 8, 2017

Copy link
Copy Markdown
Contributor

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