superset icon indicating copy to clipboard operation
superset copied to clipboard

Having difficulty configuring LDAP

Open mogthesprog opened this issue 10 years ago • 8 comments

Hi,

I've recently installed caravel, love the interface. And on top of druid it's sublime.

I'm trying to sort out LDAP authentication for Caravel and I get the following error when i change the AUTH_TYPE declaration in my config.

NameError: name 'AUTH_LDAP' is not defined

any ideas? I'm guessing I'm doing something wrong, had a google around and can't find any documentation on it either.

Any help would be great! :)

Cheers

mogthesprog avatar Apr 12 '16 21:04 mogthesprog

It lives in the flask appbuilder package, you need to import it from there

andrewhn avatar Apr 13 '16 07:04 andrewhn

Ah nice one, that's great. Is there any documentation for configuring caravel other the source?

We can close this now. Thanks for your help.

mogthesprog avatar Apr 13 '16 07:04 mogthesprog

Hi, having digged in the flask appl builder configs, i'm still having trouble getting this working. Here is my current configuration, for AD:

DEBUG = True

AUTH_TYPE = AUTH_LDAP

#AUTH_USER_REGISTRATION = True
AUTH_LDAP_SERVER = "ldap://us-lou-svv-1101.domain.co.uk"
#AUTH_LDAP_BIND_USER = "[email protected]"
AUTH_LDAP_SEARCH = "dc=domain,dc=co,dc=uk"
AUTH_LDAP_BIND_USER = "CN= LDAP Search,OU=Tasks,OU=Administrative,OU=Users,OU=UK,DC=domain,DC=co,DC=uk"
#UTH_LDAP_BIND_USER = "cn=gblsci_ldapsrch,dc=domain,dc=co,dc=uk"
AUTH_LDAP_BIND_PASSWORD = "Password"
AUTH_LDAP_UID = "sAMAccountName"

Any ideas?

mogthesprog avatar Apr 24 '16 15:04 mogthesprog

Can you try creating an account manually and logging in? Make sure you give appropriate permissions e.g. Gamma.

I am unable to auto-create accounts using LDAP login, although authentication works correctly.

andrewhn avatar Apr 25 '16 03:04 andrewhn

Looks like the same of #443, or a flask-appbuilder issue anyway thus closing.

xrmx avatar Aug 08 '16 16:08 xrmx

Since this is the first entry that comes up for Superset & LDAP, I'd like to point out for others that the proper setting for account name is AUTH_LDAP_UID_FIELD and not AUTH_LDAP_UID as shown above.

jlkokko avatar Sep 19 '17 13:09 jlkokko

hello ,can anyone help me ? this is a part of my superset_config.py about ldap

AUTH_TYPE = 2 AUTH_LDAP_SERVER = "ldap://xxx.xxx.xxx.xxx:389" AUTH_LDAP_USE_TLS = False AUTH_LDAP_BIND_USER = "bind-user-to-ldap" AUTH_LDAP_BIND_PASSWORD = "password" AUTH_LDAP_APPEND_DOMAIN ="hhh.com" AUTH_LDAP_UID_FIELD = "userPrincipalName" AUTH_LDAP_SEARCH ="OU=ee,OU=dd,DC=cc,DC=bb,DC=aaa"

but it can't login in superset sucessfully!
I take the way of username and password to make ldap access ... help me ,thank you ~

yaobukeji123 avatar Mar 14 '18 09:03 yaobukeji123

I have solved this question when l use sAMAccountName instead of userPrincipalName. problem appears beacuse of AUTH_LDAP_APPEND_DOMAIN,it will repeatly append to url twice when there is twice binds.thanks

yaobukeji123 avatar Mar 20 '18 02:03 yaobukeji123