Skip to content

feat: add opt-in LDAP and Active Directory authentication - #1

Merged
maniaba merged 21 commits into
ladpfrom
feat-ldap
Nov 24, 2026
Merged

maniaba merged 21 commits into
ladpfrom
feat-ldap

Conversation

@maniaba

@maniaba maniaba commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add opt-in LDAPv3 authentication for Active Directory and OpenLDAP. Applications register the ldap authenticator and direct their login POST route to it. LDAP verifies the directory credentials and uses Shield's existing users, sessions, login actions, and authorization checks.

  • Named connections support verified LDAPS or StartTLS, ordered endpoint failover, and bounded searches. Login filters escape submitted identifiers, and the transport rechecks eligibility and the immutable identity after the user bind.
  • Applications can explicitly link an existing Shield user or enable just-in-time provisioning and mapped profile updates. Links use a connection-scoped immutable ID such as AD objectGUID or OpenLDAP entryUUID. Shield does not store directory passwords.
  • Hybrid deployments can reserve local operator names and pin them to Shield user IDs. Those operators must complete a configured Shield login action.
  • The native transport uses optional ext-ldap. Identity links use the existing auth_identities table. Setup examples and bounded diagnostic APIs are documented in the LDAP guide.

Scope

Directory group filters can restrict login eligibility. Group assignment and synchronization, scheduled reconciliation, and revalidation of existing sessions are follow-up work. Applications using force-reset on routes accessed by passwordless LDAP users need the separate fix in codeigniter4/shield#1411.

Verification

  • Full PHPUnit suite on PHP 8.3 passed with 749 tests and 1,771 assertions, including 10 live OpenLDAP tests over LDAPS and StartTLS.
  • All 19 native transport tests passed with ext-ldap disabled.
  • PHP-CS-Fixer, Rector, PHPStan, and the strict MkDocs build passed.
  • Active Directory configuration and objectGUID handling are covered by automated tests. Live directory testing used OpenLDAP.

@maniaba maniaba changed the title Feat ldap feat: add opt-in LDAP and Active Directory authentication Nov 23, 2026
Comment thread docs/getting_started/authenticators.md Resolved
@maniaba
maniaba changed the base branch from develop to ladp November 24, 2026 11:31
@maniaba
maniaba merged commit 824bd55 into ladp Nov 24, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant