-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
AD users "deactivated" after the "branch pruning" process runs since v1.7.3 #6241
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
You can enable more verbose logging and check gitea.log for ldap errors |
I set the log level to DEBUG..unfortunately the problem didn't surfaced since then. maybe the restart of gitea get rid of the problem? I'll wait a few days and eventually close this ticket if it does not pop up again.. |
I had this same issue, but they were all deactivated because the Gitea server started before my LDAP server finished initialization. A quick restart of Gitea fixed it for me. |
@jakeshaffer we are not in this case. Everything was fine after upgrade to 1.7.3. Then at some point all AD users became disabled. We manually reactivated all of them. The next day it happened again. We reactivated them and a few hours later, again.. etc. Our AD server is the corporate server and we are certain it was up all the time, and this did not appera on Gitea startup |
It happend again yesterday...In the logs there are some lines that may be related to the problem:
This appear just after the following:
Could it be related to the branch pruning process? I attached the relevant part of the logs (I changed the name of the repository to "xxxx") : gitea_6241.txt |
Can you also provide info from gitea.log? |
The |
It happend again. This time with DEBUG=TRACE. In the meantime we upgraded to v1.7.4 |
I can confirm this problem using Samba as Gitea's AD/LDAP provider. After some testing I've found out that the "Synchronize external users"-Cronjob seems to deactivate the users; when I'm executing it manually it's also producing the same result, and all AD-Users will be deactivated immediately. PS: I guess the problem is that for some reason Gitea can't find the Users in LDAP anymore, which is why they're being deactivated. Have a look here. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
Confirmed that this issue as described by je-s still exists when running under 1.8.3. My reproducer is; |
Okay. Found the cause. Looks like my version of the issue was due to the use of a lowercase entry in the "Username Attribute" field. Specifically I had "samaccountname" rather than "sAMAccountName". This meant that the case-insensitive match within LDAP would find users initially when searching the LDAP tree, but would not correctly match that existing user on a subsequent search as it could not find the correct "Username" field. So, the solution here for anyone reading this in the future is to ensure that your "Username Attribute" field is EXACTLY "sAMAccountName" with no trailing space (that got me in testing too). |
Ugh. Do you think we should add an option to allow for a case insensitive match of the LDAP attribute? |
In my case this is not a problem coming from differing capitalization of the filters. I've checked this multiple times. |
I had exactly this issue. |
[x]
):Description
Our Gitea is configured to authenticate user with Microsoft AD
Since the upgrade to v1.7.3 from v1.7.2, all AD users are set to "inactive" after "some" time.
Everything was working fine with v1.7.2
The "some" time is maximum a few hours. We can't figure a pattern or an exact time
We have to use a "local" gitea admin user to "reactive" them:
[UPDATED 2019-03-07]
After enabling more verbose logging, it apperas that this happens after the "branch pruning" process runs and not after an "undetermined amount of time"
The text was updated successfully, but these errors were encountered: