-
Notifications
You must be signed in to change notification settings - Fork 225
Support rfc2307 memberUid in sync operations. #3466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A lot of legacy directory servers will use rfc2307 schema where members of groups are stored as the uid instead of a dn. Within kani, we absolutely need this to be a dn, else we risk accidentally adding kanidm entries into ldap synced groups which isn't what we want. If we have an rfc2307 schema, then we pre-resolve the uid to the member dn so that kanidm gets the correct information.
@pmarr Are you able to test this branch with your ldap server to see if it helps you? I have done some testing, but would really want to hear back from you about it. |
Yes I can test later today or tomorrow. Is there an image tag I can pull somewhere or do I need to build the container locally off the 20250226-rfc2307-ldap branch? |
After futzing around on the wrong branch for a bit, I've now successfully run For example here is the kanidm_tools built against the correct git branch
And the server:
DISREGARD BELOW, SEE FOLLOWUP RESPONSE - forgot to set
{
"schemas": [
"urn:ietf:params:scim:schemas:kanidm:sync:1:group",
"urn:ietf:params:scim:schemas:kanidm:sync:1:posixgroup"
],
"id": "fd779974-dabf-103c-81d5-c7b825f17e5b",
"externalId": "cn=sa_group1,ou=Groups,dc=ldap,dc=example,dc=com",
"gidnumber": 10001,
"member": [
{
"external_id": "user1"
}
],
"name": "sa_group1"
},
|
I'm a dummy. Forgot to add the
I tested on uidMember that no longer exist or are in a different ou than we're syncing from. They correctly do not get added:
I do think this should be a WARN instead of a DEBUG. It was easy to miss the first time round when debugging why the groups had no members. Thanks again. This provides a cleaner migration path forward for us. |
Thank you for testing this! Really appreciate your feedback on the process, it's making Kanidm better. |
A lot of legacy directory servers will use rfc2307 schema where members of groups are stored as the uid instead of a dn. Within kani, we absolutely need this to be a dn, else we risk accidentally adding kanidm entries into ldap synced groups which isn't what we want.
If we have an rfc2307 schema, then we pre-resolve the uid to the member dn so that kanidm gets the correct information.
Fixes #3464
Checklist