[jboss-jira] [JBoss JIRA] (WFLY-1685) Authentication using LDAP security realm with SSL configured fails with ClassNotFoundException
Emmanuel Hugonnet (JIRA)
jira-events at lists.jboss.org
Fri Jul 12 06:00:22 EDT 2013
Emmanuel Hugonnet created WFLY-1685:
---------------------------------------
Summary: Authentication using LDAP security realm with SSL configured fails with ClassNotFoundException
Key: WFLY-1685
URL: https://issues.jboss.org/browse/WFLY-1685
Project: WildFly
Issue Type: Bug
Components: Domain Management
Affects Versions: 8.0.0.Alpha2, 8.0.0.Alpha3
Reporter: Emmanuel Hugonnet
Assignee: Emmanuel Hugonnet
When a user configures security domain, which uses RealmDirect with configured LDAP authentication using SSL as described in https://issues.jboss.org/browse/AS7-5246, the authentication fails with ClassNotFoundException. Moreover the exception is only logged on TRACE level, which is the second issue here.
IMO, the first problem can be simply solved by adding "org.jboss.as.domain-management" module dependency on a right place.
javax.naming.CommunicationException: 127.0.0.1:10636 [Root exception is java.lang.ClassNotFoundException: org.jboss.as.domain.management.connections.ldap.ThreadLocalSSLSocketFactory from [Module "deployment.ldaps-authn-sd.war:main" from Service Module Loader]]
at com.sun.jndi.ldap.Connection.<init>(Connection.java:224)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:136)
at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1600)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2698)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:316)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:193)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:211)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:154)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:84)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.init(InitialContext.java:242)
at javax.naming.InitialContext.<init>(InitialContext.java:216)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:101)
at org.jboss.as.domain.management.connections.ldap.LdapConnectionManagerService.getConnection(LdapConnectionManagerService.java:112)
at org.jboss.as.domain.management.connections.ldap.LdapConnectionManagerService.getConnection(LdapConnectionManagerService.java:93)
at org.jboss.as.domain.management.security.UserLdapCallbackHandler.handle(UserLdapCallbackHandler.java:186)
at org.jboss.as.domain.management.security.SecurityRealmService$1.handle(SecurityRealmService.java:168)
at org.jboss.as.security.RealmDirectLoginModule.handle(RealmDirectLoginModule.java:175)
at org.jboss.as.security.RealmDirectLoginModule.validatePassword(RealmDirectLoginModule.java:206)
at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:281)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)
at javax.security.auth.login.LoginContext.login(LoginContext.java:594)
at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:408)
at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:345)
at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:333)
at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:146)
at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:216)
at org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:447)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: org.jboss.as.domain.management.connections.ldap.ThreadLocalSSLSocketFactory from [Module "deployment.ldaps-authn-sd.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.sun.jndi.ldap.VersionHelper12.loadClass(VersionHelper12.java:71)
at com.sun.jndi.ldap.Connection.createSocket(Connection.java:284)
at com.sun.jndi.ldap.Connection.<init>(Connection.java:201)
... 47 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list