2019-07-15 14:24:39,543 DEBUG [org.ldaptive.provider.jndi.JndiConnectionFactory] - <Error connecting to LDAP URL: ldaps://adlocal.lan:636>org.ldaptive.provider.ConnectionException: javax.naming.CommunicationException: adlocal.lan:636 [Root exception is java.net.UnknownHostException: adlocal.lan]cas.server.prefix=${cas.server.name}/caslogging.config: file:/etc/cas/config/log4j2.xml
# logging.level.org.apereo=DEBUGcas.authn.accept.users=# cas.authn.accept.credentialCriteria=
## KEYSTORE# cas.authn.attributeRepository.ldap.keystore=file:/etc/cas/config/thekeystore# cas.authn.attributeRepository.ldap.keystorePassword=*********# cas.authn.attributeRepository.ldap.keystoreType=JKS|JCEKS|PKCS12
## LDAPcas.authn.ldap[0].name=adlocal.lancas.authn.ldap[0].type=ADcas.authn.ldap[0].ldapUrl=ldaps://adlocal.lan:636cas.authn.ldap[0].baseDn=DC=adlocal,DC=lancas.authn.ldap[0].dnFormat=CN=%s,DC=adlocal,DC=lan# cas.authn.ldap[0].bindDn=*# cas.authn.ldap[0].bindCredential=*# cas.authn.ldap[0].minPoolSize=1# cas.authn.ldap[0].maxPoolSize=10cas.authn.ldap[0].validateOnCheckout=falsecas.authn.ldap[0].validatePeriodically=truecas.authn.ldap[0].validatePeriod=PT5Mcas.authn.ldap[0].failFast=truecas.authn.ldap[0].idleTime=PT10Mcas.authn.ldap[0].prunePeriod=PT2Mcas.authn.ldap[0].blockWaitTime=PT3Scas.authn.ldap[0].useStartTls=falsecas.authn.ldap[0].useSsl=truecas.authn.ldap[0].searchFilter=sAMAccountName={user}
## INMEMORY TICKET REGISTRY (TEMPORARY)cas.ticket.registry.inMemory.cache=truecas.ticket.registry.inMemory.loadFactor=1cas.ticket.registry.inMemory.concurrency=20cas.ticket.registry.inMemory.initialCapacity=1000--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/97f6dd77-5d77-4bfa-80fc-073bfbaa496b%40apereo.org.
[...]
COPY extra/certs/cacert.crt $JAVA_HOME/jre/lib/security/cacert.crt
COPY extra/certs/ssl.crt $JAVA_HOME/jre/lib/security/ssl.crt
RUN $JAVA_HOME/bin/keytool -import -trustcacerts \
-keystore $JAVA_HOME/jre/lib/security/cacerts \
-storepass changeit -file $JAVA_HOME/jre/lib/security/cacert.crt -alias cacert -noprompt && \
$JAVA_HOME/bin/keytool -import \
-keystore $JAVA_HOME/jre/lib/security/cacerts \
-storepass changeit -file $JAVA_HOME/jre/lib/security/ssl.crt -alias ssl -noprompt
[...]cas.server.name=https://${dns}cas.authn.accept.users=
cas.authn.ldap[0].name=${ldapDomain}cas.authn.ldap[0].type=ADcas.authn.ldap[0].ldapUrl=${ldapUrl}cas.authn.ldap[0].baseDn=${ldapBaseDn}cas.authn.ldap[0].validatePeriod=PT5M
cas.authn.ldap[0].minPoolSize=3cas.authn.ldap[0].maxPoolSize=10cas.authn.ldap[0].validateOnCheckout=falsecas.authn.ldap[0].validatePeriodically=truecas.authn.ldap[0].validatePeriod=PT5Mcas.authn.ldap[0].failFast=falsecas.authn.ldap[0].idleTime=PT10Mcas.authn.ldap[0].prunePeriod=PT2Mcas.authn.ldap[0].blockWaitTime=PT3Scas.authn.ldap[0].useStartTls=falsecas.authn.ldap[0].useSsl=truecas.authn.ldap[0].searchFilter=sAMAccountName={user}cas.authn.ldap[0].dnFormat=CN=%s,OU=Users,DC=active-directory,DC=lan
cas.ticket.registry.inMemory.cache=true
cas.ticket.registry.inMemory.loadFactor=1cas.ticket.registry.inMemory.concurrency=20cas.ticket.registry.inMemory.initialCapacity=1000[Root exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
Which would indicate either the cert is not imported correctly, or Tomcat server.xml is pointing to a different keystore.
ldapUrl=ldaps://active-directory.lan:636The above is from your ad-error.txt, which indicates a different server name than in your config: active-directory.lan:636 vs adlocal.lan:636I set up 6.0.0 a few months ago with the following:Tomcat server.xml connector:<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true" address="DEV_SERVER_IP"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/etc/ssl/private/.keystore"
keystorePass="MY_KEYSTORE_PASS"
/>
I used a different keystore and location than default JAVA_HOME, because of similar issues as you.Then in /etc/cas/config, I have the following files: cas.properties, application-standalone.properties, and ldap.properties.I am using type ADHere is the minimal LDAP config I used to get it to work for me:# LDAP/Active Directorycas.authn.ldap[0].type=AD
cas.authn.ldap[0].ldapUrl=ldaps://...
cas.authn.ldap[0].baseDn=dc=...,dc=...,dc=...
cas.authn.ldap[0].bindDn=cn=...,ou=...,ou=...,dc=...,dc=...,dc=...
cas.authn.ldap[0].bindCredential=...
cas.authn.ldap[0].searchFilter=sAMAccountName={user}
cas.authn.ldap[0].dnFormat=%s@...
cas.authn.ldap[0].principalAttributePassword=passwordI also have in my config the following, which I cannot remember why I have in the config, but it works for my setup on the development machine:cas.tgc.crypto.encryption.key=SOME_KEY_STRINGcas.tgc.crypto.signing.key=SOME_BIG_KEY_STRING
cas.tgc.httpOnly=false
cas.webflow.crypto.signing.key=ANOTHER_KEY_STRING
cas.webflow.crypto.encryption.key=ANOTHER_STRING