XO Community Edition - Ldap Plugin not working ?
-
It's not a problem on XO's side, so to me it's all about trying to understand your difference between XOA and the version you use. I would ask the provider of the 3rd party script, since that's where you are installing XO.
-
@olivierlambert That's fair, I'll bring it up there. I'll also find some time and build XOCE myself (using the instructions you provide in your documentation) and see if the problem follows.
-
@olivierlambert So, as luck would have it, I left work early to get ahead of a snow storm. When I got home, I decided to spin up a Debian 12 VM and build XO from sources myself while the kids were doing homework (by following the instructions here - https://docs.xen-orchestra.com/installation#from-the-sources).
In a nutshell, I was able to replicate the problem. My test user account could only authenticate successfully AFTER I reduced its group membership in Active Directory to two. Out of curiosity, I incremented the group membership by one and then tested, and kept doing that until I arrived at a max of six. The minute I added the seventh group, authentication failed. This is happening on both this new instance of XOCE and the existing instance I have in production on my church's small network.
Both instances are up-to-date (git commit 8f877).
Here's the console output of the VM while running the tests:
2025-02-11T23:42:17.461Z xo:api WARN admin@admin.net | plugin.test(...) [34ms] =!> Error: could not authenticate user 2025-02-11T23:44:14.072Z xo:api WARN admin@admin.net | plugin.test(...) [14ms] =!> Error: could not authenticate user 2025-02-11T23:45:07.777Z xo:xo-server-auth-ldap INFO successfully bound as CN=yAgbasi\, Kismet,OU=Privileged Users,OU=Users,OU=WGSDAC,DC=wgsdac,DC=net => ykagbasi authenticated 2025-02-11T23:45:07.783Z xo:xo-server-auth-ldap INFO syncing groups... 2025-02-11T23:45:07.898Z xo:xo-server-auth-ldap INFO done syncing groups
PLUGIN CLI (SUCCESSFUL)
So I tried the plugin's test-cli and this is the output. I'm curious as to why theobjectGUID
value is mangled.root@XO2:~/xen-orchestra/packages/xo-server-auth-ldap/dist# node test-cli.js ? URI ldap://x.x.x.x:389 ? fill optional Certificate Authorities? No ? fill optional Check certificate? No ? fill optional Use StartTLS? No ? Base OU=WGSDAC,DC=wgsdac,DC=net ? fill optional Credentials? Yes ? Credentials > dn CN=xxXenOrchestra Service Account,OU=Service Accounts,OU=Users,OU=WGSDAC,DC=wgsdac,DC=net ? Credentials > password SUPERSECRETPASSWORD ? fill optional User filter? Yes ? User filter (&(sAMAccountName={{name}})(memberOf=CN=IT_XenOrchestra_Admins,OU=Groups,OU=WGSDAC,DC=wgsdac,DC=net)) ? ID attribute sAMAccountName ? fill optional Synchronize groups? Yes ? Synchronize groups > Base OU=Groups,OU=WGSDAC,DC=wgsdac,DC=net ? Synchronize groups > Filter (objectClass=group) ? Synchronize groups > ID attribute dn ? Synchronize groups > Display name attribute cn ? Synchronize groups > Members mapping > Group attribute member ? Synchronize groups > Members mapping > User attribute dn configuration saved in ./ldap.cache.conf ? Username ykagbasi ? Password [hidden] 2025-02-12T00:06:49.730Z xo:xo-server-auth-ldap DEBUG attempting to bind with as CN=xxXenOrchestra Service Account,OU=Service Accounts,OU=Users,OU=WGSDAC,DC=wgsdac,DC=net... 2025-02-12T00:06:49.741Z xo:xo-server-auth-ldap DEBUG successfully bound as CN=xxXenOrchestra Service Account,OU=Service Accounts,OU=Users,OU=WGSDAC,DC=wgsdac,DC=net 2025-02-12T00:06:49.741Z xo:xo-server-auth-ldap DEBUG searching for entries... 2025-02-12T00:06:49.746Z xo:xo-server-auth-ldap DEBUG 1 entries found 2025-02-12T00:06:49.746Z xo:xo-server-auth-ldap DEBUG attempting to bind as CN=yAgbasi\, Kismet,OU=Privileged Users,OU=Users,OU=WGSDAC,DC=wgsdac,DC=net 2025-02-12T00:06:49.748Z xo:xo-server-auth-ldap INFO successfully bound as CN=yAgbasi\, Kismet,OU=Privileged Users,OU=Users,OU=WGSDAC,DC=wgsdac,DC=net => ykagbasi authenticated 2025-02-12T00:06:49.749Z xo:xo-server-auth-ldap DEBUG { "dn": "CN=yAgbasi\\, Kismet,OU=Privileged Users,OU=Users,OU=WGSDAC,DC=wgsdac,DC=net", "objectClass": [ "top", "person", "organizationalPerson", "user" ], "cn": "yAgbasi, Kismet", "sn": "yAgbasi", "c": "US", "l": "Severn", "st": "MD", "description": "For Testing Xen Orchestra LDAP Auth failures", "postalCode": "21144", "givenName": "Kismet", "distinguishedName": "CN=yAgbasi\\, Kismet,OU=Privileged Users,OU=Users,OU=WGSDAC,DC=wgsdac,DC=net", "instanceType": "4", "whenCreated": "20230716100123.0Z", "whenChanged": "20250211234414.0Z", "displayName": "Kismet yAgbasi", "uSNCreated": "1222253", "memberOf": "CN=IT_XenOrchestra_Admins,OU=Groups,OU=WGSDAC,DC=wgsdac,DC=net", "uSNChanged": "6046408", "co": "United States", "department": "Communications Department", "company": "Washington-Ghanaian SDA Church", "name": "yAgbasi, Kismet", "objectGUID": "mX�_���F�.�i�lq�", "userAccountControl": "512", "badPwdCount": "0", "codePage": "0", "countryCode": "840", "badPasswordTime": "0", "lastLogoff": "0", "lastLogon": "0", "pwdLastSet": "133837909104346381", "primaryGroupID": "513", "objectSid": "\u0001\u0005\u0000\u0000\u0000\u0000\u0000\u0005\u0015\u0000\u0000\u0000�A�\u0015�d�G�:��q\u0006\u0000\u0000", "adminCount": "1", "accountExpires": "9223372036854775807", "logonCount": "0", "sAMAccountName": "ykagbasi", "sAMAccountType": "805306368", "userPrincipalName": "ykagbasi@wgsdac.org", "lockoutTime": "0", "objectCategory": "CN=Person,CN=Schema,CN=Configuration,DC=wgsdac,DC=net", "dSCorePropagationData": [ "20230716110107.0Z", "16010101000000.0Z" ], "lastLogonTimestamp": "133837910540472258" } root@XO2:~/xen-orchestra/packages/xo-server-auth-ldap/dist#
-
And with a fresh XOA you do not have the problem, even on
latest
? -
@olivierlambert I have an XOA instance on the
Stable
channel (v5.102.1) which I'd pulled down earlier to troubleshoot another issue with you, however, my trial has ended so all the plugins have been unloaded.I can test if you'll reactivate my trial (kagbasi at wgsdac.org). Let me know.
-
Trial extended
-
@olivierlambert Thanks.
XOA Test results:
-
On Stable v5.102.1 - issue persists. Auth failure occurs with AD group membership at 7.
-
On Latest v5.103.1 - issue persists. Auth failure occurs with AD group membership at 7.
I can make a screen recording of my testing, if that helps lend more credibility? Just let me know, thanks.
-
-
Ah and now it's logical then
I believe you, this is possibly a bug in XO if you have it both on sources and XOA.
Worth opening a Github issue!
-
@olivierlambert Awesome, glad I could convince ya
. I will submit a Github issue shortly, thanks again.
-
@olivierlambert I have just submitted a Github issue for this - https://github.com/vatesfr/xen-orchestra/issues/8351
Thanks again for indulging me.