You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

How to configure usermanagement to communicate with an LDAP directory server?

Tested setup

This configuration worked for:

  • ... Archiva 1.2 standalone
  • ... Windows XP

Steps to run

Creating local admin

  • It is very important to have a local admin. You can create this user while starting up the application for the first time. Open a command prompt and change the current directory to ARCHIVA_HOME:
$ cd %ARCHIVA_HOME%
$ %ARCHIVA_HOME%/bin/archiva start
Username          :  admin
Full Name         :  ##SOME NAME##
Email Address     :  ##SOME E-MAIL ADDRESS##
Password          :  ##SOME PASSWORD##
Confirm Password  :  ##SOME PASSWORD##
  • Log in with the admin account you've just created
  • Now stop your application by pushing "control + c" at the command line

Changing the configuration files

apache-archiva-x.y\apps\archiva\WEB-INF\classes\META-INF\plexus\application.xml

Component managing the connection to the ldap server
<component>
    <role>org.codehaus.plexus.redback.common.ldap.connection.LdapConnectionFactory</role>
    <role-hint>configurable</role-hint>
    <implementation>org.codehaus.plexus.redback.common.ldap.connection.ConfigurableLdapConnectionFactory</implementation>
    <configuration>
        <hostname>##HOSTNAME##</hostname>
        <port>##PORT##</port>
        <baseDn>##BASEDN##</baseDn>
        <contextFactory>com.sun.jndi.ldap.LdapCtxFactory</contextFactory>
        <bindDn>##BINDDN##</bindDn>
        <password>##PASSWORD##</password>
    </configuration>
    <requirements>
        <requirement>
            <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
        </requirement>
   </requirements>
</component>

name

description

example

HOSTNAME

The hostname of the ldap server

ldapserver.mycompany.be

PORT

The port of the ldap server

389

BASEDN

The baseDn of the ldap system

DC=mycompany,DC=be

BINDN

the core user used for authentication the ldap server, must be able to perform the necessary searches, etc.

CN=archiva,OU=User Accounts,DC=mycompany,DC=be

PASSWORD

password for the bindDn for the root ldap connection

xxxxx

// more documentation coming up

  • No labels