Apache HTTPD is generally compatible with Moonshot through the use of an Apache GSS-API module.
In the tables below, the following icons have the following meanings:
- - This version of the software has been tested and verified as supporting Moonshot.
- - This version of the software has been tested and verified as not supporting Moonshot.
- - This version of the software has not yet been tested thoroughly and its status is not known. Let us know if you have tried it and whether it worked or not!
2.2. Compatibility List
Note that accessing supported versions of this software requires a Moonshot compatible client - see the next section for details on which clients are supported.
Any versions not listed below have not yet been tested. If you do so, please let us know!
|Apache 2.4||Using the Github GSSAPI Negotiate module|
|Apache 2.2||Using the Moonshot mod_auth_gssapi module|
3. Installation & Configuration
How you set up a Moonshot-enabled version of the Apache HTTP server will differ depending on your OS. See the relevant pages for your particular distribution:
Instructions for building the module manually for RHEL-based platforms can be found here.
4. Client Compatibility
The following clients are known to work with this server software using Moonshot authentication (click on the link to see further information about enabling Moonshot in that client):
5. Next Steps
Once you have installed the software, what happens next?
5.1. Account Mapping
The simplest way to test the Apache Moonshot integration is to create a simple script, protected by Moonshot. To do this, do the following:
Create a simple script to protect by creating a directory for cgi scripts.
Create a script in that directory called "hello.cgi" with the following content:
Set the permissions appropriately:
Configure Apache to protect this location, by creating a file at
/etc/apache2/conf.d/moonshot.confwith the following content:
- Test by browsing to with a compatible browser.
6.1. Incompatibility with other Apache modules
Currently there exist a problem of incompatibility when using Moonshot with other Apache modules, such as
mod_php. The reason seems to be that Apache modules are dynamically loaded using the
RTLD_GLOBAL flag. This makes that duplicated symbol names are overwritten in memory, resulting into calls to the wrong symbol and, thus, segmantation faults.
One of the symptoms of this incompatibility is text similar to the below in the Apache error log (error_log):
Apache developers acknowledge this bug in the documentation of
We aught to provide an alternative to RTLD_GLOBAL, which is the only supported method of loading DSOs today.
In particular, we have detected problems with (at least) the following modules:
- mod_shib Shibboleth module.
This module is currently not compatible with the Shibboleth2 service provider Apache module. The reason is that
mod_shibmakes use of
libshibsp-lite.so, whereas Moonshot makes use of
libshibsp.so. As both libraries provide symbols with the same name but different implementations the system gets confused and fails.
To resolve this error, just disable the Shibboleth module.
- mod_php5 JSON submodule.
This module is not compatible with the PHP5 JSON submodule. The reason is that the module is built with
libjson-c.so whereas Moonshot is built withTo resolve this error, disable the PHP5 JSON submodule. In Debian, just delete the
libjansson.so. Both libraries share symbol names that fail when Apache dynamically loads them.
/etc/php5/apache2/conf.d/20-json.inifile. Note that no JSON support will be available from PHP.
Another alternative (and preferred) way of work-around this issues is to manually patch
libapr to force the usage of the RTDL_DEEPBIND flag (as suggested by the developers in https://bz.apache.org/bugzilla/show_bug.cgi?id=62083#c1). In such a case, you need to ensure that the locally installed library is chosen before the system's one. The APR libray can be downloaded from https://apr.apache.org/download.cgi.
6.2. RP Proxy configuration
6.2.1. Populating REMOTE_USER
Web services often rely on the
REMOTE_USER Apache environment variable for user information, such as a local user account or a pseudonymous identifier.
REMOTE_USER, update the reply from the RP Proxy with the
User-Name RADIUS attribute in the RP Proxy's
6.2.2. Setting the GSS-Acceptor-Host-Name and GSS-Acceptor-Service-Name attributes
You may find during testing that you get failures when attempting to authenticate. Run the RP Proxy in debug mode and check the incoming access requests from your webserver. When an access request looks similar to the below, you will notice that the
GSS-Acceptor-Service-Name attributes are not set correctly, or are missing altogether, and you must set them manually.
To set these two vital attributes, you must do the following in your RP Proxy configuration:
- Open the
sites-available/abfab-tlsfile in the FreeRADIUS configuration directory (on RHEL platforms, it's
/etc/raddb, on Debian platforms it's
- Locate the line '
Duplicate the '
client default' block below it and modify the duplicate to suit the requirements as below, then save the file:
You can name the
clientin the block above anything from just a simple entry to its full hostname. To make things easier, you may use the
shortnameconfiguration option in the list of options to set a short name that you can use elsewhere in your FreeRADIUS configuration.
ipaddrconfiguration option also accepts CIDR-formatted IP address blocks if you have multiple servers you want to connect as the same host.
- Open the
sites-available/abfab-tr-idpfile in the FreeRADIUS configuration directory (on RHEL platforms, it's
/etc/raddb, on Debian platforms it's
Locate the line '
psk_authorize'. Insert the following block before that line, then save the file:
This issue should be rectified and no longer necessary from FreeRADIUS 3.0.13 onwards.
Restart your RP Proxy, and re-test. Your entry should now look something more like this:
6.3. AppArmor and SELinux
Ubuntu's AppArmor and the RedHat SELinux systems are also known to interfere with Apache's loading of the Moonshot module. Follow the appropriate operating system's instructions on how to allow Apache to access files outside its assigned directories.