J2EE does not define much in terms of requirements for JAAS. We have our own usage notion that is described in chap 8 of the online admin and devl guide. There is no requirement to subclass jboss JAAS login modules.
Can you share your experience on this subject with me?
I'm trying to do exactly what you were asking about, such as, creating a module thatis inherited from the standard java login module. It seems to work fine but jboss still rejects the connection.
I think my problem is that I'm not quite sure how I have to assign the roles to the principals.
The simple test I'm doing is to:
Specifies that only users in the Manager role can access the servlet
In my login module, I somehow authenticate the user (that part runs fine) and in its commit method I try to add Manager to the subject.getPrincipals().
Could you help me to fiure out how this should be done as I cannot find any document that would specify this.
getPrincipals(add (new MyPrincipal("Manager")))
but , as I said, jboss rejects the access with a
"Access to the requested resource has been denied" message after I type my credentials and my loginmodule runs.
Thanks in advance.