Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-1542

Hue keeps trying to use TLS even when the "ldap_cert" is not set and using ldaps URI

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: core.api
    • Labels:
      None

      Description

      For some reason, if we use an ldaps URI like "ldaps://ldap.test.com:636" and leave "ldap_cert" empty, I would expect that using the certs in /etc/openldap/cacerts, Hue would be able to connect to ldap. However, it fails with an error message akin to:

      Unable to connect: TLS error -8172

      I don't have the exact error message, but I will work on it. It appears to be using TLS even when "ldap_cert" is not set and this is causing the failure. I can see in the Hue code that we set TLS Require Cert = Never:

      1. Certificate-related config settings
        if desktop.conf.LDAP.LDAP_CERT.get():
        ldap_settings.AUTH_LDAP_START_TLS = True
        ldap_settings.AUTH_LDAP_GLOBAL_OPTIONS[ldap.OPT_X_TLS_CACERTFILE] = desktop.conf.LDAP.LDAP_CERT.get()
        else:
        ldap_settings.AUTH_LDAP_START_TLS = False
        ldap_settings.AUTH_LDAP_GLOBAL_OPTIONS[ldap.OPT_X_TLS_REQUIRE_CERT] = ldap.OPT_X_TLS_NEVER

      However, the only way to fix the above issue was to edit the /etc/openldap/ldap.conf and add:

      TLS_REQCERT = never

      Then restart Hue. Not sure why the above TLS_NEVER setting isn't working, but it does not seem to be stopping Hue from using TLS. This was on Redhat 6.2 and Hue 2.3.

        Attachments

          Activity

            People

            • Assignee:
              abe Abraham Elmahrek
              Reporter:
              cconner Chris Conner
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: