mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-11 09:13:15 +03:00
🐛 Bug Report: LDAP: With wrong unique attribute for groups ldap sync creates _local_ groups. #281
Reference in New Issue
Block a user
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 @jose-d on GitHub.
Originally assigned to: @kmendell on GitHub.
Reproduction steps
I installed pocket-id using docker image and connected it to instance of freeIPA.
Expected behavior
Imported groups are shown with source
LDAP.Actual Behavior
Groups imported from LDAP are shown as
localVersion and Environment
0.42.1 in Docker behind haproxy
Log Output
@kmendell commented on GitHub:
Does the value uuid exsist on the group in freeipa? Some stuff does it differently uuid was lldap , but most ldpa solutions have a unique value for each entry thats what you should use.
@kmendell commented on GitHub:
If its uses the same Logic as LDAP it should work.
My guess is something is not setting the ldapId value on the groups. If you try to edit a group thats from ldap (dont save it), does it let you or are the values and options greyed out?
Same thing for users?
@kmendell commented on GitHub:
I have never used FreeIPA , Does it differ from LDAP in any way when it comes do search queries?
Also do you get any error logs load this page?
@jose-d commented on GitHub:
it is solution around LDAP so should be not different.
I can provide output of any
ldapsearchif needed to verify it.On every LDAP sync I see this kind of error for all LDAP groups: (
c4is ldap group and I never created it manually for sure )so cannot be that the groups were somehow created as
localduring initial sync?no. When I refresh group page with F5 in browser, in
docker logsI see:@jose-d commented on GitHub:
yes, I am able to check/uncheck the check-boxes with (possible) members in group and type into textbox with groupname
no, when I open particular user in /settings/admin/users , then I can not edit name, it's grayed out.
when I check the
user_groupssqlite table, it looks like this (i redacted some more sensitive groupnames)@kmendell commented on GitHub:
@jose-d No worries, I actually just implemented a quick fix to skip over groups or user without a valid ldap id.
@jose-d commented on GitHub:
thanks, this was helpful.
ipaUniqueIDwas the right one, the local groups indeed need to be deleted, and then the import works fine.Next week I'll take look at the code if we could somehow detect similar scenario and avoid creating such false local groups.
@kmendell commented on GitHub:
It looks like the unqiue attribute fpr groups in free ipa is:
ipaUniqueIDor you can trygidNumberas well