Hello, i've been really struggling with trying to get ldaps to authenticate so we can use AD SSO with our rm server running on windows 2019 on liberty
Currently I imported the client certificate using ikeyman tool. When I view the p12 file using the ikeyman app, under personal certificates, I can see my host cert that was signed by the CA, and when i go to the signer certificates section I can see the intermediate CA and Root CA certificates as well.
Next I changed the server.xml to the following:
<ssl id="defaultSSLConfig" keyStoreRef="defaultKeyStore" sslProtocol="TLSv1.2" trustDefaultCerts="true"
enabledCiphers="TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 TLS_RSA_WITH_AES_128_CBC_SHA256 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA TLS_DHE_RSA_WITH_AES_128_CBC_SHA TLS_DHE_RSA_WITH_AES_128_CBC_SHA256"/>
<keyStore id="defaultKeyStore" location="server.domain.co.us" type="PKCS12" password="{xor}[omitted]"/>
And I enabled the ldapuserregistry which looks like this:
<featureManager>
<feature>ldapRegistry-3.0</feature>
</featureManager>
<!-- Sample LDAP user registry configuration
-->
<ldapRegistry baseDN="OU=Company,DC=core,DC=company,DC=co,DC=us" bindDN="username-omitted" bindPassword="{aes}AL+omitted==" host="ldaps.company.co.us" id="ldaps.company.co.us:636" ignoreCase="false" ldapType="Microsoft Active Directory" port="636" realm="ldapse.company.co.jp:636" recursiveSearch="true" referal="follow" sslEnabled="true">
<idsFilters groupFilter="(&(cn=%v)(|(objectclass=groupOfNames)(objectclass=posixGroup)))" groupIdMap=":cn" groupMemberIdMap="ibm-allGroups:member;ibm-allGroups:uniqueMember" userFilter="(&(uid=%v)(objectclass=inetOrgPerson))" userIdMap=":uid">
</idsFilters>
<activedFilters groupIdMap=":cn" groupMemberIdMap=":member" userIdMap="*:sAMAccountName"/>
</ldapRegistry>
But i am getting an error like so when trying to log into the jazz admin portal:
[ERROR ] com.ibm.wsspi.security.wim.exception.WIMSystemException: CWIML4520E: The LDAP operation could not be completed. The LDAP naming exception javax.naming.NamingException: LDAP response read timed out, timeout used:60000ms. occurred during processing.
com.ibm.wsspi.security.wim.exception.WIMException: com.ibm.wsspi.security.wim.exception.WIMSystemException: CWIML4520E: The LDAP operation could not be completed. The LDAP naming exception javax.naming.NamingException: LDAP response read timed out, timeout used:60000ms. occurred during processing.
at com.ibm.ws.security.wim.ProfileManager.loginImpl(ProfileManager.java:1823)
at [internal classes]
at com.ibm.team.repository.server.servletbridge.LoginFilter.doFilter(LoginFilter.java:69)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:201)
at [internal classes]
Caused by: com.ibm.wsspi.security.wim.exception.WIMSystemException: CWIML4520E: The LDAP operation could not be completed. The LDAP naming exception javax.naming.NamingException: LDAP response read timed out, timeout used:60000ms. occurred during processing.
at com.ibm.ws.security.wim.adapter.ldap.context.ContextManager.getDirContext(ContextManager.java:750)
... 4 more
Caused by: javax.naming.NamingException: LDAP response read timed out, timeout used:60000ms.
at com.sun.jndi.ldap.Connection.readReply(Connection.java:491)
at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:377)
at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:226)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2803)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:331)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxFromUrl(LdapCtxFactory.java:237)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:201)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:255)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:166)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:96)
at org.apache.aries.jndi.ContextHelper.getInitialContextUsingBuilder(ContextHelper.java:199)
... 4 more
[AUDIT ] CWWKS1100A: Authentication did not succeed for user ID username.omitted An invalid user ID or password was specified.
NOTES
I am running windows 2019 and jre20 with wsl as well for testing ldapsearch.
Once thing when i use ldapsearch to auth to the ldaps server on another linux machine I am able to do it fine, but when I try to run the same ldapsearch query in my elm server using WSL I get:
Enter LDAP Password:
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP ldaps.company.co.us:636
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying [ip address]:636
ldap_pvt_connect: fd: 3 tm: -1 async: 0
attempting to connect:
connect success
TLS: peer cert untrusted or revoked (0x42)
TLS: can't connect: (unknown error code).
ldap_err2string
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
However if i disable TLS/SSL cert check from ldap.conf, via "TLS_REQCERT never" it will be successful in authenticating with my username and password
Is there a way to disable certificate checking in ELM as well to see if i can log in?? Or am i doing something else wrong?
I'd be really grateful for some assistance getting this working. thanks!