From 49d7621e583f7caa1812c22a5e396f5048e66db1 Mon Sep 17 00:00:00 2001 From: MrCirca Date: Thu, 27 Sep 2018 15:20:34 +0300 Subject: [PATCH 1/2] Add NTLM authentication --- redash/authentication/ldap_auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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).") From 2d53b867399a53ed1dc5b72321d00c827b47d5e8 Mon Sep 17 00:00:00 2001 From: MrCirca Date: Thu, 27 Sep 2018 15:37:50 +0300 Subject: [PATCH 2/2] Add comment to authentication method envar --- redash/settings/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)