[cas-user] 5.0.4 LDAP NamespaceHandler issue

12 views
Skip to first unread message

Jim Riley

unread,
Apr 13, 2017, 4:14:57 PM4/13/17
to CAS Community
I am trying to get 5.0.4 to authenticate with LDAP.   As soon as I add the ldap dependency below to the POM, I get the following error at startup.

<dependency>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-server-support-ldap</artifactId>
    <version>${cas.version}</version>
</dependency>

An additional question is property
#cas.authn.ldap[0].dnFormat=uid=%s,ou=users,dc=example,dc=com

In our directory tree users are serveral layers deep and not all under the same folder.   How is this parameter configured for this situation.

CN=jim smith,OU=Users,OU=LibertyPark-AL,OU=OfficeswithDomainControllers,OU=OfficeLocations,DC=ad,DC=mycompay,DC=com
CN=mary.jones,OU=Users,OU=Dallas-TX,OU=OfficeswithDomainControllers,OU=OfficeLocations,DC=ad,DC=mycompay,DC=com

  __  ____     _     ____  __
 / / / ___|   / \   / ___| \ \
| | | |      / _ \  \___ \  | |
| | | |___  / ___ \  ___) | | |
| |  \____|/_/   \_\|____/  | |
 \_\                       /_/

CAS Version: 5.0.4
Apache Tomcat Version: Apache Tomcat/8.5.11
Build Date/Time: 2017-04-13T20:08:01.052Z
System Temp Directory: C:\Users\RileyJ\AppData\Local\Temp\
Java Home: C:\Program Files (x86)\Java\jre1.8.0_101
Java Vendor: Oracle Corporation
Java Version: 1.8.0_101
JCE Installed: no
OS Architecture: x86
OS Name: Windows 7
OS Version: 6.1


2017-04-13 15:08:34,633 WARN [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Error evaluating Groovy script: Unable to load NamespaceHandler mappings from location [META-INF/spring.handlers]
Offending resource: class path resource [deployerConfigContext.groovy]; nested exception is java.lang.IllegalStateException: Unable to load NamespaceHandler mappings from location [META-INF/spring.handlers]>
2017-04-13 15:08:35,407 ERROR [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception>
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@17632c9: startup date [Thu Apr 13 15:08:28 CDT 2017]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@13b6d03
        at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) ~[spring-context-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) ~[spring-context-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) ~[spring-beans-4.3.4.RELEASE.jar!/:4.3.4.RELEASE]                                                                 

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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/fd1b8329-e0e1-4be8-8bd9-524294a3623d%40apereo.org.

Nour Krichene

unread,
Apr 14, 2017, 4:07:13 AM4/14/17
to jasig-cas-user, cas-...@apereo.org, jim....@ipacc.com
Hello

It seems that one of the program that you used has an old version (not updated) so that cause no compatibility or some jars are missed.

Take a look at this LDAP conf maybe it helps you
 

cas.adminPagesSecurity.ip=127\.0\.0\.1

logging.config: file:/etc/cas/config/log4j2.xml
# cas.serviceRegistry.config.location: classpath:/services
cas.authn.accept.users= 
cas.authn.ldap[0].type=AUTHENTICATED

cas.authn.ldap[0].ldapUrl=ldap://localhost:389
cas.authn.ldap[0].useSsl=false
cas.authn.ldap[0].useStartTls=false
cas.authn.ldap[0].connectTimeout=5000
cas.authn.ldap[0].baseDc=dc=example,dc=com
cas.authn.ldap[0].baseDn=ou=users,dc=example,dc=com
cas.authn.ldap[0].userFilter=uid={user}
cas.authn.ldap[0].subtreeSearch=true
cas.authn.ldap[0].usePasswordPolicy=false
cas.authn.ldap[0].bindDn=cn=admin,dc=example,dc=com
cas.authn.ldap[0].bindCredential=*******

cas.authn.ldap[0].enhanceWithEntryResolver=false
cas.authn.ldap[0].dnFormat=uid=%s,ou=users,dc=example,dc=com
cas.authn.ldap[0].principalAttributeId=uid
cas.authn.ldap[0].principalAttributePassword=
cas.authn.ldap[0].principalAttributeList=sn,cn:commonName,givenName
cas.authn.ldap[0].allowMultiplePrincipalAttributeValues=true

cas.authn.ldap[0].minPoolSize=3
cas.authn.ldap[0].maxPoolSize=10
cas.authn.ldap[0].validateOnCheckout=true
cas.authn.ldap[0].validatePeriodically=true
cas.authn.ldap[0].validatePeriod=600

cas.authn.ldap[0].failFast=true
cas.authn.ldap[0].idleTime=5000
cas.authn.ldap[0].prunePeriod=5000
cas.authn.ldap[0].blockWaitTime=5000
cas.authn.ldap[0].allowMultipleDns=false

cas.authn.ldap[0].passwordEncoder.type=NONE
cas.authn.ldap[0].principalTransformation.suffix=
cas.authn.ldap[0].principalTransformation.caseConversion=NONE
cas.authn.ldap[0].principalTransformation.prefix=
Reply all
Reply to author
Forward
0 new messages