PHPackages                             ztec/security-active\_directory - 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. ztec/security-active\_directory

Abandoned → [riper/security-active\_directory](/?search=riper%2Fsecurity-active_directory)Symfony-bundle[Authentication &amp; Authorization](/categories/authentication)

ztec/security-active\_directory
===============================

This is a bundle to allow authentication into symfony &gt;= 2.6 by an Active directory

v2.0.0(10y ago)162.0k6[1 issues](https://github.com/ztec/ZtecSecurityActiveDirectoryBundle/issues)[1 PRs](https://github.com/ztec/ZtecSecurityActiveDirectoryBundle/pulls)CC-BY-4.0PHPPHP &gt;=5.3.0

Since Nov 17Pushed 8y ago4 watchersCompare

[ Source](https://github.com/ztec/ZtecSecurityActiveDirectoryBundle)[ Packagist](https://packagist.org/packages/ztec/security-active_directory)[ Docs](https://github.com/RiperFr/Security-ActiveDirectoryBundle)[ RSS](/packages/ztec-security-active-directory/feed)WikiDiscussions v2.x Synced 5d ago

READMEChangelog (3)Dependencies (1)Versions (6)Used By (0)

Riper/Security/ActiveDirectory
==============================

[](#ripersecurityactivedirectory)

This package is a bundle for Symfony. It uses the standard form\_login security model to authenticate user from an Active Directory domain. It uses LDAP as communication layer, so you need the LDAP extension installed on your server to make it work.

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ec531d693411ac3e9bb32ebf281519b0b3bcd67346f82ceb6c45295767aff9c3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f526970657246722f53656375726974792d4163746976654469726563746f727942756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d76322e78)](https://scrutinizer-ci.com/g/RiperFr/Security-ActiveDirectoryBundle/?branch=v2.x)[![License CC-BY-4](https://camo.githubusercontent.com/60f554296c5981c6408caca8ca87c0b553192791e6b2491f57a189cfee05beb6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e63652d43432d2d42592d2d342e302d626c75652e737667)](https://camo.githubusercontent.com/60f554296c5981c6408caca8ca87c0b553192791e6b2491f57a189cfee05beb6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e63652d43432d2d42592d2d342e302d626c75652e737667)[![php version](https://camo.githubusercontent.com/5b7ed54843d6fb446574a6d8b76e76e2ec44e20d36e69bb108f794c6300dccbb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d352e332e302c253230352e342c253230352e352c253230352e362c253230372d626c75652e737667)](https://camo.githubusercontent.com/5b7ed54843d6fb446574a6d8b76e76e2ec44e20d36e69bb108f794c6300dccbb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d352e332e302c253230352e342c253230352e352c253230352e362c253230372d626c75652e737667)[![symfony version](https://camo.githubusercontent.com/adb70c974e0c7ed498d51f822303ce31c83830ae3ffc2135830e288678ba7f18/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d322e362c253230322e372c253230322e382c253230332d626c75652e737667)](https://camo.githubusercontent.com/adb70c974e0c7ed498d51f822303ce31c83830ae3ffc2135830e288678ba7f18/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d322e362c253230322e372c253230322e382c253230332d626c75652e737667)

[![SensioLabsInsight](https://camo.githubusercontent.com/6c1a00086fe278696d2f5a91b4eb4765a7314e4016f2e0bced9a5106febbf2ec/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33363238623439612d306162312d343431322d393463662d3332383830393034306166312f6269672e706e67)](https://insight.sensiolabs.com/projects/3628b49a-0ab1-4412-94cf-328809040af1)

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

[](#requirements)

php 5.3.0

php\_ldap

ssl configuration for LDAP. see [http://adldap.sourceforge.net/wiki/doku.php?id=ldap\_over\_ssl](http://adldap.sourceforge.net/wiki/doku.php?id=ldap_over_ssl)

Compatible with Symfony starting from 2.6

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

[](#installation)

You need to add a package to your dependency list :

```
// composer.json
"riper/security-active_directory": "2.*"

```

You need to enable the bundle into your kernel

```
// app/AppKernel.php
new Riper\Security\ActiveDirectoryBundle\RiperActiveDirectoryBundle(),

```

You need to configure your domain specific information

```
// app/config/config.yml or app/config/parameters.yml
parameters:
    riper.security.active_directory.settings:
        account_suffix : riper.fr # without the @ at the beginning
        base_dn : DC=RIPER,DC=FR #The DN of the domain
        domain_controllers : [ baudrive.kim.riper.fr ] #Servers to use for ldap connection (Random)
        admin_username: #Null to use the userConnection
        admin_password: #Null to use the userConnection
        keep_password_in_token: false #Set to true if you want to re-use the adldap instance to make further queries (This is a security issue because the password is kept in session)
        real_primarygroup : true #For Linux compatibility.
        use_ssl : false #Set it true need configuration of the server to be useful
        use_tls : false #Set it true need configuration of the server to be useful
        recursive_grouproles: false #recursive group roles
        username_validation_pattern: /^[a-z0-9-.]+$/i #Regex that check the final username value (extracted from patterns below). Must be compliant with your Active Directory username policy.
        username_patterns: #username is extracted from the string the user put into the login form
          - /([^@]*)@riper.fr/i  # like toto@riper.fr
          - /RIPER\\(.*)/i #like RIPER\toto
          - /RIPER.FR\\(.*)/i #like RIEPER.FR\toto
          - /(.*)/i #like toto

```

You need to add security parameters

```
// app/config/security.yml
encoders:
    Riper\Security\ActiveDirectoryBundle\Security\User\AdUser : plaintext #Active directory does not support encrypted password yet

providers:
    my_active_directory_provider :
          id: riper.security.active.directory.user.provider

firewalls:
    secured_area:
        active_directory: #Replace the 'form_login' line with this
                check_path: /demo/secured/login_check
                login_path: /demo/secured/login

```

Useful information
------------------

[](#useful-information)

Roles are got from Active directory. The name is transformed to match the ROLE system of Symfony2

```
Domain User => ROLE_DOMAIN_USER
Administrators => ROLE_ADMINISTRATORS

```

Nested Groups are not supported yet. Enabling the option wont affect the Role check.

SSL part of the lib isn't used yet and haven't been tested with Symfony

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 62.5% 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 ~51 days

Total

5

Last Release

3684d ago

Major Versions

v1.x-dev → v2.0.02016-04-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a4474ae12dc75409d7161f1e481ab94f75076ae3b7cec5b5202ed0246bf4090?d=identicon)[ztec](/maintainers/ztec)

---

Top Contributors

[![ztec](https://avatars.githubusercontent.com/u/988094?v=4)](https://github.com/ztec "ztec (35 commits)")[![xelan](https://avatars.githubusercontent.com/u/5080535?v=4)](https://github.com/xelan "xelan (10 commits)")[![Deamon](https://avatars.githubusercontent.com/u/560209?v=4)](https://github.com/Deamon "Deamon (4 commits)")[![akcoder](https://avatars.githubusercontent.com/u/830339?v=4)](https://github.com/akcoder "akcoder (2 commits)")[![mplx](https://avatars.githubusercontent.com/u/1986588?v=4)](https://github.com/mplx "mplx (2 commits)")[![vedosis](https://avatars.githubusercontent.com/u/3306521?v=4)](https://github.com/vedosis "vedosis (1 commits)")[![pborreli](https://avatars.githubusercontent.com/u/77759?v=4)](https://github.com/pborreli "pborreli (1 commits)")[![cyb3rd4d](https://avatars.githubusercontent.com/u/300826?v=4)](https://github.com/cyb3rd4d "cyb3rd4d (1 commits)")

---

Tags

symfonybundleldapactive directory

### Embed Badge

![Health badge](/badges/ztec-security-active-directory/health.svg)

```
[![Health](https://phpackages.com/badges/ztec-security-active-directory/health.svg)](https://phpackages.com/packages/ztec-security-active-directory)
```

###  Alternatives

[web-token/jwt-framework

JSON Object Signing and Encryption library for PHP and Symfony Bundle.

94518.9M77](/packages/web-token-jwt-framework)[riper/security-active_directory

This is a bundle to allow authentication into symfony &gt;= 2.6 by an Active directory

163.7k](/packages/riper-security-active-directory)[web-token/jwt-library

JWT library

2011.2M83](/packages/web-token-jwt-library)[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)[jotaelesalinas/laravel-adminless-ldap-auth

Authenticate users in Laravel against an adminless LDAP server

2105.1k](/packages/jotaelesalinas-laravel-adminless-ldap-auth)

PHPackages © 2026

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