Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6188

Authorization loop using "CurrentWindowsCredentials"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 3.0.3
    • 3.0.4
    • Core
    • None
    • All Windows versions

    • Unknown

    Description

      It is actually not possible to use org.apache.http.impl.auth.win.CurrentWindowsCredentials to build a CXF client for a WCF service that is using NTLM authentication.

      When accessing a web service, that is defined in C# using:

      binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;

      it is possible to setup a CXF client with explicitly defined credential by using

      (1) org.apache.http.auth.NTCredentials

      but not with

      (2) org.apache.http.impl.auth.win.CurrentWindowsCredentials (Maven GAV is org.apache.httpcomponents/winauth-jni /4.3.6)

      When I use (2), I get a "Authorization loop detected on Conduit" exception.

      See more in http://cxf.547215.n5.nabble.com/Authorization-loop-using-quot-CurrentWindowsCredentials-quot-td5752751.html

      The patch I made and described in the mailing list question is a quick-and-dirty solution for me to see, whether it would work from a technical perspective. The hard-coded

      .setDefaultAuthSchemeRegistry(...)
      .setDefaultCredentialsProvider(...)

      must be sth. thta can be passed to AsyncHTTPConduit.

      If you need the WCF service or the Java code , it can be provided.

      Attachments

        1. ServiceClient.java
          3 kB
          Hans Schuell
        2. MyAsyncHttpConduitFactory.java
          2 kB
          Hans Schuell
        3. AsyncHTTPConduitFactory.java
          15 kB
          Hans Schuell

        Activity

          People

            dkulp Daniel Kulp
            gira1 Hans Schuell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: