Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Incorrect authentication credentials results in server error #150

Open
auahmed opened this issue Sep 14, 2018 · 7 comments
Open

Incorrect authentication credentials results in server error #150

auahmed opened this issue Sep 14, 2018 · 7 comments

Comments

@auahmed
Copy link

auahmed commented Sep 14, 2018

When a user enters the wrong username and password for code authentication, the response should be incorrect credentials rather then server error.

@stevehu
Copy link
Contributor

stevehu commented Sep 14, 2018

Which authenticator is used? Marketplace?

@auahmed
Copy link
Author

auahmed commented Sep 14, 2018

yes, currently when the user logins with invalid credentials null is returned:

logger.error("Failed to authenticate user '" + id + "' with LDAP");
return null;

This is also similar to the default authenticator:

if(!match) return null;

@stevehu
Copy link
Contributor

stevehu commented Sep 14, 2018

I will take a look this weekend. Thanks for bringing it up.

@stevehu
Copy link
Contributor

stevehu commented Sep 15, 2018

@auahmed If the credential is not matched, then a null account object is returned and in the basic authentication, the popup window will show up again. This repeats several times depending on the OS configuration and then fail the basic authentication. The Marketplace is using the form and the flow might be different. What is the behavior in your app?

@auahmed
Copy link
Author

auahmed commented Sep 17, 2018

The flow of the app is that the user credentials are passed in the headers to oauth2 as base64-encoded.
As the application is blocking the popup provided by light-oauth2 to use its own form rather, we get an internal server error rather then the popup window to try again. This way it becomes difficult for the user to differentiate if incorrect credentials were provided or any other issue.

@stevehu
Copy link
Contributor

stevehu commented Sep 17, 2018

Do you have a form to collect the username and password? Is it possible to just customize the marketplace auth? I am working on the light-portal now and will pick up the post authentication soon.

@auahmed
Copy link
Author

auahmed commented Sep 18, 2018

Will check into seeing if its possible to just update the marketplace auth

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants