(no commit message)
[devwiki.git] / ConfiguringRHEL.mdwn
1 First we need to install and configure moonshot, its dependencies, and a local RADIUS server for testing
2 In a real deployment, a local RADIUS server is not needed, however it simplifies testing if one is available
3 __gss-server__ and __gss-client__ are standard Kerberos diagnostic tools, which give us a lot of information that is helpful for debugging
4 Again, in a real deployment these are not required, but help with testing
5
6 This guide walks through deploying the client, IdP and SP portions of moonshot - depending on your target, some steps may be inappropriate.
7
8 ## Environment
9 ### LD_LIBRARY_PATH
10 __LD_LIBRARY_PATH__ has to have _/opt/moonshot/lib64/_ and _/usr/lib64/freeradius_ added to it.<br />
11 The best way to do this is create a file at _/etc/profile.d/moonshot.sh_, with the following:
12
13     if [ [ $LD_LIBRARY_PATH != */opt/moonshot/lib64/:/usr/lib64/freeradius/* ] ]
14     then
15         export LD_LIBRARY_PATH=/opt/moonshot/lib64/:/usr/lib64/freeradius/:$LD_LIBRARY_PATH
16     fi
17
18 This is required as moonshot currently stores its modified libraries separately to the main system ones to avoid conflicts.  This should not be necessary in the future.
19
20
21 ### SELinux set to permissive
22 Moonshot has a couple of outstanding issues regarding proper labeling of _SELinux_ contexts, causing it to fail when _SELinux_ is enforcing.  This should be resolved soon - change the setting in _/etc/sysconfig/selinux_, or in _/etc/rc.local_:
23
24     echo 0 > /selinux/enforce
25
26 ### EPEL
27 Moonshot needs __EPEL__ for a few extra libraries (as pulling them from a semi-supported repository is preferable to repackaging).<br />
28 The simplest way to install EPEL is:
29
30     yum install epel-release
31
32 ## Moonshot Packages
33 The RPM's and SRPM's for moonshot are currently hosted at [http://yum.dev.ja.net] - this may change (and in fact, is quite likely to change) in the future.  The packages are currently unsigned.  
34
35
36
37 First we need to install and configure moonshot, its dependencies, and a local RADIUS server for testing
38 In a real deployment, a local RADIUS server is not needed, however it simplifies testing if one is available
39 __gss-server__ and __gss-client__ are standard Kerberos diagnostic tools, which give us a lot of information that is helpful for debugging
40 Again, in a real deployment these are not required, but help with testing
41
42 This guide walks through deploying the client, IdP and SP portions of moonshot - depending on your target, some steps may be inappropriate.
43
44 ## Environment
45 ### LD_LIBRARY_PATH
46 __LD_LIBRARY_PATH__ has to have _/opt/moonshot/lib64/_ and _/usr/lib64/freeradius_ added to it.<br />
47 The best way to do this is create a file at _/etc/profile.d/moonshot.sh_, with the following:
48
49     if [ [ $LD_LIBRARY_PATH != */opt/moonshot/lib64/:/usr/lib64/freeradius/* ] ]
50     then
51         export LD_LIBRARY_PATH=/opt/moonshot/lib64/:/usr/lib64/freeradius/:$LD_LIBRARY_PATH
52     fi
53
54 This is required as moonshot currently stores its modified libraries separately to the main system ones to avoid conflicts.  This should not be necessary in the future.
55
56
57 ### SELinux set to permissive
58 Moonshot has a couple of outstanding issues regarding proper labeling of _SELinux_ contexts, causing it to fail when _SELinux_ is enforcing.  This should be resolved soon - change the setting in _/etc/sysconfig/selinux_, or in _/etc/rc.local_:
59
60     echo 0 > /selinux/enforce
61
62 ### EPEL
63 Moonshot needs __EPEL__ for a few extra libraries (as pulling them from a semi-supported repository is preferable to repackaging).<br />
64 The simplest way to install EPEL is:
65
66     yum install epel-release
67
68 ## Moonshot Packages
69 The RPM's and SRPM's for moonshot are currently hosted at [[http://yum.dev.ja.net]] - this may change (and in fact, is quite likely to change) in the future.  The packages are currently unsigned.<br />
70 Example _/etc/yum.repos.d/moonshot.repo_
71
72     [Moonshot]
73     name=Moonshot
74     baseurl=http://yum.dev.ja.net/RPMS/x86_64/
75     gpgcheck=0
76
77 After setting up the repository definition, we'll set up a composite ORPS/IdP.
78
79 ##Moonshot IdP
80 To install the diagnostic tools (only needed for testing) and the RADIUSd:
81
82     yum install freeradius krb5-moonshot-devel
83
84 Once FreeRADIUS is installed, a source of identity needs to be enabled - either the roaming network in the case of an ORPS, or AD/LDAP/etc for an IdP.  For now, we'll just use a flat file.  Open _/etc/raddb/users_ and locate the following fragment:
85
86
87     # This is a complete entry for "steve". Note that there is no Fall-Through
88     # entry so that no DEFAULT entry will be used, and the user will NOT
89     # get any attributes in addition to the ones listed here.
90     #
91     #   steve   Cleartext-Password := "testing"
92     #   Service-Type = Framed-User,
93     #   Framed-Protocol = PPP,
94
95 Uncomment the line beginning __steve__.
96
97 __Chargeable-User-Identity__ is the value used to decide what user account to log in the user as on the SSH server.<br />
98 This value would normally be set by your local RADIUS proxy (ORPS) – so in a real deployment, rather than statically logging the user in as __moonshot__ you may decide to use something like __steve-camford.ac.uk__.<br />
99 If anonymity is required, you could use a Perl or Python script to generate something like __user-789-camford.ac.uk__.<br />
100 The exact value does not matter – only that the mappings are consistent, so that the user gets access to the same local account each time.
101 To allow creation of accounts on demand you could use __LDAP__ – when the ORPS sees a successful authentication, it could trigger a script that creates the desired account in an __LDAP__ domain.
102 It is not guaranteed that __Chargeable-User-Identity__ will be used permanently – in the future a specific RADIUS attribute may be created instead.
103
104 To activate CUI insertion, Edit _/etc/raddb/sites-enabled/default_, and find the post-auth section, and add the following:
105
106     update reply {
107         Chargeable-User-Identity = "moonshot"
108     }
109
110 Note in the case of an ORPS you need to unfilter this attribute in _/etc/raddb/attrs_ to prevent this attribute from being stripped on roaming requests.
111
112 A legacy attribute required for SSH at this time is the user name returned by the IdP.  To make this happen, Edit _/etc/raddb/sites-enabled/inner-tunnel_, find the following and uncomment it:
113
114                 #update outer.reply {
115                 #       User-Name = "%{request:User-Name}"
116                 #}
117
118