Wednesday, March 21, 2018

Windows Active Directory integration with Bamboo




Skip to end of metadata

Topic

Windows Active Directory integration with Bamboo

Category

Technical

Create Date

 

Editor

Viraj Bandara Dodanwala

1) Configure Connection Details

The LDAP server connection is specified by manually editing the file atlassian-user.xml
To configure your connection details:
  1. Edit the file .../{BAMBOO-HOME}/xml-data/configuration/atlassian-user.xml and configure the connection AD or LDAP.
Check the EX-1.xml file with example. Ex-1.xml.
 Below are the settings related to Connection configuration.

[HOSTNAME]
389
CN=[DISPLAY-NAME],CN=Users,DC=example,DC=com
[PASSWORD]
plain
simple
DC=example,DC=com

     2. Ensure that the following line is also active in your atlassian-user.xml
(it should be there by default):

2) Map LDAP Data Tree

Below setting are related to the LDAP Tree mapping. Below setting need to add to atlassian-user.xml. 
Ex-1.xml file contain the example.

in we are going to specify where our users have been created in the Active Directory
OU=Bamboo_Users,DC=Direct,DC=local
in we are going to specify where our groups have been created in the Active Directory
CN=Bamboo_Group,DC=Direct,DC=local

true
true
sAMAccountName
in we are going to get all users that are members of "bamboo-admin" and "bamboo-user" groups

(&(objectClass=user))
givenName
sn
mail
cn
in we are going to get all the groups specified in

(&(objectClass=group))
member

3) Testing LDAP or Active Directory connectivity with Paddle.


  1. Download into a directory where you have permissions to create files.
  2. Copy your atlassian-user.xml into that directory - this is found in your .../{BAMBOO-HOME}/xml-data/configuration/ directory.
  3. Run  this command "java -jar paddle-x.x.jar debug limit=10000 "  (where x.x is the version of Paddle you downloaded).
            After executing  the above command, results should similar to below. 
###############################################################################
LDAP Support Tool version 2.0
################################################################################
Connected to server successfully
-----------------------------------------------------------------
TEST 1: Search and list 10000 users
-----------------------------------------------------------------
User: CN=Gimhan Priyantha,OU=D F N Technology,DC=Direct,DC=local
Member of:
CN=TFS_MubasherB2BUsers,OU=Groups,DC=Direct,DC=local
CN=TFS_MubasherOMSClientReadUsers,OU=Groups,DC=Direct,DC=local
CN=TFS_MubasherOMSUsers,OU=Groups,DC=Direct,DC=local
CN=TFS_MubasherTradeWebUsers,OU=Groups,DC=Direct,DC=local
CN=Jenkins_Users,OU=Groups,DC=Direct,DC=local
CN=TFS_MubasherTMSAdmins,OU=Groups,DC=Direct,DC=local
User: CN=Iresha Lakmali Kothalawala,OU=D F N Technology,DC=Direct,DC=local
Member of:
CN=TFS_MubasherTMSUsers,OU=Groups,DC=Direct,DC=local
CN=RunDeck-jarsign,OU=Groups,DC=Direct,DC=local
CN=Jenkins_Users,OU=Groups,DC=Direct,DC=local
-----------------------------------------------------------------
TEST 2: Search and list 10000 groups
-----------------------------------------------------------------
Group: CN=TFS_MubasherGDCVASServiceAdmin,OU=Groups,DC=Direct,DC=local
Members:
No members in this group.
Group: CN=TFS_MubasherHRMUsers,OU=Groups,DC=Direct,DC=local
Members:
CN=Ruwan Siriwardena,OU=D F N Technology,DC=Direct,DC=local
Group: CN=TFS_MubasherTRSAdmins,OU=Groups,DC=Direct,DC=local
Members:
No members in this group.
Group: CN=TFS_IndiaMTBSBRSDocumentAdmins,OU=Groups,DC=Direct,DC=local
Members:
No members in this group.
In here, both Users and Groups should retrieved. If there is no record retrieved for Users or Groups,
 that means there is a issue in LDAP Tree mapping.

4) Integrate LDAP with Bamboo


Now, that we have tested our LDAP configuration against Paddle and users and groups have been 
retrieved it is time to integrate our "atlassian-user-custom.xml" with Bamboo.
Please, copy "atlassian-user-custom.xml" back into /xml-data/configurationdirectory.
Please, notice Bamboo will search for "atlassian-user-custom.xml" under /xml-data/configuration directory in order to enable the
 "Custom user repository" under "Bamboo administration >> Security >> User repositories"

No comments:

Post a Comment