diff --git a/redash/authentication/ldap_auth.py b/redash/authentication/ldap_auth.py index 55553a99fa..e3f1aa9b27 100644 --- a/redash/authentication/ldap_auth.py +++ b/redash/authentication/ldap_auth.py @@ -7,7 +7,7 @@ from flask_login import current_user, login_required, login_user, logout_user try: - from ldap3 import Server, Connection, SIMPLE, ANONYMOUS + from ldap3 import Server, Connection, SIMPLE, ANONYMOUS, NTLM except ImportError: if settings.LDAP_LOGIN_ENABLED: logger.error("The ldap3 library was not found. This is required to use LDAP authentication (see requirements.txt).") diff --git a/redash/settings/__init__.py b/redash/settings/__init__.py index b20940c8f3..9c2d58b68c 100644 --- a/redash/settings/__init__.py +++ b/redash/settings/__init__.py @@ -83,7 +83,7 @@ def all_settings(): LDAP_LOGIN_ENABLED = parse_boolean(os.environ.get('REDASH_LDAP_LOGIN_ENABLED', 'false')) # Bind LDAP using SSL. Default is False LDAP_SSL = parse_boolean(os.environ.get('REDASH_LDAP_USE_SSL', 'false')) -# Choose authentication method(SIMPLE or ANONYMOUS). Default is SIMPLE +# Choose authentication method(SIMPLE, ANONYMOUS or NTLM). Default is SIMPLE LDAP_AUTH_METHOD = os.environ.get('REDASH_LDAP_AUTH_METHOD', 'SIMPLE') # The LDAP directory address (ex. ldap://10.0.10.1:389) LDAP_HOST_URL = os.environ.get('REDASH_LDAP_URL', None)