Allow for using AA or ECP
[freeradius-pysaml2.git] / README
1 moonshot
2 ========
3 A python module usable in a Moonshot environment to allow a freeradius server
4 to fetch information about a user from a SAML2 Attribute Authority (AA) or
5 Identity Provider (IdP).
6 There are some things you have to do disregarding how you want the SP to
7 talk to the IdP/AA. So I take those first.
8
9 Basic Installing
10 ----------
11
12 A couple of changes to the freeradius configuration are necessary.
13 This is one way of doing it. How you chose to do it depends on your local
14 preferences.
15
16 1) create raddb/modules/python
17
18 You can use one of the provided 'template/modules_python_aa' or
19 'template/modules_python_ecp' files as they are. Which one depends of your
20 choice of using ECP or AA. Rename of copy the one you want to use to
21 'template/modules_python' and copy it to raddb/modules.
22
23 Regarding the configuration of outer/inner tunnel this is still a bit
24 undecided. The extension module can be use in either.
25
26 2) Edit raddb/sites-available/default
27 To the 'post-auth' section add one line referencing the python module.
28 You can see how it can be done in
29 'template/sites-available_default".
30
31 3) Edit raddb/sites-available/inner-tunnel.
32 To the 'post-auth' section add one line referencing the python module.
33 You can see how it can be done in
34 'template/sites-available_inner-tunnel".
35
36
37 Now, you should have the basic freeradius setup.
38 To get it working you have to do a couple of more things:
39
40
41 I) Get the SAML2 metadata for the AA or IDP you want to use. Rename it to
42 metadata.xml and place it in the 'etc' directory.
43
44
45 II) Chose one of the configuration files for the extension you want to use.
46 There are two choices (etc/aa_config.py and etc/ecp_config.py).
47 Rename (or copy) the one you want to use to config.py and edit it.
48
49 You must change the value of ATTRIBUTE_AUTHORITY/IDP_ENTITYID so it is the
50 identifier (entityID) of the SAML2 AA/IdP you want to use.
51
52
53 III) Change the pysaml2 configuration file 'etc/pysaml_config.py'.
54 A couple of things:
55
56 BASE : This is the identifier of the SP (=this module) you are running.
57
58 organization: Information about the organization running this service
59
60 contact_person: Information about a person people can contact to ask about
61     this service
62
63 xmlsec_binary: where the xmlsec1 binaries are located. This is only needed if
64 these binaries are somewhere outside the normal PATH.
65
66 IV) Create your own key pair.
67
68 A key and certificate can be created using the openssl tool:
69 $ openssl genrsa 1024 > ssl.key
70 $ openssl req -new -x509 -nodes -sha1 -days 365 -key ssl.key > ssl.cert
71 $ sudo mv ssl.key ssl.cert /usr/local/etc/moonshot/pki
72
73 If you chose other names for you key and cert you have to change
74 pysaml_config.py accordingly.
75
76
77 V)
78
79 Now you can install the package:
80
81 python setup.py install
82
83 should place everything in it's place.
84 One thing that might happen is that a new directory is created.
85 /usr/local/etc/moonshot
86 You may have to change the premissions on this directory to make it possible
87 for the freeradius extension to access the information in the directory.
88
89 VI) Create the metadata file for your SP.
90
91 $ cd etc
92 $ make_metadata.py pysaml_config.py > sp.xml
93
94 This file you have to give to the person/organization that runs the AA/IdP you
95 want to get information from.
96
97 !!! That should be it !!!
98