mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 16:25:55 +03:00
[GH-ISSUE #67] Feature Request: Arbitrary and Duplicate Text Fields #31
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dwmunster on GitHub (Oct 21, 2021).
Original GitHub issue: https://github.com/lldap/lldap/issues/67
Overview
As an LLDAP admin, I would like to be able to define arbitrary text fields that may be repeated to extend the user object schema.
Details
I would like to see the following:
Context
I am interested in using LLDAP as a user DB for my mail server and to replace my OpenLDAP instance with something much more manageable. However, my users may have more than one email address assigned to them. Currently, I have that implemented with a repeated
mailaliasattribute. For example, my user looks something like the following:Restricting the ability for users to change the
mailaliasattributes is also crucial to prevent users from impersonating other users and sending mail from arbitrary addresses.Other use cases include:
Task breakdown:
@nitnelave commented on GitHub (Oct 22, 2021):
We talked about it a bit on Discord. It'll probably end up getting implemented without a schema: if you request the field, it's there, but otherwise you can't know about it. Moreover, we'll probably only have unstructured strings only, but we'll support repeated or single (if it makes a difference).
In terms of prioritization though, it'll come after the V1 project, so not for a while.
@nitnelave commented on GitHub (Sep 17, 2022):
Here's an RFC for this feature: https://docs.google.com/document/d/1BdizgwX6Pvy5hqH8_HzSg3LCa66tQSDhrTsdhF80ySY/edit?usp=drivesdk
@Samonitari commented on GitHub (Oct 13, 2022):
Wow!
I was searching for ldap-ui when I stumbled upon this project, which seems pretty awesome.
The only thing stopping me from using this form my family mail/matrix/nextcloud/etc self-host is - mostly - mailAlias attribute.
OTOH, reading the RFC, what use does
objectClassfiltering will have, if any filtering will always return all users (or groups) if all new items are added for all users (groups)Seems like adding new, quasi-objectclasses to all users or all groups is quite a limitation, kinda defeats the whole auxilliary class paradigm.
For example, I only host mail for immediate family, meaning they would have PostfixBookMailAccount as auxilliay objectClass, but I host matrix for the larger family.
I have to have filtering based on different objectClass I think... I know it is not intended as a full (Open)LDAP replacement, I am not asking for
groupOfUrls,ppolicyand the like.Could you improve on the RFC possibly?
@nitnelave commented on GitHub (Oct 13, 2022):
@Samonitari The
objectclassis just so that you can customize the output to match whatever your service expects (e.g. "Oh I only work with PosixUser" -> all the users are now PosixUsers).The classes in LDAP allow to change the structure of objects, and in LLDAP you only ever have 2 structures, users and groups.
For your usecase, there is a simpler solution: have 2 groups,
mailUsersandmatrixUsers, and add your users to each group as needed. Then you can filter on these groups.@Samonitari commented on GitHub (Oct 13, 2022):
Fair enough.
I am still wrapping my head around a few things to solve differently (or at all) with LLDAP.
Can I reach you in like matrix or something (or could I write an email)?
@Samonitari commented on GitHub (Oct 13, 2022):
BTW, Nextcloud's Mail app have support for getting aliases from a - arbitrarily named - LDAP attribute, which makes handling multiple mail identities for a single mailbox a breeze. You automatically get your identities with your provisioned mail accounts.
Just some context for what this feature means 😜
@nitnelave commented on GitHub (Oct 13, 2022):
Feel free to join the Discord :)
@blysik commented on GitHub (Apr 5, 2023):
This could also be used to get ssh keys in? I'm currently using glauth for ldap, and rely on it to make ssh public keys available.
@nitnelave commented on GitHub (Apr 5, 2023):
Yes, ssh keys should work with this.
On Wed, 5 Apr 2023, 19:00 Bruce Lysik, @.***> wrote:
@abn0mad commented on GitHub (May 9, 2023):
Is there a timeline for this feature?
LLDAP is a truly wonderful project, many thanks for all the team's efforts.
The addition of custom fields, however, is sorely needed for compatibility with other apps such as sftpgo and its external (ldap) authentication hook which requires a sshpublickey and homedir field to operate.
Again, many thanks for the fantastic project and all the effort, very much appreciated. :)
@nitnelave commented on GitHub (May 9, 2023):
It is the top priority, but I don't have a timeline for my free time :)
If you want to help me build confidence to get started, you can contribute new integration tests for the integrations you care about. See the gitea integration test here: https://github.com/lldap/lldap/blob/main/server/tests/integrations.rs
The idea is to issue the same LDAP queries as the service, and to check that the output is as expected.
This issue requires a fundamental schema and query change, and I don't want to break everything.
@abn0mad commented on GitHub (May 9, 2023):
@nitnelave that's totally understandable, and again, thank you for all the hard work on the project. Happy to hear that it is a priority. I hope to include both LLDAP and Kanidm in a series of tutorials and guides that I plan to write on setting up FOSS-based networks and servers. Hopefully, that will attract some organisations to sponsor both projects, as they are well-deserved of more support.
I'll see what I can do with the integration test suggestion, if I can help I surely shall, but it will take me some time to get my head around the code. (Bit of a noob with Rust to be honest : (
Thanks again for reading and answering and all the hard work; hope I can contribute in the near future :)
@nitnelave commented on GitHub (Sep 15, 2023):
For all those watching this issue, as you can see there's been some activity. I created a bunch of tasks to show the roadmap of what's left to implement, you can follow along ;)
@nitnelave commented on GitHub (Oct 22, 2023):
Alright, the feature should be functionally complete, but I don't have the frontend updated yet. It's going to be slightly non-trivial, so it'll come little by little.
If there are some brave souls, you can use the graphql API (with the playground or with a client library, or even just curl) to create custom attributes, and add them to users and groups. Any testing would be much appreciated!
With that, a bunch of integrations are unlocked: PAM with sssd, windows with samba, ssh keys stored in LLDAP...
It'll probably take a little effort to figure out the exact configuration, but as a community we should be able to figure it out :)
@vincentDcmps commented on GitHub (Nov 15, 2023):
Hi thanks for your work, I just try to add an attribute uidNumber and set on user admin via graphql but when I request information via LDAPsearch I can't get this attribute, this function is not implemented yet?
@nitnelave commented on GitHub (Nov 16, 2023):
@vincentDcmps can you try specifically requesting the attribute by name in the LDAP query?
@vincentDcmps commented on GitHub (Nov 16, 2023):
yes see answer of graphql query
and with this
log message:
@nitnelave commented on GitHub (Nov 16, 2023):
Oh, I think I know what's going on: we create the attribute with the exact name, keeping the case, but we try to find it in a case insensitive way by converting the input to lowercase. If you delete your attribute and recreate it as "uidnumber" (no uppercase), does it work? If so, I already have a WIP PR that'll fix this.
@vincentDcmps commented on GitHub (Nov 17, 2023):
indeed this works with attribute in lowercase thanks
@nitnelave commented on GitHub (Dec 28, 2023):
We now have an (experimental) CLI frontend for the custom attributes: https://github.com/Zepmann/lldap-cli
Thanks @Zepmann !
Feel free to try it out, it should greatly simplify handling of attributes (but it's not user friendly, only admin friendly)
@Zepmann commented on GitHub (Dec 28, 2023):
I prefer the term user-centric. 😉
If there are any questions about the usage of LLDAP-CLI, please let me know by tagging me in. To get you started, consider these commands:
Replace
adminandsomepasswordwith valid LLDAP credentials of an administrator account.The first set of command shows you which user attributes are in the schema, which user attributes have a value for user
someuser, and what the value of themailattribute is forsomeuser.The last set of command defines new user attribute
mailAliasin the schema, gives it two values for usersomeuser(since it is a list, it can have multiple values), and shows the values as configured.@jakob42 commented on GitHub (Jan 6, 2024):
I'm a bit unclear about whats already in the current 0.5 release. I thought custom attributes would be already included, but it doesn't seem to work for me with the commands Zepmann had here as an example:
Do I need a dev version to test this feature?
@Zepmann commented on GitHub (Jan 6, 2024):
@jakob42
Custom attributes only work in the current development version. There hasn't yet been a stable release of LLDAP that includes it.
@nitnelave commented on GitHub (Jan 6, 2024):
I was waiting until we have a UI for it before releasing it. Now that we have the CLI tool, it's not the best but I'll make a stable release. It has been already tested by several people, and no major issues remain. I'll still want to fix #763 before releasing though.
@Zepmann commented on GitHub (Jan 6, 2024):
@nitnelave
You can always make a stable release in which you label some features experimental, such as custom attributes. This will temper expectations, especially since this new feature is only usable with community-contributed tooling for now and has not been extensively tested.
@jakob42 commented on GitHub (Jan 6, 2024):
Thanks @nitnelave! No need to hurry on my account, I'll either patiently wait or get a dev version. :-)
@nitnelave commented on GitHub (Oct 21, 2024):
The frontend is now complete for custom attributes (no aliases, yet), feel free to try it and report any issues.
@twitzelbos commented on GitHub (Jun 10, 2025):
I'm interested in this as well. Are there any other people interested in using lldap for posix id provider applications?
@nitnelave commented on GitHub (Jun 10, 2025):
Have you checked out our PAM/SSSD configuration guides?
@twitzelbos commented on GitHub (Jun 10, 2025):
I guess not. Thank you for pointing it out.
@twitzelbos commented on GitHub (Jun 11, 2025):
@nitnelave are there any premade scripts to affect all the attribute schema changes for SSSD/posix?
@nitnelave commented on GitHub (Jun 11, 2025):
Not yet, but we're working on a plugin API which will include not only the setup, but also updating users on creation and almost everything else you might need.
@twitzelbos commented on GitHub (Jun 11, 2025):
Let me know if you need any help, I have a little bandwidth.
So today I should just use lldap-cli ?
@nitnelave commented on GitHub (Jun 11, 2025):
You can use lldap-cli or the web frontend. The plugin issue is #714, but right now we have a contributor who has done most of the work in not-yet-PR'd private branches, so I don't think there's much you can do. But once we get something going, feel free to follow the issue, we might call for early adopters to provide feedback/develop plugins.