[GeoNode-users] LDAP configuration and troubleshooting in SPCGeonode

Alessio Fabiani alessio.fabiani at geo-solutions.it
Wed Oct 30 02:01:57 PDT 2019


Dear Chiara,
typically the issue is mostly related to misconfiguration. You'll need to
be sure the following parameters have been correctly configured and the
filters actually return the entities you are looking for

LDAP_SERVER_URL=ldap://<the_ldap_server>
LDAP_BIND_DN=uid=ldapinfo,cn=users,dc=ad,dc=example,dc=org
LDAP_BIND_PASSWORD=<something_secret>
LDAP_USER_SEARCH_DN=dc=ad,dc=example,dc=org
LDAP_USER_SEARCH_FILTERSTR=(&(uid=%(user)s)(objectClass=person))
LDAP_GROUP_SEARCH_DN=cn=groups,dc=ad,dc=example,dc=org
LDAP_GROUP_SEARCH_FILTERSTR=(|(cn=abt1)(cn=abt2)(cn=abt3)(cn=abt4)(cn=abt5)(cn=abt6))
LDAP_GROUP_PROFILE_MEMBER_ATTR=uniqueMember

Unfortunately, there's no standard configuration here. This really depends
on your LDAP structure.

It is worth trying the filters first from the Django shell, as an instance:

import ldap
conn = ldap.initialize("ldap:// <the_ldap_server> ")
conn.simple_bind_s("<LDAP_BIND_USER_FULL_DN>", "<LDAP_BIND_PASSWORD>")

# Search users
conn.search_s("ou=something,dc=ad,dc=example,dc=org", ldap.SCOPE_SUBTREE,
"(&(uid=*)(objectClass=person))")

# Search groups
conn.search_s("cn=groups,dc=ad, dc=example,dc=org", ldap.SCOPE_SUBTREE,
"(|(cn=group1_name)(cn=group2_name)(cn= group2_name
)(cn=group3_name)(cn=group4_name)(cn=group5_name))")

Once you are sure your filters return what you need (users and groups) you
can put those into the settings.

If everything works as expected, at first login, if the user does not
exist, GeoNode will try to authenticate against your LDAP server. If
successful, it will get user info from LDAP and will create the internal
user accordingly.

In order to keep Groups and Users synchronized with LDAP, you will need to
create some cron jobs running every X minutes, checking for changes on the
LDAP tree.

Regards,
Alessio.



Il giorno mar 29 ott 2019 alle ore 14:49 Chiara Sammarco <
chiara.sammarco at geodatalab.it> ha scritto:

> Hi Everyone,
> I'm having some troubles in configuring AUTH LDAP in geonode 2.10 (Ubuntu
> 18.04). Actually, I'm using SPCGeoNode, so I'm dealing with docker
> containers.
> I've read and used this guide to setup my configuration:
> http://docs.geonode.org/en/2.10.x/advanced/contrib/
> but it's not working yet. It does not give any error, but it says that the
> credentials are not valid.
>
> About this guide, there's a paragraph in the end called "Keep Users and
> Group Synchronized" -> I couldn't what is written there. Can someone be
> more specific? how to synchronize users and groups in the dockerized
> version of geonode? I tried to work that code inside the docker container,
> but couldn't understand it totally how it should be.
>
> Anyway, as far as I've understood, if the configuration is correct, once
> an LDAP user tries to log in for the first time, a new user in geonode
> should get created ...  For being more complete: I've also created the
> groups in geonode and giving all the rights in the list in the Admin
> Panel... but nothing...
>
> I've checked the connection to my LDAP server using ldap-search and it
> works ... so or Iìm missing something else or something is wrong with the
> configuration?
>
> Can someone explain how to set up LDAP configuration parameters, given  a
> sample LDAP user schema?
>
> Another more important question is: how can I do troubleshooting of LDAP
> configuration with the SPCGeonode? I tried to make "docker logs
> <container>" but I haven't found anything for guessing where is the problem.
>
> Thanks in advance for your help.
> Any suggestion is more than welcome :)
>
> Chiara
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>


-- 

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==
Ing. Alessio Fabiani

@alfa7691
Founder/Technical Lead


GeoSolutions S.A.S.
Via di Montramito 3/A - 55054  Massarosa (LU) - Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39 331 6233686


http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.


This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20191030/60461d2c/attachment.html>


More information about the geonode-users mailing list