I’ve inherited an application that was created by MarkLogic professional
services.  It uses the the DataHub Framework and a Node.js app that was
generated with Slush.  It was created on MarkLogic 8 and is working there.
I need to make several changes/improvements, one of which is to upgrade
MarkLogic to v9.

   I’ve upgraded MarkLogic to v9 ok and the data load and harmonization
stuff seems to be working ok now.  But I’m having no end of trouble getting
the Node front-end app to talk to ML9.

   The problem seems to be the digest authentication protocol.  The app is
able to complete login where it hits MarkLogic to validate the
user/password and then stores it locally in a session for later search
requests.  Those always fail with a 401 response.  I’ve done some tracing
and it appears that it is indeed finding the session credentials and is
setting the digest auth header as expected on the request to ML.

   Comparing the Authentication: header with the one sent by a successful
curl request, the only difference of note seems to be that the “cnonce”
feld is hex encoded by Node and is base64 encoded by curl.  I don’t know
the digest protocol well enough to know if this is the core or the
problem.  But in any case trying to track down how the authentication is
generated is like being lost in a maze of twisty little passages, all
Javascript.

   I found a small ML9 release note that digest authentication had been
tightened up in ML9, which is probably the nub of the issue.  So my
question is, how do I fix this?  How do I get the HTTP digest handshake
working properly between this Node.js app and MarkLogic 9?

   Any help appreciated.

----
Ron Hitchens r...@overstory.co.uk, +44 7879 358212
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to