fr3d/ldap-bundle
Symfony bundle that adds LDAP authentication to your app. Integrates with Symfony Security, binds against LDAP servers, maps directory attributes to user objects, and supports configurable connections/domains for directory-backed login.
What it is. FR3DLdapBundle is a Symfony bundle, not a Laravel package. It wires an LDAP directory into Symfony's security.firewalls chain by supplying an authentication provider and a user provider that maps LDAP attributes (DN, mail, cn, memberOf, etc.) onto a Doctrine-backed user entity, and delegates persistence/registration to a "user manager" such as FOSUserBundle. The design assumption is that the directory is the credential authority and the local RDBMS is the profile/authorization store, reconciled on each login.
What v4.0.0 changes. The release raises the dependency floor to PHP >=7.1 and Symfony >=3.4 and ships one breaking change: the form validator now targets Symfony 3.4 classes. There are no new capabilities — no PHP 8 support, no Symfony 5/6/7 targeting, no Laravel anything, no security process. Notably, the release notes describe 7.1 and 3.4 as "current supported versions," both of which have been end-of-life for years. That framing is itself the most informative signal in the release.
Architecture fit.
Auth::viaRequest guard, no Eloquent binding. The package is only valuable as a design artifact — re-implement its attribute-mapping and user-reconciliation logic against LdapRecord-Laravel or Adldap2-Laravel.LdapUserProvider only stabilizes from Symfony 4.4.form_login_ldap / LdapUserProvider or ldaptools/ldaptools-bundle.Integration feasibility. The core mechanics are unchanged: bind-as-user (or bind-then-search-then-rebind), DN lookup from a filter, attribute hydration, group/role mapping from memberOf. The expensive work is still the directory integration contract — base DN, bind account, AD vs. OpenLDAP schema differences, group nesting depth, TLS/CA posture. Effort is unchanged: 3–5 engineering days + 2–3 days for group→role mapping and edge cases on a Laravel build-from-reference path; 1–2 days to wire in-place, now contingent specifically on Symfony 3.4 (or a careful 4.x spike).
Technical risk. Still high, and the release removes one of the previous safety nets:
>=3.4 and >=7.1 are open-ended. Previously, Composer would often refuse to resolve the bundle into a modern tree, failing loudly at install time. Now it will happily install into a Symfony 6/7 / PHP 8.3 application and fail at runtime, in the authentication path — the worst possible failure location. Treat the constraints as advisory and never rely on resolution success as a compatibility signal.Key questions. Largely unchanged, with two additions:
composer update?Stack fit. Unchanged in substance. Treat this as a pattern source, not a dependency, unless the consuming app is a Symfony 3.4 legacy system that must stay put. Laravel → LdapRecord-Laravel (or Adldap2-Laravel); Symfony 4.4+ → native LdapUserProvider; Symfony 3.4 → the bundle is a defensible stopgap. From FR3DLdapBundle, port three ideas regardless: (1) a configurable DN-lookup filter, (2) an attribute→model map, (3) a "provision on first successful bind, sync on subsequent binds" reconciliation step.
Compatibility checklist — now with a harder edge, because install success no longer implies compatibility:
ext-ldap present in the target image (not universal; Alpine/scratch and some managed runtimes omit it).symfony/* ranges so a future upgrade PR cannot silently drag archived auth code into a modern framework.Migration path. Sequence as a strangler, not a cutover:
ldapsearch from the target runtime's network namespace; verify bind account, base DN, TLS/CA trust, and the exact attributes for one real user. No application code before this passes.memberOf values.Upgrade sequencing for existing consumers (new). Do not combine the v4.0.0 bump with anything else. The release's only functional change is a breaking validator change in the login path, so:
Maintenance. Still the dominant cost, and still yours. One release after a multi-year gap does not constitute a cadence; the stated floors (PHP 7.1, Symfony 3.4) are both long EOL, so there is no evidence of PHP 8.4/8.5 readiness or Symfony 6/7 support. Budget an internal fork with a named owner, a divergence log, and a hard review at every PHP/Symfony bump. The v4.0.0 breaking validator change is the first concrete rebase cost — small in lines, but it lands in the login path and therefore requires real regression testing rather than a version bump.
Support. No vendor, no SLA, no security contact. The release notes are a two-line summary with typos and no migration guidance for a breaking change in an authentication path — that is a reasonable proxy for process maturity. Expect to solve AD/LDAP edge cases yourself: referral chasing, paged results, nested group expansion, memberOf on AD vs. memberUid/groupOfNames on OpenLDAP, kerberos-less bind restrictions, account-lockout semantics. Keep the fork in an org-controlled namespace with CI and a SECURITY.md.
Scaling.
Failure modes.
Can't contact LDAP server; pin the CA bundle, alert on handshake failures.ext-ldap absence after a base-image change → deploy-time breakage; pin and test in the image build.composer update on an upgraded app can pull archived auth code into a Symfony 6/7 / PHP 8 runtime where it fails at login. Add a tree check for this package to the framework-upgrade runbook and CI.Ramp-up. 1–2 weeks for a mid-level engineer to become productive with LDAP semantics and the fork absent directory experience; 3–5 days with AD/OpenLDAP background. Add half a day of directory-owner time for base DNs, service-account policy, and group taxonomy — still the longest-lead external dependency; request it on day one.
Bottom line. The prior verdict was replace, don't adopt, and v4.0.0 does not overturn it — it refines it. The release is a maintenance signal, not a capability signal: it raises the floor to two long-EOL versions, ships one breaking validator change in the login path, and adds nothing for the Laravel target. Its one genuinely new consequence is negative: open-ended >=3.4 / >=7.1 constraints mean Composer will no longer fail loudly on a modern tree, so the package can enter a Symfony 6/7 application and fail at runtime instead of at install. For a Laravel target: still no-go as a dependency, useful only as a reference; build on LdapRecord. For Symfony 3.4: acceptable as a pinned internal fork with an explicit exit ticket tied to the next framework upgrade — and v4.0.0 is the baseline for that fork. For Symfony <3.4 or 4.4+: not a candidate. In all cases, gate the decision on the SSO roadmap; if SAML/OIDC lands within two quarters, this work is disposable and should not be started.
How can I help you explore Laravel packages today?