Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7325

LDAP referrals following - SSLSocketFactory not set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 11.0.0.Final
    • None
    • Security
    • None

    Description

      When the referral-mode="follow" is used, NamingEnumeration.hasMore create new LdapReferralContext and socket, which is not covered by DelegatingDirContext yet.

      Unable to find source-code formatter for language: text. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      java.lang.RuntimeException: ELY01084: Error while consuming results from search. SearchDn [dc=users,dc=elytron,dc=wildfly,dc=org], Filter [(|(objectclass=referral)(uid={0}))], Filter Args [[refUser]].
      Caused by: javax.naming.PartialResultException [Root exception is javax.naming.CommunicationException: localhost:11391 [Root exception is java.lang.IllegalStateException: ELY04025: DirContext tries to connect without SSLSocketFactory thread local setting]]
      	at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(AbstractLdapNamingEnumeration.java:237)
      	at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMore(AbstractLdapNamingEnumeration.java:189)
      	at org.wildfly.security.auth.realm.ldap.LdapSecurityRealm$LdapRealmIdentity$LdapSearch$1.tryAdvance(LdapSecurityRealm.java:938)
      	... 39 more
      Caused by: javax.naming.CommunicationException: localhost:11391 [Root exception is java.lang.IllegalStateException: ELY04025: DirContext tries to connect without SSLSocketFactory thread local setting]
      	at com.sun.jndi.ldap.LdapReferralContext.<init>(LdapReferralContext.java:95)
      	at com.sun.jndi.ldap.LdapReferralException.getReferralContext(LdapReferralException.java:150)
      	at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreReferrals(AbstractLdapNamingEnumeration.java:325)
      	at com.sun.jndi.ldap.AbstractLdapNamingEnumeration.hasMoreImpl(AbstractLdapNamingEnumeration.java:227)
      	... 41 more
      Caused by: java.lang.IllegalStateException: ELY04025: DirContext tries to connect without SSLSocketFactory thread local setting
      	at org.wildfly.security.auth.realm.ldap.ThreadLocalSSLSocketFactory.getDefault(ThreadLocalSSLSocketFactory.java:46)
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.sun.jndi.ldap.Connection.createSocket(Connection.java:284)
      	at com.sun.jndi.ldap.Connection.<init>(Connection.java:203)
      	at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:137)
      	at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1614)
      	at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2746)
      	at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:319)
      	at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:192)
      	at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:151)
      	at com.sun.jndi.url.ldap.ldapURLContextFactory.getObjectInstance(ldapURLContextFactory.java:52)
      	at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:601)
      	at javax.naming.spi.NamingManager.processURL(NamingManager.java:381)
      	at javax.naming.spi.NamingManager.processURLAddrs(NamingManager.java:361)
      	at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:333)
      	at com.sun.jndi.ldap.LdapReferralContext.<init>(LdapReferralContext.java:114)
      	... 44 more
      

      Attachments

        Issue Links

          Activity

            People

              jkalina@redhat.com Jan Kalina (Inactive)
              jkalina@redhat.com Jan Kalina (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: