dpgaspar / Flask-AppBuilder

Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
BSD 3-Clause "New" or "Revised" License
4.65k stars 1.36k forks source link

LDAP connectivity problem #2037

Closed AhmedAbuElyazeed closed 1 year ago

AhmedAbuElyazeed commented 1 year ago

Greetings,

I'm trying to integrate airflow with ldap server. I made sure that airflow can communicate with ldap server and requested the configurations from ldap team, but whenever I try to login, the web portal shows "Invalid login, please try again" message.

How can I check the logs for flask_appbuilder? to troubleshoot this, or what can I try?

_this is my webserverconfig.py

from future import annotations import os from airflow.www.fab_security.manager import AUTH_LDAP basedir = os.path.abspath(os.path.dirname(file))

Flask-WTF flag for CSRF WTF_CSRF_ENABLED = True WTF_CSRF_TIME_LIMIT = None

AUTH_TYPE = AUTH_LDAP

AUTH_ROLE_ADMIN = 'Admin'

AUTH_USER_REGISTRATION = True

AUTH_USER_REGISTRATION_ROLE = "Viewer"

AUTH_LDAP_SERVER = 'ldap://myLDAPServer:389' AUTH_LDAP_SEARCH = 'OU=users,DC=x,DC=y'

AUTH_LDAP_BIND_USER = 'CN=bind_user,OU=services,DC=x,DC=y' AUTH_LDAP_BIND_PASSWORD = '*****' AUTH_LDAP_UID_FIELD = 'CN' AUTH_LDAP_USERNAME_FORMAT = 'CN=%s,OU=services,DC=x,DC=y'

LDAPS AUTH_LDAP_USE_TLS = False AUTH_LDAP_ALLOW_SELF_SIGNED = False AUTH_LDAP_TLS_CACERTFILE = '/etc/ssl/certs/ldap.crt'

dpgaspar commented 1 year ago

Hi,

Not possible for me to help you without server logs, try using ldapsearch from your Airflow server to troubleshoot