Does ldap groups work with openldap? #10399

Closed
opened 2025-11-02 09:06:30 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @night-gold on GitHub (Mar 8, 2023).

Description

I'm trying to link groups to gitea organization/teams.

For tests purposes I tried to link the ldap admins to a test "Admins" organization with an "Admins" team that I created.

Users synchronisation is working so I thought this option should work as well but I can't really found any clear description of this feature or how I should fill it, you never know I may be doing something wrong. My current configuration look like that:
image

Currently the logs look like that when I try so synchronise:
Failed group search using filter[(member=UIDVALUEOFUSER)]: LDAP Result Code 34 "Invalid DN Syntax": invalid DN

I have seen some strange things like people adding a plugin (memberof) to their openldap to make something works, not sure it applies in that case, can't find a definitive doc about that.
There is also a script to force the sync outside of gitea conf: gitea-group-sync but from what I can read in it... seems like it's not compatible with the gitea API after the version 1.16.x ...

It's a bit confusing and I don't know what I should be using to synchronise my ldap groups.

I may have miss a doc hidden somewhere and if that is the case I'm sorry but I can't find an answer currently.

Gitea Version

1.17.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.30.2

Operating System

Debian

How are you running Gitea?

We are running the gitea package downloaded from dl.gitea.io and are using systemd to run it as a service.

Database

PostgreSQL

Originally created by @night-gold on GitHub (Mar 8, 2023). ### Description I'm trying to link groups to gitea organization/teams. For tests purposes I tried to link the ldap admins to a test "Admins" organization with an "Admins" team that I created. Users synchronisation is working so I thought this option should work as well but I can't really found any clear description of this feature or how I should fill it, you never know I may be doing something wrong. My current configuration look like that: ![image](https://user-images.githubusercontent.com/18196640/223690045-be14d792-4a08-479e-8a55-8f289e386a68.png) Currently the logs look like that when I try so synchronise: ` Failed group search using filter[(member=UIDVALUEOFUSER)]: LDAP Result Code 34 "Invalid DN Syntax": invalid DN` I have seen some strange things like people adding a plugin (memberof) to their openldap to make something works, not sure it applies in that case, can't find a definitive doc about that. There is also a script to force the sync outside of gitea conf: [gitea-group-sync](https://github.com/gitea-group-sync/gitea-group-sync) but from what I can read in it... seems like it's not compatible with the gitea API after the version 1.16.x ... It's a bit confusing and I don't know what I should be using to synchronise my ldap groups. I may have miss a doc hidden somewhere and if that is the case I'm sorry but I can't find an answer currently. ### Gitea Version 1.17.3 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.30.2 ### Operating System Debian ### How are you running Gitea? We are running the gitea package downloaded from dl.gitea.io and are using systemd to run it as a service. ### Database PostgreSQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 09:06:30 -06:00
Author
Owner

@svenseeberg commented on GitHub (Mar 24, 2023):

In Gitea 1.19 the group sync does not seem to work at all. I cannot see any queries related to the group sync in my OpenLDAP logs. However, the admin group sync seems to work. I'll investigate a little.

*edit: my problem is actually #23615

@svenseeberg commented on GitHub (Mar 24, 2023): In Gitea 1.19 the group sync does not seem to work at all. I cannot see any queries related to the group sync in my OpenLDAP logs. However, the admin group sync seems to work. I'll investigate a little. *edit: my problem is actually #23615
Author
Owner

@wxiaoguang commented on GitHub (Apr 23, 2023):

OpenLDAP is a standard LDAP server so Gitea should work with it.

1.17 is quite old and new Gitea has fixed a lot of LDAP related bugs. Could you try the latest version?

@wxiaoguang commented on GitHub (Apr 23, 2023): OpenLDAP is a standard LDAP server so Gitea should work with it. 1.17 is quite old and new Gitea has fixed a lot of LDAP related bugs. Could you try the latest version?
Author
Owner

@wxiaoguang commented on GitHub (May 2, 2023):

Feel free to reopen if there is still any problem.

@wxiaoguang commented on GitHub (May 2, 2023): Feel free to reopen if there is still any problem.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10399