Skip to content

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

Open
maniaba wants to merge 2 commits into
codeigniter4:developfrom
maniaba:ladp
Open

maniaba wants to merge 2 commits into
codeigniter4:developfrom
maniaba:ladp

Conversation

@maniaba

@maniaba maniaba commented Nov 24, 2026 •

Copy link
Copy Markdown

Description

Issue: #1413

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.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

* feat: add verified LDAP transport and filter support

* feat: integrate optional LDAP login with Shield sessions

* docs: disable remembered sessions in LDAP-only setup

* refactor: align LDAP login and exceptions with Shield conventions

* refactor: standardize LDAP class and file names

* refactor: isolate LDAP from Shield login defaults

* test: cover LDAP authentication and transport edge cases

* fix: redact native LDAP passwords from exception traces

* docs: configure LDAP through Auth properties

* chore: trigger GitHub Actions for LDAP review

* docs: connect the LDAP guide and use a controller login action

* docs: document the public LDAP API

* test: resolve Psalm errors in LDAP tests

* fix: preload migrations config for Rector analysis

* fix: remove migrations config from Rector bootstrap

* refactor: configure LDAP connections through AuthLDAP properties

* docs: address LDAP guide review feedback

* chore: retrigger PR checks after LDAP guide review

* refactor: persist LDAP identities as UserIdentity entities

* test: run OpenLDAP integration checks in CI

* fix: restore Rector analysis for LDAP changes

This branch has not been deployed

No deployments
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