Skip to content

Add LDAP authentication and user creation

Santiago Saavedra requested to merge ssaavedra/ldap-setup into master

Implements LDAP authentication and first sign up process.

First sign-up:

  • If the user is a superuser in the configured Django User Model, as created, e.g., with ./manage.py createsuperuser, we will create the underlying LDAP tree structure and the user itself, and authenticate against the just-created structure.

  • Otherwise an exception indicating that the superuser must login is issued. When we have the onboarding experience, this flow will change.

Later sign ups:

  • Users are always authenticated against LDAP. We have no means yet for changing passwords or adding additional users. We cannot trust the Django Admin yet, but we will probably be able to sync both models via signals in the future.

Only the local environment has been tested!

The local environment (.envs/.local/.django) includes environment varibles needed for the LDAP setup, and the requirements include the django-auth-ldap package that we are leveraging.

The Docker Compose files also include now the OpenLDAP package (using osixia image on Docker Hub).

URLs are now in the discussed format, we still need to configure the API docs.

Edited by Santiago Saavedra

Merge request reports