CustumLoginModule
sanjuthomas Apr 23, 2004 2:39 AMwe are trying to migrate from welogic to JBoss, we need to implement a security policy for the system(pogramatic), we have written a custom security class for this purpose. that custom class we are using in the server side, and in the client side we are using ClientLoginModule. But when we are running a simple ejb that secured using this custom class server is generating this exception, i have created a jar of this custom class and placed it in the sever/default/lib directory, i think it is right, becuase the server is invoking this class, and i am getting log infos in the server console. if any body need the whole file i will send you, please give your mail id. if somebody can help us, please....
the exception is
=
12:44:09,131 INFO [OptiwiseServerLoginModule] B4 RETURN STATEMENT IN getUserPas
sword()
12:44:09,141 ERROR [SecurityInterceptor] Authentication exception, principal=san
ju
12:44:09,151 ERROR [LogInterceptor] EJBException, causedBy:
java.lang.SecurityException: Authentication exception, principal=sanju
 at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(Se
curityInterceptor.java:164)
 at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercep
tor.java:81)
 at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:1
20)
 at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyF
actoryFinderInterceptor.java:93)
 at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessS
essionContainer.java:319)
 at org.jboss.ejb.Container.invoke(Container.java:720)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
 at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
367)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
 at sun.rmi.transport.Transport$1.run(Transport.java:148)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
60)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
 at java.lang.Thread.run(Thread.java:536)
if somebody know the reason, please help me.
auth.conf entry
OptiwiseClient
{
 org.jboss.security.ClientLoginModule required;
};
login-config.xml
<application-policy name="OptiwiseSecurityDomain">
 <login-module code="com.optiwise.bl.core.security.OptiwiseServerLoginModule" flag="required"></login-module>
</application-policy>
jboss.xml
<?xml version="1.0"?>
 <security-domain>java:/jaas/OptiwiseSecurityDomain</security-domain>
is there any file i need to modify, the security class is being currectly invoked by the server, but getUsersPassword() method return the result this exception is fired (that is what I understood). is there any need of achaging any other file, sun as any MBean or something like this, really i am very new in this jboss, i am desperately looking for your help , plese.
thank you for spending your valuable time
 
     
     
    