ztec/security-active_directory
Laravel package for integrating Active Directory/LDAP authentication into your app. It helps authenticate users against AD, map directory groups to roles or permissions, and streamline enterprise access management.
ztec/security-active_directory is a Symfony 2.1+ bundle, not a Laravel package. There is no service provider, no config/*.php, and no Laravel guard. If you're on Laravel, treat the repo as a reference implementation of an LDAP/AD authenticate flow you will re-implement (or replace with adldap2/adldap2-laravel). If you're maintaining a legacy Symfony 2.x/3.x app, you can still install it, but pin your PHP version accordingly.Security/ (authentication provider + user provider) and DependencyInjection/ (config tree). The README and Resources/config/ show the intended security.yml wiring — read those before touching anything.User object is hydrated from AD attributes (sAMAccountName, mail, displayName, memberOf). Get a single hard-coded test credential binding over ldap:// before you wire it into the firewall.Minimal Symfony setup (legacy):
composer require ztec/security-active_directory
// app/AppKernel.php
new Ztec\Security\ActiveDirectoryBundle\ZtecSecurityActiveDirectoryBundle(),
# app/config/config.yml
ztec_security_active_directory:
domain: example.local
hosts: [dc01.example.local, dc02.example.local]
base_dn: "DC=example,DC=local"
security.yml alongside a form_login listener. Configure it as a custom provider/authentication_provider, not as a standalone middleware — there is no automatic request interception.memberOf DNs to Symfony roles on every request without caching.UserProvider + Guard, drive it from config/services.php, and mirror the bundle's config keys (hosts, base_dn, domain) so the mental model transfers. Use ldap_bind/ldap_search directly or adldap2-laravel; do not try to shoehorn the Symfony bundle into a Laravel service container.Guard component and PHP 7 typing. Expect deprecation warnings and manual patching on modern PHP; assume no upstream fixes.ztec/security-active_directory) and the repo (RiperFr/Security-ActiveDirectoryBundle) differ from the class namespace (Ztec\...). Verify the registered bundle class name against vendor/ — a mismatch is the most common "bundle not found" error.ldap_escape() values interpolated into filters. A malicious username like *)(uid=* can bypass the bind if the filter is hand-built.ldap:// sends credentials in cleartext. Force ldaps:// on port 636 or StartTLS; verify the DC certificate or you'll silently accept MITM.anonymous rule. A misordered security.yml yields "credentials rejected" with no LDAP traffic at all — check access_control order first when debugging.ldap logging, then reproduce with raw ldapsearch -x -H ldaps://dc01 -D user@domain -W. If ldapsearch fails, the bundle will too — isolate the DC before blaming the bundle.vendor/.adldap2/adldap2-laravel, which is actively maintained and container-native.How can I help you explore Laravel packages today?