This is more specific to Tomcat than Hudson but as i did my specific configuration for Hudson i think it can help someone here
There are 5 existing realms for Tomcat 6:
See Tomcat documentation here for more information.
For my company i need to have an LDAP authentication and an hudson authorization management.
So i just had to mix JNDIRealm & JDBCRealm.
The result is LdapJDBCRealm (LdapJdbcRealm.java,LdapJdbcRealm.class). This is only a deal with overriding some methods.
Parameters are also mix of Realms, see server.xml template in installation steps.
<Realm className="org.apache.catalina.realm.LdapJdbcRealm" debug="99" connectionName="_your bind accound information_" connectionPassword="_your bind accound password if anonymous not supported_" connectionURL="_ldap url server (like http://ldapserver:389)_" userPattern="_pattern to search your user_" roleBase="dummyValue" roleSubtree="true" roleName="groupMembership" roleSearch="cn=DummyValue" driverName="com.mysql.jdbc.Driver" dbConnectionURL="jdbc:mysql://localhost:3306/hudson_users?user=userForDatabase&password=userpassword" dbConnectionName="userForDatabase" dbConnectionPassword="userpassword" userTable="users" userNameCol="user_name" userRoleTable="user_roles" roleNameCol="role_name" />
Once you do that, Hudson should authenticate users against LDAP server and get their authorization using your local database.