[Building Sakai] Searching users created by external authority

Steve Swinsburg steve.swinsburg at gmail.com
Mon Jun 6 15:47:43 PDT 2011


Glad you got it sorted. I was going to say that in UserDirectoryService there is a protected method called checkAndEnsureMappedIdForProvidedUser - this is what needs to be done to setup the mapping for a user. 

In kernel 1.2.2 there is also a new public UserEdit factory method that can be used to leverage this method above (new UserEdit(String eid).

Re Tomcat 7, the basiclti issue is fixed and will be appearing in a release soon. Dav still needs to be addressed though. My tests showed the same.

cheers,
Steve


On 07/06/2011, at 2:18 AM, David Wafula wrote:

> 
> Ok...turns out there was logical error in my code, can be able to search user now. 
> 
> On Mon, Jun 6, 2011 at 4:08 PM, David Wafula <davidwaf at gmail.com> wrote:
> 
> 
> On Mon, Jun 6, 2011 at 2:36 PM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
> Hi,
> 
> External users don't show up in the Admin users tool because there isn't really a way of showing them all since there could be thousands in the external provider.
> 
> Another point to note is that you don't actually have to make that UDS call to have users from LDAP created in Sakai, their mapping will automatically be set the first time their entry is accessed, either by adding them to a site or by logging in.
> 
> Also, if you do make that call, are you sure it is working? You can't create a user that has the same eid as a provided account so I'd expect that call to fail.
> 
> Off topic, are you really using Tomcat 7? How is it going? What was the build and setup like? Sakai has only really been tested on Tomcat 5.5.
> 
> cheers,
> Steve
> 
> 
> 
> Thanks for the info. Well, this is our own little custom LDAP-based provider (involves searching across multiple LDAP servers etc). I know there is jldap, but its not being flexible enough for our needs now. I can verify the user is for sure being created.
> I dont understand though what you exactly meant by "their mapping will automatically be set the first time their entry is accessed, either by adding them to a site or by logging in".  I mean, isn't 
> 
> userDirectoryService.addUser() enough ..or there is more to be done to make the user searchable ? As it stands login works fine, and even the profile is correctly populated with the minimal info provided from LDAP. Just i can't find the user on searching.
> 
> I also have:
> 
> 
> public boolean getUser(UserEdit edit) {
>         System.out.println("Get User called " + edit);
>         if (edit == null) {
>             return false;
>         }
> 
>         StaffLDAP staffLDAP = new StaffLDAP(staffLDAPHost, staffSearchBase, staffDN, ldapPassword);
>         LDAPUser user = staffLDAP.getLDAPUser(edit.getEid());
> 
>         if (user == null) {
>             return false;
>         }
>         edit.setFirstName(user.getGivenname());
>         edit.setLastName(user.getSurname());
>         edit.setEmail(user.getEmail());
>         edit.setType("staff");
> 
>         return true;
> 
>     } // getUser
> 
> 
> As for tomcat 7...it runs fairly ok, except for these in logs:
> 
> SEVERE: Parse error in application web.xml file at jndi:/localhost/imsblti/WEB-INF/web.xml
> java.lang.IllegalArgumentException: Duplicate filter name [sakai.request]
> ...
> java.lang.ClassNotFoundException: org.sakaiproject.dav.DavRealm
> ...
> 
> java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter
> 
> Am just using this tomcat 7 for the fun of it, but in prod we will probably use 5.5.
> -- 
> David Wafula
> 
> 
> 
> -- 
> David Wafula

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110607/ab145f15/attachment.html 


More information about the sakai-dev mailing list