Skip to content

[auth] Allow a full bind DN as LDAP_USER for LDAP sync#1164

Merged
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:fix-ldap-bind-full-dn
Jul 13, 2026
Merged

[auth] Allow a full bind DN as LDAP_USER for LDAP sync#1164
frankrousseau merged 1 commit into
cgwire:mainfrom
frankrousseau:fix-ldap-bind-full-dn

Conversation

@frankrousseau

Copy link
Copy Markdown
Contributor

Problem

  • zou sync-with-ldap-server fails with LDAPInvalidCredentialsResult on OpenLDAP servers: the bind user is always built as uid=<LDAP_USER>,<LDAP_BASE_DN>, but OpenLDAP admin accounts usually live outside the users base DN (e.g. cn=admin,dc=studio,dc=local), so there is no way to provide a working bind identity.

Solution

  • When LDAP_USER contains a =, treat it as a full bind DN and pass it to the LDAP bind untouched; plain usernames keep the existing uid=...,<base DN> behavior.

Fix #1070

sync-with-ldap-server always built the bind user as
uid=<LDAP_USER>,<LDAP_BASE_DN>, which fails with invalidCredentials on
OpenLDAP setups where the admin account lives outside the users base DN
(e.g. cn=admin,dc=studio,dc=local). When LDAP_USER contains a "=", it
is now treated as a full DN and passed to the bind untouched.

Fix cgwire#1070

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@frankrousseau
frankrousseau merged commit a1d51ec into cgwire:main Jul 13, 2026
14 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.

OpenLDAP - Unable to run sync-with-ldap-server

1 participant