Project

General

Profile

Foreman and mod auth kerb » History » Version 1

Jan Pazdziora, 10/17/2013 05:04 AM

1 1 Jan Pazdziora
h1. Foreman and mod auth kerb
2
3
Setting up SPNEGO/GSSAPI/Negotiate authentication in Foreman 1.3.
4
5
Stock Foreman 1.3 can be configured to use SPNEGO/GSSAPI/Negotiate authentication.
6
7
We need mod_auth_kerb installed on the Foreman machine.
8
9
We assume the Foreman machine is IPA-enrolled:
10
11
<pre>
12
 # ipa-client-install
13
</pre>
14
15
On the IPA server, we crete the service:
16
17
<pre>
18
 # ipa service-add HTTP/<the-foreman-hostname>
19
</pre>
20
21
On the Foreman machine, we get the keytab for the service:
22
23
<pre>
24
 # ipa-getkeytab -s ipa.example.com -k /etc/http.keytab -p HTTP/$( hostname )
25
 # chown apache /etc/http.keytab
26
 # chmod 600 /etc/http.keytab
27
</pre>
28
29
On the Foreman machine, we install mod_auth_kerb:
30
31
<pre>
32
 # yum install -y mod_auth_kerb
33
</pre>
34
35
On the Foreman machine, we configure it to be used by Apache:
36
37
<pre>
38
 # to /etc/httpd/conf.d/auth_kerb.conf add
39
 <Location />
40
 AuthType Kerberos
41
 AuthName "Kerberos Login"
42
 KrbMethodNegotiate On
43
 KrbMethodK5Passwd Off
44
 KrbAuthRealms EXAMPLE.COM
45
 Krb5KeyTab /etc/http.keytab
46
 KrbLocalUserMapping On
47
 require valid-user
48
 </Location>
49
</pre>
50
51
On the Foreman machine, we tell Foreman that it is OK to trust the authentication dome by Apache:
52
53
<pre>
54
 # to /etc/foreman/settings.yaml add
55
 :authorize_login_delegation: true
56
 :login_delegation_logout_url: /
57
</pre>
58
59
On Foreman machine, restart Apache:
60
61
<pre>
62
 # service httpd restart
63
</pre>
64
65
Now in your browser, if you kinit to obtain a ticket, accessing Foreman's WebUI should not ask for login/password and should display the authenticated dashboard directly.