SlideShare a Scribd company logo
LDAP integration with
user/group search
(in pas.plugins.ldap)
Fred van Dijk - Zest Software)
Welcome
• About you

• Integrator

• Developer

• How do I connect Plone
to an LDAP user
directory?

• What’s new in
pas.plugins.ldap?
• About me

• Fred van Dijk

• Zest Software

• Rotterdam - NL

• Using Plone since 2002

• From user to integrator,
dev, consultant, trainer
Agenda
• Quick: what’s LDAP?

• LDAP and organisations

• Users/Groups in Plone

• LDAP integration in Plone

• pas.plugins.ldap

• Install & setup 

• sharing users/groups

• Advanced setup

• Wrap up

• Questions
Why LDAP
• Centralised database of users and groups inside
organisations

• old school: copy the users and groups file to different pc’s

• On UNIX this goes back a long way in the 80’s 90’s

NIS, network information service, X.500

• PC’s: Windows: Lan manager, Novell Netware 2/3
From flat to hierarchical
user databases
• Organisational units, departments, mirror org. structure

• Some Implementations

• UNIX: SLAPD - Netscape Directory server 

• Windows: NDS: Novell Directory Services

• Windows: Microsoft Active Directory

• LDAP: Lightweight Directory Access Protocol

• Protocol becomes server, becomes protocol
Users in Plone
• Plone has its own user database

• Works fine, but with larger organisations and/or many
services you don’t want to maintain many user/group lists for
every service. 

• Connect to central directory service maintaining user, groups

• Authentication vs Authorisation

• who you are - which groups you belong to. ID - LDAP

• What is the ID allowed to do: in the the separate services
What’s the problem for us?
• Us being Plone users and
integrators trying to set up
LDAP

• Multiple moving parts, LDAP
is protocol, data depends on
the directory service (LDAP
implementations, AD)

Zope, PAS, Plone Config

• You only set this up once for
a project, until it works, then
you don’t look back … 

• Everything is always (a bit)
different
Authentication in Zope
• Plone is built on top of Zope. - Zope is ‘mature’

• acl_users folder - Zope Simple user folder (1996?)

• Products.LDAPUserFolder, replacement for acl_users
(1.0beta2 from 2001)

• Pluggable Authentication Service - Products.PlonePAS
(version 2.3 from 2007)

• PAS -> Products.LDAPMultiplugins -> (LDAPUserFolder)
On top of Zope in Plone
• Webmaster facing configuration and support in Plone &
controlpanel:

• Products.PloneLDAP

• plone.app.ldap

• wrapping the stuff on the

previous page

• That’s a a lot of history and stack…
pas.plugins.ldap
• “New” implementation without depending on the existing plugins 

• developed by BlueDynamics Alliance

• based on node and node.ext.ldap, virtual node tree

• Version 1.1.0 - 2014

• upgraded from bda.ldap - 2007 - so not that new

• Can/should cache results in memcached - speed vs freshness

• Not totally feature equivalent with plone.app.ldap

• underlying node.ext.ldap can also work with Pyramid
And so it goes
(with add’ons for Plone)
• People start using and improving

• Open source, on branches, sometimes specifics for their organisation.

• 2016 - fundraising to implement pagination in pas.plugins.ldap

• Fixes and improvements by Asko Soukka from & for University of
Jyväskylä

• Speed optimisations for huge (university) directories

• User search

• Not yet merged to master, needs more testing
Our ‘quest’ with
pas.plugins.ldap
• Have setups at different customers with plone.app.ldap
stack. Very stable, fire and forget, but old.

• pagination and unicode issues

• Let’s test this pas.plugins.ldap stuff (on Plone 4)

• Did fixes in main branch and dependent packages, fork
Asko’s branch for search fixes

• Not yet merged to master either. Is this generic and
stable enough?
There’s some work to be
done
• Our versions available at

• https://github.com/zestsoftware/pas.plugins.ldap &
node.ext.ldap

• http://pypi.zestsoftware.nl/public/

• Sprint this saturday / sunday? 

• More documentation

• check changes and prepare merge back
Demonstration
• To test and demo this stuff: get your own ldap-server

• Local setup of openldap on my Mac (quick show)

> slapd -d1 -f slapd.conf -h "ldap://127.0.0.1:8389/"
• Import users/groups with ldapadd and an ldif file

• querying locally on the command line: 

> ldapsearch -D "cn=root,dc=ldapdemo,dc=com" -w secret -p
8389 -h localhost -b "dc=ldapdemo,dc=com" -s sub
“(objectclass=inetOrgPerson)"
Browsing your LDAP
• Apache Directory Studio

• cross platform

• Big Java Tool, has LDAP browser
but also built in LDAP server,
maybe useful on Windows?

• http://directory.apache.org/studio

• Demo
Configuring Plone
• Demo in plone 5.0.8

• Buildout

• pas.plugins.ldap in eggs
sections of
plone.rezipe.zope2instance

• Some version pinnings -
You always pin your
versions, right? 

• Show config in editor
# pas.plugins.ldap

pas.plugins.ldap = 1.5.2+zest1

node.ext.ldap = 1.0b4+zest1

bda.cache = 1.2.0

pylibmc = 1.5.1

node = 0.9.16

plumber = 1.3.1

yafowil = 2.2

yafowil.plone = 2.3.1

PyYAML = 3.11

loremipsum = 1.0.5

node.ext.ugm = 0.9.8

odict = 1.5.2

python-memcached = 1.57

smbpasswd = 1.0.2

yafowil.widget.array = 1.4

yafowil.widget.dict = 1.6

yafowil.yaml = 1.2

python-ldap = 2.4.45
configuring the Plug-in
• Activate Add’on

• Configuration panel. A lot of options

• Server Settings

• User Settings

• Group Settings
Server settings
• Use SSL in production

• The manager user can/should be read only for safety in
production setups

• ignore certificate check option for nasty in company
introspecting firewalls

• Page size: fundraising option to not overquery a large
ldap
User settings
• Where are your users coming from?

• Path in the directory

• Can and sometimes should be recursive depending on the
structure

• Limit your search, Limit objects returned for consideration

• Same query language as ldapsearch on the command line

• keep objectClass on iNetOrgPerson for now, not finished
option yet
User settings
• User attribute Aliases: which required Plone user
attributes map to the attributes found on your objects in
LDAP?

• for my local LDAP it’s uid, but Active Directory often
uses sAMAccountName

• User Property Sheet: extra attributes coming into the
Plone user object, full name, email, etc.
Group support
• Same drill as with users, inspect your directory first

• Different options support for different LDAP backends:
memberOf support on User objects default activated in
Active Directory
mapping ldap fields to user
fields
• There’s no one size fits all

• Trial and error is very much that: a lot of trial, please don’t

• Inspect your directory through an ldap browser
actual objects in my local
slapd demo server
Demo of adding users on
the sharing menu
• Add users to sharing tab

• Add groups to sharing tab

• search parts of name with * syntax at the moment. 

• Also searches in other attributes like location or email

• Should also work in global sharing tab, but bug in Plone
5.0.8,will investigate

• hierarchical searching - One Level - Subtree
Example of LDAP object in
Active Directory
Better performance
• ALWAYS use memcached with pas.plugins.ldap in
production, use system supplied memcached or install
with buildout
[memcached]

recipe = zc.recipe.cmmi

url = http://www.memcached.org/files/memcached-1.5.2.tar.gz

[supervisor]

recipe = collective.recipe.supervisor

…..

programs =

80 memcached (stderr_logfile=NONE stdout_logfile=${buildout:directory}/var/log/
memcached-stdout.log) ${memcached:location}/bin/memcached [ -m ${conf:memcached-size} -
l localhost -p ${conf:memcached} -U ${conf:memcached} ] true
Automatic configuration
• Generic Setup:
• ldap_settings.xml 

• Configure and export with portal_setup

• Don’t forget registry.xml with the memcached settings

• Demo of ldapdemo.policy product

• show config in editor

• demo
Final thoughts
• This is not plug and play easy stuff

• Know your directory, don’t trial and error attributes, use Apache
Directory Studio to find them

• Production:

• SSL communication with LDAP

• Read only admin user

• Add’on still needs more polishment

• Plone 5 / Plone 4
Thank You
• Questions ? 

• Sprint on pas.plugins.ldap improvements?

More Related Content

PDF
Avoid boring work_v2
PPTX
Drupal commerce performance profiling and tunning using loadstorm experiments...
PDF
How to use the new Domino Query Language
PDF
SharePoint Saturday The Conference 2011 - SP2010 Performance
PPTX
Scaling High Traffic Web Applications
PDF
One drupal to rule them all - Drupalcamp Caceres
PDF
XPages Performance Master Class - Survive in the fast lane on the Autobahn (E...
PDF
Life in the Fast Lane: Full Speed XPages!, #dd13
Avoid boring work_v2
Drupal commerce performance profiling and tunning using loadstorm experiments...
How to use the new Domino Query Language
SharePoint Saturday The Conference 2011 - SP2010 Performance
Scaling High Traffic Web Applications
One drupal to rule them all - Drupalcamp Caceres
XPages Performance Master Class - Survive in the fast lane on the Autobahn (E...
Life in the Fast Lane: Full Speed XPages!, #dd13

What's hot (20)

PPTX
PDF
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
PPTX
How_To_Soup_Up_Your_Farm
PDF
SharePoint Saturday San Antonio: SharePoint 2010 Performance
PPTX
Fundamentals of performance tuning PHP on IBM i
PPTX
Profiling and Tuning a Web Application - The Dirty Details
PDF
Infrastructure as Code with Chef
PDF
Alfresco monitoring with Nagios and ELK stack
PPTX
Making Life Easier with PowerShell - SPSRIC
PDF
Sharepoint Deployments
PPTX
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
PPTX
Oozie meetup - HA
PDF
Face Off Domino vs Exchange On Premises
PPTX
New life inside monolithic application
PPTX
Oozie at Yahoo
PPTX
Learn from my Mistakes - Building Better Solutions in SPFx
PDF
High Concurrency Architecture and Laravel Performance Tuning
PDF
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
PPTX
Parallel and Asynchronous Programming - ITProDevConnections 2012 (Greek)
PPTX
Picnic Software - Developing a flexible and scalable application
NoSQL and SQL - Why Choose? Enjoy the best of both worlds with MySQL
How_To_Soup_Up_Your_Farm
SharePoint Saturday San Antonio: SharePoint 2010 Performance
Fundamentals of performance tuning PHP on IBM i
Profiling and Tuning a Web Application - The Dirty Details
Infrastructure as Code with Chef
Alfresco monitoring with Nagios and ELK stack
Making Life Easier with PowerShell - SPSRIC
Sharepoint Deployments
What is cool with Domino V10, Proton and Node.JS, and why would I use it in ...
Oozie meetup - HA
Face Off Domino vs Exchange On Premises
New life inside monolithic application
Oozie at Yahoo
Learn from my Mistakes - Building Better Solutions in SPFx
High Concurrency Architecture and Laravel Performance Tuning
SHOW102 XPages: Still No Experience Necessary IBM Connect 2014
Parallel and Asynchronous Programming - ITProDevConnections 2012 (Greek)
Picnic Software - Developing a flexible and scalable application
Ad

Similar to Plone pas.plugins.ldap user/group search (20)

PDF
Ldap introduction (eng)
PDF
Ldap 121020013604-phpapp01
PDF
Practical-LDAP-and-Linux
PPTX
LDAP(In_Linux).pptx
PDF
LDAP and Active Directory Authentication in Plone
ODP
Ldapsession
ODP
Ldapsession 1217528612650451-9
PDF
OpenLDAP - Installation and Configuration
PDF
Using OpenLDAP
PPT
The Ldap Protocol
PDF
LDAP Applied (EuroOSCON 2005)
KEY
Bringing "real life" relations to Plone
PDF
Ldap howto
PDF
Pimp my Plone
PDF
Frequently asked questions answered frequently - but now for the last time
PDF
Buildout future
Ldap introduction (eng)
Ldap 121020013604-phpapp01
Practical-LDAP-and-Linux
LDAP(In_Linux).pptx
LDAP and Active Directory Authentication in Plone
Ldapsession
Ldapsession 1217528612650451-9
OpenLDAP - Installation and Configuration
Using OpenLDAP
The Ldap Protocol
LDAP Applied (EuroOSCON 2005)
Bringing "real life" relations to Plone
Ldap howto
Pimp my Plone
Frequently asked questions answered frequently - but now for the last time
Buildout future
Ad

Recently uploaded (20)

PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
Database Information System - Management Information System
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
Paper PDF World Game (s) Great Redesign.pdf
PDF
Introduction to the IoT system, how the IoT system works
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
Funds Management Learning Material for Beg
PPTX
Introduction to cybersecurity and digital nettiquette
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
DOC
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
PPTX
artificial intelligence overview of it and more
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPTX
Mathew Digital SEO Checklist Guidlines 2025
DOCX
Unit-3 cyber security network security of internet system
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
Database Information System - Management Information System
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Paper PDF World Game (s) Great Redesign.pdf
Introduction to the IoT system, how the IoT system works
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Tenda Login Guide: Access Your Router in 5 Easy Steps
Funds Management Learning Material for Beg
Introduction to cybersecurity and digital nettiquette
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
artificial intelligence overview of it and more
presentation_pfe-universite-molay-seltan.pptx
SASE Traffic Flow - ZTNA Connector-1.pdf
Unit-1 introduction to cyber security discuss about how to secure a system
Job_Card_System_Styled_lorem_ipsum_.pptx
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Mathew Digital SEO Checklist Guidlines 2025
Unit-3 cyber security network security of internet system

Plone pas.plugins.ldap user/group search

  • 1. LDAP integration with user/group search (in pas.plugins.ldap) Fred van Dijk - Zest Software)
  • 2. Welcome • About you • Integrator • Developer • How do I connect Plone to an LDAP user directory? • What’s new in pas.plugins.ldap? • About me • Fred van Dijk • Zest Software • Rotterdam - NL • Using Plone since 2002 • From user to integrator, dev, consultant, trainer
  • 3. Agenda • Quick: what’s LDAP? • LDAP and organisations • Users/Groups in Plone • LDAP integration in Plone • pas.plugins.ldap • Install & setup • sharing users/groups • Advanced setup • Wrap up • Questions
  • 4. Why LDAP • Centralised database of users and groups inside organisations • old school: copy the users and groups file to different pc’s • On UNIX this goes back a long way in the 80’s 90’s
 NIS, network information service, X.500 • PC’s: Windows: Lan manager, Novell Netware 2/3
  • 5. From flat to hierarchical user databases • Organisational units, departments, mirror org. structure • Some Implementations • UNIX: SLAPD - Netscape Directory server • Windows: NDS: Novell Directory Services • Windows: Microsoft Active Directory • LDAP: Lightweight Directory Access Protocol • Protocol becomes server, becomes protocol
  • 6. Users in Plone • Plone has its own user database • Works fine, but with larger organisations and/or many services you don’t want to maintain many user/group lists for every service. • Connect to central directory service maintaining user, groups • Authentication vs Authorisation • who you are - which groups you belong to. ID - LDAP • What is the ID allowed to do: in the the separate services
  • 7. What’s the problem for us? • Us being Plone users and integrators trying to set up LDAP • Multiple moving parts, LDAP is protocol, data depends on the directory service (LDAP implementations, AD)
 Zope, PAS, Plone Config • You only set this up once for a project, until it works, then you don’t look back … • Everything is always (a bit) different
  • 8. Authentication in Zope • Plone is built on top of Zope. - Zope is ‘mature’ • acl_users folder - Zope Simple user folder (1996?)
 • Products.LDAPUserFolder, replacement for acl_users (1.0beta2 from 2001)
 • Pluggable Authentication Service - Products.PlonePAS (version 2.3 from 2007) • PAS -> Products.LDAPMultiplugins -> (LDAPUserFolder)
  • 9. On top of Zope in Plone • Webmaster facing configuration and support in Plone & controlpanel: • Products.PloneLDAP • plone.app.ldap • wrapping the stuff on the
 previous page • That’s a a lot of history and stack…
  • 10. pas.plugins.ldap • “New” implementation without depending on the existing plugins • developed by BlueDynamics Alliance • based on node and node.ext.ldap, virtual node tree • Version 1.1.0 - 2014 • upgraded from bda.ldap - 2007 - so not that new • Can/should cache results in memcached - speed vs freshness • Not totally feature equivalent with plone.app.ldap • underlying node.ext.ldap can also work with Pyramid
  • 11. And so it goes (with add’ons for Plone) • People start using and improving • Open source, on branches, sometimes specifics for their organisation. • 2016 - fundraising to implement pagination in pas.plugins.ldap • Fixes and improvements by Asko Soukka from & for University of Jyväskylä • Speed optimisations for huge (university) directories • User search • Not yet merged to master, needs more testing
  • 12. Our ‘quest’ with pas.plugins.ldap • Have setups at different customers with plone.app.ldap stack. Very stable, fire and forget, but old. • pagination and unicode issues • Let’s test this pas.plugins.ldap stuff (on Plone 4) • Did fixes in main branch and dependent packages, fork Asko’s branch for search fixes • Not yet merged to master either. Is this generic and stable enough?
  • 13. There’s some work to be done • Our versions available at • https://github.com/zestsoftware/pas.plugins.ldap & node.ext.ldap • http://pypi.zestsoftware.nl/public/ • Sprint this saturday / sunday? • More documentation • check changes and prepare merge back
  • 14. Demonstration • To test and demo this stuff: get your own ldap-server • Local setup of openldap on my Mac (quick show) > slapd -d1 -f slapd.conf -h "ldap://127.0.0.1:8389/" • Import users/groups with ldapadd and an ldif file • querying locally on the command line: > ldapsearch -D "cn=root,dc=ldapdemo,dc=com" -w secret -p 8389 -h localhost -b "dc=ldapdemo,dc=com" -s sub “(objectclass=inetOrgPerson)"
  • 15. Browsing your LDAP • Apache Directory Studio • cross platform • Big Java Tool, has LDAP browser but also built in LDAP server, maybe useful on Windows? • http://directory.apache.org/studio • Demo
  • 16. Configuring Plone • Demo in plone 5.0.8 • Buildout • pas.plugins.ldap in eggs sections of plone.rezipe.zope2instance • Some version pinnings - You always pin your versions, right? • Show config in editor # pas.plugins.ldap pas.plugins.ldap = 1.5.2+zest1 node.ext.ldap = 1.0b4+zest1 bda.cache = 1.2.0 pylibmc = 1.5.1 node = 0.9.16 plumber = 1.3.1 yafowil = 2.2 yafowil.plone = 2.3.1 PyYAML = 3.11 loremipsum = 1.0.5 node.ext.ugm = 0.9.8 odict = 1.5.2 python-memcached = 1.57 smbpasswd = 1.0.2 yafowil.widget.array = 1.4 yafowil.widget.dict = 1.6 yafowil.yaml = 1.2 python-ldap = 2.4.45
  • 17. configuring the Plug-in • Activate Add’on • Configuration panel. A lot of options • Server Settings • User Settings • Group Settings
  • 18. Server settings • Use SSL in production • The manager user can/should be read only for safety in production setups • ignore certificate check option for nasty in company introspecting firewalls • Page size: fundraising option to not overquery a large ldap
  • 19. User settings • Where are your users coming from? • Path in the directory • Can and sometimes should be recursive depending on the structure • Limit your search, Limit objects returned for consideration • Same query language as ldapsearch on the command line • keep objectClass on iNetOrgPerson for now, not finished option yet
  • 20. User settings • User attribute Aliases: which required Plone user attributes map to the attributes found on your objects in LDAP? • for my local LDAP it’s uid, but Active Directory often uses sAMAccountName • User Property Sheet: extra attributes coming into the Plone user object, full name, email, etc.
  • 21. Group support • Same drill as with users, inspect your directory first • Different options support for different LDAP backends: memberOf support on User objects default activated in Active Directory
  • 22. mapping ldap fields to user fields • There’s no one size fits all • Trial and error is very much that: a lot of trial, please don’t • Inspect your directory through an ldap browser
  • 23. actual objects in my local slapd demo server
  • 24. Demo of adding users on the sharing menu • Add users to sharing tab • Add groups to sharing tab • search parts of name with * syntax at the moment. • Also searches in other attributes like location or email • Should also work in global sharing tab, but bug in Plone 5.0.8,will investigate • hierarchical searching - One Level - Subtree
  • 25. Example of LDAP object in Active Directory
  • 26. Better performance • ALWAYS use memcached with pas.plugins.ldap in production, use system supplied memcached or install with buildout [memcached] recipe = zc.recipe.cmmi url = http://www.memcached.org/files/memcached-1.5.2.tar.gz [supervisor] recipe = collective.recipe.supervisor ….. programs = 80 memcached (stderr_logfile=NONE stdout_logfile=${buildout:directory}/var/log/ memcached-stdout.log) ${memcached:location}/bin/memcached [ -m ${conf:memcached-size} - l localhost -p ${conf:memcached} -U ${conf:memcached} ] true
  • 27. Automatic configuration • Generic Setup: • ldap_settings.xml • Configure and export with portal_setup • Don’t forget registry.xml with the memcached settings • Demo of ldapdemo.policy product • show config in editor • demo
  • 28. Final thoughts • This is not plug and play easy stuff • Know your directory, don’t trial and error attributes, use Apache Directory Studio to find them • Production: • SSL communication with LDAP • Read only admin user • Add’on still needs more polishment • Plone 5 / Plone 4
  • 29. Thank You • Questions ? • Sprint on pas.plugins.ldap improvements?