wger-project / wger

Self hosted FLOSS fitness/workout, nutrition and weight tracker
https://wger.de
GNU Affero General Public License v3.0
3.07k stars 571 forks source link

[Enhancement] Add LDAP support #812

Open andretheolauret opened 2 years ago

andretheolauret commented 2 years ago

Use case

You can’t access wger with users of a LDAP server like in a portal. This cause you can’t add wger in sso ldap

Proposal

I want to add wger to the yunohost project app catalog, for this I need wger to be compatible with ldap authentication

rolandgeider commented 2 years ago

There is a django auth plugin for LDAP so this should be doable. We should make the possible authentication methods configurable, if someone wants to tackle this

https://django-auth-ldap.readthedocs.io/en/latest/

andretheolauret commented 2 years ago

I am not very fluent with development, can you do this please ?

rolandgeider commented 2 years ago

At the moment there are other features that have a higher priority, but maybe in the future

andretheolauret commented 2 years ago

Okay i will take a look to django so

rolandgeider commented 2 years ago

If you get stuck or need any help setting up a development instance or something, just write

andretheolauret commented 2 years ago

Thank you

AlphaJack commented 2 years ago

Any update on this?

Agraphie commented 2 years ago

I'd also be interested in this feature. Maybe one could directly use https://django-allauth.readthedocs.io/en/latest/index.html? E.g. https://github.com/TandoorRecipes/recipes is another Django app which uses that library. Maybe some inspiration can be drawn from there. Also see https://docs.tandoor.dev/features/authentication/

CEbbinghaus commented 7 months ago

This is an absolute must have for me. Although I would be plenty happy with doing it via Forward Auth. Ideally it would support both ldap user management and forward auth. I would probably want those features before I deploy a a wger instance so I might just add the features myself. Anything the maintainers want to add in regards to how they want it developed?

rolandgeider commented 7 months ago

Hi @CEbbinghaus ! The application should obviouly keep working without LDAP, but besides that (and some documentation on how to set-up the process), not really

CEbbinghaus commented 7 months ago

Awesome, Not the most experienced at python but I doubt this requires a deep expertiese. Django is popular enough for me to find all kinds of guides online. Will keep this Issue updated 👍🏻

snyssen commented 5 months ago

I'd also be interested in this feature. Maybe one could directly use https://django-allauth.readthedocs.io/en/latest/index.html? E.g. https://github.com/TandoorRecipes/recipes is another Django app which uses that library. Maybe some inspiration can be drawn from there. Also see https://docs.tandoor.dev/features/authentication/

Paperless-ngx is another good example of a Django project that uses Django-allauth (see its doc). This library would be a great addition to this project because it not only enables LDAP integration, but also social logins and OIDC, which is a great way to enable SSO on homelabs (e.g. with Authelia)

gregistech commented 3 months ago

I'd also be interested in this feature. Maybe one could directly use https://django-allauth.readthedocs.io/en/latest/index.html? E.g. https://github.com/TandoorRecipes/recipes is another Django app which uses that library. Maybe some inspiration can be drawn from there. Also see https://docs.tandoor.dev/features/authentication/

Paperless-ngx is another good example of a Django project that uses Django-allauth (see its doc). This library would be a great addition to this project because it not only enables LDAP integration, but also social logins and OIDC, which is a great way to enable SSO on homelabs (e.g. with Authelia)

I'd love OIDC support! I use Authentik for my homelab and this would be a great addition.

florent4014 commented 2 months ago

LDAP auth would be a great feature on this app !

seyfeb commented 1 month ago

I'm using Keycloak for SSO. It would be great if existing wger user can be migrated to the users authenticated via OIDC.