Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12439

Elytron failed authentication results in different exceptions for stateless and stateful EJBs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 7.1.0.ER3
    • EJB, Security, User Experience
    • Hide

      Reproducer is available in this package: https://github.com/kwart/wildfly/tree/JBEAP-12439/testsuite/integration/manualmode/src/test/java/org/wildfly/test/manual/elytron/seccontext

      The test itself is in the parent class (AbstractSecurityContextPropagationTestBase). Child classes (SecurityContextPropagation*) just configure if stateless or stateful EJBs are used.

      Full steps to reproduce the issue:

      git clone -b JBEAP-12439 https://github.com/kwart/wildfly.git
      cd wildfly
      mvn clean install -DskipTests -Dcheckstyle.skip -Denforcer.skip
      cd testsuite/integration/manualmode
      mvn clean test -Dcheckstyle.skip -Dcheckstyle.skip -Denforcer.skip -DtestLogToFile=false -Dtest=SecurityContextPropagation\*
      

      The test fail in stateless-stateless (SLSL) EJB combination and passes in the rest (SLSF, SFSL, SFSF).

      Show
      Reproducer is available in this package: https://github.com/kwart/wildfly/tree/JBEAP-12439/testsuite/integration/manualmode/src/test/java/org/wildfly/test/manual/elytron/seccontext The test itself is in the parent class (AbstractSecurityContextPropagationTestBase). Child classes (SecurityContextPropagation*) just configure if stateless or stateful EJBs are used. Full steps to reproduce the issue: git clone -b JBEAP-12439 https: //github.com/kwart/wildfly.git cd wildfly mvn clean install -DskipTests -Dcheckstyle.skip -Denforcer.skip cd testsuite/integration/manualmode mvn clean test -Dcheckstyle.skip -Dcheckstyle.skip -Denforcer.skip -DtestLogToFile= false -Dtest=SecurityContextPropagation\* The test fail in stateless-stateless (SLSL) EJB combination and passes in the rest (SLSF, SFSL, SFSF).

      When authentication in EJB-to-EJB remote call fails, the Exceptions differ depending on whether the EJBs are both stateless or not.

      When they are stateless, I see

      javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/seccontext-server2/WhoAmIBean", view is interface org.wildfly.test.manual.elytron.seccontext.WhoAmI, affinity is URI<remote+http://127.0.0.1:8180>
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:570)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:507)
      	at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:572)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:507)
      	at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:98)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:572)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:507)
      	at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:86)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:572)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:507)
      	at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:913)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:174)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:107)
      	at com.sun.proxy.$Proxy50.getCallerPrincipal(Unknown Source)
      	at org.wildfly.test.manual.elytron.seccontext.EntryBean.lambda$doubleWhoAmI$0(EntryBean.java:65)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      	at org.wildfly.security.auth.server.Scoped.runAsFunctionEx(Scoped.java:150)
      	at org.wildfly.security.auth.server.Scoped.runAs(Scoped.java:62)
      	at org.wildfly.test.manual.elytron.seccontext.SeccontextUtil.switchIdentity(SeccontextUtil.java:75)
      	at org.wildfly.test.manual.elytron.seccontext.EntryBean.doubleWhoAmI(EntryBean.java:68)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
      	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
      	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:264)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.notSupported(CMTTxInterceptor.java:318)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
      	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.security.IdentityOutflowInterceptor.processInvocation(IdentityOutflowInterceptor.java:73)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.security.RolesAllowedInterceptor.processInvocation(RolesAllowedInterceptor.java:63)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.security.SecurityDomainInterceptor.processInvocation(SecurityDomainInterceptor.java:44)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
      	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609)
      	at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      	at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:492)
      	at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:487)
      	at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:188)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      	Suppressed: org.jboss.ejb.client.RequestSendFailedException: javax.security.sasl.SaslException: Authentication failed: none of the mechanisms presented by the server (PLAIN, OAUTHBEARER) are supported
      		at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.handleFailed(RemoteEJBReceiver.java:91)
      		at org.jboss.ejb.protocol.remote.RemoteEJBReceiver$1.handleFailed(RemoteEJBReceiver.java:72)
      		at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:215)
      		at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:720)
      		at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:898)
      		... 3 more
      	Caused by: javax.security.sasl.SaslException: Authentication failed: none of the mechanisms presented by the server (PLAIN, OAUTHBEARER) are supported
      		at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:438)
      		at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:242)
      		at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      		at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
      		at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
      		at org.xnio.nio.WorkerThread.run(WorkerThread.java:571)
      		at ...asynchronous invocation...(Unknown Source)
      		at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:542)
      		at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:508)
      		at org.jboss.remoting3.ConnectionInfo$None.getConnection(ConnectionInfo.java:83)
      		at org.jboss.remoting3.ConnectionInfo.getConnection(ConnectionInfo.java:56)
      		at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:459)
      		at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:405)
      		at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.lambda$getConnection$1(RemoteEJBReceiver.java:180)
      		at java.security.AccessController.doPrivileged(Native Method)
      		at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.getConnection(RemoteEJBReceiver.java:180)
      		at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.processInvocation(RemoteEJBReceiver.java:119)
      		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:458)
      		at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocation(RemotingEJBClientInterceptor.java:51)
      		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:470)
      		at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocation(DiscoveryEJBClientInterceptor.java:84)
      		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:470)
      		at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:81)
      		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:470)
      		at org.wildfly.common.context.Contextual.runExConsumer(Contextual.java:203)
      		at org.jboss.ejb.client.EJBClientInvocationContext.sendRequestInitial(EJBClientInvocationContext.java:306)
      		at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:170)
      		at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:107)
      		at com.sun.proxy.$Proxy50.getCallerPrincipal(Unknown Source)
      		at org.wildfly.test.manual.elytron.seccontext.EntryBean.lambda$doubleWhoAmI$0(EntryBean.java:65)
      		at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      		at org.wildfly.security.auth.server.Scoped.runAsFunctionEx(Scoped.java:150)
      		at org.wildfly.security.auth.server.Scoped.runAs(Scoped.java:62)
      		at org.wildfly.test.manual.elytron.seccontext.SeccontextUtil.switchIdentity(SeccontextUtil.java:75)
      		at org.wildfly.test.manual.elytron.seccontext.EntryBean.doubleWhoAmI(EntryBean.java:68)
      		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      		at java.lang.reflect.Method.invoke(Method.java:498)
      		at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      		at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
      		at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
      		at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      		at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:264)
      		at org.jboss.as.ejb3.tx.CMTTxInterceptor.notSupported(CMTTxInterceptor.java:318)
      		at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      		at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
      		at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.security.IdentityOutflowInterceptor.processInvocation(IdentityOutflowInterceptor.java:73)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.security.RolesAllowedInterceptor.processInvocation(RolesAllowedInterceptor.java:63)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.security.SecurityDomainInterceptor.processInvocation(SecurityDomainInterceptor.java:44)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
      		at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609)
      		at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
      		at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      		at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      		at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
      		at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      		at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:492)
      		at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:487)
      		at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:188)
      		... 3 more
      

      And when any of them is stateful:

      javax.naming.CommunicationException: EJBCLIENT000062: Failed to look up "/seccontext-server2/WhoAmIBeanSFSB!org.wildfly.test.manual.elytron.seccontext.WhoAmI?stateful" [Root exception is javax.ejb.CreateException: Failed to create stateful EJB: Authentication failed: none of the mechanisms presented by the server (PLAIN, OAUTHBEARER) are supported]
      	at org.jboss.ejb.client.EJBRootContext.lookupNative(EJBRootContext.java:158)
      	at org.wildfly.naming.client.AbstractContext.lookup(AbstractContext.java:84)
      	at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:150)
      	at javax.naming.InitialContext.lookup(InitialContext.java:417)
      	at javax.naming.InitialContext.lookup(InitialContext.java:417)
      	at org.wildfly.test.manual.elytron.seccontext.SeccontextUtil.lookup(SeccontextUtil.java:112)
      	at org.wildfly.test.manual.elytron.seccontext.EntryBean.getWhoAmIBean(EntryBean.java:111)
      	at org.wildfly.test.manual.elytron.seccontext.EntryBean.lambda$doubleWhoAmI$0(EntryBean.java:65)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      	at org.wildfly.security.auth.server.Scoped.runAsFunctionEx(Scoped.java:150)
      	at org.wildfly.security.auth.server.Scoped.runAs(Scoped.java:62)
      	at org.wildfly.test.manual.elytron.seccontext.SeccontextUtil.switchIdentity(SeccontextUtil.java:75)
      	at org.wildfly.test.manual.elytron.seccontext.EntryBean.doubleWhoAmI(EntryBean.java:68)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:90)
      	at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101)
      	at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:40)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      	at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:264)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.notSupported(CMTTxInterceptor.java:318)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:238)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
      	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
      	at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:89)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.security.IdentityOutflowInterceptor.processInvocation(IdentityOutflowInterceptor.java:73)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.security.RolesAllowedInterceptor.processInvocation(RolesAllowedInterceptor.java:63)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.security.SecurityDomainInterceptor.processInvocation(SecurityDomainInterceptor.java:44)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.deployment.processors.EjbSuspendInterceptor.processInvocation(EjbSuspendInterceptor.java:57)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:438)
      	at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:609)
      	at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:57)
      	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53)
      	at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
      	at org.wildfly.security.auth.server.SecurityIdentity.runAsFunctionEx(SecurityIdentity.java:380)
      	at org.jboss.as.ejb3.remote.AssociationImpl.invokeWithIdentity(AssociationImpl.java:492)
      	at org.jboss.as.ejb3.remote.AssociationImpl.invokeMethod(AssociationImpl.java:487)
      	at org.jboss.as.ejb3.remote.AssociationImpl.lambda$receiveInvocationRequest$0(AssociationImpl.java:188)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: javax.ejb.CreateException: Failed to create stateful EJB: Authentication failed: none of the mechanisms presented by the server (PLAIN, OAUTHBEARER) are supported
      	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.createSession(RemoteEJBReceiver.java:148)
      	at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:66)
      	at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleSessionCreation(RemotingEJBClientInterceptor.java:66)
      	at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:72)
      	at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleSessionCreation(DiscoveryEJBClientInterceptor.java:124)
      	at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:72)
      	at org.jboss.ejb.client.EJBClientInterceptor.handleSessionCreation(EJBClientInterceptor.java:77)
      	at org.jboss.ejb.client.EJBSessionCreationInvocationContext.proceed(EJBSessionCreationInvocationContext.java:72)
      	at org.jboss.ejb.client.EJBClientContext.createSession(EJBClientContext.java:722)
      	at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:327)
      	at org.jboss.ejb.client.EJBClient.createSessionProxy(EJBClient.java:193)
      	at org.jboss.ejb.client.EJBRootContext.lookupNative(EJBRootContext.java:156)
      	... 83 more
      Caused by: javax.security.sasl.SaslException: Authentication failed: none of the mechanisms presented by the server (PLAIN, OAUTHBEARER) are supported
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:438)
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:242)
      	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
      	at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
      	at org.xnio.nio.WorkerThread.run(WorkerThread.java:571)
      	at ...asynchronous invocation...(Unknown Source)
      	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:542)
      	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:508)
      	at org.jboss.remoting3.ConnectionInfo$None.getConnection(ConnectionInfo.java:83)
      	at org.jboss.remoting3.ConnectionInfo.getConnection(ConnectionInfo.java:56)
      	at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:459)
      	at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:405)
      	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.lambda$getConnection$1(RemoteEJBReceiver.java:180)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.getConnection(RemoteEJBReceiver.java:180)
      	at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.createSession(RemoteEJBReceiver.java:138)
      	... 94 more
      

              rhn-engineering-lgao Lin Gao
              josef.cacek@gmail.com Josef Cacek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 4 days
                  4d
                  Remaining:
                  Remaining Estimate - 4 days
                  4d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified