Requests for comment/Passwords

This document proposes a change to the MediaWiki password policy and outlines other ideas for future discussion.

Context
MediaWiki's password policy does not currently require or encourage users to have very strong passwords. Consider the following:


 * The current minimum password length is only one character. At the risk of stating the obvious, this is unusual for the modern web. Whether a MediaWiki user is a farm of thousands of wikis, or a private corporate wiki, they are likely to want to have strong passwords for users, and length is a key determining characteristic of password strength.
 * We do not effectively suggest to users that they select a strong password, nor do we tell them what a strong password is. Current core login, password reset, or account creation forms either contain only a link to a help guide or nothing at all. Some wikis have used customization of MediaWiki messages on login or account creation to provide instruction about password security. Previous instructions have often been vague – English Wikipedia's signup form simply told users to "choose a strong password that would be difficult to guess". We can do better.

Proposed change
We're proposing the following simple change. While other ideas have come up in the past (see the Talk page or previous RFCS) this change is easy to implement and will not be an unexpected burden to the vast majority of users.

Increase $wgMinimalPasswordLength
The default setting (also used in Wikimedia configuration) for $wgMinimalPasswordLength is currently one character. This should be changed to a minimum of six characters.

Until resolution of users were allowed to have blank passwords. Today, users will have experienced other applications and services which typically request long and complex passwords. While in the past it may have seemed a major annoyance to require a longer password, it now will be a requirement that users expect as part of registering. If we want to provide an alternative option with a lower barrier to entry then there is always editing while unregistered.

Increasing $wgMinimalPasswordLength will currently lock users out of their account, if they do not meet the minimum password length. These users will then be forced to use the password reset form. After is merged, we will be able to force a password reset without locking users out of their accounts. (Note: this will impact users of Wikimedia wikis before basically all others. Loud and numerous announcements before a switchover will be required to minimize annoyance to current account holders.)

Additional ideas for discussion
This request for comment is a merge and refactor of two older but closely related discussions:


 * Platonides created "Password strength" in 2010-12-20
 * Matt Flaschen created "Password requirements" in 2013-02-08

These two address basically the same set of problems, even if the solutions proposed were different. Some of the following ideas come from previous RFCs or research in to password strength. There may also be other ideas we have not considered yet, so please feel free to add to this list. The following are not necessarily proposed for implementation immediately, unless a consensus for them develops.

Create a password strength indicator
MediaWiki core forms for login, account creation, and password reset would benefit from a client-side indicator of how strong a user's password is. Even passwords that meet the minimum requirements may be weak, and so password meters are an extremely common UI pattern. There are some good pre-existing solutions to this, and we have tested client-side valiation in the past as part of the account creation user experience. This is easy to do, if  criteria for defining what constitutes weak or strong can be agreed on.

Require more complex passwords
Many sites require users to have passwords which mix letters, numbers, symbols and uppercase/lowercase characters. We need to explore the implications for non-English speaking users more here, and it may be unnecessary anyway.

Create new password requirements for accounts with advanced user rights
If we want new users to not be subject to annoying requirements that make signing up harder, then increasing password requirements only for accounts with advanced userrights might be a good future solution. However, further discussion is needed about how to implement this and for which userrights. This topic is probably more appropriate for a future request for comment.

Password expiration
Password expiration functionality is likely to be added, so that administrators can age passwords, or force users to reset their passwords on login. By default, MediaWiki will not expire passwords on any schedule. The security advantage of having password expiration available is as a contingency measure, if we suspect that our password database has been exposed or otherwise compromised.

Comments

 * I'm ok with showing an indicator, but I oppose requiring stronger passwords. It is up to the contributor to choose in my view (forms which require things are a bit obnoxious; I would support that, were there existing issues with account takeovers). --Gryllida 10:01, 24 January 2014 (UTC)
 * There are. English Wikipedia has a list of admin accounts that were desysopped after being compromised.  At least some of those were probably due to password guessing.  And of course, there were probably more privileged accounts on other wikis (Wikimedia wikis and otherwise), and plenty of regular users, who were also compromised. Superm401 - Talk 23:32, 24 January 2014 (UTC)
 * Thanks for the context; I would still not want to enforce anything, for usability, and work out how to make the indicator sufficiently prominent. --Gryllida 00:24, 25 January 2014 (UTC)
 * Concur with Gryllida. Perhaps enforcement can be done per-wiki, but out of the box merely indicating weakness is all the software should do - David Gerard (talk) 20:04, 24 January 2014 (UTC)
 * In this case, we're discussing what the MediaWiki default for the minimal password length is, not necessarily what all individual wikis will do. To be frank, I personally think this is something where Wikimedia wikis are going to just need to eat their peas, considering there is nearly universal requirement for a password more than just one character on modern websites. But in theory it is possible for us to set different configurations for different wikis. Steven Walling (WMF) &bull; talk   20:17, 24 January 2014 (UTC)
 * MediaWiki core should have sane defaults, which include a reasonable minimum password length. Wikis can still override that default. Superm401 - Talk 23:32, 24 January 2014 (UTC)
 * How many more users would be locked out if we made the minimum password length 8 characters instead of 6? The  helpful  one  20:22, 24 January 2014 (UTC)
 * We do not store password length, so there's no simple way to answer this question. Superm401 - Talk 23:32, 24 January 2014 (UTC)
 * Okay that's reasonable enough, it's just that our own page about this suggests a minimum of 8 characters, as does (from a quick search) this Google page and this one from Microsoft. If we're going to try to fix the issues with the password lengths at the moment, then perhaps we should add the two extra characters for the minimum length as well? The  helpful  one  23:37, 24 January 2014 (UTC)