-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[LDAP] harbor fails to resolve existing group #21127
Comments
The filter |
I am facing the same issue with Active Directory, I've tried so many different settings but Harbor just won't get the groups from LDAP.
I think what's happening is Harbor gets the group DNs from the memberof property of the user and then tries to search for that group using the DN, but it doesn't work because the groupname is not populated, maybe? I did try it with no filter and with only filtering for groups, to no avail. the filter is correct and works in other software. The issue seems to be with the ldap query not working correctly for groups. |
I don't have much more information about it. When trying to add a new Group, I have the following error:
LDAP group configuration:
I tried with a without Group Filter. My LDAP does not support anonymous search, so I have a configured a Search DN, which is working as user auth works. |
I have log from the LDAP side. It looks like this is a scope issue. Harbor erroneously use the In my case, the User Scope was set to
Changing the |
I can confirm that setting user scope to subtree allows harbor to populate
the groups as a workaround. I still get the warnings as it's unable to
resolve the groups the user is a member of when I'm using the group filter
to limit groups to only the relevant ones.
…On Wed, 6 Nov 2024, 12:10 Jean-Daniel Dupas, ***@***.***> wrote:
I have log from the LDAP side. It looks like this is a scope issue.
Harbor erroneously use the "LDAP User Scope" instead of the LDAP Group
Search Scope when performing group lookup.
In my case, the User Scope was set to one level, causing the group lookup
to send this query:
conn=1001 op=1 SRCH base="cn=developers,ou=Groups,dc=example,dc=com" scope=1 deref=0 filter="(cn=*)"
—
Reply to this email directly, view it on GitHub
<#21127 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADHLLUOF2GRUNPK7O6H2NPDZ7IBKTAVCNFSM6AAAAABRDXKEZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJZGU4DIMJQHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The warning log has already been updated to debug level instead in a recent commit ( #21034 ), and should disappear in the next release. |
درود. |
Expected behavior and actual behavior:
LDAP group are not found because the query built by Harbor is invalid.
This is the debug log:
For whatever reason, Harbor is building all group resolving query passing
cn=*
instead of keeping the real group DN, making the query returning 0 entries.The LDAP record in OpenLDAP looks like this:
Versions:
Please specify the versions of following systems.
The text was updated successfully, but these errors were encountered: