Skip to content

SSPI auth error after update to 1.20.0 #25952

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

Closed
AnDann opened this issue Jul 18, 2023 · 6 comments · Fixed by #25955
Closed

SSPI auth error after update to 1.20.0 #25952

AnDann opened this issue Jul 18, 2023 · 6 comments · Fixed by #25955
Labels

Comments

@AnDann
Copy link

AnDann commented Jul 18, 2023

Description

After update from 1.19.4 to 1.20.0 the SSPI auth is not working anymore.
I also did a fresh install of 1.20.0 on another PC in the same domain and I get the same error message.
A fresh install of 1.19.4 doesn´t have the issue.

Gitea Version

1.20.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/AnDann/8637f5e3a29719d34ded21dbd8c4adcc

Screenshots

image

Git Version

2.40.1

Operating System

Windows Server 2016

How are you running Gitea?

gitea-1.20.0-gogit-windows-4.0-amd64 from https://dl.gitea.com/gitea/1.20.0/ running as a windows service under a domain user

Database

MSSQL

@GhaziTriki
Copy link

Hello,

I also have a problem when I update to 1.20. I am using PostgreSQL. How can share the logs?

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jul 18, 2023

@AnDann

Can you try this Fix SSPI auth panic #25955 ?

TBH it seems that the SSPI auth module hasn't been maintained for long time, I do not have the experience of debugging the SSPI auth modules. If there are other more difficult problems .... maybe it needs some people who have related experience to help.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jul 18, 2023

After reading the code again, I guess the real problem is that the SSPI auth itself fails.

2023/07/18 10:20:25 ...auth/sspi_windows.go:89:Verify() [W] Authentication failed with error: 
could not get auth data: 
the Authorization header is not provided

If the SSPI login succeeds, there should be no such panic? It looks like the panic only occurs when the login attempt fails.

@AnDann
Copy link
Author

AnDann commented Jul 18, 2023

I dont think the auth fails because with 1.19.4 it is working and also if auth fails it should not panic.

I will try your fix but need some time to compile it my self.

@AnDann
Copy link
Author

AnDann commented Jul 18, 2023

@wxiaoguang With the fix in #25955 the auth is working again. I still get the same error in the logfile but in continues and finally it says Authenticated.
Log

@wxiaoguang
Copy link
Contributor

Since it works, I think it's safe to ignore the error log

In 1.19, there is also an error, but it's not logged as that way

silverwind pushed a commit that referenced this issue Jul 18, 2023
Try to fix #25952

Co-authored-by: Giteabot <[email protected]>
GiteaBot added a commit to GiteaBot/gitea that referenced this issue Jul 18, 2023
silverwind pushed a commit that referenced this issue Jul 18, 2023
Backport #25955 by @wxiaoguang

Try to fix #25952

Co-authored-by: wxiaoguang <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2023
project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-as-gitea-fork that referenced this issue Jan 23, 2025
Backport go-gitea#25955 by @wxiaoguang

Try to fix go-gitea#25952

Co-authored-by: wxiaoguang <[email protected]>
(cherry picked from commit 227c3b6)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants