BlackbitDigitalCommerce / pimcore-ldap-bundle

LDAP bundle for Pimcore
GNU General Public License v3.0
27 stars 9 forks source link

CircleCI License Total Downloads Latest Stable Version Latest Unstable Version

LDAP bundle for Pimcore

Enables LDAP authentication to the Pimcore's admin UI.

If a user already exists in Pimcore (and is not in the list of the excluded users) it will be automatically updated with the informations coming from LDAP. If not a new user will be created automatically.

Requirements

Pimcore >= 5.1.0

Installation

1) Install the bundle using composer composer require blackbit_digital_commerce/pimcore-ldap. 2) Open Pimcore Admin UI, navigate to Tools > Extensions and activate the bundle.

Configuration

1) Configure the Symfony LDAP client (see http://symfony.com/doc/current/security/ldap.html#configuring-the-ldap-client).

    # config/services.yaml
    services:
        Symfony\Component\Ldap\Ldap:
            arguments: ['@Symfony\Component\Ldap\Adapter\ExtLdap\Adapter']
        Symfony\Component\Ldap\Adapter\ExtLdap\Adapter:
            arguments:
                -   host: my-server
                    port: 389
                    encryption: tls
                    options:
                        protocol_version: 3
                        referrals: false

2) Configure the LDAP bundle.

    # config/config.yaml
    alep_ldap:
      enabled: true
      base_dn: "dc=example,dc=com"

Supported options

Custom data mapper

To build your own custom data mapper you just have to create a class which implements the LdapUserMapperInterface. You can use DefaultLdapUserMapper as an example. The DefaultLdapUserMapper is the default data mapper used by the bundle and it maps the following ldap attributes to the Pimcore user:

About Blackbit

Beside of this Pimcore plugin Blackbit also offers other bundles, individual development, consulting and hosting for your Pimcore project.