LDAP/Jira user importing: jira-ldap-userimporter


JIRA - Bug tracking, issue tracking and project management software

I’ve slightly modified the jira-ldap-userimporter script to fit my needs. This script manages the Jira-LDAP integration, by doing a LDAP query to a server and generating a Jelly Script that can run througt the Jira’s Jelly Runner. The goal of this modification is accepting some parameters in the ldap.properties to optionally wrap the <jira:createUser> tags with a <jira:Login> tag, this way the resulting Jelly script can be run as a service.

In my scenario there are continuously adding/removing users, so I should run the jira-ldap-userimporter with crontab and executing the output as Jelly service. I found this modification may be useful for other people.

Executable XML

Jelly - Jelly : Executable XML

You can download the jar file from the project’s page, and set the jelly.service=1, jelly.username and jelly.password in ldap.properties.

4 Responses to “LDAP/Jira user importing: jira-ldap-userimporter”

  1. Hello,

    I tried to use this to import my users from our active directory and I am getting this exception do you by chance know what’s causing this.

    “[root@rpc7467 bin]# java -jar jira-ldap-userimporter-1.2.jar
    Exception in thread “main” java.lang.NullPointerException
    at com.atlassian.ldapuserimporter.UserImporter.main(UserImporter.java:47)”

    Thanks for your help,
    Michael

  2. # Configuration file for JIRA’s LDAP user importer

    # URL of your LDAP server, Eg:
    java.naming.provider.url=ldap://susday7603:389

    # Username and password of account that has privileges to loop through all users, eg:
    java.naming.security.principal=cn=myuser,dc=TERADATA,dc=COM
    java.naming.security.credentials=[nothing to see, move along]

    # LDAP node below which we should search, eg:
    searchbase=ou=User Accounts,dc=TD,dc=TERADATA,dc=com

    # LDAP query run below ‘searchbase’ identifying user nodes, eg:
    query=(objectclass=*)

    # Name of record in nodes which should become the username in JIRA, eg:
    username_attr=sAMAccountName

    # Record that contains the user’s full name. When commented out, defaults to username_attr value. Eg:
    fullname_attr=cn

    # Record that specifies the user’s email address. When commented out, username_attr value with email_suffix appended will
    be used
    #email_attr=
    email_suffix=@teradata.com

    There aren’t 47 lines in my ldap.properties

    • 1-read carefully … the error you pasted is thrown at line 47 of the program (not line 47 of the properties)

      2-check lines 36-38 of MY ldap.properties. you’ll need to add:
      jelly.service=0
      jelly.username=usr
      jelly.password=pwd

      I hope that this password is not the real password😉
      (I’m going to edit your comment)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: