Single login specifications

From Meta, a Wikimedia project coordination wiki
(Redirected from Single User Login)
Shortcut:
SUL
This page is meant as a set of suggested specifications including work flows and GUI mock-ups for the transition to a single login system. Brion Vibber is committed to this project, though not necessarily this specification. This page is just a proposal; for more information, see the single login documentation page.

Process[edit]

Stage 0 (Limit conflicts)

  1. New user creation is updated to check all projects for conflicts, to prevent conflicts from growing in number. This should be done before any big public announcement.
    For instance, if you want to create a new Wikiquote account, you might be asked to pick another wiki on which that username has an account, and authenticate with the password from the other wiki.


Stage I (Estimate conflicts, gather statistics)

  1. Simple code is implemented to allow accounts on different projects to be linked together.
  2. A cross-project "you have new messages" banner is implemented. Users are encouraged to identify related accounts, and setting a valid e-mail address in their preferences is the most automatic way to do this (a bot auto-associates same-name same-email accounts; others have to be processed by hand).
    NB: this is functionality that will be needed after any migration, and it is a cool feature that people will want to have at any rate, providing encouragement to identify accounts with one another.
    This is promoted widely. (VP, mailing-list announcements, site-wide notice for logged-in users?)
  3. After a week of such promotion, statistics are gathered:
    • How many accounts are linked, and how many could be (same name/email) but haven't yet had such a link requested?
    • How many accounts with the same name have potential merge-conflicts for what is planned in later stages? Two levels of potential conflicts: no email/different email.
      How many users with >500 total edits have a potential conflict?
    • How many totally-inactive accounts (no user/talk page, no edits; or a user/talk page, perhaps a redirect, but no email and no article-space edits) are there? Often these have been created to prevent someone else from creating a suspiciously-similar username… A list is made available.
      Should these be allowed to stake claims on the global namespace? It would be more sensible to let users register name-variants on a blacklist, to keep the "list of users" pages clean.
    • Ditto for very-few-edit accounts (no email, older than 3 months with no more than 5 total edits). How many such accounts are there? (answer: more than half) What do their contribs usually look like? A profile of this set of accounts would be useful.
      Assuming they won't return, perhaps we can find a good way to preserve their edit history - and let them reclaim their original edits if they do return - without giving them a global username. Note that we will have to find such a method for abandoned accounts that lose a conflict, at any rate.


Stage II (Announcements, make life easy for active users)

  1. A notice is distributed (sitewide message, other), encouraging users to set a valid e-mail address in their preferences for at least their most active user account. It is pointed out that this is the safest way to keep their current name. It is recommended to use the same e-mail address for each login.
    This migration process is linked to, so everyone knows what to expect.
  2. A temporary table is created to help with account-merging. Within the set of user accounts from all databases, subsets sharing a name and an e-mail address are identified (including sets of size one).1 The total edit count for each subset is computed. (the edits are not weighted)
  3. An email is sent to active subsets (>100 edits) with potential conflicts, informing them of the conflicting projects/languages. (Notice A2)
  4. After a week, a similar notice is sent to all users [with >1 edit?] with potential conflicts -- either via email, if it is set, or as a note appended to their talk page. (Notice A3)
  5. Any complaints from users who expect to lose a name conflict should start being responded to, with mediation if necessary.


Stage III (Early migration and no-conflict merging)

  1. A new shared user account (and preferences) table is created.
  2. Code is added which first checks the shared-account table first for a given name, and checks for a global cookie/identifier, before checking via traditional methods.
  3. Accounts are migrated to the shared table as follows:
    • GROUP 1: If there is only one database with a given name, and it passes a minimum-activity check (more than 1 article-namespace edit? see stats above), it is migrated; with the notification put on its user talk page and possibly emailed. ("E-mail" B1)
    • GROUP 1.1: If there is only one subset with a given name, it is not migrated.2 Ownership of this name is assigned to the e-mail address of the subset. An e-mail notification is sent out to this effect, inviting the user to verify that all those accounts are his/hers. (E-mail B1? 2? 3? Perhaps a new email.)
      A talk-page notice is also left on the most active account in the subset.
  4. A history-preserving patch is written that allows User:A in en:wp and User:B on en:wikt to merge into a global account named "A".
    Perhaps an actual name change with redirects from old userpages... actively moving all "User:B/*" and "User talk:B/*" to "User:A..." Then freeing up the name "B" if possible.
  5. A patch is written that allows User:Isam on en:wp and User:عصام بايزيدي on ar:wp to share a single universal login.
    Perhaps this would allow a single global-user to have different usernames on different wikis, and to reserve each of them globally. (This could require a special request.)
  6. Users in the shared table can see two new things:
    1. A global user-preferences panel.
    2. A new screen where they can enter a username/password for existing accounts from any Wikimedia database. Any account they successfully authenticate against will be merged into theirs via one of the above methods (with an option for 'merge' and another for 'multiple usernames'... the latter might be a request that needs consideration). This screen should be accessible through the user preferences.


Stage IV (Finishing migration and conflict merging)

  1. Last call for human-assisted conflict mediation.
  2. Accounts are migrated to the shared table as follows:
    • GROUP 2: If an account name exists in multiple subsets, the subset with the highest edit count "wins". Accounts in that subset are not migrated, however.2 Ownership of this name is assigned to the e-mail address of the subset. An e-mail notification is sent out to this effect, inviting the user to verify that all those accounts are his/hers. (E-mail B2 or B3 as appropriate) [Also a talk-page notice]
    • GROUP 3: All remaining accounts - those without an e-mail address, those that never edited, and the losers of GROUP 2 - are not assigned or migrated.
  3. Announcements, with status updates, are sent out. (Another site-wide notice may be appropriate here.) Every user should be aware that the migration is going to take place, across *all* projects, and what that will mean.
    The migration will not actually take place until Date X (see below; say after a month to allow for replies to the above emails, especially from the smaller, slower-moving communities); mediation of conflicts, and final bugfixes, can finish now.
  4. After a fixed migration date (Date X), it will no longer be possible to log in with an account that lost a merge conflict.
    All existing login sessions will expire.
  5. The default login screen will state unambiguously that unless you have received some notification (e-mail or talk page), you will most likely have to create a new account, and that you will be able to migrate your existing accounts to the new system.
    • Users in GROUP 1 can log in using their password as they used to.
    • Users in GROUP 2 can log in using the password of the account with the highest number of edits.
    • Users in GROUP 3 have to create a new account.
  6. After the first login:
    1. The entered password will be tested against all existing local accounts with the same name, and all successfully authenticated accounts will be migrated.
    2. If a local account with the same name but a different password exists, the old local username will be moved to something unambiguous [and reserved?] such as "Name (old: lang-proj)."3
    3. Users in all groups see a new screen where they can enter a password for their existing accounts from any Wikimedia database. Any account they successfully authenticate against will be merged into theirs. This screen should continue to be accessible through the user preferences.

1 All user passwords are presently hashed and salted. Therefore, no two password hashes across different projects or languages are identical, and passwords cannot be compared at this stage.

2 We must avoid a scenario where a troll account sharing an email address and username with a legitimate account is automatically migrated.

3 There should be some mechanism for retrieving an old account & edit history, if one loses a merge and has the old account renamed; a csv file of all such accounts might suffice.

Transition period[edit]

The ownership locks should expire after 2 months. After this period, users in GROUP 2 become users of GROUP 3. Optionally, e-mail notifications which bounce because of a permanent failure could lead to immediate expiration.

After a transition period of 6 months, all remaining local accounts will be converted to the new system using the account name syntax "Username@wiki", e.g. "Eloquence@wp-en".

Unresolved:

  • With a global account system, existing signatures on talk pages and in votes may point to the wrong account name after a migration if the user's name has been changed due to losing a conflict. While timestamps provide context, we cannot trivially create redirects, as the user winning the name may also want to edit on the wiki. It may be best to simply ask the winner to provide some disambiguation.

Authentication[edit]

The global account table consists at least of the following fields:

user_id int(10) unsigned This is independent from local IDs
user_name varchar(255) binary
user_password tinyblob
user_newpassword tinyblob
user_default_options blob
user_default_email tinytext
user_email_authenticated varchar(14) binary We only want to authenticate once
user_expires tinyint(1) Account name is locked, but account has not yet been claimed by its determined owner. Set to 0 on first login. Global accounts with user_expires=1 will be deleted later so that others can claim them.

An authentication plugin is written using the AuthPlugin.php class. This plugin checks against the global account database, and creates a local account if no account with that name exists already. The local account will use as its settings those in the global table (function initUser).

Global settings[edit]

A distinction is to be made in Special:Preferences between global settings and local settings. This functionality needs not be there in the first implementation. However, the following functionality should be there:

  • E-mail authentication should be checked in the shared table if the e-mail address matches; otherwise we have to authenticate for every account.
  • New passwords should be sent to the e-mail address associated with the local account, but be set in the shared account table, unless a password is requested specifically for the purposes of hooking up a local account.

Migration[edit]

A tinyint(1) user_valid field is added to the user tables for all wikis. This is checked in User::idFromName -- invalid accounts return 0. All existing accounts are marked invalid (0). This prevents false look-ups (global user visits a wiki where their name exists.) Furthermore, MediaWiki is changed to look up user_name in the user table in page histories and other places where it is currently redundantly stored, if the user_id is not 0. This makes it unnecessary to change many rows when a user name is modified.

Scenario 1: User creates a new account

The AuthPlugin checks whether a user with that name exists. This includes locked accounts until the date of expiry. When the user edits a wiki, a local account with is_valid set will be created transparently.

Scenario 2: User or script hooks up an existing account from a local wiki that has the same name as global name

The account's is_valid flag is set if the correct password is provided.

Scenario 3: User or script hooks up existing account from a local wiki that has a different name

The account is renamed to the global name using the existing code to do so, and the is_valid flag is set.

Scenario 4: User hooks up an existing account after an is_valid local account with the same name has been created

This scenario occurs when a user creates a global account, but forgets to hook up a local account, and then edits the wiki where that local account exists. It could be avoided by preventing the user from editing the wiki unless they provide a password for that account (if necessary, by resetting the password). Otherwise, the account histories have to be merged to the new user ID.

E-mails[edit]

These will be needed to be sent out for various tasks; each user will get at most one of each letter, and possibly (hopefully!) not a D if they have transitioned their local accounts in time.

A: Global transition is coming; be prepared[edit]

This should be the third or fourth message about this change, not the first. The early messages about the transition should be well before it begins.

needs more, esp. "go set email addresses on all your accounts"

As part of structural improvements to improve the Wikimedia systems, all user accounts are being migrated to global status across all Wikimedia projects - Wikipedia, Wikinews, Wiktionary, Wikiquote, Wikibooks, Wikisource, Commons, Meta, and all the others.
Thank you for your patience during this process. Happy editing!
Yours,
--
The Wikimedia Development Team

B1: Simple transition notification (one account)[edit]

tell the users not to worry, everything now works as it did before - do we actually need this?

Congratulations, you are now globally registered on all Wikimedia projects under your user account INSERT-GLOBAL-USER-ACCOUNT-HERE as part of the transition to global accounts mentioned in an earlier email.
We have automatically selected for your new global account the password of INSERT-SELECTED-LOCAL-USER-ACCOUNT-HERE from INSERT-SELECTED-LOCAL-WIKI-HERE, as it is your only account on Wikimedia projects.
Happy editing!
Yours,
--
The Wikimedia Development Team

B2: Simple winner notification (many accounts, no conflicts)[edit]

Congratulations, you are now globally registered under your user account, INSERT-GLOBAL-USER-ACCOUNT-HERE as part of the transition to global accounts mentioned in an earlier email.
We have automatically selected for your new global account the password of INSERT-SELECTED-LOCAL-USER-ACCOUNT-HERE from INSERT-SELECTED-LOCAL-WIKI-HERE, as that has the greatest number of edits. You can now log in with this password on all Wikimedia sites.
The following list of local accounts detected as yours, and have been merged:

  • INSERT-LOCAL-USER-ACCOUNTS-VECTOR-HERE from INSERT-LOCAL-WIKIS-VECTOR-HERE.

Any other local accounts that you had can be assigned to your global account by means of the preferences interface.
Thank you for your patience during this process. Happy editing!
Yours,
--
The Wikimedia Development Team

B3: Conflict winner notification[edit]

as above, but note that another user lost, so (a) be nice, (b) check that they weren't an imposter, and (c) beware of people confusing you for the other at first

Congratulations, you are now globally registered under your user account, INSERT-GLOBAL-USER-ACCOUNT-HERE as part of the transition to global accounts mentioned in an earlier email.
We have automatically selected for your new global account the password of INSERT-SELECTED-LOCAL-USER-ACCOUNT-HERE from INSERT-SELECTED-LOCAL-WIKI-HERE, as that has the greatest number of edits. You can now log in with this password on all Wikimedia sites.
The following list of local accounts detected as yours, and have been merged:

  • INSERT-LOCAL-USER-ACCOUNTS-VECTOR-HERE from INSERT-LOCAL-WIKIS-VECTOR-HERE.

The following list of local accounts was not detected as yours; please make sure you are not mistaken for one of these other users:

  • INSERT-LOSING-LOCAL-ACCOUNTS-VECTOR-HERE from INSERT-LOCAL-WIKIS-VECTOR-HERE.

Any other local accounts that you had can be assigned to your global account by means of the preferences interface.
Thank you for your patience during this process. Happy editing!
Yours,
--
The Wikimedia Development Team

B4: Conflict loser notification[edit]

hard cheese, mate

C: Impending transition end date[edit]

get your local accounts allocated before they're renamed

D: Transition ended, stale locals renamed[edit]

your local account has been renamed. Sorry, but it's not like we didn't warn you.

GUI mock-ups[edit]

Login screen with information about process[edit]

Single Login Transition In Progress

As part of structural improvements to improve the Wikimedia systems, all user accounts are being migrated to global status across all Wikimedia projects - Wikipedia, Wiktionary, Wikiquote, Wikibooks, Wikisource, Commons, Meta, and all of the others.

What to expect

  • Log in as you normally would.
  • The system will check if your account will be automatically migrated.
    • If your account was successfully and automatically migrated, congratulations, that's it!
    • If the system was unable to automatically merge all accounts, you'll be given the opportunity to manually merge the accounts.

(normal login screen follows)

Hook-up dialogue after first login, accessible from preferences[edit]

  • [spectaclar.org/2005/sul-mockups/post-merge-winner-1 Option 1] - Click on "Global account preferences". We'll need to tweak the JavaScript such that deep linking is possible.
  • [spectaclar.org/2005/sul-mockups/post-merge-winner-2 Option 2] - All accounts in one table, with separate page to request new password

Request new password for accounts not yet hooked up[edit]

  • [spectaclar.org/2005/sul-mockups/single-account-hookup Account Hookup Dialog] - for hooking up one account at a time, or for retrieving the password of a particular account.

Global (default) preferences existing alongside local ones[edit]

This shows the basic split-up of the prefs dialog. Some futzing with the JavaScript code that generates the list on the left will be needed to express the hierarchy: