Code Monkey home page Code Monkey logo

Comments (4)

boring-cyborg avatar boring-cyborg commented on June 16, 2024

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

from airflow.

romsharon98 avatar romsharon98 commented on June 16, 2024

can you add your webserver_config.py?
did you try cleaning cookies?

from airflow.

Taragolis avatar Taragolis commented on June 16, 2024

This feature provided by the FAB (Flask App Builder), so you should check the documentation there https://flask-appbuilder.readthedocs.io/en/latest/security.html#authentication-ldap

from airflow.

zhouxm2022 avatar zhouxm2022 commented on June 16, 2024

@Taragolis ,Yes. I read it.

@romsharon98. I uses DB to store session at this moment, plan to switch to cookies. it appears there is a bug. when I use 4 webserver worker by default, I got duplicated session key errors. then I changed to 1 worker. it works fine. I also need disable CSRF token because there are errors in the log.

Thanks, Xiaoming

"""Default configuration for the Airflow webserver."""
from future import annotations
import os

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

WTF_CSRF_ENABLED = False
WTF_CSRF_TIME_LIMIT = None
AUTH_TYPE = AUTH_LDAP
AUTH_USER_REGISTRATION = True

AUTH_USER_REGISTRATION_ROLE = "Admin"

AUTH_ROLE_ADMIN = 'Admin'

AUTH_LDAP_SERVER = "ldap://example.com"
AUTH_LDAP_USE_TLS = False
AUTH_LDAP_SEARCH = "OU=Canada,OU=...."
AUTH_LDAP_UID_FIELD = "cn"
AUTH_LDAP_BIND_USER = "CN=s700xxx,..."
AUTH_LDAP_BIND_PASSWORD = "xyz123"
AUTH_ROLES_MAPPING = {
"CN=xxx,OU=Users_Groups,DC=example,DC=com": ["Admin"],
}
AUTH_LDAP_GROUP_FIELD = "memberOf"
AUTH_ROLES_SYNC_AT_LOGIN = True
PERMANENT_SESSION_LIFETIME = 1800

from airflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.