Forum Problems Installing LAMS: Re: Re: Installation Problem Sakai


 
Search: 

20: Re: Re: Installation Problem Sakai
In response to 18 11/30/05 08:48 PM
[ Reply | Forward ]
Hi Ian,

I have found a bug in the Sakai-LAMS plugin. I've drawn up a sequence diagram (see attachment) and realise there is something missing. Between frame 5 and 8 LAMS should invoke the Sakai’s user data callback URL to obtain user data from Sakai. But the url was never invoked. The only reason for this is the hash given to LAMS is wrong.

So I try to verify the hash manually, the hash is constructed as follow;
HASH = SHA1{ lowercase(timestamp + username + serverid + serverkey) }

We can obtain all those variables from the soap call

        <soapenv:Body>
            <ns1:getAllLearningDesigns soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:lamsws">
                <serverId xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
                    sakaicamtools
                    </serverId>
                <datetime xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
                    1133343588745
                    </datetime>
                <hashValue xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
                    ceec19f3e0367001ea8659665aa7db5d26800d0b
                    </hashValue>
                <username xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
                    admin
                    </username>
                </ns1:getAllLearningDesigns>
            </soapenv:Body>
        </soapenv:Envelope>

LAMS will reconstruct the hash value as follow...
SHA1{1133343588745adminsakaicamtoolslamsserverkey} = 2705295bf414faa67056c7e1c732e3a2af7c9d41

But the hash that is sent to LAMS is ceec19f3e0367001ea8659665aa7db5d26800d0b

So the hash generated by the Sakai-LAMS plugin is wrong, it generated the hash as follow...
SHA1{1133343588745adminsakaicamtoolsLAMSSERVERKEY} = ceec19f3e0367001ea8659665aa7db5d26800d0b

The bug is the serverkey wasn’t converted to lowercase.

The good news is, there is a quick fix available simply convert your serverkey to lowercase should fix the problem.

In the mean time we will fix this problem in the plugin.

Sorry for causing you so much trouble.

Posted by Anthony Xiao

Attachments:
Reply to first post on this page
Back to Problems Installing LAMS