Fresh installation of Archiva with LDAP authentication does not survive restart
of the servlet container
--------------------------------------------------------------------------------------------------------
Key: MRM-1013
URL: http://jira.codehaus.org/browse/MRM-1013
Project: Archiva
Issue Type: Bug
Components: Users/Security
Affects Versions: 1.2-M1
Environment: Archiva 1.2-M1, Tomcat 6.0.18, Sun JDK 1.6,
ActiveDirectory LDAP for user authentication
Reporter: Tuomas Jormola
I'm trying to setup an Archiva instance from the scratch. I've configured
Archiva to use LDAP for user authentication (see attached security.policy). The
admin user is defined to be "maven" and there's corresponding entry in the
ActiveDirectory for the user. When I start Tomcat with no existing Derby
database, everything work just fine. The Derby database is created and I can
log in using any user in the ActiveDirectory, including the Archiva admin user.
However, troubles begin if I shutdown Tomcat and re-start it. Now Archiva won't
start. Log entries in localhost.2008-11-19.log (attached, as the other log
files) would suggest that the system tried to find some user (probably admin
user) in the local Derby database, but couldn't find one since we're using
remote LDAP directory.
As a workaround, I was able get Archiva properly running with LDAP support so
that I first deleted the Derby databased and used minimal security.properties
like this:
redback.default.admin=maven
redback.default.guest=mavengu
security.policy.password.expiration.enabled=false
This will configure Redback to use the same admin and guest user names that the
LDAP setup has. When accessing Archiva for the first time, it'll redirect to
admin creation form. After creating the admin user, I shutdown Tomcat and
replaced security.properties with the full one that enables LDAP support. Now
when Tomcat is started, also Archiva start properly and I'm able to login as
any user in LDAP.
As a summary, quick instructions to reproduce this:
0. Have a working Archiva setup ready
1. Configure security.properties so that Archiva is using LDAP
2. Delete existing Derby database directory
3. Start the servlet container and verify LDAP login works
4. Shutdown servlet container
5. Start servlet container, Archiva application fails to load
Correct behaviour would be that that Archiva would just work when configured to
use LDAP, with no aforementioned workaround needed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira