Integrating Crowd with Atlassian Bamboo
This page explains how to connect Atlassian's Bamboo integration server to one or more directory servers through Crowd.
Prerequisites
Do not deploy multiple Atlassian applications in a single Tomcat container.
The practical reasons why we don't support deploying multiple Atlassian applications in a single Tomcat container are:
- You must shut down Tomcat to upgrade any application
- If one application crashes, the other applications running in that Tomcat container will be inaccessible
Finally, we recommend not deploying any other applications to the same Tomcat container that runs Crowd, especially if these other applications require large memory or additional libraries in Tomcat lib
subdirectory.
Glossary and concepts
- We refer to the Crowd root folder as
CROWD
. - We refer to the Bamboo root folder as
BAMBOO
. - We refer to a directory created in Step 1.1 as Crowd Bamboo Directory.
- For the purposes of this document, we will assume that you have used the Bamboo distribution (not EAR-WAR) (that is, the easier) installation method of Bamboo. If you need to install Bamboo as an EAR/WAR, extract the EAR/WAR, make the necessary changes as described below, then repackage the EAR/WAR.
Preparation steps
- Download and install Crowd. Refer to the Crowd installation guide for instructions.
- Download and install Bamboo (version 1.2.2 or later). Refer to the Bamboo installation guide for instructions.
- Run the Bamboo Setup Wizard, as described in the Bamboo documentation. For a better experience when integrating Bamboo and Crowd, we recommend defining the Bamboo administrator's username and password.
- After installing and configuring Bamboo, shut Bamboo down before you begin the integration process described below.
Step 1. Configuring Crowd to talk to Bamboo
1.1 Prepare Crowd directories, groups, and users for Bamboo
- Create a Crowd directory: The Bamboo application authenticates users against a directory configured in Crowd. For more information on how to do this, see Adding a Directory.
It is possible to assign more than one directory for an application. This example uses a single Crowd Bamboo Directory to store Bamboo users. - Add users and groups: You can either import them from your Bamboo deployment or add them manually.
- Importing users and groups from Bamboo: If you have an existing Bamboo deployment, use the Bamboo Importer tool as described in Importing Users from Atlassian Bamboo.
If you choose to import users into Crowd, you must complete this step before you proceed further.
- Adding users and groups manually: For Bamboo to access the administrative features, there must be an administrative group in the directory. You can also create an optional additional group for other users. Create the groups in the Crowd Bamboo Directory:
bamboo-admin
bamboo-user
(optional)
See the documentation on Creating Groups for more information on how to define these groups.
- Adding users and groups manually: For Bamboo to access the administrative features, there must be an administrative group in the directory. You can also create an optional additional group for other users. Create the groups in the Crowd Bamboo Directory:
Create at least one user in the Crowd Bamboo Directory and assign the user(s) to both the bamboo-user
and the bamboo-admin
groups. The Crowd documentation has more information on creating groups, creating users and assigning users to groups.
1.2 Add the Bamboo application in Crowd
Crowd needs to be aware that the Bamboo application will be making authentication requests to Crowd. To add the Bamboo application to Crowd and map it to the Crowd Bamboo Directory:
- Log in to the Crowd Administration Console and go to Applications > Add Application.
- Complete the Add Application wizard for the Bamboo application. See the instructions on using Add Application wizard.
The Name and Password values you specify in the Add Application wizard must match the application.name and application.password that you will set in the crowd.properties file.
You can find the crowd.properties file in:
Bamboo/webapp/WEB-INF/classes/
(Bamboo 3.1 and earlier)$BAMBOO_HOME/xml-data/configuration
(Bamboo 3.2 or later)
1.3 Specify which users can log in to Bamboo
Once Crowd is aware of the Bamboo application, Crowd needs to know which users can authenticate (log in) to Bamboo via Crowd.
As part of the Add Application wizard, set up your directories and group authorizations for the application. If necessary, you can adjust these settings after completing the wizard.
You can either allow entire directories to authenticate, or just particular groups within the directories. In our example, we allow the bamboo-user
and bamboo-admin
groups within the Crowd Bamboo Directory to authenticate.
If you are not using a bamboo-user
group as a security restriction, set Allow all to authenticate to true when mapping the directory, otherwise only bamboo-admin
group members will be able to log in to Bamboo.
1.4 Specify the address from which Bamboo can log in to Crowd
As part of the Add Application wizard, set up Bamboo's IP address. This is the address that Bamboo will use to authenticate to Crowd.
If necessary, you can add a hostname, in addition to the IP address, after completing the wizard. See Specifying an Application's Address or Hostname.
Step 2. Configuring Bamboo to talk to Crowd
To continue the configuration on the Bamboo side, refer to Integrating Bamboo with Crowd.
(Optional) Tune the cache
We highly recommend that you enable caching when using the atlassian-user and Crowd framework together with Bamboo. Multiple redundant calls to the atlassian-user framework are made on any given request. These results can be stored locally between calls by enabling caching via the Crowd Options menu. (Note that this caching in the Crowd application is enabled by default.)
Bamboo will obtain all necessary information for the period specified by the cache configuration. If a change or addition occurs in Crowd to users, groups, and roles, these changes will not be visible in Bamboo until the cache expires for that specific item (that is, for the particular user, group, or role).
The default value for the application cache is 5 minutes (300 seconds). To increase the performance of your application, consider changing the cache value to one or two hours (3600 or 7200 seconds).
See Crowd in action
Welcome to Bamboo with Crowd!
- Users belonging to the
bamboo-user
group should now be able to log in to Bamboo. Try adding a user to the group using Crowd — you should be able to log in to Bamboo using this newly created user. That's centralized authentication in action! - If you have enabled SSO, you can try adding the Crowd Bamboo Directory and
bamboo-admin
group to the crowd application (see Mapping a Directory to an Application and Specifying which Groups can access an Application). This will allow Bamboo administrators to log in to the Crowd Administration Console. Try logging in to Crowd as a Bamboo administrator, and then point your browser at Bamboo. You should be logged in as the same user in Bamboo. That's single sign-on in action!