axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Walsh <>
Subject RE: Differences in WLS security with Axis 1.4 versus Axis2
Date Wed, 05 May 2010 08:54:46 GMT
Still trying to progress this issue; would appreciate any input/help.

It looks like a threading issue in Axis2 in that there are these calls:
    Our custom receiver code (when WLS) simply calls: super.invokeBusinessLogic(messageContextIn,
    which then invokes:

The call to makeNewServiceObject starts a new (EJBClientWorker) thread that makes the usual
RMI/EJB calls (similar to what we do with Axis 1.4); to summarize:
          Creates Property object for Context.SECURITY_PRINCIPAL, Context.SECURITY_CREDENTIALS,
- new InitialContext(properties)
String) - context.lookup(beanJndiName)
          Object ehome = javax.rmi.PortableRemoteObject.narrow(ejbHome, cls);
          Method createMethod = cls.getMethod("create", empty_class_array);
          return createMethod.invoke(ehome, empty_object_array);

It appears that from this thread WebLogic does the JAAS authentication, calling our login
module's login() method and successfully authenticating; but, then ending the thread and returning
back to the RPCMessageReceiver.invokeBusinessLogic() thread where it calls org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(AxisMessage,
Method, Object, String, OMElement, MessageContext) that calls java.lang.reflect.Method.invoke(Object,
Object...) and then falls over because of the WebLogic error: EJB:010160]Security Violation:
User: '<anonymous>' has insufficient permission to access EJB.

So would this be failing because the create EJB call is where WebLogic is invoking the authentication
and it's done in a different thread to the service method invocation and thus WebLogic doesn't
see the EJB invocation as authenticated? Any ideas about this; does this analysis seem correct?
 Is anyone else successfully using Axis2 with WebLogic and a login module?   Would seem hard
to customize this in a general way.


From: William Walsh
Sent: Thursday, April 22, 2010 4:08 PM
Subject: Differences in WLS security with Axis 1.4 versus Axis2

Is anyone aware of how/why WebLogic is showing us differences between Axis 1.4 and Axis2 in
how security is being processed on invocation of a service?

For Axis 1.4 we have our own provider that extends,
which in its invokeMethod method sets up a properties object to create a new InitialContext,
calls PortableRemoteObject.narrow, calls the EJB create() method, and then calls invoke on
the service method(), which works fine with WLS.

For Axis2 it looks like this same functionality is provided in and;
so, we're extending org.apache.axis2.rpc.receivers.ejb.EJBMessageReceiver and in our invokeBusinessLogic
method, for WLS, we just invoke super.invokeBusinessLogic(messageContextIn, messageContextOut),
which results in this error:

[ERROR] [EJB:010160]Security Violation: User: '<anonymous>' has insufficient permission
to access EJB: type=<ejb>, application=TestModel, modu
le=FacadeModule.jar, ejb=Axis2DocWebServiceTestBPO, method=simpleAdd, methodInterface=Remote,
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(
        at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(
        at curam.util.connectors.axis2.CuramMessageReceiver.invokeBusinessLogic(
        at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(
        at org.apache.axis2.receivers.AbstractMessageReceiver.receive(
        at org.apache.axis2.engine.AxisEngine.receive(
        at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(
        at org.apache.axis2.transport.http.AxisServlet.doPost(

The jndiUser and jndiPassword parameters in services.xml and server-config.wsdd are equivalent
and are both against same WLS system, same ear, different war files.

I have added  runAs code to our Receiver for the WLS JAAS configuration with some success;
but we never had to do this for Axis 1.4.  Any ideas why we are seeing this difference?


The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful. If you are not the intended
addressee please contact the sender and dispose of this e-mail. Thank you.

View raw message