Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-133984

Make QHttpHeaders::WellKnownHeader::WWWAuthenticate headers available in QNetworkAccessManager::authenticationRequired() signal

    XMLWordPrintable

Details

    Description

      Background
      A customer wants to implement IWA authentication. Their server supports both Kerberos and NTLM.

      When connecting, the server replies twice, corresponding to QNetworkAccessManager::authenticationRequired() being emitted twice.

      1. The first reply contains both of these headers (as observed via a network traffic sniffer):
        • WWW-Authenticate: Negotiate
        • WWW-Authenticate: NTLM
      2. And then, if we don't provide a username to QAuthenticator the first time, another reply comes with a smaller set of www-authenticate header values:
        • WWW-Authenticate: NTLM

       

      Use-case
      The customer wants to use NTLM, while opting-out of NTLM's auto-login mechanism (seee QTBUG-133780). In other words, they want to ignore the first authenticationRequired() signal and provide the username + password at the second authenticationRequired() signal. instead (the second reply). To do this, they need to be able to check the QNetworkReply headers for the presence or absence of WWW-Authenticate: Negotiate

       

      Current problem
      Inside the QNetworkAccessManager::authenticationRequired() signal handler, the QNetworkReply does not contain any QHttpHeaders::WellKnownHeader::WWWAuthenticate headers (or any other headers, for that matter). Thus, the use-case cannot be easily achieved.

      The headers eventually arrive, and we are notified via the QNetworkReply::metaDataChanged() signal. However, this occurs some time after QNetworkAccessManager::authenticationRequired() which is too late.

       

      Suggestion/Request
      Would it be possible to ensure that the WWW-Authenticate header(s) are made available before QNetworkAccessManager::authenticationRequired() is emitted?

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              manordheim Mårten Nordheim
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes