-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.3RC2
-
None
A call to the JaasSecurityManagerService and calling the
getUserRoles(...) method of the org.jboss.security.plugins.JaasSecurityManager
will return null instead of the Set of roles.
((RMIAdaptor) ctx.lookup("/jmx/rmi/RMIAdaptor")).invoke(
new ObjectName("jboss.security:service=JaasSecurityManager"), "getUserRoles", args, types);
This was OK in JBoss 4.0.1
The reason was in the org.jboss.jmx.connector.invoker.InvokerAdaptorService
at the statement
// Associate the method
SecurityActions.pushSubjectContext(principal, credential, null);
which pushes null as the ActiveSubject.
With following code change i have fixed the problem temporary.
java.security.PrivilegedAction pa = new java.security.PrivilegedAction() {
public Object run()
};
javax.security.auth.Subject subj = (javax.security.auth.Subject) java.security.AccessController.doPrivileged(pa);
// Associate the method
SecurityActions.pushSubjectContext(principal, credential, subj);