[Mapbender-users] LDAP integration

Philipp van Biesbrock philipp.vanbiesbrock at wheregroup.com
Thu Apr 22 02:03:28 PDT 2021


Hi Adrián,


Unfortunately we currently don't have any documentation. We're working 
on it though.
Here's a quick tutorial for you:

To use Mapbender with LDAP you can add this Symfony-bundle to your 
Mapbender:

https://github.com/mapbender/ldapBundle

This can be done manually or via composer: composer require 
mapbender/ldapbundle

Don't forget to register in AppKernel.php

Configuration isn't too easy. Basically you need to configure 
security.yml and parameters.yml.

Security.yml needs the ldapProvider and some firewall configuration:

providers:
     ldapProvider:
         id: LDAPUserProvider
     main:
         entity:
             class: FOM\UserBundle\Entity\User
             property: username
     chain_provider:
         chain:
             providers: ["ldapProvider","main"]

firewalls:
     ...
     secured_area:
         pattern:    ^/
         anonymous: ~
         provider: chain_provider
         mapbender_ldap:
             login_path: /user/login
             check_path: /user/login/check
             service: ldapClient
         form_login:
             check_path: /user/login/check
             login_path: /user/login
             provider: main
         logout:
             path:   /user/logout
             target: /


Add this to parameters.yml fitting your ldap server configuration:

ldap.host: example.com
ldap.port: 389
ldap.version: 3
ldap.useTLS: false
ldap.useSSL: false
ldap.bind.dn: cn=admin,dc=example,dc=com
ldap.bind.pwd: *********

ldap.user.nameAttribute: cn
ldap.user.baseDn: ou=user,dc=example,dc=com
ldap.user.adminFilter: (objectClass=*)
ldap.user.query: (&(cn={username})(objectclass=top))
ldap.user.dn: cn={username},ou=user,dc=example,dc=com
ldap.user.password: unicodePwd={password}

ldap.group.nameAttribute:~
ldap.group.baseDn: ou=groups,dc=example,dc=com
ldap.group.adminFilter: (objectClass=*)
ldap.group.id: cn
ldap.group.query: member=cn={username},ou=user,dc=example,dc=com


Now this probably won't work right away. Depending on your Ldap server 
settings it can be quite a hassle to get this running.

Hope this helps.



Am 22.04.21 um 06:12 schrieb Adrián Ariza:
> Hi! Are there any tutorial to configure LDA FOM? How to activate, 
> configure and debug.
> Thanks in advance!
>
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapbender_users

-- 
Mit freundlichen Grüßen

Philipp van Biesbrock


  ----------------------------------------------------
  Aufwind durch Wissen!
  Web-Seminare und Online-Schulungen
  bei der www.foss-academy.com
  ----------------------------------------------------

-------------------------------
WhereGroup GmbH
Eifelstraße 7
53119 Bonn
Germany

Fon: +49 (0)228 / 90 90 38 - **
Fax: +49 (0)228 / 90 90 38 - 11

info at wheregroup.com
www.wheregroup.com
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
-------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20210422/4ba2188f/attachment.html>


More information about the Mapbender_users mailing list