Documentation for Crowd 1.6. Documentation for other versions of Crowd is available too.
Crowd provides a number of modules that allow you to configure Crowd to authenticate HTTP Authentication requests made to an Apache web server.
The following features are provided:
Note: These instructions assume some Unix system and Apache configuration knowledge.
SSO not supported
Currently, the Crowd-Apache integration does not support user single sign-on (SSO). Please refer to issue CWD-1440 for more details. If you like, you can add yourself as a watcher of the issue and vote for it to register your interest in this feature request.
Using Subversion under Apache?
Crowd's Subversion connector allows you to password-protect a Subversion repository and provide fine grained access by group or user. Read more.
mod_perl
module installed and configured.SOAP::Lite
(v0.69 or greater required)Digest::SHA1
Error
Cache::Cache
The following instructions are for Unix systems. If you're running Apache on Windows, see the notes below.
Download the required Perl modules from CPAN using the links above and install them as follows:
tar xvzf Cache-Cache-1.05.tar.gz cd Cache-Cache-1.05 perl Makefile.PL make make install
See http://search.cpan.org/~jhi/perl-5.8.0/pod/perlmodinstall.pod for a detailed description of the various ways of installing Perl modules on your system.
Attached file |
Description |
---|---|
Crowd authentication, authorisation and perl module for Apache 2 |
unzip Crowd-Apache-Connector-1.2.3.zip cd Atlassian-Crowd-1.2.3/ perl Makefile.PL make make install cd ../Apache-CrowdAuth-1.2.3/ perl Makefile.PL make make install cd ../Apache-CrowdAuthz-1.2.3/ perl Makefile.PL make make install
Ensure that mod_perl
is enabled. Your Apache config file should contain a line like the following:
LoadModule perl_module modules/mod_perl.so
Many common distributions of Apache come with mod_perl
preconfigured.
To tell Apache to use Crowd to authenticate requests for a particular location, edit the Apache config file to add the following commands to a <Location>
or <Directory>
section.
Alias /crowd/ "/var/crowd/" <Directory "/var/crowd/"> . . . AuthName crowd AuthType Basic PerlAuthenHandler Apache::CrowdAuth PerlSetVar CrowdAppName appname PerlSetVar CrowdAppPassword apppassword PerlSetVar CrowdSOAPURL http://localhost:8095/crowd/services/SecurityServer PerlSetVar CrowdCacheEnabled on PerlSetVar CrowdCacheLocation /tmp/CrowdAuth PerlSetVar CrowdCacheExpiry 300 require valid-user . . . </Directory>
Command |
Explanation |
---|---|
|
Defines the realm of the authentication. This information is typically provided to the user in the dialogue box popped up by their browser |
|
Tells Apache to use basic authentication. Digest authentication is not currently supported. |
|
Tells Apache to delegate authentication to the CrowdAuth module |
|
Set the Application Apache should authenticate as |
|
Set the password for the Application |
|
The URL of the Crowd SOAP service |
|
[optional] Controls whether CrowdAuth caches authentications locally to improve performance. Set to "on" or "off". Caching is "on" by default |
|
[optional] The directory in which CrowdAuth's local cache is stored. Defaults to |
|
[optional] The time (in seconds) before cached authentications in CrowdAuth's local cache expire. Defaults to 300 seconds (5 minutes) |
|
Tells Apache that clients must provide a valid username/password to access the location |
If you want to restrict access to a certain Directory or Location in your Apache configuration to a subset of Crowd users and/or groups, add the following lines to your configuration:
<Location> . . . PerlAuthzHandler Apache::CrowdAuthz PerlSetVar CrowdAllowedUsers johnh,kevinr PerlSetVar CrowdAllowedGroups developers,crowd-administrators,customers:r . . . </Location>
Command |
Explanation |
---|---|
|
Tells Apache to use the |
|
Allow only the users |
|
Allow only members of the |
Note:
CrowdAllowedUsers
or CrowdAllowedGroups
would be needed for a particular location. You can define both. If you do, then access is granted if either is satisfied.CrowdCacheEnabled
setting is on, then authorisation checks are cached in order to increase performance. This means that changes to group membership in Crowd may not be reflected immediately in user access.CrowdAllowedGroups
setting and your group names contain spaces, then surround the group names with quotes, for example:
PerlSetVar CrowdAllowedGroups "Admin Staff,developers"
PerlSetVar CrowdSOAPURL https://localhost:8095/crowd/services/SecurityServer
The CrowdAuth
module logs detailed output if the Apache LogLevel parameter is set to info
or debug
. This can be useful in diagnosing problems.
Apache Log Error Message |
Possible Cause and Next Steps |
---|---|
|
One or both of the |
|
The attempt to authenticate the application with Crowd failed. Check the values of the |
|
Failed to authenticate a username/password pair provided by the client. This may just mean that the username or password supplied is incorrect. Note that |
|
Internal SOAP protocol error. |
|
Indicates that Apache can't connect to the Crowd SOAP service. |
|
Indicates that the URL used to connect to the Crowd SOAP service is incorrect. Check the value of the |
|
The |
|
The |
|
This message indicates a missing or old installation of SOAP::Lite. Try installing (or reinstalling) version 0.69 SOAP:Lite. On Windows, you will get this error if you haven't manually upgraded the SOAP::Lite ppm (see below) |
|
This message is a result of using Perl 5.10 with SOAP::Lite 0.69. Upgrading SOAP::Lite to version 0.71 or greater should correct the problem. |
mod_perl
and Perl Modules on Windows
Setting up CrowdAuth
on an Apache instance running on Windows requires that some things be done differently. The following instructions assume you are using ActivePerl as your Perl environment.
mod_perl
pre-installed. A Win32 version of mod_perl
in PPM format is available here..tar.gz
format used to distribute CrowdAuth (and other modules) is supported by most modern Windows archiving utilities (WinZip, for example).make
utility used to build the Perl modules is not part of a Windows. nmake
, Microsoft's equivalent, is available as a self-extracting archive here.The required modules (Digest::SHA1
, Error
, Cache::FileCache
, SOAP:Lite
) are available through the Perl Package Manager utility.
CrowdAuth
needs a newer version of SOAP::Lite than is supplied with ActivePerl (0.69 vs 0.55). A prebuilt ppm of the correct version can be installed from the University of Winnipeg's repository using the following command:
C:\>ppm install http://theoryx5.uwinnipeg.ca/ppms/SOAP-Lite.ppd
Apache::CrowdAuth
on Windowsunzip Crowd-Apache-Connector-1.2.3.zip using Winzip or equivalent... cd Atlassian-Crowd-1.2.3/ perl Makefile.PL nmake nmake install cd ../Apache-CrowdAuth-1.2.3/ perl Makefile.PL nmake nmake install cd ../Apache-CrowdAuthz-1.2.3/ perl Makefile.PL nmake nmake install
When editing the httpd.conf
file and adding the mod_perl.so
module to Apache, you may need to add the following line above the LoadModule line:
LoadFile "C:/Perl/bin/perl58.dll" LoadModule perl_module modules/mod_perl.so
This LoadFile line points to the perl58.dll
in your Perl install directory.