Installing and Configuring Shibboleth 2.x on Mac OS X 10.6.x Server
Notes
- Your server must have a static IP address, and valid DNS
- Your server must have the MIT CA installed in it's System Keychain. See the "Install the MIT CA (Certificate Authority)" section on Install and Renew Certificates in Safari on Mac OS X 10.6 for detailed instructions.
Installing an MIT Server Certificate for SSL
- Obtain a certificate signed by the MIT Certificate authority
- Launch Server Admin
- Select the Server > Certificates > '+' > Import a Certificate Identity
- Drag the file containing your private key, https-key.pem from step 1, to the sheet
- Drag the file containing your certificate, returned by mitcert@mit.edu from step 1, to the sheet
- Press Import
- Start the Web service if it's not already running
- Select the Server and press the triangle to list the services
- Select Web > Sites and press + to add a new site
- Enter the server's host name in the host name field
- Check the Enabled box next to this new site
- Select the Security tab
- Check "Enable Secure Sockets Layer (SSL)"
- Press OK to the "Site port changed" warning
- From the Certificate pull down menu, select the certificate you installed above
- Press Save
- Press Restart when asked if you want to restart Web now.
- Launch Terminal.app
- Run sudo -s
- Run cd /etc/apache2
- Run mkdir certs
- Run chmod 700 certs
- Copy your private key and certificate, from step 1, into /etc/apache2.
- Run chmod -R 600 certs/*
You should be able to connect to your server via http and https.
Install Shibboleth
- Install Xcode, found on the Mac OS X 10.6 (Snow Leopard) install DVD
- Download and run the MacPortsinstaller
- Launch Terminal.app
- Run port selfupdate
- Run sudo -s
- Run port install curl +ssl
- Run port install shibboleth
Configure Shibboleth
- Launch Terminal.app
- Run sudo -s
- Run cd /private/etc/apache2
- Run echo "Include /opt/local/etc/shibboleth/apache22.config" >> httpd.conf
- Run perl -pi -e 's/UseCanonicalName Off/UseCanonicalName On/' httpd.conf
- Run /usr/sbin/apachectl restart
- Run launchctl load -Fw /Library/LaunchDaemons/org.macports.shibd.plist
- Run touch /opt/local/var/log/httpd/native.log
- Run chown _www /opt/local/var/log/httpd/native.log
- Run cd /opt/local/etc/shibboleth
- Run scp username@athena.dialup.mit.edu:/afs/athena.mit.edu/project/touchstone/config/shibboleth2-sp/. . where username is your Athena username.
- Run sh gen-shib2.sh
- Press Return
- Enter the full path to your certificate file, found in /etc/apache2/certs.
- Enter the full path to your private key file, found in /etc/apache2/certs.
- To get information about authenticated users, you must first register your application as described in the Letting the IdP know about your application section of Touchstone Provisioning Steps.
- Run mkdir /Library/WebServer/Documents/secure. This directory will be restricted to all authenticated users by default. To enable .htaccess files, you'll need to add "AllowOverride AuthConfig" to the "<Location /secure>" section of /opt/local/etc/shibboleth/apache22.config, as well as remove the "require valid-user" line. You'll need to restart apache after making these changes. Once restarted, you can add .htaccess files to limit access to any directory in /Library/WebServer/Documents/secure. To limit access to bob@mit.edu and sue@mit.edu, the .htaccess file would contain "require user bob@mit.edu sue@mit.edu". Note: moira groups are note supported.
Upgrading Shibboleth
- Launch Terminal.app
- Run sudo -s
- Run port sync
- Run port upgrade shibboleth