PHPackages                             con4gis/ldap - 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. con4gis/ldap

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

con4gis/ldap
============

Authentication bundle with functionality needed for using external authentications for Contao Back-/Frontend

v1.5.3(1y ago)12685[4 issues](https://github.com/Kuestenschmiede/LdapBundle/issues)LGPL-3.0-or-laterPHPPHP ^7.4 || ^8.0

Since Jun 5Pushed 1y ago5 watchersCompare

[ Source](https://github.com/Kuestenschmiede/LdapBundle)[ Packagist](https://packagist.org/packages/con4gis/ldap)[ Docs](https://con4gis.org)[ RSS](/packages/con4gis-ldap/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (10)Dependencies (4)Versions (15)Used By (0)

LdapBundle
==========

[](#ldapbundle)

Important

We are not actively developing this con4gis module. Further development orders are possible.

This bundle adds LDAP functionality for Contao backend and frontend users/groups.

Requirements
------------

[](#requirements)

For everything to work you need to install and activate the PHP extension "php-ldap". Without it you can not install and use this Bundle Beside that you need at least the Contao Version 4.9.

Installation
------------

[](#installation)

### Step 1: Install the bundle

[](#step-1-install-the-bundle)

You can install the bundle using composer or the contao manager. For composer use the following command:

```
$ composer require con4gis/ldap
```

In the contao manager, you can find the bundle under "con4gis/ldap".

### Step 2: Configure the bundle

[](#step-2-configure-the-bundle)

After the installationy you need to add the files "security.yml" and "services.yml" to your config folder in the root folder of your installation. If the file "config.yml" doesn't exist create it too. Then you need to add the following configurations to these files:

**services.yml:**

```
services:
    Symfony\Component\Ldap\Ldap:
        arguments: ['@Symfony\Component\Ldap\Adapter\ExtLdap\Adapter']
    Symfony\Component\Ldap\Adapter\ExtLdap\Adapter:
        arguments:
            -   host: ad.yourldapserver.com
                port: 389
                encryption: tls
                options:
                    protocol_version: 3
                    referrals: false
```

In the services.yml you need to change the host to where your LDAP server is available. If you don't use the standard port change it here to (SSL is normally port 636). For the encryption, you can choose between "none" (not recommended), "ssl" and "tls".

**security.yml:**

```
security:
    providers:
        con4gis_ldap:
            ldap:
                service: Symfony\Component\Ldap\Ldap
                base_dn: 'dc=ad,dc=yourldapserver,dc=com'
                search_dn: 'cn=Administrator,cn=Users,dc=ad,dc=yourldapserver,dc=com'
                search_password: '*Password*'
                default_roles: ROLE_USER
                uid_key: uid
                filter: '(objectClass=user)'

        chain_provider_backend:
            chain:
                provider: [contao.security.backend_user_provider, con4gis_ldap]

        chain_provider_frontend:
            chain:
                provider: [contao.security.frontend_user_provider, con4gis_ldap]

    firewalls:
        contao_backend:
            provider: chain_provider_backend
            form_login_ldap:
                service: Symfony\Component\Ldap\Ldap
                dn_string: 'uid={username},ou=Users,dc=ad,dc=yourldapserver,dc=com'

        contao_frontend:
            provider: chain_provider_frontend
            form_login_ldap:
                service: Symfony\Component\Ldap\Ldap
                dn_string: 'uid={username},ou=Users,dc=ad,dc=yourldapserver,dc=com'
```

In this configuration file, you need to change a few things. These include the "base\_dn", "search\_dn", "search\_password", "uid\_key", "filter" and both "dn\_string" at ""contao\_backend" and "contao\_frontend".

The uid\_key needs to contain the attribute which contains the username. Normally it's "uid" or "sAMAccountName" (for Windows AD). You can filter which user can log in with the "filter". This is completely optional. If you don't want this delete the line.

The dn\_string can contain two placeholders: "{username}" and "{uid\_key}". These placeholders will be replaced with the username of the login request respectively the uid\_key you set up earlier.

**config.yml:**

```
imports:
    - { resource: security.yml }
    - { resource: services.yml }
```

Here you need to import the newly created files.

After these changes, you need to clear the Symfony cache for everything to work.

### Step 3: Configure the groups

[](#step-3-configure-the-groups)

Now you can login to the Backend and configure everything else from there. You can import user and member groups from your LDAP server and select an admin group.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance24

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~144 days

Recently: every ~341 days

Total

13

Last Release

438d ago

PHP version history (4 changes)v1.0.0PHP ^7.1

v1.4.0PHP ^7.2

v1.5.0PHP &gt;=7.4

v1.5.1PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/02221ea4af1d10e1e1ef091b8eb768cc8ab864fd1cbc8f969c1b249ec9543282?d=identicon)[coastforge](/maintainers/coastforge)

---

Top Contributors

[![maltedv](https://avatars.githubusercontent.com/u/49306981?v=4)](https://github.com/maltedv "maltedv (50 commits)")[![coastforge-mei](https://avatars.githubusercontent.com/u/1382479?v=4)](https://github.com/coastforge-mei "coastforge-mei (28 commits)")[![eknoes](https://avatars.githubusercontent.com/u/3641205?v=4)](https://github.com/eknoes "eknoes (16 commits)")[![croastforge](https://avatars.githubusercontent.com/u/162104287?v=4)](https://github.com/croastforge "croastforge (2 commits)")[![coastforge-cro](https://avatars.githubusercontent.com/u/17297529?v=4)](https://github.com/coastforge-cro "coastforge-cro (1 commits)")[![xx81](https://avatars.githubusercontent.com/u/1532987?v=4)](https://github.com/xx81 "xx81 (1 commits)")[![coastforge-rro](https://avatars.githubusercontent.com/u/35964536?v=4)](https://github.com/coastforge-rro "coastforge-rro (1 commits)")[![Eaglemong](https://avatars.githubusercontent.com/u/77971959?v=4)](https://github.com/Eaglemong "Eaglemong (1 commits)")[![kampfq](https://avatars.githubusercontent.com/u/7052906?v=4)](https://github.com/kampfq "kampfq (1 commits)")

---

Tags

Authenticationcontaoldapactive directorycon4giscon4gis\_authLdapBundle

### Embed Badge

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

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

###  Alternatives

[causal/ig_ldap_sso_auth

This extension provides LDAP support for TYPO3 by delegating the authentication of frontend and/or backend users to the centrally-managed directory of your organization. It fully supports OpenLDAP and Active Directory and is capable of connecting securely to the authentication server using either TLS or SSL (ldaps://). In case of use in an intranet environment, this extension is a perfect match since it natively brings Single Sign-On (SSO) capability to TYPO3 without any complex configuration.

33377.4k](/packages/causal-ig-ldap-sso-auth)[edvlerblog/yii2-adldap-module

yii2 Active Directory implementation (wrapper for Adldap2)

51227.3k](/packages/edvlerblog-yii2-adldap-module)[ldaptools/ldaptools-bundle

Provides easy LDAP integration for Symfony via LdapTools.

49159.5k](/packages/ldaptools-ldaptools-bundle)[chrmorandi/yii2-ldap

Ldap

1453.1k](/packages/chrmorandi-yii2-ldap)

PHPackages © 2026

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