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

adtrustinstance: use LDAPI/EXTERNAL to retrieve CIFS keytab #457

Closed

Conversation

martbab
Copy link
Contributor

@martbab martbab commented Feb 10, 2017

In order to be able to function as a part of composite installer, samba
configuration code must be able to work without admin credentials. This
requires changes in the CIFS principal key retrieval method so that it is not
bound to the presence of privileged user ccache. This is achieved by slightly
altering and re-using the recently developed code for service keytab retrieval.

https://fedorahosted.org/freeipa/ticket/6638

Copy link
Contributor

@abbra abbra left a comment

Choose a reason for hiding this comment

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

I'm not getting where you are getting an idea Samba uses /etc/krb5.keytab. It is configured to use /etc/samba/samba.keytab and should continue doing so.


def _clean_previous_keytab(self):
"""
Purge old CIFS keys from /etc/krb5.keytab and clean up samba ccache
Copy link
Contributor

Choose a reason for hiding this comment

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

Samba does not use /etc/krb5.keytab. Instead, Samba has own keytab in /etc/samba/samba.keytab.

% self.principal)
def _set_keytab_owner(self):
"""
Do not re-set ownership of /etc/krb5.keytab
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here -- Samba uses /etc/samba/samba.keytab. That keytab file should be root:root.

@martbab martbab force-pushed the adtrust-installer-keytab-via-ldapi branch from 5422ffa to 5322384 Compare February 10, 2017 14:03
@martbab
Copy link
Contributor Author

martbab commented Feb 10, 2017

Sorry I just got confused for a bit. Fixed the docstring now refer only to 'samba keytab'.

Martin Babinsky added 4 commits February 17, 2017 16:30
The service installers can now override the methods for cleaning up
stale keytabs and changing file ownership of the newly acquired keytabs.

The default actions should be usable by most installers without specific
overriding.

https://fedorahosted.org/freeipa/ticket/6638
a cosmetic change: we had private method comprising of calls to public
ones, which did not make much sense in our case

https://fedorahosted.org/freeipa/ticket/6638
adtrustinstance will now use parent's methods to retrieve keys for CIFS
principal. Since the keys are appended to the host keytab
(/etc/krb5.keytab) we need to make sure that only the stale CIFS keys
are purged from the file and that we do not re-set its ownership.

https://fedorahosted.org/freeipa/ticket/6638
@martbab martbab force-pushed the adtrust-installer-keytab-via-ldapi branch from 5322384 to 5d0bed6 Compare February 17, 2017 15:30
@martbab
Copy link
Contributor Author

martbab commented Feb 17, 2017

I have added some commits to cope with changes made during privliege spearation work

@martbab
Copy link
Contributor Author

martbab commented Feb 22, 2017

Bump for review.

@MartinBasti MartinBasti added ack Pull Request approved, can be merged pushed Pull Request has already been pushed labels Feb 22, 2017
@martbab martbab deleted the adtrust-installer-keytab-via-ldapi branch February 23, 2017 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
3 participants