mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #893] [FEATURE REQUEST] Return schema in RootDSE for better compatibility with Apache Directory Studio Browser #323
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#323
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 @GCTWorks on GitHub (Apr 8, 2024).
Original GitHub issue: https://github.com/lldap/lldap/issues/893
Motivation
I want to be able to use Apache Directory Studio Browser to browse LLDAP server
Describe the solution you'd like
When creating the connection to LLDAP in Apache Directory Studio, you must enter the baseDN manually because LLDAP is "Missing schema location in RootDSE" and the baseDN(s) cannot be fetched.
I can make this work half way by creating two connections and manually identifying one baseDN as
ou=people,dc=example,dc=comorou=groups,dc=example,dc=com. However, they must be separate connections. It would be nice if there was an OU one level up or some other way to identify the baseDN. Even better would be for that baseDN to be fetchable by the Apache Directory Studio.@nitnelave commented on GitHub (Apr 9, 2024):
I don't know that much about rootDSE and how to respond with the schema. In the spirit of my limited time and to avoid reading the RFC, could you provide an example of a rootDSE response you'd like to see?
@GCTWorks commented on GitHub (Apr 9, 2024):
I am not too sure myself. I actually only extremely recently made myself familiar with LDAP because I wanted to use your tool in my homelab, and I had needs for work.
Some searching came up with what I think might be a good explanation of rootDSE here: link
What I think this means is that there is no schema returned when it (Apache Directory Studio) tries to fetch the root of the directory server.
What this results in is the following error message.

Also, if there is no "namespaceless" root, then Apache Directory Studio is restricted to a connection to LLDAP that has a baseDN of
ou=people,dc=example,dc=comorou=groups,dc=example,dc=com, but not both in the same connection. I think it is looking for a level above.I hope this clarifies. I could also be way off base as I am very very new to this stuff and may not have any idea what I am talking about, but I am trying to learn.
By the way... I really like your LLDAP tool. It is amazing for small homelabs to dip feet into LDAP. My friends and I that are on the homelab journey together are enjoying its use. I appreciate the hard work.
@nitnelave commented on GitHub (Apr 9, 2024):
@FirstYear hey, do you know what's needed in the rootDSE for this? I made the minimum effort to be compliant, but this is stretching my knowledge.
I guess I need to declare and implement the DC level above the OUs, and declare a schema?
@Firstyear commented on GitHub (Apr 9, 2024):
I'll save you the trouble of reading the (whole) RFC:
https://www.rfc-editor.org/rfc/rfc4512#section-4.4
"""
To discover the DN of the subschema (sub)entry holding the subschema
controlling a particular entry, a client reads that entry's
'subschemaSubentry' operational attribute. To read schema attributes
from the subschema (sub)entry, clients MUST issue a Search operation
[RFC4511] where baseObject is the DN of the subschema (sub)entry,
scope is baseObject, filter is "(objectClass=subschema)" [RFC4515],
and the attributes field lists the names of the desired schema
attributes (as they are operational). Note: the
"(objectClass=subschema)" filter allows LDAP servers that gateway to
X.500 to detect that subentry information is being requested.
"""
So this really glosses over whats going on.
In the rootdse you have:
subschemaSubentry is operational, so only return it on
+or when requested.The client then searches with that as the base dn, you just respond with a single entry with a ton of attributes representing the schema.
These entries are defined in https://www.rfc-editor.org/rfc/rfc4512#section-4.2 again with the usual level of "specific but not clear" as we would expect from an LDAP rfc.
And easy way to "cheat" and check this would be to look at what something else does. So here's an ldif I prepared for you.
@nitnelave commented on GitHub (Apr 10, 2024):
Oh, geez, it's more complicated than I thought... I was hoping for adding a couple of lines to the hardcoded rootDSE 😅
Thanks a lot!
@Firstyear commented on GitHub (Apr 10, 2024):
but for once it's not twice as complicated as it should be.