How to achieve LDAP authentication for DASH Plotly app?

Viewed 4408

I have created a simple DASH plotly application. I need to do LDAP authentication for the users. The application should support multiple users at a time.

I checked on few references but nothing helped. I prefer not to use any 3rd party opensource products like keycloak, ngninx.

Some help on this would be really appreciated.

1 Answers

Get Basic Auth running. Then fork https://github.com/plotly/dash-auth and change the is_authorized function in the file dash_auth/basic_auth.py to your needs, i.e. make it only return true if the given username and password can login to your LDAP server, for which you probably have to use a LDAP library. After that build your altered dash-auth package and install it over the one that ships with Dash.

You can also serve your app via gunicorn and make it use TLS, so your user's credentials are protected.

Related