-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Gitea Authentication no longer working with NGINX Proxies #8561
Comments
Edit: I've got the wrong end of the stick here. This is totally the wrong interpretation of the problem. Hi! It's difficult to know what the causative change is as this is highly configuration dependent on your proxy and I'm not sure how to go about setting up a test environment for this - any test harness would be highly complex. Could you tell us what the last known working version was? Are you able to do a git bisect from a known working version and the latest? The code that handles this is as follows and the majority of it is 3 years old with 10 months being the youngest: Lines 134 to 169 in 6ddd3b0
As you can see if the X-WEBAUTH-USER header is set then the user will be logged in automatically as the appropriate user. To log out from this you would need to log out from both Gitea - removing the session from gitea and log out from the WEBAUTH host - meaning that it no longer sends the X-WEBAUTH-USER. Hmm... we did change some more upstream auth bits but I'm not sure that these would account for this. |
Oh wow, it is the auto-login caused by logging in to HTTP Basic-Auth. When the login details for both HTTP Basic-Auth and Gitea are the same, it will login automatically. What a strange feature. |
I tried to disable the feature using: https://docs.gitea.io/en-us/config-cheat-sheet/
Setting it to false does not seem to have any impact on the issue. Am I using it wrong?
|
Those default values are already |
He's looking for a way to disable basic authentication in Gitea - I don't think we have that. |
Those default values weren't in the "app.ini" created by Gitea, I had to add them. But even now, they don't do anything. Setting them to true/false does nothing. |
@a20eac1d those settings are for a different type of login - in that case the proxy server is setting a X-WEBAUTH-USER header. Basic authentication is set using the AUTHORIZATION header with type basic. We have no setting to turn that mode of authentication off at present - it's used in the API, predominantly for controlling tokens. I think it would be possible to add a simple config switch to disallow this method of authentication though. |
Description
I recently updated my Gitea Docker container to the latest version and it seems like one of the last Gitea updates broke compatibility with NGINX web proxies.
After setting up the Gitea instance and creating an account I will be immediately logged in without entering any credentials. When switching devices or computers, I still dont have to login with my password. My account is automatically logged in WORLDWIDE on EVERY device.
The "Logout" button does nothing and simply redirects me to my dashboard.
The text was updated successfully, but these errors were encountered: