TourEiffel
TourEiffel

Reputation: 4434

How to Migrate from LDAP to LDAPS in a Django Application?

I'm currently using Django with django-auth-ldap for authentication, and my organization is transitioning from LDAP to LDAPS for security reasons. I need to update my Django settings to use LDAPS instead of LDAP, but I'm unsure of the exact steps required.

Here’s my current configuration:

AUTH_LDAP_SERVER_URI = "ldap://abc.example.com"
AUTH_LDAP_BIND_DN = "cn=admin,dc=example,dc=com"
AUTH_LDAP_BIND_PASSWORD = "password"
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com",
                                   ldap.SCOPE_SUBTREE, "(uid=%(user)s)")

I understand that for LDAPS, I need to change AUTH_LDAP_SERVER_URI to ldaps://abc.example.com:636, but I have a few questions:

What other changes are required in Django settings? Do I need to configure SSL certificates for django-auth-ldap to work with LDAPS? If so, how?

Upvotes: 0

Views: 30

Answers (0)

Related Questions