Uploaded image for project: 'Commons Proxy'
  1. Commons Proxy
  2. PROXY-26

NTLM not working on ATS 6.2.1 ( recursive prompt for auth)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Invalid
    • None
    • None
    • ATS (6.2.1), linux windriver, & NTLM

    • Important
    • Hide
      I have configured ATS as a web proxy in a NTLM authentication domain; and, have a plugin with a function for TS_HTTP_READ_REQUEST_HDR_HOOK say, func_1.

      In func_1 which is invoked during the request header, I create a hook for TS_HTTP_SEND_RESPONSE_HDR_HOOK (say, func_2) and then do a TSHttpTxnReenable(txnp, TS_EVENT_HTTP_ERROR);



      Subsequently, when func_2 is invoked during the SEND_RESPONSE_HEADER event, I frame a “407 Proxy Auth required” response header along with Proxy-Authenticate set to “NTLM” and then do a TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);



      Func_1() {

      ….



      TSHttpTxnHookAdd(txnp, TS_HTTP_SEND_RESPONSE_HDR_HOOK,

      TSContCreate(responseHook, TS_NULL_MUTEX));

      }

      TSHttpTxnReenable(txnp, TS_EVENT_HTTP_ERROR);

      ….

      return;

      }



      func_2() {





      TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);

      return;

      }



      What happens is that even though the client sends a “Connection: keep-alive”, ATS seems to be returning a “Connection: close” which results in the connection getting closed.





      > GET http://www.purple.com/ HTTP/1.1

      > Host: www.purple.com

      > Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=

      > User-Agent: curl/7.44.0

      > Accept: */*

      > Proxy-Connection: Keep-Alive

      >

      < HTTP/1.1 407 Proxy Authentication Required

      < Date: Sun, 03 Sep 2017 10:47:24 GMT

      < Connection: close

      < Via: http/1.1 POD128-CentOS7-01 (ApacheTrafficServer/6.2.1)

      < Server: ATS/6.2.1

      < Proxy-Authenticate: NTLM

      < Content-Length: 15

      < Content-Type: text/plain

      <

      0 15 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0

      * Closing connection 7

      Why is ATS closing the connection?And, how can I control this behavior?
      Show
      I have configured ATS as a web proxy in a NTLM authentication domain; and, have a plugin with a function for TS_HTTP_READ_REQUEST_HDR_HOOK say, func_1. In func_1 which is invoked during the request header, I create a hook for TS_HTTP_SEND_RESPONSE_HDR_HOOK (say, func_2) and then do a TSHttpTxnReenable(txnp, TS_EVENT_HTTP_ERROR); Subsequently, when func_2 is invoked during the SEND_RESPONSE_HEADER event, I frame a “407 Proxy Auth required” response header along with Proxy-Authenticate set to “NTLM” and then do a TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE); Func_1() { …. … TSHttpTxnHookAdd(txnp, TS_HTTP_SEND_RESPONSE_HDR_HOOK, TSContCreate(responseHook, TS_NULL_MUTEX)); } TSHttpTxnReenable(txnp, TS_EVENT_HTTP_ERROR); …. return; } func_2() { … TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE); return; } What happens is that even though the client sends a “Connection: keep-alive”, ATS seems to be returning a “Connection: close” which results in the connection getting closed. > GET http://www.purple.com/ HTTP/1.1 > Host: www.purple.com > Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA= > User-Agent: curl/7.44.0 > Accept: */* > Proxy-Connection: Keep-Alive > < HTTP/1.1 407 Proxy Authentication Required < Date: Sun, 03 Sep 2017 10:47:24 GMT < Connection: close < Via: http/1.1 POD128-CentOS7-01 (ApacheTrafficServer/6.2.1) < Server: ATS/6.2.1 < Proxy-Authenticate: NTLM < Content-Length: 15 < Content-Type: text/plain < 0 15 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 * Closing connection 7 Why is ATS closing the connection?And, how can I control this behavior?

    Description

      This is in line with (Traffic ServerTS-3866) Issue.
      Tried patch available in this bug but still facing same issue.

      My Setup looks like:
      Client --> ATS ( + plugin ) ---> Server
      (+ plugin ) means --> plugin code which commuincates with a Auth-Server where we are using NTLM.

      Here plugin communicates with Authentication server and in case of authentication we return 407 + NTLM challenge to browser. But the problem is, ATS is closing connection due to which we are not able use previous connection.

      Note:- In my problem, till now we did not hit Server. It's plugin who is serving 407 and connection close to Browser(curl).

      Attachments

        Activity

          People

            Unassigned Unassigned
            vijaysharma1991 Vijay Sharma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified