Questions tagged [django-auth-ldap]

django-auth-ldap is a pluggable Django app that provides an authentication backend that authenticates against an LDAP service

django-auth-ldap is a pluggable Django app that provides an authentication backend that authenticates against an LDAP service.

See also:

103 questions
4
votes
2 answers

LDAP in Django default admin

UPDATED How it is possible to Django default admin authenticate on a LDAP server instead of the default database? I have found the package Django Auth LDAP but nothing about configuring it to be used by admin login. I've tried putting the lines…
Karlisson
  • 520
  • 4
  • 12
4
votes
2 answers

How to apply hashing SHA256 on Django LDAP login?

I'm using LDAP authentication in Django, as shown below and also using password hashers. from django_auth_ldap.config import PosixGroupType, LDAPSearch import ldap PASSWORD_HASHERS = [ 'django.contrib.auth.hashers.PBKDF2PasswordHasher', …
shaik moeed
  • 5,300
  • 1
  • 18
  • 54
4
votes
2 answers

Django restrict/allow access by groups from ldap

I have Django project that has two apps App1 and App2) each app has only 1 view. . My project connected to openldap using django-auth-ldap. I have two groups(Group1, Group2). I Added decorators before my views in app1 and app2 (@login_required) and…
Eyla
  • 5,751
  • 20
  • 71
  • 116
4
votes
1 answer

Django LDAP authentication fails: SERVER_DOWN

I'm using the django-auth-ldap for the authentication. I'm having the following error: Caught LDAPError while authenticating xxx: SERVER_DOWN({'info': '(unknown error code)', 'desc': "Can't contact LDAP server"},) Using: AUTH_LDAP_CONNECTION_OPTIONS…
3
votes
1 answer

django-auth-ldap members groups not woking

i managed to get ldap authentification working, but the users groups aren't. when a user is autheticated the username, firstname, email ..etc are copied to the session, but the boolean values (gotten from the groups the user belongs to) aren't. this…
Mohamed Benkedadra
  • 1,964
  • 3
  • 21
  • 48
3
votes
1 answer

django-auth-ldap - find if user belongs to a ldap group

I am trying to configure ldap authentication for a django project. Where all users should be able to access the web services ( I achieved this ). I would like to make few people (part of ldap group) as admins. I need to verify if logged in user…
3
votes
0 answers

Django LDAP authentication: Add custom field and set permissions

I got the LDAP authentication working but now I need two more things. I need to add the new User to the permission group default. And I need to store the department field additionally to the User. For the first Problem I didn't find any solutions.…
baam
  • 1,122
  • 2
  • 14
  • 25
3
votes
1 answer

Populate User From Ldap Without Login in Django

I'm using django-auth-ldap for auth backend in a Django project. But I have a problem, I can't give any permissions to a user before user once logged in. Because the user object created when user tring login to system. I want to write a task to…
yozel
  • 451
  • 1
  • 5
  • 15
3
votes
1 answer

Django User Authentication against LDAP - Multiple Groups

As per the documentation in django_auth_ldap at http://pythonhosted.org/django-auth-ldap/reference.html#std:setting-AUTH_LDAP_REQUIRE_GROUP AUTH_LDAP_REQUIRE_GROUP can be used to configure the distinguished name of a group; authentication will fail…
Guddu
  • 1,588
  • 4
  • 25
  • 53
3
votes
1 answer

django_auth_ldap custom AUTH_USER_MODEL IntegrityError

I'm trying to make django_auth_ldap work with custom User model. After some struggling i created new application with one model: class MyUser(django.contrib.auth.models.AbstractUser): uidNumber = models.IntegerField(unique=True) and in…
MoonWolf
  • 91
  • 1
  • 2
  • 7
3
votes
2 answers

How can I configure django-auth-ldap to use more than one LDAP server?

I've been using django-auth-ldap for a while to auth against a single server (AUTH_LDAP_SERVER_URI in settings.py). There have been some changes in my organization recently, and I now need to be able to check against two different LDAP servers…
djangodude
  • 5,362
  • 3
  • 27
  • 39
2
votes
1 answer

What exactly is _auth_user_id (in connection with django-auth-ldap)?

In Django you can read _auth_user_id from request.session dictionary after you authenticate and log in user. As I understand in "normal" conditions (standard authentication backend) it should be user id (pk). But what is _auth_user_id when I'm using…
pbm
  • 358
  • 2
  • 7
  • 22
2
votes
1 answer

how to install django-auth-ldap

so basicly i'm trying to install django-auth-ldap to my system, but it always crashes with errors i use python3.10 on Ubuntu 20.04 with Django 4.0.4 (.venv) user@vmlist:~/test/vmlist_frontend$ pip3.10 install django-auth-ldap Collecting…
2
votes
2 answers

Django LDAP with OpenWisp Django-IPAM

I'm trying to setup OpenWisp Django-IPAM with WebUI authentication via LDAP. We have an OpenLDAP server within our network and I am looking to use a simple LDAP lookup to check for a valid user object for login. I see that the API's generics.py…
Toby
  • 245
  • 1
  • 10
2
votes
2 answers

DRF Model permissions fail for LDAP auth'd users

I'm working on an application with a DRF base, requiring LDAP authentication. I have run across a problem, by which I am seeing different behaviours for users logging in directly via the DRF API and those accessing it from an external application -…