Skip to content

feat: add generic LDAP authentication strategy using ldapts#1496

Open
1saac-k wants to merge 6 commits intofinos:mainfrom
1saac-k:add-ldap-auth
Open

feat: add generic LDAP authentication strategy using ldapts#1496
1saac-k wants to merge 6 commits intofinos:mainfrom
1saac-k:add-ldap-auth

Conversation

@1saac-k
Copy link
Copy Markdown

@1saac-k 1saac-k commented Apr 7, 2026

Closes #1488

Add a new ldap authentication type that integrates with any standards-compliant LDAP server. The existing
activedirectory type relies on the activedirectory2 library which is AD-specific and incompatible with lightweight
LDAP servers (e.g. lldap). This PR introduces a generic LDAP strategy built on ldapts
and passport-custom, lowering the barrier to entry for teams that want simple, manageable user authentication without
setting up a full Active Directory.

This implementation is not lldap-specific — it supports any standards-compliant LDAP server, which means it should also work with Active Directory. As a result, it may be possible in the future to replace the deprecated activedirectory2 and ldapjs dependencies with ldapts.

Testing

  • 11 unit tests added covering authentication success/failure scenarios.
  • Manually verified end-to-end against a running lldap instance.

@1saac-k 1saac-k requested a review from a team as a code owner April 7, 2026 15:01
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 735e842
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/69d6608ebbf59400082c6d10

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Apr 7, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

1saac-k added 6 commits April 8, 2026 22:54
Add ldapts (v8.1.7) for modern LDAP client support and
passport-custom (v1.1.1) for custom Passport strategy creation.

Signed-off-by: Kwangjin Ko <kyet@me.com>
Add LDAP auth type definition to config.schema.json and
generated TypeScript types with LdapConfig interface.

Signed-off-by: Kwangjin Ko <kyet@me.com>
Add disabled ldap authentication entry with sensible defaults
for attribute mappings, and group settings.

Signed-off-by: Kwangjin Ko <kyet@me.com>
Add new LDAP authentication strategy that uses ldapts for LDAP
operations and passport-custom for Passport integration.

The authentication flow:
1. Bind with service account
2. Search for user entry
3. Check group memberships (user/admin)
4. Verify user password via user bind
5. Sync user profile to database

Signed-off-by: Kwangjin Ko <kyet@me.com>
Add ldap module to passport strategy registry and include it
in the list of username/password login strategies.

Signed-off-by: Kwangjin Ko <kyet@me.com>
Test cases cover: successful auth with admin/non-admin roles,
user not found, user group rejection, invalid password,
connection errors, multiple entries in search result,
missing credentials, and escapeFilterValue with normal strings,
LDAP injection attempts, and RFC 4515 special characters.

Signed-off-by: Kwangjin Ko <kyet@me.com>
@1saac-k
Copy link
Copy Markdown
Author

1saac-k commented Apr 8, 2026

Since this work was done outside of my company, I changed the commit email to my personal email and added GPG signatures to sign the CLA as an individual contributor.

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.

Discussion and Questions on Local/AD/LDAP Authentication

1 participant