[Bamboo Knowledge Base]
Bamboo can be integrated with LDAP for the authentication and authorisation of LDAP users. The Integrating Bamboo with LDAP instructions below describe how you can set this up. Please note that Bamboo does not currently support multiple LDAP servers. If you need to connect to multiple LDAP servers, please consider using Atlassian's Crowd.
If you choose to integrate Bamboo with LDAP, please note that you cannot manage LDAP accounts or user groups from Bamboo. Please refer to the Integrating Bamboo with LDAP instructions on this page for details on how to manage your users and groups.
In Bamboo version 1.2.2 and later, XML backups of your Bamboo instance do not include LDAP user data.
Please note that once LDAP has been enabled, reverting back to local user management is not possible.
You will need to confirm that your LDAP server is compatible and set up correctly before integrating it with Bamboo. Please check your LDAP server against the requirements below:
Check whether your LDAP or Active Directory server supports static groups — Your LDAP or Active Directory server must support static groups. This means that the user DNs must be stored against a membership attribute inside an LDAP group. An example of a static group is shown below:
Dn: CN=Sales and Marketing,CN=Users,DC=ad,DC=atlassian,DC=com objectClass: top; group; cn: Sales and Marketing; distinguishedName: CN=Sales and Marketing,CN=Users,DC=ad,DC=atlassian,DC=com; name: Sales and Marketing; ... member: CN=John Smith,CN=Users,DC=ad,DC=atlassian,DC=com member: CN=Sally Smith,CN=Users,DC=ad,DC=atlassian,DC=com ...
The membership attribute in this case is member, but this is not required. Note that the full DNs of John Smith and Sally Smith are listed. If the values against member are not full DNs, but are just usernames, then you need to add the flag <useUnqualifiedUsernameForMembershipComparison>true</useUnqualifiedUsernameForMembershipComparison>
to your LDAP configuration. Open Directory on OS X uses this configuration.
bamboo-admin
'. — The bamboo-admin
group is reserved by Bamboo.We strongly recommend that you backup your data before attempting LDAP integration.
The LDAP server connection is specified by manually editing the file atlassian-user.xml
.
To configure your connection details:*
.../{BAMBOO-HOME}/xml-data/configuration/atlassian-user.xml
and configure the connection AD or LDAP.Check your configuration against the example connection details shown below.
<ldap key="ldapRepository" name="LDAP Repository@hecate.atlassian.com" cache="true"> <host>hecate.atlassian.com</host> <port>389</port> <securityPrincipal>cn=admin,dc=atlassian,dc=private</securityPrincipal> <securityCredential>secret</securityCredential> <securityProtocol>plain</securityProtocol> <securityAuthentication>simple</securityAuthentication> <baseContext>dc=atlassian,dc=private</baseContext> ....
Please ensure that the following line is also active in your atlassian-user.xml
(it should be there by default):
<hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" />
To map the LDAP Data Tree:
atlassian-user.xml
for either AD or LDAP, please see:Check your configuration against the example connection details shown below.
... <baseUserNamespace>dc=staff,dc=perftest,dc=atlassian,dc=private</baseUserNamespace> <baseGroupNamespace>dc=groups,dc=perftest,dc=atlassian,dc=private</baseGroupNamespace> <usernameAttribute>cn</usernameAttribute> <userSearchFilter>(objectClass=inetorgperson)</userSearchFilter> <firstnameAttribute>givenname</firstnameAttribute> <surnameAttribute>sn</surnameAttribute> <emailAttribute>mail</emailAttribute> <groupnameAttribute>cn</groupnameAttribute> <groupSearchFilter>(objectClass=groupOfNames)</groupSearchFilter> <membershipAttribute>member</membershipAttribute> </ldap>
Filters: <userSearchFilter>
and <groupSearchFilter>
may use the AD specific filter syntax. Operators such as &
need to be escaped.
<userSearchFilter>(&(objectClass=inetorgperson)(memberOf=cn=bamboo-usr,ou=groups,DC=atlassian,dc=com))</userSearchFilter>
Making Sure that the LDAP Filters are Precise
Depending on the LDAP server being used, different object types may have common objectClass values. In this case, please customize the User and Group filters so that Bamboo can fetch only the objects that are really useful for the application. If your directory server does not display the literal object LDIF details, you may want to use an LDAP browser tool like Apache Directory Studio to check if the filters are restricting the objects correctly based on one or more object attributes.
The following settings do not appear in the default atlassian-user.xml
file. Their default values are as follows:
<poolingOn>true</poolingOn> <maxSize>0</maxSize> <initSize>10</initSize> <prefSize>10</prefSize> <debugLevel>none</debugLevel> <securityProtocol>plain ssl</securityProtocol> <authentication>simple</authentication> <timeout>0</timeout> <initialContextFactory>com.sun.jndi.ldap.LdapCtxFactory</initialContextFactory> <batchSize>100</batchSize> <timeToLive>0</timeToLive> <userSearchAllDepths>true</userSearchAllDepths> <groupSearchAllDepths>true</groupSearchAllDepths>
If you want to override these default values, you can specify any or all of them by adding them to the end of the atlassian-user.xml
file. For example, to add your own value for the <initSize>
setting, you would add an extra line before the </ldap>
line shown in 'Stage 3' above:
... <groupnameAttribute>cn</groupnameAttribute> <groupSearchFilter>(objectClass=groupOfNames)</groupSearchFilter> <membershipAttribute>member</membershipAttribute> <initSize>20</initSize> </ldap>
It is important that the connection pool timeout value be set to 0, as this will force Atlassian User (via the JNDI layer) to clean up lingering connections that have lived past one request. For more information about LDAP pools please see http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html.
You cannot manage LDAP accounts or user groups from Bamboo. Bamboo will continue to use local users and groups, even when LDAP is enabled. If you need to assign LDAP users to particular groups referenced by Bamboo (e.g. for permissions or notifications), the workaround is to assign your LDAP users to local Bamboo groups, and reference these groups rather than LDAP groups.
Please note that once LDAP has been enabled, reverting back to local user management is not possible.
Please ensure that Read-only External User Management is turned OFF in Bamboo before assigning LDAP users to Bamboo groups. The Read-only External User Management check-box in Bamboo controls whether users and groups in Bamboo are editable. Setting this option to ON will make users and groups in Bamboo read-only (i.e. the implication being that you will be managing your users and groups externally).
If you are using Crowd together with an LDAP, please read the documentation on Integrating Bamboo with Crowd to see our recommended settings for the Read-only External User Management check-box.
To disable Read-only External User Management:
Once Bamboo is started with 'Read-Only External User Management' disabled, you can assign LDAP users to Bamboo groups. Please see Changing members of groups.
Please note, the 'View Users' and 'View Groups' screens in Bamboo currently will not list all of your LDAP users/groups (please see BAM-1963 for details).
Bamboo does not currently support native delegated LDAP functionality, however an LDAP functionality compromise exists if you are an Atlassian Crowd customer:
Note that when using this approach, users will still be required to log in to Crowd at least once before Bamboo is able to read or authenticate from Crowd.
Find out more about Atlassian Crowd, licenses and pricing, or download a 30 day free trial.