Attribute fetching from LDAP

62 views
Skip to first unread message

Eric Jiang

unread,
Oct 9, 2019, 4:11:01 PM10/9/19
to CAS Community
Hi there, 
  I am new to CAS, been setting up the server(5.3.0) in the past days to work with LDAP, now we would like to simply retrieve one extra attribute .e.g email from the LDAP server. I have configured the server like this according to the blog : https://apereo.github.io/2018/02/20/cas-service-rbac-attributeresolution/ , but ran into  these on startup the server.  


2019-10-09 15:40:14,377 INFO [org.apereo.cas.web.CasWebApplication] - <The following profiles are active: standalone>
2019-10-09 15:40:14,461 INFO [org.apereo.cas.web.CasWebApplicationContext] - <Refreshing CasWebApplicationContext()>
2019-10-09 15:40:19,268 WARN [org.apereo.cas.web.CasWebApplicationContext] - <Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casBeanValidationPostProcessor' defined in class path resource [org/apereo/cas/config/CasCoreUtilConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'casCoreTicketsConfiguration': Unsatisfied dependency expressed through field 'casProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cas-org.apereo.cas.configuration.CasConfigurationProperties': Could not bind properties to CasConfigurationProperties (prefix=cas, ignoreInvalidFields=false, ignoreUnknownFields=false, ignoreNestedProperties=false);
 nested exception is org.springframework.boot.bind.RelaxedBindingNotWritablePropertyException: Failed to bind 'cas.authn.attributeRepository.ldap[0].userFilter' from 'applicationProfilesProperties' to 'authn.attributeRepository.ldap[0].userFilter' property on 'org.apereo.cas.configuration.model.core.authentication.PrincipalAttributesProperties'>

I highlighted the nested exception to help you quickly spot the root cause.  I checked the documentations and so on, can't figure out why the property is not writable.  Regards !

Ray Bon

unread,
Oct 9, 2019, 4:31:23 PM10/9/19
to cas-...@apereo.org
-- 
Ray Bon
Programmer Analyst
Development Services, University Systems

I respectfully acknowledge that my place of work is located within the ancestral, traditional and unceded territory of the Songhees, Esquimalt and WSÁNEĆ Nations.

Eric Bo Jiang

unread,
Oct 10, 2019, 9:57:50 AM10/10/19
to cas-...@apereo.org
Thank you for your reply. 
I understand the attributeRepository is using userFilter instead of searchFilter, what you referred to is for LDAP configuration.

--
- 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/5b5695fbc484d229befe8756cb2250b7b17d0186.camel%40uvic.ca.

Ray Bon

unread,
Oct 10, 2019, 12:35:41 PM10/10/19
to cas-...@apereo.org
Eric,

I am not clear about your last statement, whether it means you understand or are still confused. I will add some more clarification, which I should have included the first time.

There is an effort in CAS to streamline the config properties.
The error you received says that a property was encountered but CAS does not know what it is, "Failed to bind 'cas.authn.attributeRepository.ldap[0].userFilter'".

In the docs, the '${configurationKey}' part says that this property applies to multiple areas of configuration, in this case, authentication and search.

Ray
Reply all
Reply to author
Forward
0 new messages