PHPackages                             connectholland/ldap-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. connectholland/ldap-bundle

AbandonedArchivedSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

connectholland/ldap-bundle
==========================

LDAP authentication for various existing user bundles.

1.0.0(8y ago)12.0k1MITPHPPHP ^5.6 || ^7.0

Since Aug 30Pushed 8y ago2 watchersCompare

[ Source](https://github.com/ConnectHolland/ldap-bundle)[ Packagist](https://packagist.org/packages/connectholland/ldap-bundle)[ RSS](/packages/connectholland-ldap-bundle/feed)WikiDiscussions 1.0 Synced today

READMEChangelog (2)Dependencies (11)Versions (4)Used By (0)

LDAP bundle
===========

[](#ldap-bundle)

[![Build Status](https://camo.githubusercontent.com/063b07bcf60fefaea9f31dc240b7a4ce602e1cc42027a0fde7091b3d334db1de/68747470733a2f2f7472617669732d63692e6f72672f436f6e6e656374486f6c6c616e642f6c6461702d62756e646c652e737667)](https://travis-ci.org/ConnectHolland/ldap-bundle)[![Coverage Status](https://camo.githubusercontent.com/c30f28e64d7c614711ee280ac168eef3350f2dce9b191fdae8f7c1d7e78246e6/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f436f6e6e656374486f6c6c616e642f6c6461702d62756e646c652f62616467652e737667)](https://coveralls.io/github/ConnectHolland/ldap-bundle)

The bundle extends LDAP authentication of the Symfony LDAP component with the ability to automatically create / fetch users from eg. a database. This enables you to (easily) add LDAP authentication to existing authentication bundles.

Installation using Composer
---------------------------

[](#installation-using-composer)

Run the following command to add the package to the composer.json of your project:

```
$ composer require connectholland/ldap-bundle
```

### Enable the bundle

[](#enable-the-bundle)

Enable the bundle in the kernel:

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new ConnectHolland\LdapBundle\ConnectHollandLdapBundle(),
        // ...
    );
}
```

Configuring the bundle
----------------------

[](#configuring-the-bundle)

The bundle requires the following configuration to function in your `security.yml` file:

```
# app/config/security.yml
security:
    # ...

    providers:
        my_ldap:
            connect_holland_ldap: # Configuration part of this bundle.
                connection:
                    host: ldap.example.com
                user_factory:
                    type: doctrine # Currently 2 types available (doctrine and sulu). Custom user factories can be defined through a 'service' key with the id of the service.
                    user_class: 'AppBundle\Entity\User'
                    username_column: username
                    user_property_map: # Mapping of LDAP attributes (keys) to user properties (values).
                        uid: username
                        givenname: firstname
                        sn: lastname
                        mail: email
                base_dn: ou=users,dc=example,dc=com
                search_dn: ~
                search_password: ~
                default_roles:
                    - ROLE_ADMIN
                uid_key: uid

    firewalls:
        somename:
            # ...
            form_login_ldap:
                provider: my_ldap
                service: security.user.provider.concrete.my_ldap.client # Service created by the bundle.
                dn_string: 'uid={username},ou=users,dc=example,dc=com'
```

For more information and a detailed description of the various options, see [Authenticating against an LDAP server](https://symfony.com/doc/2.8/security/ldap.html) within the Symfony documentation.

### Configuring the bundle for Sulu CMS

[](#configuring-the-bundle-for-sulu-cms)

To add LDAP authentication to Sulu CMS add the following configuration to `app/config/admin/security.yml`:

```
# app/config/admin/security.yml

security:
    # ...

    ldap:
        connect_holland_ldap: # Configuration part of this bundle.
            connection:
                host: ldap.example.com
            user_factory:
                type: sulu
                user_property_map: # Mapping of LDAP attributes (keys) to user properties (values).
                    uid: username
                    givenname: contact.first_name
                    sn: contact.last_name
                    mail: email
            base_dn: ou=users,dc=example,dc=com
            search_dn: ~
            search_password: ~
            default_roles:
                - User # The name of the role within your Sulu CMS.
            uid_key: uid

    firewalls:
        admin:
            # ...

            form_login_ldap:
                login_path: sulu_admin.login
                check_path: sulu_admin.login_check
                success_handler: sulu_security.authentication_handler
                failure_handler: sulu_security.authentication_handler
                csrf_provider: security.csrf.token_manager
                provider: ldap
                service: security.user.provider.concrete.ldap.client
                dn_string: 'uid={username},ou=users,dc=example,dc=com'
```

Adjust the settings within `connect_holland_ldap` according to your LDAP configuration.

Configuration reference
-----------------------

[](#configuration-reference)

```
connect_holland_ldap:
    connection:
        host: ldap.example.com
        port: 389
        encryption: ssl # tls or ssl
        options:
            protocol_version: 3
            referrals: false
    user_factory:
        type: sulu # doctrine or sulu
        service: ~ # Reference to your own user factory service.
        user_class: ~ # Fully qualified class name of your user entity. Only used for doctrine user factory type.
        username_column: ~ # Name of the username column. Only used for doctrine user factory type.
        user_property_map: # Mapping of LDAP attributes (keys) to user properties (values).
            uid: username
            givenname: firstname
            sn: lastname
            mail: email
    base_dn: ~
    search_dn: ~
    search_password: ~
    default_roles:
        - ~
    uid_key: sAMAccountName
    filter: '({uid_key}={username})'
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Total

3

Last Release

3107d ago

Major Versions

0.1.0 → 1.0.02017-11-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/32c77f5ff7ffcce6bdf072dd76718e014643cb4b3083b27ecf1806606a5ce363?d=identicon)[RonRademaker](/maintainers/RonRademaker)

---

Top Contributors

[![niels-nijens](https://avatars.githubusercontent.com/u/3245362?v=4)](https://github.com/niels-nijens "niels-nijens (37 commits)")

---

Tags

bundlephpsymfonysymfony-bundle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/connectholland-ldap-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/connectholland-ldap-bundle/health.svg)](https://phpackages.com/packages/connectholland-ldap-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[scheb/2fa-bundle

A generic interface to implement two-factor authentication in Symfony applications

6914.0M62](/packages/scheb-2fa-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
