GAAAAAH!  Head.  Banging.  Desk.

   I knew about this patch.  I applied it a while ago and it didn’t seem to
fix the problem, but there were other issues still in play at that point.
I had to roll some stuff back and did not re-apply the patch.  In my trace
output the “/v1” prefix was present in a couple of places but in the one
place where it really mattered it was “undefined/search…”.  I hate when
that happens.

   Digest auth working.  Now to fix the remaining problems.

   Thanks.

----
Ron Hitchens r...@overstory.co.uk, +44 7879 358212


On April 26, 2018 at 7:37:35 PM, Ryan Dew (ryan.j....@gmail.com) wrote:

Hi Ron,

You can find the changes that fixed this issue at
https://github.com/marklogic-community/slush-marklogic-node/pull/520/files

Basically, when performing the path as part of the digest authentication
was missing the "/v1" prefix.



On Thu, Apr 26, 2018 at 8:20 AM Ron Hitchens <r...@ronsoft.com> wrote:

>
>    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
>
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to