Page MenuHomePhabricator

Move account passwords to shared infrastructure
ClosedPublic

Authored by epriestley on Jan 22 2018, 1:12 AM.
Tags
None
Referenced Files
F15508982: D18903.id45363.diff
Wed, Apr 16, 7:56 AM
F15507259: D18903.diff
Tue, Apr 15, 5:56 PM
F15458247: D18903.id45319.diff
Sun, Mar 30, 10:08 PM
F15456930: D18903.id45363.diff
Sun, Mar 30, 1:06 PM
F15454848: D18903.id.diff
Sat, Mar 29, 8:48 PM
F15451632: D18903.diff
Fri, Mar 28, 11:03 PM
F15424314: D18903.id45363.diff
Mar 22 2025, 9:28 PM
F15424002: D18903.diff
Mar 22 2025, 7:52 PM
Subscribers
None

Details

Summary

Ref T13043. This moves user account passwords to the new shared infrastructure.

There's a lot of code changes here, but essentially all of it is the same as the VCS password logic in D18898.

Test Plan
  • Ran migration.
  • Spot checked table for general sanity.
  • Logged in with an existing password.
  • Hit all error conditions on "change password", "set password", "register new account" flows.
  • Verified that changing password logs out other sessions.
  • Verified that revoked passwords of a different type can't be selected.
  • Changed passwords a bunch.
  • Verified that salt regenerates properly after password change.
  • Tried to login with the wrong password, which didn't work.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley added inline comments.
resources/sql/autopatches/20180120.auth.03.vcsdata.sql
4–6

There's a little bit of juggling here to make sure that the migration runs okay if the unique key on phid gets added sooner than we expect. This just gives each new password a unique value, then the followup migrations overwrite them with real PHIDs.

src/applications/settings/panel/PhabricatorPasswordSettingsPanel.php
73–76

It turns out this comment is out of date; CSRF tokens haven't depended on any secret shared with passwords in a long time.

This revision is now accepted and ready to land.Jan 23 2018, 7:47 PM