This post is about setting up Spacewalk to integrate to FreeIPA'sauthentication (ldap/kerberos).
First of all, why should you integrate Spacewalk to FreeIPA? FreeIPA gives you the option to control the access policies using keytabs and you can manage your users centrally.
So let's get started. I assume you have a functional Spacewalk and FreeIPA-Server set up and the Spacewalk-Server added as client to your domain.
Log in to your FreeIPA-Server and add the http-keytab to your Spacewalk-Server:
ipa service-add HTTP/spacewalk01.archyslife.lan
[archy@ipa01 ~]$
Next run the script provided by the spacewalk-project / red hat to set up the spacewalk-services
sudo spacewalk-setup-ipa-autchentication
[archy@spacewalk ~]$
When that's finished, sign in to your IPA-Server again and add the Host Based Access Control Service. I've named it 'spacewalk'
ipa hbacsvcs-add spacewalk
[archy@ipa01 ~]$
Next add a hbac-rule for allowing defined users to retrieve a keytab and authenticate using ldap / kerberos. I've named the rule spacewalk-management just like the group.
ipa hbacrule-add spacewalk-management
[archy@ipa01 ~]$
Next, We'll add the host, service and users which are allowed to login on to the spacewalk-service.
ipa hbacrule-add-user --groups=spacewalk-management spacewalk-management
[archy@ipa01 ~]$
ipa hbacrule-add-service --hbacsvcs=spacewalk spacewalk-management
[archy@ipa01 ~]$
ipa hbacrule-add-host --hosts=spacewalk01.archyslife.lan spacewalk-management
[archy@ipa01 ~]$
You can test if the authentication would work by running:
ipa hbactest --user=archy--host=spacewalk01.archyslife.lan --service=spacewalk
[archy@ipa01 ~]$
Great article. I am currently trying to connect a Solaris 10 server to a FreeIPA in a lab environment but things are not working out. Any helpful suggestions or links to tutorials will be highly appreciated.
ReplyDeleteHey there,
Deletethanks for the kind words. Sorry for the late reply, I haven't tried this yet but I'd start by editing the following files:
/etc/nsswitch.conf - for password and group lookups
/etc/pam.conf - configure to use kerberos first
/etc/ldap.conf - configure to integrate it to FreeIPA's 389DS-Server
/etc/krb5/krb5.conf - configure to get kerberos-tickets
This should be all configs on solaris. All there is left, would be creating a principal for the client and generating a keytab which you copy to the solaris-client in theory.
I'd check out the FreeIPA-Homepage and their IRC-Channel on freenode. So far I have not seen any tutorials for this specific setup.
Hi Archy
ReplyDeleteI have implemented your steps for spacewalk integration with freeIpa but it's not working.
I have verified all files and executed all steps but still spacewalk is not authenticating any freeIpa user .
Can you please help on this.
Spacewalk GitHub link for free ipa authentication but
that also did not work
Hi Narayan,
Deletecheck your logs in spacewalk and the permissions in freeipa using
'ipa hbac-test'. I cannot reproduce this anymore since I've switched to foreman/katello 2 years ago.