1 Reply Latest reply on Feb 12, 2015 9:33 AM by valsaraj viswanathan

    EJBAccessException: Invalid User when accessing EJB from remote client using http-remoting

    valsaraj viswanathan Master

      I am getting EJBAccessException: Invalid User when accessing EJB from remote client using http-remoting.

       

      jndi.properties:

      java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory

      java.naming.provider.url=http-remoting://localhost:8080

      java.naming.security.principal=appAdmin

      java.naming.security.credentials=appAdmin

      jboss.naming.client.ejb.context=true

       

      jboss-ejb3.xml:

      <s:security>

        <ejb-name>*</ejb-name>

        <s:missing-method-permissions-deny-access>false</s:missing-method-permissions-deny-access>

                  <s:security-domain>appLDAP</s:security-domain>

         </s:security>

      The security domain appLDAP is using custom login module.

       

      The method called from client is annotated with @PermitAll

       

      standalone.xml:

      <security-realm name="ApplicationRealm">

                      <authentication>

                          <local default-user="$local" allowed-users="*" skip-group-loading="true"/>

                          <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>

                      </authentication>

                      <authorization>

                          <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>

                      </authorization>

                  </security-realm>

                  <security-realm name="SSLRealm">

                      <server-identities>

                          <ssl protocol="TLSv1">

                              <keystore ..................../>

                          </ssl>

                      </server-identities>

                      <authentication>

                          <jaas name="appLDAP"/>

                      </authentication>

      ............................

       

      <subsystem xmlns="urn:jboss:domain:ejb3:2.0">

      .........................

      <remote connector-ref="http-remoting-connector" thread-pool-name="default"/>

      ..................................

       

      <subsystem xmlns="urn:jboss:domain:remoting:2.0">

                  <endpoint worker="default"/>

                  <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>

              </subsystem>

      ..........

      <subsystem xmlns="urn:jboss:domain:undertow:1.2">

                  <buffer-cache name="default"/>

                  <server name="default-server">

                      <ajp-listener name="ajp" scheme="https" socket-binding="ajp"/>

                      <http-listener name="default" socket-binding="http"/>

                      <https-listener name="https-listener" socket-binding="https" security-realm="SSLRealm"/>

                      <host name="default-host" alias="localhost">

                          <location name="/" handler="welcome-content"/>

                          <filter-ref name="server-header"/>

                          <filter-ref name="x-powered-by-header"/>

                      </host>

                  </server>

       

      Here is the full stack trace:

      Caused by: javax.ejb.EJBAccessException: JBAS013323: Invalid User

              at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:66)

              at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:46)

              at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:92)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)

              at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)

              at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)

              at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

              at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)

              at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:330)

              at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70)

              at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203)

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

              at java.util.concurrent.FutureTask.run(FutureTask.java:166)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

              at java.lang.Thread.run(Thread.java:722)

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

              at ...asynchronous invocation...(Unknown Source)

              at org.jboss.ejb.client.remoting.InvocationExceptionResponseHandler$MethodInvocationExceptionResultProducer.getResult(InvocationExceptionResponseHandler.java:96)

              at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:276)

              at org.jboss.ejb.client.EJBObjectInterceptor.handleInvocationResult(EJBObjectInterceptor.java:64)

              at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:290)

              at org.jboss.ejb.client.EJBHomeInterceptor.handleInvocationResult(EJBHomeInterceptor.java:88)

              at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:290)

              at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:46)

              at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:290)

              at org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult(ReceiverInterceptor.java:129)

              at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:265)

              at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:453)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:202)

              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)

              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)

              at $Proxy16.findProperties(Unknown Source)

        .....

      12:48:14,175 INFO  [remoting] EJBCLIENT000016: Channel Channel ID f700b5c5 (outbound) of Remoting connection 59fc982f to localhost/127.0.0.1:8080 can no longer process messages

       

      What may be wrong?