Skip to content

Configuring the plugin on a new install results in failure #2

Description

@AlexisLessard

I've tried using the plugin in a virtualenv on my RHEL 7 server, but an exception appears, even on a fresh install. We are using ActiveDirectory as our authentication backend.

Packages:
In my virtualenv, I've got theses installed:

  • "apache-airflow[celery]==1.10.3"
  • "apache-airflow[crypto]==1.10.3"
  • "apache-airflow[kubernetes]==1.10.3"
  • "apache-airflow[ldap]==1.10.3"
  • "apache-airflow[postgres]==1.10.3"
  • "apache-airflow[s3]==1.10.3"
  • "ldap3"
  • "airflow-alt-ldap"

Configuration
Here's the relevant configuration information:

[webserver]
authenticate = true
auth_backend = airflow-alt-ldap.auth.backend.ldap_auth

[ldap]
uri = ldaps://<ldap server>:636
user_filter = objectClass=*
user_name_attr = sAMAccountName
group_member_attr = memberOf
superuser_filter =
data_profiler_filter =
bind_user = CN=<bind user path>
bind_password = SECRET
basedn = <base dn>
cacert = /etc/ca/ldap_ca.crt <This file is absent>
search_scope = SUBTREE

For basedn, bind_user and bind_password, I'm using the same configuration we are using on other services using ldap as their authentication engine.

Result
Here's what I'm getting by just accessing the home page of the server after the install:

Traceback (most recent call last):
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/flask/app.py", line 1834, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/flask/app.py", line 1737, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise
    raise value
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/flask_admin/base.py", line 69, in inner
    return self._run_view(f, *args, **kwargs)
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/flask_admin/base.py", line 368, in _run_view
    return fn(self, *args, **kwargs)
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/airflow/www/views.py", line 731, in login
    return airflow.login.login(self, request)
  File "/home/airflow/virtualenv/lib/python3.6/site-packages/airflow-alt-ldap/auth/backend/ldap_auth.py", line 241, in login
    if current_user.is_authenticated():
TypeError: 'bool' object is not callable

Version information

  • Python 3.6.8
  • Virtualenv 16.6.1
  • RHEL 7.6

I'm not sure we'll be using this backend, but I tough it was important to raise a flag about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions