Test LDAP service

One of the first integration tasks undertaken on a new repository installation is to plug it in to the local authentication system. More often than not this is LDAP. It allows users to use their usual local username and password in the repository rather than having to remember another password. LDAP services can be provided by a Microsoft Active Directory (run by most institutions who have Microsoft desktop systems) or dedicated LDAP (e.g. OpenLDAP) service.

One thing I’ve noticed with the DSpace testathons is that often LDAP does not get tested because many of the developers do not have access to an LDAP system – for example in DSpace 1.5 LDAP authentication does not work with Manakin or SWORD. (I have fixed both in the upcoming 1.5.1 though :) ). With this in mind, and because I have to teach a DSpace technical course in 4 days time where we’ll be covering LDAP configuration, I’ve created an open LDAP server which can be used for testing and training.

Details:

  • ldap.provider_url = ldap://ldap.testathon.net:389/
  • ldap.id_field = cn
  • ldap.object_context = OU=users,DC=testathon,DC=net
  • ldap.search_context = OU=users,DC=testathon,DC=net
  • ldap.email_field = mail
  • ldap.surname_field = sn
  • ldap.givenname_field = givenName
  • ldap.phone_field = telephoneNumber

Users and their passwords are:

  • stuart / stuart
  • john / john
  • carol / carol

Each user has a full name (Stuart Lewis / John Smith / Carol Jones), a telephone number and email address so should be fully functional.

If you make use of this server, please drop me a line or leave a comment so I know. Otherwise it might get turned off…!

168 thoughts on “Test LDAP service

  1. Darwin

    I use this server with Symfony2 to test LDAP authentication, thank you so much for this tool, so helpfull :)

  2. Vader

    I got the error. Thought?

    res = ldap_simple_bind_s(ld, ‘carol’, ); // v.3
    Error : ldap_simple_bind_s() failed: Invalid DN Syntax
    Server error: invalid DN

  3. Jed Anderson

    Thanks for running this server! It’s great help to those who need to do some quick LDAP testing. We’re using it to write an example Java->LDAP integration for our Eclipse delivery software, Secure Delivery Center. For those who are curious, http://genuitec.com/sdc.

    It’s always awesome to find somebody has done exactly what you want/need to do and is letting others use that service. Kudos!

  4. Peter

    Great post! i am using this LDAP server for testing with a Django app i am developing. I am using django-auth-ldap and have the following basic configuration for anonymous binding in my settings.py:

    AUTH_LDAP_SERVER_URI = “ldap://ldap.testathon.net:389/”
    AUTH_LDAP_BIND_DN = “”
    AUTH_LDAP_BIND_PASSWORD = “”
    AUTH_LDAP_USER_SEARCH = LDAPSearch(“ou=users,dc=testathon,dc=net”,
    ldap.SCOPE_SUBTREE, “(uid=%(user)s)”)

  5. Tolga

    Hey, could you please give its DN info? When I was trying to authenticate those users, i got ” Invalid Credentials” error.

  6. feki

    Thanks for this post. I’m working with php symfony2 and BorisMorel Bundle for LDAP.
    For me, I had to specify the version v3 to work:
    imag_ldap:
    client:
    host: your.host.foo
    port: 389
    version: 3

  7. Peter

    Thanks a lot. At least now I know my code connects to an ldap … but something is wrong with a secure ldap connection. Could you host a secure ldap too?

    Thanks again :) Peter

  8. Arman

    Nice, it works !! This is my settings :

    java.naming.factory.initial : com.sun.jndi.ldap.LdapCtxFactory
    java.naming.provider.url : ldap://ldap.testathon.net:389
    java.naming.security.authentication : simple
    java.naming.security.principal : cn=stuart,ou=users,dc=testathon,dc=net
    java.naming.security.credentials : stuart

    thank you very much for this test service !

  9. Erik

    Works fine with the PHP LDAP class. Was struggling a bit with invalid credentials, make sure you use ‘CN=stuart,OU=users,DC=testathon,DC=net’ in ldap_connect().

    Thanks for making this available!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>