Hello all. I am attempting to create a config ...
# troubleshooting
b
Hello all. I am attempting to create a config file with the book management software jelu, but am struggling.
n
Here's a brand new thread for you! Please keep the discussion for this problem in this thread.
n
Hi! What do you have so far?
b
Right now, my current config is
Copy code
ldap:
      enabled: true
      url: "ldap://LLDAP:3890/dc=home,dc=lab"
      userSearchFilter: "(memberof=cn=<existing_group_in_lldap>,ou=groups,dc=home,dc=lab)"
      userSearchBase: "ou=people,dc=home,dc=lab"
      userDN: "cn=admin,ou=people,dc=home,dc=lab"
      password: "<super secret password>"
However, the error that keeps coming up is
Property 'userDn' not set - anonymous context will be used for read-write operations
which means when attempting to login,
login error, backend seems down or unreachable
Any ideas? (Thanks also for your SUPER fast response on git!)
I'm currently combing the example configs on the LLDAP git to try and find anything like this one.
n
Hmm, the error seems very Jelu-specific. Jelu is complaining that the userDN property is not set, and it won't try to log in properly until it is
Looking at the code, I'm guessing it's simply a question of casing ๐Ÿ˜„ The error is complaining about
userDn
and you're specifying
userDN
. Spot the difference!
b
Oh geez.
lol. Let me fix that. haha
I swear, doesn't matter how many times you look at something. ๐Ÿ™‚
Same error even with
userDn: cn=admin,ou=people,dc=home,dc=lab
changed.
n
Still getting
Property userDn not set
?
and in the context of the full yaml, it's
jelu.auth.ldap.userDn
?
b
Yes, same error still.
Yes ,that is correct. correct casing included. ๐Ÿ™‚
Copy code
jelu:
  auth:
    ldap:
      enabled: true
      url: "ldap://LLDAP:3890/dc=home,dc=lab"
      userSearchFilter: "(memberof=cn=requesters,ou=groups,dc=home,dc=lab)"
      userSearchBase: "ou=people,dc=home,dc=lab"
      userDn: "cn=admin,ou=people,dc=home,dc=lab"
      password: "password"
n
Hmm, I tried to have a look at the code, but there are too many injections to be able to follow, too much annotation magic, and a lot of logic implemented in the Spring Framework that I don't know at all. Your best chance is to talk to the owner, I think
b
Thanks again. I will do that. If all is successful, I will add this config to the repository here.
Thank you!
I'm still on the hunt to solve this. The developer wasn't super helpful, as he/she didn't seem to have a lot of knowledge about lldap.
However, I think I have made progress.
After more tinkering with the yaml, I can get a password to accept for a user and group listings to happen:
Copy code
jelu:
  auth:
    ldap:
      enabled: true
      url: "ldap://LLDAP:3890/dc=home,dc=lab"
      userSearchFilter: "(uid={0})"
      userSearchBase: "ou=people"
      userDn: "cn=admin,ou=people,dc=home,dc=lab"
      password: "sweet_password"
The log (and subsequent errors) are here:
Copy code
INFO     LDAP session [ 26.2ms | 0.11% / 100.00% ]
INFO     โ”โ” LDAP request [ 26.2ms | 0.12% / 99.88% ]
DEBUG    โ”‚  โ”โ” ๐Ÿ› [debug]:  | msg: LdapMsg { msgid: 1, op: BindRequest(LdapBindRequest { dn: "uid=my_user,ou=people,dc=home,dc=lab", cred: Simple("********") }), ctrl: [] }
DEBUG    โ”‚  โ”โ” do_bind [ 26.2ms | 0.05% / 99.76% ]
DEBUG    โ”‚  โ”‚  โ”โ” ๐Ÿ› [debug]: DN: uid=my_user,ou=people,dc=home,dc=lab
DEBUG    โ”‚  โ”‚  โ”โ” bind [ 26.0ms | 0.01% / 99.07% ]
DEBUG    โ”‚  โ”‚  โ”‚  โ”โ” get_password_file_for_user [ 28.8ยตs | 0.11% ]
DEBUG    โ”‚  โ”‚  โ”‚  โ”•โ” passwords_match [ 25.9ms | 98.94% ]
DEBUG    โ”‚  โ”‚  โ”โ” get_user_groups [ 170ยตs | 0.65% ]
DEBUG    โ”‚  โ”‚  โ”‚  โ”โ” ๐Ÿ› [debug]:  | user_id: UserId("my_user")
DEBUG    โ”‚  โ”‚  โ”‚  โ”•โ” ๐Ÿ› [debug]:  | return: {GroupDetails { group_id: GroupId(2), display_name: "lldap_password_manager", creation_date: 2023-08-20T12:47:32, uuid: Uuid("e6b15fce-fd99-387e-bcd2-a24971e9bcc1") }, GroupDetails { group_id: GroupId(6), display_name: "requests", creation_date: 2023-08-29T11:35:55, uuid: Uuid("fb552d4b-6875-3b95-8d31-9a70d29b2951") }, GroupDetails { group_id: GroupId(4), display_name: "calibre_web", creation_date: 2023-08-28T15:39:55, uuid: Uuid("23ab1e77-fdf4-328c-93f8-d84d3df11d3d") }, GroupDetails { group_id: GroupId(5), display_name: "vaultwarden", creation_date: 2023-08-29T11:35:45, uuid: Uuid("5e892e73-98be-3ea7-987c-7d1eb618f74c") }}
DEBUG    โ”‚  โ”‚  โ”•โ” ๐Ÿ› [debug]: Success!
DEBUG    โ”‚  โ”•โ” ๐Ÿ› [debug]:  | response: BindResponse(LdapBindResponse { res: LdapResult { code: Success, matcheddn: "", message: "", referral: [] }, saslcreds: None })
ERROR    โ”โ” ๐Ÿšจ [error]: Unsupported control oid | o: 2.16.840.1.113730.3.4.2
ERROR    โ”โ” ๐Ÿšจ [error]: Failed to parse ldapcontrol
INFO     โ”•โ” LDAP request [ 2.10ยตs | 0.01% ]
DEBUG       โ”•โ” ๐Ÿ› [debug]:  | msg: LdapMsg { msgid: 2, op: UnbindRequest, ctrl: [] }
I'll stop tinkering until I hear back, as I'm not sure I will be able to make much more progress on my own. Thanks!
n
Ah yeah, you won't get much further with tinkering...
There was a similar issue recently, our underlying ldap parsing library doesn't support many controls, and this client sends an unsupported one.
It seems to be the same control as reported in https://github.com/kanidm/ldap3/issues/28
b
Gotcha! Thanks. This would be something I would need to ask jelu to fix, then, correct?
n
No, that's on us
They're sending a perfectly valid message
It's just that we don't support it (yet)
b
No worries, then. Super appreciative of what you have already, as it is the foundation of user management in my UnRaid server.
Thanks for all you are doing here!
n
Glad to hear it! And if you like the project and you feel like it, you can support it!
By the way, could I ask you to get a tcpdump pcap file from the login attempt? When you get the
Unsupported control oid | o: 2.16.840.1.113730.3.4.2
message. That way we can check all the controls that are requested and if there's more than one that we don't support, we can add them all at once.
The fix was merged in the lday library, and LLDAP has updated to use it, so you can give it a try!