B
B
barbaris762020-05-27 16:48:46
Python
barbaris76, 2020-05-27 16:48:46

How to make pass-through user authentication from a Windows domain on a site with Flask + Nginx?

Good afternoon!
We made an application in Flask that runs on a Linux server in conjunction with Gunicorn + Nginx. The server is on a network with a corporate Windows domain, so users are all authorized in the domain and have their own AD accounts.
How can I attach the definition of the domain name of the user who visited the site to the application?
I understand that I need to use Flask-SimpleLDAP, flask-login, python-ldap - I don't quite understand how to do it specifically. Maybe someone has a working example?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2020-05-27
@leahch

Look at keycloak. This is an SSO application that can combine authorization and different sources. It binds to both ldap and windows and kerberos ... For the flask, you need to make authorization via jwt and openid via keyckoak.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question