Skip to content
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

oauth applications show up as failed logins when using ldap #16235

Closed
johanvdw opened this issue Jun 23, 2021 · 3 comments · Fixed by #16238
Closed

oauth applications show up as failed logins when using ldap #16235

johanvdw opened this issue Jun 23, 2021 · 3 comments · Fixed by #16238

Comments

@johanvdw
Copy link
Contributor

We have a lot of logs like this:

2021/06/23 17:40:52 ...dels/login_source.go:844:UserSignIn() [W] Failed to login '3b5ade80-xxx' via 'ldaphost': user does not exist [uid: 0, name: 3b5ade80-xxx', keyid: 0]

Where the key 3b5ade80-xxx is actually an oauth key (used by droneci).

It is a bit inconvenient, because the large volume hides real issues. It would be better to show this warning only if the login is not found as a token either.

@zeripath
Copy link
Contributor

What version of gitea are you using?

@zeripath
Copy link
Contributor

But in any case I see the issue.

log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err)

should be debug unless the error is not a UserNotExist error.

zeripath added a commit to zeripath/gitea that referenced this issue Jun 23, 2021
Instead log these at debug - with warn logging for other errors.

Fix go-gitea#16235

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath
Copy link
Contributor

Now interestingly if this user had properly authenticated these shouldn't have ever got to the UserSignin stage so I'm not sure what's going on - likely this is related to the other oauth2 error people have been experiencing.

zeripath added a commit to zeripath/gitea that referenced this issue Jun 23, 2021
Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick pushed a commit that referenced this issue Jun 23, 2021
Instead log these at debug - with warn logging for other errors.

Fix #16235

Signed-off-by: Andrew Thornton <art27@cantab.net>
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 10, 2021
…itea#16238)

Instead log these at debug - with warn logging for other errors.

Fix go-gitea#16235

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants