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:
- Use Crowd to password-protect resources on your website.
- Configure website locations to restrict access to specific Crowd groups or users.
Note: These instructions assume some Unix system and Apache configuration knowledge.
| 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. |
Prerequisites
- Apache web server version 2.0 or above with the
mod_perlmodule installed and configured. - The following third-party Perl modules:
SOAP::Lite(v0.69 or greater required)Digest::SHA1ErrorCache::Cache
Installation and Configuration
The following instructions are for Unix systems. If you're running Apache on Windows, see the notes below.
Installing the Third-Party Perl Modules
Download the required Perl modules from CPAN using the links above and install them as follows:
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.
Installing the Crowd Perl Modules
- Download the three Crowd module files attached to this page:
Attached file
Description
Crowd authentication, authorisation and perl module for Apache 2
- Extract the Crowd-Apache-Connection archive file and install the three modules using the same procedure as for the third party modules.
unzip Crowd-Apache-Connector-1.2.zip cd Atlassian-Crowd-1.2/ perl Makefile.PL make make install cd ../Apache-CrowdAuth-1.2/ perl Makefile.PL make make install cd ../Apache-CrowdAuthz-1.2/ perl Makefile.PL make make install
Configuring Apache
Ensure that mod_perl is enabled. Your Apache config file should contain a line like the following:
Many common distributions of Apache come with mod_perl preconfigured.
Configuring Authentication
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.
Command |
Explanation |
|---|---|
|
Defines the realm of the authentication. This information is typically provided to the user in the dialog box popped up by their browser |
|
Tells apache to use basic authentication |
|
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 |
Configuring Authorisation
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:
Command |
Explanation |
|---|---|
|
Tells Apache to use the |
|
Allow only the users |
|
Allow only members of the |
Note:
- Typically, only one of the
CrowdAllowedUsersorCrowdAllowedGroupswould be needed for a particular location. You can define both. If you do, then access is granted if either is satisfied. - If the
CrowdCacheEnabledsetting 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.
Troubleshooting
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) |
Installing Perl, 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.
- If you don't already have a Perl interpreter installed, you'll need one. The following instructions assume an install of ActiveState's ActivePerl.
- Windows installations of Apache are less likely to come with
mod_perlpre-installed. A Win32 version ofmod_perlin PPM format is available here. - The
.tar.gzformat used to distribute CrowdAuth (and other modules) is supported by most modern Windows archiving utilities (WinZip, for example). - The
makeutility used to build the Perl modules is not part of a Windows.nmake, Microsoft's equivalent, is available as a self-extracting archive here.
Installing Perl Modules on Windows
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
Installing Apache::CrowdAuth on Windows
Extract Apache-CrowdAuth-0.06.zip using Winzip or equivalent... cd Apache-CrowdAuth-0.06 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.
Related Topics
- 3.1 Using the Application Browser
- 3.2 Adding an Application
- 3.2.01 Integrating Crowd with Apache
- 3.2.02 Integrating Crowd with Subversion
- 3.2.03 Integrating Crowd with Atlassian Confluence
- 3.2.04 Integrating Crowd with Atlassian CrowdID
- 3.2.05 Integrating Crowd with Atlassian FishEye
- 3.2.06 Integrating Crowd with Atlassian JIRA
- 3.2.07 Integrating Crowd with Jive Forums
- 3.2.08 Integrating Crowd with Atlassian Bamboo
- 3.2.09 Integrating Crowd with Acegi Security
- 3.2.10 Integrating Crowd with Atlassian Crucible
- 3.2.11 Integrating Crowd with a Custom Application
- 3.3 Mapping a Directory to an Application
- 3.4 Specifying which Groups can access an Application
- 3.5 Specifying an Application's Address or Hostname
- 3.6 Testing a User's Login to an Application
- 3.7 Managing an Application's Session
- 3.8 Deleting or Deactivating an Application






