Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot configure ldap in Superset 4.1.0 rc2 #30553

Open
3 tasks done
ilsaloving opened this issue Oct 8, 2024 · 5 comments
Open
3 tasks done

Cannot configure ldap in Superset 4.1.0 rc2 #30553

ilsaloving opened this issue Oct 8, 2024 · 5 comments
Labels
authentication Related to authentication

Comments

@ilsaloving
Copy link

ilsaloving commented Oct 8, 2024

Bug description

Apparently as part of the database driver purge, ldap drivers have also been removed and have to be reinstalled by the user.

There are currently 2 options, neither of which are ideal:

  • Install using pip
    • While this works, it requires compiling from source. This requires numerous build environment dependencies and greatly complicates the setup
  • Install from system packages (Debian 12)
    • The python3-ldap package provided by debian is tied to python 3.11. Since Superset 4.1.0 uses python 3.10, it does not find the library.

It would be much better if Superset restored the necessary ldap libraries by default.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.10

Node version

Not applicable

Browser

Not applicable

Additional context

The following appears in the logs:

2024-10-08 16:25:15,031:ERROR:flask_appbuilder.security.manager:python-ldap library is not installed

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added the authentication Related to authentication label Oct 8, 2024
Copy link

dosubot bot commented Oct 8, 2024

A similar issue was discussed in a closed thread regarding the installation of the python-ldap package [1]. Here's a suggested solution:

  1. Access the Superset container:

    docker exec -it <container_name> /bin/bash
  2. Install necessary packages:

    apt-get update -y && apt-get install -y python3-dev libldap2-dev libsasl2-dev ldap-utils tox lcov valgrind
  3. Install python-ldap:

    pip install python-ldap
  4. Restart the container if needed:

    docker-compose -f docker-compose-non-dev.yml restart

This should help resolve the issue with LDAP configuration in Superset 4.1.0 rc2.

To continue talking to Dosu, mention @dosu.

@ilsaloving
Copy link
Author

Is there a reason superset isn't standardizing on python 3.11? It would save a great deal of frustration, given that most of the distro-supplied python packages are built for 3.11.

@ilsaloving
Copy link
Author

I'm going to have to give up on rc2. I keep running into one problem after another. I bit the bullet and built the ldap module. Now when Superset starts up, it seems to not know if it should be using postgres or SQLite. superset db upgrade generates numerous foreign key errors, the postgres database is only partially populated, and I get a 500 error when I try to access the UI.

I can understand wanting to slim down the build, but there has to be a better way than just stripping out all the drivers and forcing the burden onto users. This is a mess.

@sfirke
Copy link
Member

sfirke commented Oct 9, 2024

Thanks for testing it out. How are you deploying - with the PyPI package? I ran into some similar problems when I tried out 4.1.0rc2, see my comment here: #29999 (comment) I'm deploying from Docker and for the purposes of testing I just switched to 4.1.0rc2-dev which fixed things. But maybe we can/should do better to support folks who want a production-ready image without building their own.

In addition to python-ldap I think other missing packages include the Postgres and SQLite drivers, openpyxl (for Excel uploads), pillow (?) for screenshots of alerts & reports.

@ilsaloving
Copy link
Author

I was creating a docker container, using the superset provided docker container as the base and adding the required drivers.

And yes, it seems like all of that is missing. I think sqlite may be included by default because I didn't install that myself, but everything else is missing. Seems like too much has been stripped out.

I think a better option would be to provide a curated superset build container, where a user just have to provide a list of the desired drivers, and the build container will take care of making sure everything is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication Related to authentication
Projects
None yet
Development

No branches or pull requests

2 participants