Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1662

NTLM auth failed because NTLMEngineImpl strip domain to base domain name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.5
    • 5.0 Alpha1
    • HttpClient (classic)
    • None
    • HttpClient 4.3, 4.5
      A http site with NTLM auth
      A domain which Netbios name is not match domain name(e.g. domain=mydomain.com; netbios name= testdomain)

    Description

      When generate type 3 message, we change the domain name to base domain name:

                  // Use only the base domain name!
                  final String unqualifiedDomain = convertDomain(domain);
      
          /** Strip dot suffix from a name */
          private static String stripDotSuffix(final String value) {
              if (value == null) {
                  return null;
              }
              final int index = value.indexOf(".");
              if (index != -1) {
                  return value.substring(0, index);
              }
              return value;
          }
      
          /** Convert domain to standard form */
          private static String convertDomain(final String domain) {
              return stripDotSuffix(domain);
          }
      

      I got http 401 in my environment with correct credential and found the root cause is those code got wrong domain name so the domain controller return a NTLM sub status code 0xC0000064, which means " The username you typed does not exist!"
      The Netbios name of a domain is the "Pre Windows 2000 name" of the domain.

      Is there any issue to use full domain name?

      Attachments

        1. HTTPCLIENT-1662.patch
          11 kB
          Karl Wright

        Activity

          People

            kwright@metacarta.com Karl Wright
            songco Colin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: