Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Password reset error messages allow user enumeration #2237

Open
pl4g4 opened this issue May 8, 2020 · 3 comments
Open

Password reset error messages allow user enumeration #2237

pl4g4 opened this issue May 8, 2020 · 3 comments

Comments

@pl4g4
Copy link

pl4g4 commented May 8, 2020

Could error messages can be more generic for password reset?

This is not a critical/high request, but should be taken into consideration.

I found the errors after resetting password are not generic and someone could enumerate user accounts.

Reset password SSO

An invalid user account returns this msg

func (e *notFoundError) Error() string {

A valid user account will return this msg

return errors.New("password reset for single sign on user not allowed")

It could be something like

"If you have an account, a password reset email will be sent" Or something more generic.

thanks!

@zwass
Copy link
Contributor

zwass commented Jun 4, 2020

This is something that has been brought up in the past and determined that the UX is worth it for the possible enumeration.

If additional folks think this ought to be changed, I am willing to change it.

@margaretho
Copy link

I don't think there need to be trade-offs for UX vs. security. Error messages can be made more generic to prevent user enumeration while also providing a good user experience. A similar discrepancy in error messages occurs on login: when an organization requires SSO, attempting to log in with a password results in the following error for
a valid user: "password login not allowed for single sign on users", while attempting to log in with an invalid username results in a different error: "username or email and password do not match". A message of "The credentials provided were invalid. If you are a single sign-on user, please log in through your SSO provider." sent to all users in all cases would be completely reasonable, in my opinion. I'm happy to put in a PR for this change if you all are amenable.

@zwass
Copy link
Contributor

zwass commented Oct 14, 2020

The tradeoff is this:

Downside - User enumeration is possible.
Upside - Legitimate users can get some information to help them understand why their login failed.

For folks who are especially concerned about this, a mitigation is to only expose the admin interface behind a VPN. This is actually a very common deployment strategy for Fleet.

Fleet does not phone home or provide any analytics that would help to understand how this plays out in real world deployments.

I remain open to changing the functionality if we can get more engagement on this issue and the community seems well aligned.

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

No branches or pull requests

3 participants