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.
Pimcore >= 5.1.0
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.
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"
false
).Symfony\Component\Ldap\Ldap
).dc=example,dc=com
).cn=your_search_dn_user,ou=users,dc=example,dc=com
).your_search_dn_user_password
).sAMAccountName
).({uid_key}={username})
).['admin']
). If already configured the values will be merged to exclude_rules.users
configuration.['admin', '/^noldap.*/i']
to exclude the user admin
and all users with a username starting with noldap
like noldap_alep
).['ROLE_PIMCORE_ADMIN', '/^ROLE_NOLDAP.*/i']
to exclude the users with ROLE_PIMCORE_ADMIN
assigned and all users with a role starting with ROLE_NOLDAP
like ROLE_NOLDAP_USERS
).['ROLE_LDAP_USERS']
). All the configured default roles needs to be already present in Pimcore.Alep\LdapBundle\DataMapper\DefaultLdapUserMapper
). See Custom data mapper to build your own data mapper.monolog.logger
).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:
Beside of this Pimcore plugin Blackbit also offers other bundles, individual development, consulting and hosting for your Pimcore project.