[Mapbender-users] LDAP integration

Adrián Ariza hardian at gmail.com
Mon Apr 26 09:01:15 PDT 2021


Thanks Philipp for your replies!
I coudn't make it work, I need to send user password to the ldap_bind and I
give up for the moment.
I resolve adding some php code for catching de username and password, do
the ldap check, if it's ok add the user to mapbender... its not a good
solution, but it works.
Thanks!


El lun, 26 abr 2021 a las 6:14, Philipp van Biesbrock (<
philipp.vanbiesbrock at wheregroup.com>) escribió:

> Hi Adrián,
>
>
> I haven't tested the mapbender/ldapbundle with 3.2.x yet. I'll do so, once
> I get to it. The mapbender/ldapbundle definitly works with 3.0.8.x
>
>
> Am 24.04.21 um 05:17 schrieb Adrián Ariza:
>
> Sorry, The mapbender I'm using is 3.2.3
>
>
> El vie, 23 abr 2021 a las 23:19, Adrián Ariza (<hardian at gmail.com>)
> escribió:
>
>> I try but the  message still seid that the problem is in
>>
>> /vendor/mapbender/ldapbundle/DependencyInjection/../Resources/config/services.yml"
>> line 13 near  "- @ldapClient").
>> I delete the @ and now I'm getting
>>
>>
>> Uncaught PHP Exception
>> Symfony\Component\Debug\Exception\FatalThrowableError: "Type error:
>> Argument 1 passed to
>> Mapbender\LDAPBundle\Security\Provider\LDAPUserProvider::__construct() must
>> implement interface Symfony\Component\Ldap\LdapClientInterface, string
>> given, called in
>> /var/www/puntogis3/app/cache/dev/ContainerEbn4jh3/getLdapUserProviderService.php
>> on line 8" at
>> /var/www/puntogis3/vendor/mapbender/ldapbundle/Security/Provider/LDAPUserProvider.php
>> line 48
>>
>> Any Clues? Anyone are using ldap? The mapbender/ldapbundle works with
>> 3.0.4 version?
>> Thanks in advance!
>>
>> El vie, 23 abr 2021 a las 4:12, Philipp van Biesbrock (<
>> philipp.vanbiesbrock at wheregroup.com>) escribió:
>>
>>> looks like you need to wrap an entry in parameters.yml in single quotes:
>>> Something like this, I guess:
>>> ldap.user.dn: 'user at example.com'
>>>
>>> Am 23.04.21 um 01:22 schrieb Adrián Ariza:
>>>
>>> Thanks for your reply!
>>>
>>> I Install ldapBundle, configure security and parameters but now I see
>>> the error
>>>
>>> The reserved indicator "@" cannot start a plain scalar; you need to
>>> quote the scalar at line 13 (near "- @ldapClient").
>>>
>>> Could you gime som clue about fixing that?
>>>
>>> Thanks in advance!
>>>
>>> PD: Sorry for my english
>>>
>>>
>>>
>>> El jue, 22 abr 2021 a las 6:03, Philipp van Biesbrock (<
>>> philipp.vanbiesbrock at wheregroup.com>) escribió:
>>>
>>>> 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 listMapbender_users at lists.osgeo.orghttps://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.comwww.wheregroup.com
>>>> Geschäftsführer:
>>>> Olaf Knopp, Peter Stamm
>>>> Amtsgericht Bonn, HRB 9885
>>>> -------------------------------
>>>>
>>>> _______________________________________________
>>>> Mapbender_users mailing list
>>>> Mapbender_users at lists.osgeo.org
>>>> https://lists.osgeo.org/mailman/listinfo/mapbender_users
>>>>
>>>
>>> _______________________________________________
>>> Mapbender_users mailing listMapbender_users at lists.osgeo.orghttps://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.comwww.wheregroup.com
>>> Geschäftsführer:
>>> Olaf Knopp, Peter Stamm
>>> Amtsgericht Bonn, HRB 9885
>>> -------------------------------
>>>
>>> _______________________________________________
>>> Mapbender_users mailing list
>>> Mapbender_users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapbender_users
>>>
>>
> _______________________________________________
> Mapbender_users mailing listMapbender_users at lists.osgeo.orghttps://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.comwww.wheregroup.com
> Geschäftsführer:
> Olaf Knopp, Peter Stamm
> Amtsgericht Bonn, HRB 9885
> -------------------------------
>
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapbender_users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20210426/2627e669/attachment.html>


More information about the Mapbender_users mailing list