[GeoNode-users] LDAP on windows

Franklin, Chris CFranklin at AngloGoldAshanti.com
Wed Sep 14 23:28:35 PDT 2016


Hi all,

We have the config working properly we think but what do we expect to see?


1.     Does it pass the username and password to be autho by LDAP?

2.     Does it require building a replica account in the instance?

3.     Does it need to download the users from LDAP and park in the local db?

Regards

From: alessio.fabiani at gmail.com [mailto:alessio.fabiani at gmail.com] On Behalf Of Alessio Fabiani
Sent: Thursday, 8 September 2016 3:47 PM
To: Franklin, Chris
Cc: Jeffrey Johnson; geonode-users at lists.osgeo.org
Subject: Re: [GeoNode-users] LDAP on windows

Do you see some specific line on the geonode-2.4.x/apache/logs/error.log or other log files?

Best Regards,
Alessio Fabiani.

==
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

-------------------------------------------------------


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

---------------------------------------------------------------------

On Thu, Sep 8, 2016 at 4:39 AM, Franklin, Chris <CFranklin at anglogoldashanti.com<mailto:CFranklin at anglogoldashanti.com>> wrote:
Ok, im getting closer:

I set the virtualenv first – ran

[cid:image001.png at 01D20F33.A6AAB600]

Then ran :

[cid:image002.png at 01D20F33.A6AAB600]

Added:

#LDAP
import ldap
from django_auth_ldap.config import LDAPSearch

AUTHENTICATION_BACKENDS = (
    'django_auth_ldap.backend.LDAPBackend',
    'django.contrib.auth.backends.ModelBackend',
    'guardian.backends.ObjectPermissionBackend',
)
AUTH_LDAP_SERVER_URI = ‘ldap://ag.ad.local'
LDAP_SEARCH_DN = 'OU=AUSTRALIA,OU=AUSTRALASIA,DC=ag,DC=ad,DC=local'
AUTH_LDAP_USER = '(uid=%(user)s)'
AUTH_LDAP_BIND_DN = '{ADD_BIND_DN_IF_REQUIRED}'
AUTH_LDAP_BIND_PASSWORD = '{ADD_BIND_PASSWORD_IF_REQUIRED}'
AUTH_LDAP_USER_ATTR_MAP = {
    'first_name': 'givenName', 'last_name': 'sn', 'email': 'mail',
}
AUTH_LDAP_USER_SEARCH = LDAPSearch(LDAP_SEARCH_DN,
                                   ldap.SCOPE_SUBTREE, AUTH_LDAP_USER)

to my local_settings.py file like so:

[cid:image003.png at 01D20F33.A6AAB600]

Restarted Apache but Geonode had a 500 error – what did I do wrong?

Thanks

From: alessio.fabiani at gmail.com<mailto:alessio.fabiani at gmail.com> [mailto:alessio.fabiani at gmail.com<mailto:alessio.fabiani at gmail.com>] On Behalf Of Alessio Fabiani
Sent: Wednesday, 7 September 2016 4:18 PM
To: Jeffrey Johnson
Cc: Franklin, Chris; geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
Subject: Re: [GeoNode-users] LDAP on windows

Jeffrey is right, you need to use pip, but first of all you need to:

1. go to the windows prompt
2. go to the geonode installation folder
3. activate the virtual env with the batch command :

cd C:\GeoNode-2.4.x\geonode-2.4.x
python_env.bat
Scripts\activate.bat

Regards,
-A.

Best Regards,
Alessio Fabiani.

==
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<tel:%2B39%200584%20962313>
fax:     +39 0584 1660272<tel:%2B39%200584%201660272>
mob:   +39 331 6233686<tel:%2B39%20331%206233686>

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

-------------------------------------------------------


AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

---------------------------------------------------------------------

On Tue, Sep 6, 2016 at 6:42 PM, Jeffrey Johnson <ortelius at gmail.com<mailto:ortelius at gmail.com>> wrote:
Chris, you need to use pip. Im not sure how the virtualenvironment is setup. Alessio, can you give us some insight here?

https://pip.pypa.io/en/stable/user_guide/#installing-from-wheels (on windows you need to use the command prompt)



On Mon, Sep 5, 2016 at 9:19 PM, Franklin, Chris <CFranklin at anglogoldashanti.com<mailto:CFranklin at anglogoldashanti.com>> wrote:
Thanks dan,

Have been trying to see how I can install the .whl file but can’t find any info on it, can someone out there help?

Regards

From: Daniel Berry [mailto:dberry at boundlessgeo.com<mailto:dberry at boundlessgeo.com>]
Sent: Wednesday, 31 August 2016 8:29 PM
To: Franklin, Chris <CFranklin at AngloGoldAshanti.com<mailto:CFranklin at AngloGoldAshanti.com>>
Cc: Jeffrey Johnson <ortelius at gmail.com<mailto:ortelius at gmail.com>>; geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
Subject: Re: [GeoNode-users] LDAP on windows

Chris,

It looks like for windows you could use one of these wheel files to install python-ldap. Just match the wheel to your OS.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap

These have already been pre built and include the `.pyd` file, which is a `.dll` file - https://docs.python.org/3/faq/windows.html#is-a-pyd-file-the-same-as-a-dll. This should alleviate you having to install devel libs and compile the source from pypi using pip.

Good luck!

Dan

On Wed, Aug 31, 2016 at 1:57 AM, Franklin, Chris <CFranklin at anglogoldashanti.com<mailto:CFranklin at anglogoldashanti.com>> wrote:
Ok I added this to my local setting file :

import ldap
from django_auth_ldap.config import LDAPSearch

AUTHENTICATION_BACKENDS = (
    'django_auth_ldap.backend.LDAPBackend',
    'django.contrib.auth.backends.ModelBackend',
    'guardian.backends.ObjectPermissionBackend',
)
AUTH_LDAP_SERVER_URI = ‘ldap://ag.ad.local'
LDAP_SEARCH_DN = 'OU=AUSTRALIA,OU=AUSTRALASIA,DC=ag,DC=ad,DC=local'
AUTH_LDAP_USER = '(uid=%(user)s)'
AUTH_LDAP_BIND_DN = '{ADD_BIND_DN_IF_REQUIRED}'
AUTH_LDAP_BIND_PASSWORD = '{ADD_BIND_PASSWORD_IF_REQUIRED}'
AUTH_LDAP_USER_ATTR_MAP = {
    'first_name': 'givenName', 'last_name': 'sn', 'email': 'mail',
}
AUTH_LDAP_USER_SEARCH = LDAPSearch(LDAP_SEARCH_DN,
                                   ldap.SCOPE_SUBTREE, AUTH_LDAP_USER)

But was unsure on installing the ldap devel lib – who do I do that on windows?

http://docs.geonode.org/en/master/tutorials/admin/ldap/

Cheers

From: Jeffrey Johnson [mailto:ortelius at gmail.com<mailto:ortelius at gmail.com>]
Sent: Thursday, 25 August 2016 2:24 PM
To: Franklin, Chris
Cc: geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
Subject: Re: [GeoNode-users] LDAP on windows

I dont think there should be any difference in how it works on windows. Let us know how it goes.

On Thu, Aug 25, 2016 at 6:45 AM, Franklin, Chris <CFranklin at anglogoldashanti.com<mailto:CFranklin at anglogoldashanti.com>> wrote:
Hi,

Im looking to link my Geonode 2.4 windows into the corp LDAP, is this possible in windows?

http://docs.geonode.org/en/master/tutorials/admin/ldap/index.html

Regards


Consider the environment. Think before you print.

This email, and its attachments, is subject to important warnings and disclaimers which are legally incorporated into this email in terms of Section 11(3) of the South African Electronic Communications and Transactions Act, 25 of 2002. The full text of the warnings and disclaimers, together with the company details and directors is available by clicking on http://www.anglogoldashanti.com/en/Pages/legal.aspx

_______________________________________________
geonode-users mailing list
geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/geonode-users

This email, and its attachments, is subject to important warnings and disclaimers which are legally incorporated into this email in terms of Section 11(3) of the South African Electronic Communications and Transactions Act, 25 of 2002. The full text of the warnings and disclaimers, together with the company details and directors is available by clicking on http://www.anglogoldashanti.com/en/Pages/legal.aspx

_______________________________________________
geonode-users mailing list
geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/geonode-users



--
Daniel Berry
Senior Software Engineer | Boundless
dberry at boundlessgeo.com<mailto:dberry at boundlessgeo.com>
512-468-3946<tel:512-468-3946> (cell)
@boundlessgeo

[https://docs.google.com/a/boundlessgeo.com/uc?id=0B_qVH4CJ8mXOa3E1YUNySzN2d00&export=download]
This email, and its attachments, is subject to important warnings and disclaimers which are legally incorporated into this email in terms of Section 11(3) of the South African Electronic Communications and Transactions Act, 25 of 2002. The full text of the warnings and disclaimers, together with the company details and directors is available by clicking on http://www.anglogoldashanti.com/en/Pages/legal.aspx


_______________________________________________
geonode-users mailing list
geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/geonode-users

This email, and its attachments, is subject to important warnings and disclaimers which are legally incorporated into this email in terms of Section 11(3) of the South African Electronic Communications and Transactions Act, 25 of 2002. The full text of the warnings and disclaimers, together with the company details and directors is available by clicking on http://www.anglogoldashanti.com/en/Pages/legal.aspx


This email, and its attachments, is subject to important warnings and disclaimers which are legally incorporated into this email in terms of Section 11(3) of the South African Electronic Communications and Transactions Act, 25 of 2002. The full text of the warnings and disclaimers, together with the company details and directors is available by clicking on http://www.anglogoldashanti.com/en/Pages/legal.aspx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160915/4c9358db/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 8965 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160915/4c9358db/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 13818 bytes
Desc: image002.png
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160915/4c9358db/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 51337 bytes
Desc: image003.png
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160915/4c9358db/attachment-0005.png>


More information about the geonode-users mailing list