Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-23362

LDAP user information issue caused by EID case difference

    XMLWordPrintable

    Details

    • 2.9 Status:
      Resolved

      Description

      We did a test upgrade of Sakai 2.8.2 to 2.9.1 and noticed a problem related to site member list affecting tools like Site Info, Roster, Gradebook, etc. After the upgrade, if we went to the Site Info tool in a site, the member list would not load and there was an error in the log as shown below. Refreshing the tool listed all members of the site, but most LDAP users were listed as jsmith (jsmith) instead of Smith, John (jsmith). In the Roster tool, their eid was listed under the name column and their email was blank. All LDAP users were able to log in to Sakai without any problem.

      John Bush (rSmart) suggested that this is most likely due to a case mismatch between the EID returned from LDAP (JSmith) and the one in the sakai_user_id_map table (jsmith). Here is a link to their fix - http://source.sakaiproject.org/viewsvn/msub/rsmart.com/providers/trunk/jldap/src/java/com/rsmart/ldap/JLDAPDirectoryProvider.java?root=svn&pathrev=117865&view=diff&r1=117865&r2=117864&diff_format=h

      Based on John's suggestion, we made a similar change to JLDAPDirectoryProvider (patch attached) and it fixed the problem.

      From the log:
      ---------------------
      2013-03-07 15:05:49,711 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - getUsers(): [Collection size = 13]
      2013-03-07 15:05:49,711 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - getCachedUserEntry(): [eid = jsmith]
      2013-03-07 15:05:49,711 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - getCachedUserEntry(): cache access [found entry = false][entry expired = false]
      2013-03-07 15:05:49,727 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - searchDirectory(): [filter = (|(sAMAccountName=jsmith))][reusing conn = false]
      2013-03-07 15:05:49,743 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - searchDirectory(): [baseDN = OU=People,DC=school,DC=edu][filter = (|(sAMAccountName=jsmith))][return attribs = [sAMAccountName, distinguishedName, givenName, sn, mail]][max results = 0]][search scope = 2]
      2013-03-07 15:05:49,743 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - mapLdapEntryOntoUserData() [dn = CN=JSmith,OU=Institution,OU=People,DC=school,DC=edu]
      2013-03-07 15:05:49,743 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - cacheUserData(): [user record = edu.amc.sakai.user.LdapUserData@560cb988[
      eid=JSmith
      firstName=John
      preferredFirstName=<null>
      lastName=Smith
      email=JSmith@school.org
      type=
      properties=

      {distinguishedName=CN=JSmith,OU=Institution,OU=People,DC=school,DC=edu, udp.dn=CN=JSmith,OU=Institution,OU=People,DC=school,DC=edu}
      ]]
      2013-03-07 15:05:49,743 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - searchDirectory(): returning connection to connection manager
      2013-03-07 15:05:49,743 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - mapUserDataOntoUserEdit() [cache record = edu.amc.sakai.user.LdapUserData@560cb988[
      eid=JSmith
      firstName=John
      preferredFirstName=<null>
      lastName=Smith
      email=JSmith@school.org
      type=
      properties={distinguishedName=CN=JSmith,OU=Institution,OU=People,DC=school,DC=edu, udp.dn=CN=JSmith,OU=Institution,OU=People,DC=school,DC=edu}

      ]]
      2013-03-07 15:05:49,743 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - getUsers(): returning connection to connection manager
      2013-03-07 15:05:49,743 DEBUG ajp-apr-8009-exec-13 edu.amc.sakai.user.JLDAPDirectoryProvider - getUsers(): abortive search, clearing received users collection
      2013-03-07 15:05:49,743 WARN ajp-apr-8009-exec-13 org.sakaiproject.site.tool.SiteAction - org.sakaiproject.site.tool.SiteAction@5d68bbda buildContextForTemplate chef_site-siteInfo-list.vm
      java.lang.RuntimeException: getUsers(): RuntimeException during search eid = jsmith]
      at edu.amc.sakai.user.JLDAPDirectoryProvider.getUsers(JLDAPDirectoryProvider.java:697)
      at org.sakaiproject.user.impl.DbUserService$DbStorage.getUsersByEids(DbUserService.java:768)
      at org.sakaiproject.user.impl.BaseUserDirectoryService.getUsersByEids(BaseUserDirectoryService.java:874)
      at org.sakaiproject.user.cover.UserDirectoryService.getUsersByEids(UserDirectoryService.java:106)
      at org.sakaiproject.site.util.SiteParticipantHelper.getEidUserMapFromCollection(SiteParticipantHelper.java:183)
      at org.sakaiproject.site.util.SiteParticipantHelper.addParticipantsFromMembers(SiteParticipantHelper.java:277)
      at org.sakaiproject.site.util.SiteParticipantHelper.prepareParticipants(SiteParticipantHelper.java:457)
      at org.sakaiproject.site.tool.SiteAction.getParticipantList(SiteAction.java:8644)
      at org.sakaiproject.site.tool.SiteAction.buildContextForTemplate(SiteAction.java:1990)
      at org.sakaiproject.site.tool.SiteAction.buildMainPanelContext(SiteAction.java:1174)
      at org.sakaiproject.site.tool.SiteAction.buildMainPanelContext(SiteAction.java:1112)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.toolModeDispatch(VelocityPortletPaneledAction.java:429)
      at org.sakaiproject.site.tool.SiteAction.toolModeDispatch(SiteAction.java:12339)
      at org.sakaiproject.cheftool.ToolServlet.doGet(ToolServlet.java:236)
      at org.sakaiproject.cheftool.VelocityPortletPaneledAction.doGet(VelocityPortletPaneledAction.java:1156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at org.sakaiproject.vm.ComponentServlet.service(ComponentServlet.java:56)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:634)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
      at org.sakaiproject.tool.impl.ActiveToolComponent$MyActiveTool.forward(ActiveToolComponent.java:511)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.forwardTool(SkinnableCharonPortal.java:1470)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doTool(ToolHandler.java:213)
      at org.sakaiproject.portal.charon.handlers.ToolHandler.doGet(ToolHandler.java:96)
      at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:881)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:695)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NullPointerException
      at edu.amc.sakai.user.SimpleLdapAttributeMapper.mapUserDataOntoUserEdit(SimpleLdapAttributeMapper.java:335)
      at edu.amc.sakai.user.JLDAPDirectoryProvider.mapUserDataOntoUserEdit(JLDAPDirectoryProvider.java:1118)
      at edu.amc.sakai.user.JLDAPDirectoryProvider.getUsers(JLDAPDirectoryProvider.java:666)
      ... 56 more

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  ottenhoff Sam Ottenhoff
                  Reporter:
                  amehta Anand Mehta (Inactive)
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration