Include Page |
---|
| TEM:_SystemPrep_RHEL |
---|
| TEM:_SystemPrep_RHEL |
---|
|
Install the SoftwareWe’re now ready to install the Moonshot software and its required dependencies. Install the software by running the following command: Code Block |
---|
language | bash |
---|
linenumbers | true |
---|
| yum install moonshot freeradius-abfab freeradius-utils |
Include Page |
---|
| TEM:_ABRT_RHEL |
---|
| TEM:_ABRT_RHEL |
---|
|
Include Page |
---|
| TEM:_SELinux_RHEL |
---|
| TEM:_SELinux_RHEL |
---|
|
Next, we need to configure the Moonshot APC. Include Page |
---|
| TEM:_CertPrep_RHEL |
---|
| TEM:_CertPrep_RHEL |
---|
|
RealmWe next need to configure your realm in the FreeRADIUS server so that it knows not to send any requests for your own users off to another server. - Configure your realm in
/etc/raddb/proxy.conf - Open the file for editing and find the line
realm example.com { Above this, add the following, where YOUR_APC_REALM should be substituted by your APC realm (e.g. apc.moonshot.ja.net): Code Block |
---|
| realm YOUR_APC_REALM {
# Intentionally left blank
} |
Channel Binding SupportWe next need to configure your FreeRADIUS server to support channel bindings. - Open
/etc/raddb/sites-available/abfab-tls for editing:- Scroll to the
client default stanza at the bottom of the file Edit the stanza to match the below: Code Block |
---|
client default {
ipaddr = 0.0.0.0/0
proto = tls
gss_acceptor_realm_name = "your APC realm here"
trust_router_coi = "your APC realm here"
} |
- If you have any other client definitions here, for example to distinguish between internal and external clients, also apply the change to them.
EAP TypeSet the EAP type in use by moonshot (EAP-TTLS) by editing /etc/raddb/mods-enabled/eap . Find the first instance of default_eap_type = md5 and change it to TTLS. Code Block |
---|
default_eap_type = ttls |
Returning the User-NameThe APC must return the User-Name attribute in its RADIUS response: - As root, find the
post-auth section in the /etc/raddb/sites-available/inner-tunnel file.
Make sure the following files are uncommented: Code Block |
---|
#
# If you want the Access-Accept to contain the inner
# User-Name, uncomment the following lines.
#
update outer.session-state {
User-Name := &User-Name
} |
- Save the file.
Resource Provider AuthenticationAll Resource Providers in the Trust Router network, including all IdPs and RP Proxies and the Trust Router itself, need to authenticate themselves to the APC using Moonshot. This means that for every service or organisation, you must provision a credential on the APC. Tip |
---|
In a production environment, we recommend you use a method of Resource Provider Authentication that integrates well with your chosen method of managing your Trust Router infrastructure. See Configuring FreeRADIUS to Use a Local Identity Store for options to define credentials. We recommend using an automatic means to provision credential files, such as an online portal. |
Defining the APC credentialDuring testing, we recommend using the FreeRADIUS users file to define credentials that your Resource Providers can use to authenticate to the APC. We will create a user with username testapc and password testing . Open /etc/raddb/users for editing and put the following at the top of the file: Code Block |
---|
| testapc Cleartext-Password := "testing"
Reply-Message = "Hello test user. You have authenticated!" |
Warning |
---|
The formatting of the stanza above is very important. There should be a line break before the Reply-Message. |
Provisioning the APC credentialFor the APC credential you defined in the previous step, create a Moonshot credential XML file: - Set the
<user> tag to the credential you defined in the previous step, e.g. testapc - Set the
<password> tag to its appropriate password. You may wish to base64-encode the password. - Set the
<realm> tag to YOUR_APC_REALM . - You can leave the
<services> tag out. You should set the <selection-rules> tag to: Code Block |
---|
title | selection-rules |
---|
linenumbers | true |
---|
| <selection-rules>
<rule>
<pattern>trustidentity/*</pattern>
<always-confirm>false</always-confirm>
</rule>
</selection-rules> |
Define either of the two trust anchors as per the moonshot-webp XML Format documentation. Note |
---|
For simple test infrastructures, you may leave out the trust anchors, but it is not recommended |
Save the file, then deploy it onto the Trust Router that you are connecting to this APC (see Section 3.2.2 of Install a Trust Router).
The APC is fundamental to a Trust Router network, so the next step involves configuring the Trust Router client software and configuring its connection to a Trust Router. The IdP also runs the Temporary ID Server (TIDS). Open the /etc/sysconfig/tids file for editing: Code Block |
---|
| TIDS_SERVER_IP="[your server IP]" # IP address that the TIDS is reachable on
TIDS_SERVER_NAME="[your server hostname]" # The host name that the TIDS is known as
TIDS_USER="trustrouter" # The user that the TIDS is running as
TIDS_GROUP="trustrouter" # The group that the TIDS is running as
TIDS_GSS_NAME="testapc@YOUR_APC_REALM" # The user name for the APC, defined in Section 4.1
## Static variables that you can also adjust
TIDS_PIDDIR="/var/run/trust_router"
TIDS_LOGDIR="/var/log/trust_router" |
TestingNow that we have the Moonshot IdP installed and configured, we're now ready to test! Tip |
---|
| At this point you probably want three consoles open on the server, so that you can manually run various components separately. |
Testing FreeRADIUS locallyThe first test is to check whether FreeRADIUS is working in its most basic manner. In window 1, run (as root user) Code Block |
---|
language | bash |
---|
linenumbers | true |
---|
| su --shell=/bin/bash radiusd
radiusd -fxx -l stdout |
In window 2, run (as root user) Code Block |
---|
language | bash |
---|
linenumbers | true |
---|
| radtest testapc@YOUR-APC-REALM testing localhost 2222 testing123 |
Info |
---|
This uses the "radtest" utility which is used in the following way - radtest username password servername port shared-secret |
If this is working correctly you should see something like the following: Code Block |
---|
title | In window 1 - FreeRADIUS server output |
---|
| Sending Access-Accept of id 57 from 127.0.0.1 port 1812 to 127.0.0.1 port 33363
Reply-Message = 'Hello test user. You have authenticated!'
(1) Finished request 1.
Waking up in 0.3 seconds.
Waking up in 4.6 seconds.
(1) Cleaning up request packet ID 57 with timestamp +94
Ready to process requests. |
Code Block |
---|
title | In window 2 - radtest client output |
---|
| Sending Access-Request of id 57 from 0.0.0.0 port 33363 to 127.0.0.1 port 1812
User-Name = 'testapc'
User-Password = 'testing'
NAS-IP-Address = 127.0.1.1
NAS-Port = 2222
Message-Authenticator = 0x00
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=57, length=61
Reply-Message = 'Hello test user. You have authenticated!' |
Testing the Trust Router connectionTo test the connection to Trust Router, we need to make sure the Temporary Identity Server (TIDS) software is running, then use the Temporary Identity Client (TIDC) software to simulate a connection to the Trust Router. Starting the Temporary Identity Server (TIDS)In window 3 (window 1 should still be still running the FreeRADIUS server and window 2 the radtest command), run the TIDS software: Code Block |
---|
language | bash |
---|
linenumbers | true |
---|
| tids --ip [your server IP] --hostname [your server hostname] testapc@YOUR-APC-REALM |
testapc@YOUR-APC-REALM is the identity that the trust router will use when provisioning keys - this makes it easy to spot in your own log files. Specifying your server's IP and hostname may seem redundant (and for single server deployments, it is!). You'll need to set the hostname and IP arguments a little differently if you want to enable some more advanced configurations (such as load balancing and key sharing). Note |
---|
When using Network Address Translation (NAT) or a firewall, you must specify your external IP address. |
Run an APC authentication testAt this point, you must configure your trust router to use testapc@YOUR-APC-REALM as authentication. - The trust router configuration must be updated with the test user associated with your trust router's rp_realm filter lines.
- The trust router configuration must be updated with your new APC designated as the APC for your trust router.
- The trust router must have its Moonshot credential store updated with the test user and its password. See Section 3.2.2 of install a trust router (RHEL/CentOS/SL 6 or Debian 7)
- The trust router must be restarted. At this point, the trust router will attempt to authenticate itself to the APC.
- In the FreeRADIUS console, you should see an Access-Accept response.
Next StepsAt this point, you now have a Moonshot APC that is working. Now for the next steps: Automatically start the software Include Page |
---|
| TEM:_FR_autostart_RH |
---|
| TEM:_FR_autostart_RH |
---|
|
TIDSTo automatically start TIDS, issue the following command (as root): Code Block |
---|
title | CentOS 6 |
---|
linenumbers | true |
---|
collapse | true |
---|
| chkconfig tids on
service tids start |
Code Block |
---|
title | CentOS 7 |
---|
linenumbers | true |
---|
collapse | true |
---|
| systemctl enable tids
systemctl start tids |
If this is working correctly, you should see TIDS running as a daemon process. Your FreeRADIUS server can currently only authenticate a single user - "testapc". At this point, you will want to connect FreeRADIUS to your management database. The FreeRADIUS site has information and instructions for how to do this.
|