PHPackages                             mapbender/ldapbundle - 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. [Security](/categories/security)
4. /
5. mapbender/ldapbundle

ActiveLibrary[Security](/categories/security)

mapbender/ldapbundle
====================

Add LDAP Login to Mapbender with FOM as fallback

v2.0.5(1y ago)1685MITPHPPHP &gt;=5.5

Since Feb 14Pushed 1y agoCompare

[ Source](https://github.com/mapbender/ldapBundle)[ Packagist](https://packagist.org/packages/mapbender/ldapbundle)[ RSS](/packages/mapbender-ldapbundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (2)Versions (21)Used By (0)

Mapbender LDAP
--------------

[](#mapbender-ldap)

The LDAP Bundle provides LDAP integration for Mapbender.

### 1. Installation

[](#1-installation)

Install Mapbender LDAP via Composer:

```
composer require mapbender/ldapbundle
```

Register the bundle in bundles.php:

```
Mapbender\LDAPBundle\MapbenderLDAPBundle::class => ['all' => true],
```

Enable the LDAP extension for php.

### 2. Configuration

[](#2-configuration)

In the `/config/packages/security.yaml` add the ldap- and chain-provider, some firewall configuration and a password hasher for the LdapUser:

```
...

providers:
  main:
    entity:
      class: FOM\UserBundle\Entity\User
      property: username
  ldap_provider:
    id: 'mapbender.ldap.user_provider'
  all_users:
    chain:
      providers: ['main', 'ldap_provider']
...

firewalls:

  ...

  secured_area:
    pattern: ^/
    entry_point: form_login
    provider: all_users
    custom_authenticators:
      - 'mapbender.ldap.authenticator'
    form_login:
      check_path: /user/login/check
      login_path: /user/login
      enable_csrf: true
    form_login_ldap:
      check_path: /user/login/check
      login_path: /user/login
      enable_csrf: true
    logout:
      path: /user/logout
      target: /

...

password_hashers:
  FOM\UserBundle\Entity\User: sha512
  Mapbender\LDAPBundle\Security\LdapUser: auto

...
```

Add your LDAP server settings at the bottom of the `parameters.yaml`:

```
ldap.host: ldap.example.com
ldap.port: 389
ldap.version: 3
ldap.encryption: none #
ldap.bind.dn: read@example.com
ldap.bind.pwd: passwort

ldap.user.baseDn: cn=users,dc=example,dc=com
ldap.user.query: (&(sAMAccountName={username})(objectClass=user))
ldap.user.adminQuery: (objectClass=user)
ldap.user.id: sAMAccountName
ldap.user.commonName: cn
ldap.user.groupKey: memberOf

ldap.group.baseDn: ou=groups,dc=example,dc=com
ldap.group.query: (&(distinguishedName={groupname})(objectClass=group))
ldap.group.adminQuery: (objectClass=group)
ldap.group.id: sAMAccountName
ldap.group.commonName: cn
ldap.group.defaultRoles: [ROLE_USER] # this should be ROLE_USER in most cases
```

---

### Follow these instructions if you use Mapbender v3.3.5 or older:

[](#follow-these-instructions-if-you-use-mapbender-v335-or-older)

### 1. Installation

[](#1-installation-1)

Install Mapbender LDAP via Composer:

```
composer require mapbender/ldapbundle:v1.1.4
```

Register the bundle in AppKernel.php:

```
new Mapbender\LDAPBundle\MapbenderLDAPBundle(),
```

Enable LDAP extension for php.

### 2. Configuration

[](#2-configuration-1)

In the `security.yml` add 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: main
    mapbender_ldap:
      login_path: /user/login
      check_path: /user/login/check
      provider: ldapProvider
    form_login:
      check_path: /user/login/check
      login_path: /user/login
      csrf_token_generator: security.csrf.token_manager
    logout:
      path:   /user/logout
      target: /

...
```

Add your LDAP server settings at the bottom of the `parameters.yml`:

```
ldap.host: ldap.example.com
ldap.port: 389
ldap.version: 3
ldap.useSSL: false
ldap.useTLS: false
ldap.bind.dn: cn=user,dc=example,dc=com
ldap.bind.pwd: passwort

ldap.user.nameAttribute: cn
ldap.user.dn: cn=users,dc=example,dc=com
ldap.user.baseDn: dc=example,dc=com
ldap.user.adminFilter: (objectClass=*)
ldap.user.query: (&(cn={username})(objectclass=user))

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
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance41

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

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

Recently: every ~47 days

Total

20

Last Release

492d ago

Major Versions

1.1.4 → v2.02024-05-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/0154eb5bdfa738d2bbc95bb345ba5f971d9395a2318f8724e42fa3bd384ae9c2?d=identicon)[LazerTiberius](/maintainers/LazerTiberius)

![](https://www.gravatar.com/avatar/edc576f86046edb0015945a3a3d25416817641cf746711c59574662cc7b9a791?d=identicon)[Phocacius](/maintainers/Phocacius)

![](https://www.gravatar.com/avatar/ebb4ec9ae68f36a1f5a3fd3b71b42a4029484a70e5f4c59bb7fb76b09f0d9e6e?d=identicon)[astroidex](/maintainers/astroidex)

---

Top Contributors

[![werrolf](https://avatars.githubusercontent.com/u/24895932?v=4)](https://github.com/werrolf "werrolf (28 commits)")[![PhilVanB](https://avatars.githubusercontent.com/u/24896163?v=4)](https://github.com/PhilVanB "PhilVanB (23 commits)")[![DavidPatzke](https://avatars.githubusercontent.com/u/5700151?v=4)](https://github.com/DavidPatzke "DavidPatzke (10 commits)")[![astroidex](https://avatars.githubusercontent.com/u/996298?v=4)](https://github.com/astroidex "astroidex (2 commits)")[![Phocacius](https://avatars.githubusercontent.com/u/3438255?v=4)](https://github.com/Phocacius "Phocacius (2 commits)")

---

Tags

securityldapmapbender

### Embed Badge

![Health badge](/badges/mapbender-ldapbundle/health.svg)

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

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[voku/anti-xss

anti xss-library

72317.1M77](/packages/voku-anti-xss)[spatie/laravel-csp

Add CSP headers to the responses of a Laravel app

8519.6M19](/packages/spatie-laravel-csp)

PHPackages © 2026

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