Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support LDAP user import for LDAP instances without group structure #3152

Open
jetblack0 opened this issue Sep 18, 2024 · 0 comments
Open

Support LDAP user import for LDAP instances without group structure #3152

jetblack0 opened this issue Sep 18, 2024 · 0 comments

Comments

@jetblack0
Copy link

Description

Currently the LDAP feature of Calibre-web requires a group structure for the LDAP instance, which limits its compatibility with simpler LDAP setups where users are not organized into groups. This group-based structure also requires modifying multiple LDAP nodes when adding new users. It would be helpful to have the ability to import users from LDAP instances where users are categorized under non-leaf nodes, for example:

dn: ou=user,dc=example,dc=com
objectClass: organizationalUnit 
ou: user

dn: ou=appUser,ou=user,dc=example,dc=com
objectClass: organizationalUnit
ou: appUser

dn: ou=adminUser,ou=user,dc=example,dc=com
objectClass: organizationalUnit
ou: adminUser

dn: uid=john,ou=appUser,ou=user,dc=example,dc=com
objectClass: inetOrgPerson
uid: john
sn: John
mail: [email protected]
userPassword: ...
...

Proposed Solution

Add support for importing users directly from an LDAP directory without requiring them to be part of a group, similar to Jellyfin's ldap-auth-plugin. For the LDAP structure above, the configuration could look something like this, similar to Jellyfin's LDAP plugin:

  • LDAP Base DN for searches (The base DN for your LDAP query): dn: ou=user,dc=example,dc=com.
  • LDAP Search Filter ( LDAP search filter to limit user searches): (userPassword=*)
  • LDAP Search Attributes (A comma-separated list of attributes to search for the username): uid, cn, mail
  • LDAP Uid Attribute (The LDAP attribute to use to uniquely identify the user): uid
  • LDAP Username Attribute (The LDAP attribute to use as the username): displayName
  • LDAP Password Attribute (The LDAP attribute for the user password): userPassword

Additional Context

I might be able to work around this by writing complex search filters for group objects and other fields, but doing so would introduce unnecessary confusion in the configuration. A more straightforward LDAP integration like the one in Jellyfin would make Calibre-web more versatile for various LDAP environments.

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

No branches or pull requests

1 participant