goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
23.8k stars 4.73k forks source link

Referral failure with LDAP auth #20641

Closed ilsaloving closed 2 months ago

ilsaloving commented 3 months ago

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior: Expectation: Successful authentication of AD user Actual: Login failure

Steps to reproduce the problem: Deploy Harbor and configure LDAP/AD authentication

Versions: Please specify the versions of following systems.

Additional context:

The logs contain:

[/core/controllers/base.go:101]: Error occurred in UserLogin: LDAP Result Code 10 "Referral": 0000202B: RefErr: DSID-0310084B, data 0, 1 access points
    ref 1: 'myldapdomain.com'

Looks like you either need to enable Referrals in the code, or expose the setting for users to modify.

MinerYang commented 3 months ago

Could you check your LDAP server log to identify the issue?

ilsaloving commented 2 months ago

I just took a quick look and realized there was a typo in my Base DN. >_< After I corrected that, authentication worked.