Just in case someone need to do the same thing, here are some technical detail on how to make jbpm-console get list of user and roles from database.
My Environment:
1. JBPM5.3 default installer
2. Changed the DB to SQL Server https://community.jboss.org/wiki/SetUpJBPM53ToUseMSSQLServer2008
3. change the security-domain of jbpm-console in JBoss AS 7's standalone.xml
Reference: http://docs.jboss.org/jbosssecurity/docs/6.0/security_guide/html/Login_Modules.html#sect-DatabaseServerLoginModule
if my database tables are:
dbo.User(UserLogon VARCHAR(64) PRIMARY KEY, Password VARCHAR(64))
dbo.UserRole (UserLogon VARCHAR(64), RoleName VARCHAR(32))
in standalone.xml look for this section:
<security-domain name="jbpm-console" cache-type="default">
<authentication>
<login-module code="UsersRoles" flag="required">
<module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/>
<module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/>
</login-module>
</authentication>
</security-domain>
and change it to:
<security-domain name="jbpm-console" cache-type="default">
<authentication>
<login-module code="UsersRoles" flag="required">
<module-option name="usersProperties" value="${jboss.server.config.dir}/users.properties"/>
<module-option name="rolesProperties" value="${jboss.server.config.dir}/roles.properties"/>
</login-module>
</authentication>
</security-domain>
Hope it can be useful