Overrides
We needed to overide the PersonServiceImpl class which, since it is a KIM module and essential to implementing searching using LDAP made sense to include it in the Rice LDAP Connector module. In order to differentiate our implementation we created a new package edu.uconn.kuali.rice.kim.identity with the UConnPersonServiceImp class and include a "bean" definition in the KIMLdapSprings.xml file (see Wiring it All Together).
Mappers
The mapping implementation for Rice v2 change significantly as each "entity" category mapper now returns a list of "Builder" objects see (Rice 2.0 release notes).
The PrincipalMapper class out of the box does not implement the method (protected boolean isPersonActive(DirContextOperations context) )to determine if the person in question is "active" (has an affiliation with the university). Instead of this implementing this method we created a new isPersonActive method (see below) which compares the values of the LDAP eduPersonAffiliation attribute with affiliation mappings rice config parameter (STAFF=staff,FCLTY=faculty,STDNT=student,AFLT=affiliate)
protected boolean isPersonActive(String[] affiliattions) { if (affiliattions != null) { String[] mappings = getConstants().getAffiliationMappings().split(","); for (String affiliationName : affiliattions) { for (String affilMap : mappings) { if (contains(affilMap, affiliationName)) { return true; } } } } return false; }
Wiring it All Together
KIMLdapSpringBeans.xml
Replaced the existing connection information with connection pooling, TLS , and ldap attribute mapping elements from our Rice-1.0.5 LDAP implementation.
---to do add link to final version of file
Additional spring beans files in Rice
Rice 2.x no longer uses the rice config parameter "rice.additionalSpringFiles" to list override spring files instead each module requires a parameter rice.[module].additionalSpringFiles that lists the override files for that particular module. To use LDAP instead we added <param name="rice.kim.additionalSpringFiles">classpath:org/kuali/rice/kim/config/KIMLdapSpringBeans.xml</param> to the Rice and KFS configuration files.