Friday, December 1, 2017

Re: authentication by ldap server

You should use django-auth-ldap. It will give you the ability to bind ldap attributes with the attributes from your user model using a dict inside settings. It'll also get the users' groups and create those groups inside Django. So try plugging that in and come back if you get stuck. All you really need to define is the server IP or URL, bind username and password if required, a common DN and those aforementioned attributes and groups. Then once you specify the ldap middleware you can use Django's authentication mechanism. 

Cheers,

M

On Fri, 1 Dec 2017 at 11:20 pm, pacopyc pacopyc <pacopyc@gmail.com> wrote:

Hi, I am a beginner django programmer.


I would like to authenticate users of my web application to an ldap server (which has about 1000 users defined).


Not all users of the ldap server must be able to access the web application (only 50 ldap users must have access to the web application).


First problem: I can not authenticate users on ldap server. I referred to https://django-auth-ldap.readthedocs.io/en/latest/ and some articles on the Internet. Do you have any simple examples? I just want to check username and password


Second issue: Once the user has been authenticated on the ldap server, I must verify that he can access the web application. How can I do? Do I have to define it on Django too? How?


Third issue: Web application users must have different permissions in using the application. Permissions are defined on Django. How can I link 50 ldap users to these permissions?


Thanks

pacopyc

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ceb285c5-1d7b-4412-ad77-7425ae499dfa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHqTbjkWkKzf5Bm-91ptezKo3VUzmkKSX6Bpnm2jQguqjE2WaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment