Wildfly 8.2.0 invocate secured remote ejb

957 views Asked by At

i'm trying to invocate a secured remote ejb but i can't. I'm using ejb-client-API.

The application is deployed in a ear named som.ear.

I'm using Wildfly 8.2.0 final

Code client:

public class SomTestClient {

public static void main(String[] args) throws Exception {
    invokeStatelessBean();
}

private static void invokeStatelessBean() throws NamingException  {
    final RemoteCalculator statelessRemoteCalculator = lookupRemoteStatelessCalculator();
    int a = 204;
    int b = 340;
    int sum = statelessRemoteCalculator.add(a, b);
    System.out.println("Remote calculator returned sum = " + sum);

}

private static RemoteCalculator lookupRemoteStatelessCalculator()
        throws NamingException {
    final Hashtable jndiProperties = new Hashtable();
    jndiProperties.put(Context.URL_PKG_PREFIXES,
            "org.jboss.ejb.client.naming");
    Context context = new InitialContext(jndiProperties);
    String jdniLookup = "ejb:som/platform_api_service/CalculatorBean!"
            + RemoteCalculator.class.getName();
    return (RemoteCalculator) context.lookup(jdniLookup);
}
}

jboss-ejb-client.properies

remote.connections=default

remote.connection.default.host=127.0.0.1
remote.connection.default.port=8080
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false

remote.connection.default.username=admin
remote.connection.default.password=scheduler

EJB

@Stateless
@SecurityDomain("som_security_domain")
@DeclareRoles("tms_login")
@RolesAllowed("tms_login")
@Remote(RemoteCalculator.class)
public class CalculatorBean implements RemoteCalculator {
    @Override
    public int add(int a, int b) {
        return a + b;
    }

    @Override
    public int subtract(int a, int b) {
        return a - b;
    }
}

standalone.xml

<security-realms>
    ....
    <security-realm name="SomRealm">
        <authentication>
            <jaas name="som_security_domain"/>
        </authentication>
    </security-realm>
    ....
</security-realms>
....
<subsystem xmlns="urn:jboss:domain:remoting:2.0">
    <endpoint worker="default"/>
    <http-connector name="http-remoting-connector" connector-ref="default" security-realm="SomRealm"/>
</subsystem>
....
<security-domains>
    <security-domain name="som_security_domain" cache-type="default">
        <authentication>
            <login-module code="Database" flag="required">
                <module-option name="dsJndiName" value="java:jboss/datasources/TMSDS"/>
                <module-option name="principalsQuery" value="select Password from TMSUser where UserName=?"/>
                <module-option name="rolesQuery" value="select A.role,'Roles' from (select userName,'tms_login' as role from TMSUser where active = 1 union select userName,'tms_security_admin' as role from TMSUser where active = 1 and isSecurityAdmin = 1) A where A.userName=?"/>
            </login-module>
        </authentication>
    </security-domain>
</security-domains>

Server log

2015-06-23 13:30:24,108 DEBUG [org.jboss.remotingjmx.DelegatingRemotingConnectorServer] (Remoting "darioschmidtpc:MANAGEMENT" task-3) Client version 2.0.0.Final
2015-06-23 13:30:24,134 DEBUG [org.jboss.remotingjmx.DelegatingRemotingConnectorServer] (Remoting "darioschmidtpc:MANAGEMENT" task-2) Chosen version 0x02
2015-06-23 13:30:24,139 DEBUG [org.jboss.remotingjmx.protocol.v2.ParameterProxy] (Remoting "darioschmidtpc:MANAGEMENT" task-2) Created connection - ID to be established after parameter negotiation.
2015-06-23 13:30:24,153 DEBUG [org.jboss.remotingjmx.protocol.v2.ServerProxy] (pool-2-thread-1) Created connectionID edb2b548-f8b0-4b5c-8531-1bafd5c86cd9
2015-06-23 13:30:24,153 DEBUG [org.jboss.remotingjmx.RemotingConnectorServer] (pool-2-thread-1) Connection 'edb2b548-f8b0-4b5c-8531-1bafd5c86cd9' now opened.
2015-06-23 13:30:34,529 TRACE [org.jboss.security] (default task-1) PBOX000200: Begin isValid, principal: admin, cache entry: null
2015-06-23 13:30:34,529 TRACE [org.jboss.security] (default task-1) PBOX000209: defaultLogin, principal: admin
2015-06-23 13:30:34,530 TRACE [org.jboss.security] (default task-1) PBOX000221: Begin getAppConfigurationEntry(som_security_domain), size: 4
2015-06-23 13:30:34,531 TRACE [org.jboss.security] (default task-1) PBOX000224: End getAppConfigurationEntry(som_security_domain), AuthInfo: AppConfigurationEntry[]:
[0]
LoginModule Class: org.jboss.security.auth.spi.DatabaseServerLoginModule
ControlFlag: LoginModuleControlFlag: required
Options:
name=dsJndiName, value=java:jboss/datasources/TMSDS
name=principalsQuery, value=select Password from TMSUser where UserName=?
name=rolesQuery, value=select A.role,'Roles' from (select userName,'tms_login' as role from TMSUser where active = 1 union select userName,'tms_security_admin' as role from TMSUser where active = 1 and isSecurityAdmin = 1) A where A.userName=?

2015-06-23 13:30:34,534 TRACE [org.jboss.security] (default task-1) PBOX000236: Begin initialize method
2015-06-23 13:30:34,534 TRACE [org.jboss.security] (default task-1) PBOX000262: Module options [dsJndiName: java:jboss/datasources/TMSDS, principalsQuery: select Password from TMSUser where UserName=?, rolesQuery: select A.role,'Roles' from (select userName,'tms_login' as role from TMSUser where active = 1 union select userName,'tms_security_admin' as role from TMSUser where active = 1 and isSecurityAdmin = 1) A where A.userName=?, suspendResume: true]
2015-06-23 13:30:34,535 TRACE [org.jboss.security] (default task-1) PBOX000240: Begin login method
2015-06-23 13:30:34,541 TRACE [org.jboss.security] (default task-1) PBOX000263: Executing query select Password from TMSUser where UserName=? with username admin
2015-06-23 13:30:34,548 FINE  [com.microsoft.sqlserver.jdbc.internals.SQLServerStatement] (default task-1) SQLServerPreparedStatement:2 created by (ConnectionID:2 ClientConnectionId: 2fdf752a-850a-415a-8eb6-d900b16854cd)
2015-06-23 13:30:34,560 FINE  [com.microsoft.sqlserver.jdbc.internals.SQLServerStatement] (default task-1) SQLServerPreparedStatement:2: calling sp_prepexec: PreparedHandle:0, SQL:select Password from TMSUser where UserName=@P0        
2015-06-23 13:30:34,563 FINE  [com.microsoft.sqlserver.jdbc.internals.SQLServerResultSet] (default task-1) SQLServerResultSet:2 created by (SQLServerPreparedStatement:2)
2015-06-23 13:30:34,568 TRACE [org.jboss.security] (default task-1) PBOX000241: End login method, isValid: true
2015-06-23 13:30:34,568 TRACE [org.jboss.security] (default task-1) PBOX000242: Begin commit method, overall result: true
2015-06-23 13:30:34,568 TRACE [org.jboss.security] (default task-1) PBOX000263: Executing query select A.role,'Roles' from (select userName,'tms_login' as role from TMSUser where active = 1 union select userName,'tms_security_admin' as role from TMSUser where active = 1 and isSecurityAdmin = 1) A where A.userName=? with username admin
2015-06-23 13:30:34,570 TRACE [org.jboss.security] (default task-1) PBOX000263: Executing query select A.role,'Roles' from (select userName,'tms_login' as role from TMSUser where active = 1 union select userName,'tms_security_admin' as role from TMSUser where active = 1 and isSecurityAdmin = 1) A where A.userName=? with username admin
2015-06-23 13:30:34,570 FINE  [com.microsoft.sqlserver.jdbc.internals.SQLServerStatement] (default task-1) SQLServerPreparedStatement:3 created by (ConnectionID:3 ClientConnectionId: 884a76af-268c-4742-859b-9087141727a2)
2015-06-23 13:30:34,571 FINE  [com.microsoft.sqlserver.jdbc.internals.SQLServerStatement] (default task-1) SQLServerPreparedStatement:3: calling sp_prepexec: PreparedHandle:0, SQL:select A.role,'Roles' from (select userName,'tms_login' as role from TMSUser where active = 1 union select userName,'tms_security_admin' as role from TMSUser where active = 1 and isSecurityAdmin = 1) A where A.userName=@P0        
2015-06-23 13:30:34,576 FINE  [com.microsoft.sqlserver.jdbc.internals.SQLServerResultSet] (default task-1) SQLServerResultSet:3 created by (SQLServerPreparedStatement:3)
2015-06-23 13:30:34,579 TRACE [org.jboss.security] (default task-1) PBOX000210: defaultLogin, login context: javax.security.auth.login.LoginContext@7660e36, subject: Subject(1245810797).principals=org.jboss.security.SimplePrincipal@489131543(admin)org.jboss.security.SimpleGroup@870530995(Roles(members:tms_login,tms_security_admin))org.jboss.security.SimpleGroup@870530995(CallerPrincipal(members:admin))
2015-06-23 13:30:34,580 TRACE [org.jboss.security] (default task-1) PBOX000207: updateCache, input subject: Subject(1245810797).principals=org.jboss.security.SimplePrincipal@489131543(admin)org.jboss.security.SimpleGroup@870530995(Roles(members:tms_login,tms_security_admin))org.jboss.security.SimpleGroup@870530995(CallerPrincipal(members:admin)), cached subject: Subject(1494215433).principals=org.jboss.security.SimplePrincipal@489131543(admin)org.jboss.security.SimpleGroup@870530995(Roles(members:tms_login,tms_security_admin))org.jboss.security.SimpleGroup@870530995(CallerPrincipal(members:admin))
2015-06-23 13:30:34,580 TRACE [org.jboss.security] (default task-1) PBOX000208: Inserted cache info: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@bee0537
2015-06-23 13:30:34,580 TRACE [org.jboss.security] (default task-1) PBOX000201: End isValid, result = true
2015-06-23 13:30:34,581 TRACE [org.jboss.security.audit] (default task-1) [Success]principal=admin;Action=authentication;Source=org.jboss.as.security.service.SimpleSecurityManager;
2015-06-23 13:30:34,621 DEBUG [org.jboss.as.ejb3] (default task-3) Client with protocol version 2 and marshalling strategy river trying to communicate on Channel ID 67b58316 (inbound) of Remoting connection 274a0859 to /127.0.0.1:63598
2015-06-23 13:30:34,625 DEBUG [org.jboss.as.ejb3] (default task-3) Sending initial module availability message, containing 5 module(s) to channel Channel ID 67b58316 (inbound) of Remoting connection 274a0859 to /127.0.0.1:63598
2015-06-23 13:30:34,627 DEBUG [org.jboss.as.ejb3] (default task-3) Writing out cluster formation message for 0 clusters, to channel Channel ID 67b58316 (inbound) of Remoting connection 274a0859 to /127.0.0.1:63598
2015-06-23 13:30:34,737 TRACE [org.jboss.security] (EJB default - 1) PBOX000200: Begin isValid, principal: admin, cache entry: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@bee0537
2015-06-23 13:30:34,737 TRACE [org.jboss.security] (EJB default - 1) PBOX000204: Begin validateCache, domainInfo: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@bee0537, credential class: class java.lang.String
2015-06-23 13:30:34,738 TRACE [org.jboss.security] (EJB default - 1) PBOX000205: End validateCache, result = true
2015-06-23 13:30:34,738 TRACE [org.jboss.security] (EJB default - 1) PBOX000201: End isValid, result = true
2015-06-23 13:30:34,738 TRACE [org.jboss.security.audit] (EJB default - 1) [Success]principal=admin;Action=authentication;Source=org.jboss.as.security.service.SimpleSecurityManager;
2015-06-23 13:30:34,738 TRACE [org.jboss.security] (EJB default - 1) PBOX000354: Setting security roles ThreadLocal: {}
2015-06-23 13:30:34,750 ERROR [stderr] (EJB default - 1) Jun 23, 2015 1:30:34 PM nl.tudelft.simulation.naming.JVMContextFactory getInitialContext

2015-06-23 13:30:34,750 ERROR [stderr] (EJB default - 1) WARNING: unused environment variables in jndi.properties

2015-06-23 13:30:34,754 TRACE [org.jboss.as.security] (EJB default - 1) Look up of JNDI for som_security_domain/authorizationMgr failed with java:jboss not found.
2015-06-23 13:30:34,755 TRACE [org.jboss.as.security] (EJB default - 1) Exception getting AuthorizationManager for domain=
2015-06-23 13:30:34,755 TRACE [org.jboss.security] (EJB default - 1) PBOX000354: Setting security roles ThreadLocal: null
2015-06-23 13:30:34,755 ERROR [org.jboss.as.ejb3.invocation] (EJB default - 1) JBAS014134: EJB Invocation failed on component CalculatorBean for method public abstract int com.soteica.platform.api.tests.RemoteCalculator.add(int,int): java.lang.RuntimeException: java.lang.IllegalStateException: PBOX000075: The property AuthorizationManager is null
    at org.jboss.as.security.service.SimpleSecurityManager.authorize(SimpleSecurityManager.java:305) [wildfly-security-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:133) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    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) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    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) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.8.0_25]
    at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.8.0_25]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_25]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_25]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.IllegalStateException: PBOX000075: The property AuthorizationManager is null
    at org.jboss.security.plugins.javaee.EJBAuthorizationHelper.authorize(EJBAuthorizationHelper.java:298) [picketbox-4.0.21.Final.jar:4.0.21.Final]
    at org.jboss.as.security.service.SimpleSecurityManager.authorize(SimpleSecurityManager.java:303) [wildfly-security-8.2.0.Final.jar:8.2.0.Final]
    ... 32 more

Client log

Jun 23, 2015 1:30:34 PM nl.tudelft.simulation.naming.JVMContextFactory getInitialContext
WARNING: unused environment variables in jndi.properties
Jun 23, 2015 1:30:34 PM org.jboss.ejb.client.EJBClient <clinit>
INFO: JBoss EJB Client version 2.0.1.Final
Jun 23, 2015 1:30:34 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.0.Final
Jun 23, 2015 1:30:34 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.0.Final
Jun 23, 2015 1:30:34 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 4.0.6.Final
Jun 23, 2015 1:30:34 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: EJBCLIENT000017: Received server version 2 and marshalling strategies [river]
Jun 23, 2015 1:30:34 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@306279ee, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@545997b1,channel=jboss.ejb,nodename=darioschmidtpc]} on channel Channel ID e7b58316 (outbound) of Remoting connection 3eecc1af to /127.0.0.1:8080
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalStateException: PBOX000075: The property AuthorizationManager is null
    at org.jboss.as.security.service.SimpleSecurityManager.authorize(SimpleSecurityManager.java:305)
    at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:133)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95)
    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(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    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 com.sun.proxy.$Proxy0.add(Unknown Source)
    at com.soteica.som.client.test.SomTestClient.invokeStatelessBean(SomTestClient.java:24)
    at com.soteica.som.client.test.SomTestClient.main(SomTestClient.java:16)
Caused by: java.lang.IllegalStateException: PBOX000075: The property AuthorizationManager is null
    at org.jboss.security.plugins.javaee.EJBAuthorizationHelper.authorize(EJBAuthorizationHelper.java:298)
    at org.jboss.as.security.service.SimpleSecurityManager.authorize(SimpleSecurityManager.java:303)
    at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:133)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95)
    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(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)

I can see that the configuration of the security domain "som_security_domain" is used because it runs the query to obtains the password and the roles of the principal, but fails when try to execute a lookup of the AuthenticationManager of the security domain. In log i can see:

[org.jboss.as.security] (EJB default - 1) Look up of JNDI for som_security_domain/authorizationMgr failed with java:jboss not found.

Thanks in advance

1

There are 1 answers

0
user2157799 On

The problem was a library of DSOL Simulation Environment in the folder lib (naming-2.0.9.jar). The library included a file jndi.properties. Once i delete the file, all was ok. I can invocate the ejb remote with a annotation of security domain.