With Tomcat's JNDI realm you can define an userRoleName attribute so that user attributes can be taken as role definitions, e.g. with
myrole: tomcat
myrole: role2
and userRoleName="myrole" a user is in roles tomcat and role2.
(http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html#JNDIRealm)
Can this be done with JBoss realms, too?
Thanks,
Juergen