-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
LDAP sync not working if Username Attribute not specified #21072
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
Comments
related to gitea/services/auth/source/ldap/source_sync.go Lines 89 to 91 in 73ae718
|
lunny
pushed a commit
that referenced
this issue
Jun 20, 2023
Fix #21072  Username Attribute is not a required item when creating an authentication source. If Username Attribute is empty, the username value of LDAP user cannot be read, so all users from LDAP will be marked as inactive by mistake when synchronizing external users. This PR improves the sync logic, if username is empty, the email address will be used to find user.
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
Jun 20, 2023
Fix go-gitea#21072  Username Attribute is not a required item when creating an authentication source. If Username Attribute is empty, the username value of LDAP user cannot be read, so all users from LDAP will be marked as inactive by mistake when synchronizing external users. This PR improves the sync logic, if username is empty, the email address will be used to find user.
lunny
pushed a commit
that referenced
this issue
Jun 20, 2023
Backport #25278 by @Zettat123 Fix #21072  Username Attribute is not a required item when creating an authentication source. If Username Attribute is empty, the username value of LDAP user cannot be read, so all users from LDAP will be marked as inactive by mistake when synchronizing external users. This PR improves the sync logic, if username is empty, the email address will be used to find user. Co-authored-by: Zettat123 <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When LDAP Authentication configured only with required fields, sync_external_users not creating accounts.
Enable user synchronization option is checked.
When trying to login with user from connected LDAP, new user is created with username taken from uid probably.
On the next sync this user is marked as inactive.
It either documentation problem or a bug.
Gitea Version
1.17.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Using compose file
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: