Tested With
JBoss 4.0.2
Java 2 SDK 1.4.2_08
Eclipse 3.0.2
Overview
The
UserAccounts
service provides for user accounts management via JMX Console within a JBoss security domain.
The service exposes methods for adding/deleting/updating an account for the user in the specified domain.
As updating an account means adding/deleting roles the user has, the service also exposes methods
for adding/deleting/updating a role in the specified domain. Updating a role means adding/deleting users
that have it. Also, updating an account means changing the current password as well as disabling/enabling the account.
Installation/Use
Import the attached zipfiles as projects into your Eclipse workspace. Edit
UserAccounts/build.properties
to specify your environment. The service comes with a sample web app. The last three projects comprise the web app.
The
form-login-config
project is a common login module that contains the login and error pages.
The login page allows the user to change the current password. To do so, the Tomcat valve is used
( Thanks Scott!), it finds the service
by its JNDI name, then invokes the appropriate operation. The error page does the same thing to disable the user account after certain number
of unsuccessful logins. Makes me think this project also could be reused in other webapps.
You do not have to download the images if all you are interested in is functionality (but then you'll see
the broken links). Anyways, enjoy!
Plans
Presently, it's all database-driven (via Hibernate where possible). Another possible solutions will be added through AOP as soon as I master it.
-
Comments