jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Heinrich <roman.heinr...@interway.sk>
Subject Testing EJB methods protected with security role, Oracle Application Server
Date Fri, 27 Apr 2007 05:31:57 GMT
Hello,

I`m trying to create connection to EJB in cactus test, which is 
protected by a security role.

    public void testSSOSecuredEJB()
    {
        log.info("sso secured test start");
               
        try {
        Context ctx = new InitialContext();
        CMSLocalHome cLH = 
(CMSLocalHome)ctx.lookup("java:comp/env/ejb/CMS");
        CMSLocal cmsFacade = cLH.create();
        } catch (Exception e)
        {
            log.log(Level.SEVERE,e.getMessage(),e);
        }       
    }

Problem is, that this enterprise application is deployed on Oracle 
Application Server 10g, which is using Single Sign On for user 
authentication.
And i`m getting exception:

26.4.2007 16:32:36 sk.orange.intranet.core.services.ssotest 
testSSOSecuredEJB
SEVERE: jazn.com/anonymous is not allowed to call this EJB method, check 
your security settings (method-permission in ejb-jar.xml and 
security-role-mapping in orion-application.xml).
javax.ejb.AccessLocalException: jazn.com/anonymous is not allowed to 
call this EJB method, check your security settings (method-permission in 
ejb-jar.xml and security-role-mapping in orion-application.xml).
    at 
CMSLocalHome_StatefulSessionHomeWrapper77.create(CMSLocalHome_StatefulSessionHomeWrapper77.java:235)
    at 
sk.orange.intranet.core.services.ssotest.testSSOSecuredEJB(ssotest.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at junit.framework.TestCase.runTest(TestCase.java:154)
    at junit.framework.TestCase.runBare(TestCase.java:127)
    at 
org.apache.cactus.internal.AbstractCactusTestCase.runBareServer(AbstractCactusTestCase.java:153)
    at 
org.apache.cactus.internal.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.java:119)
    at 
org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody0(AbstractWebTestController.java:93)
    at 
org.apache.cactus.internal.server.AbstractWebTestController.handleRequest_aroundBody1$advice(AbstractWebTestController.java:224)
    at 
org.apache.cactus.internal.server.AbstractWebTestController.handleRequest(AbstractWebTestController.java)
    at 
org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody2(ServletTestRedirector.java:101)
    at 
org.apache.cactus.server.ServletTestRedirector.doPost_aroundBody3$advice(ServletTestRedirector.java:224)
    at 
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java)
    at 
org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody0(ServletTestRedirector.java:72)
    at 
org.apache.cactus.server.ServletTestRedirector.doGet_aroundBody1$advice(ServletTestRedirector.java:224)
    at 
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at 
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
    at 
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
    at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
    at 
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
    at 
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
    at 
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
    at 
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    at java.lang.Thread.run(Thread.java:534)

Is there any way to authenicate user in cactus test using SSO ? Because 
currently cactus uses only BasicAuthentication and FormAuthentication.

Thanks for help.

Mime
View raw message