I have some EJBs with local and remote interfaces and I'm fiding my way with the security configuration. I have test cases that run with JUnit for both remote and local interfaces. When I run my test cases for the remote interfaces, I can do the user login (name/password) from the JUnit test cases themselves (using the CallbackHandler -> I learnt about from the "JASS HowTo" doc). But now I want to test the "Local" interfaces using Cactus. So I need to do the user login from the Cactus servlet that is invoked from my JUnit client to execute the tests within the container. Again, my test cases will try to do the login using the Callbackhandler. But that strategy doesn't work: at the moment of the invocation to create an EJB the container throws an exception: Principal=null!!
So if I understand correctly, the user credentials are NOT attached to the EJB context (as it was the case when I did the EJBs invocations remotely, outside of the container) ***My question*** How can I set the user/password when my tests are invoked by the Cactus servlet? That is, when my test cases run *within* the container. I guess that in a normal web application, the server will automatically open a dialog asking the user to login. But I do NOT want that here (in fact there's NO user interaction through the web browser). I need a way to do the login silently. Can anyone help ?? Maybe provide some the links to read the solution somewhere else ?? I'd appreciate if some of you would summarize the big picture (and not only give a precise answer). Thank u, Pablo View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3843334#3843334 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3843334 ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
