Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

UserDatabase

Jim Henderson

2005-05-18

Replies:

I am attempting to rewrite org.apache.catalina.users to access an existing
backend application database of users and groups. The database could have
hundreds of users. I cannot add/change/delete users or groups in the
database from the Tomcat Admin consol. In other words authentication will
be indirectly performed using an external DB.


I have the following idea - what do you think?


1) Given the above I am thinking of extending the MemoryUserDatabase class.

2) I will throw an UnsupportedOperationException if the Tomcat admin user
tries to add/change/deleted users or groups from the consol. The admin can
add/change/delete roles (there is no concept of a role in the existing
backend DB).

3) I will continue to use the tomcat-users.xml file as an intermediate DB
for Tomcat. After the database is opened and populated from the xml file I
will validate the users and groups against the backend existing DB. If the
backend has additional users or groups they will be added to the xml
database. If the xml database has users or groups not defined in the
backend DB they will be deleted.


Thanks for any suggestions and affirmations.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.