Page MenuHomePhabricator

Prepare the new AuthPassword infrastructure for storing account passwords
ClosedPublic

Authored by epriestley on Jan 21 2018, 11:15 PM.
Tags
None
Referenced Files
F19304612: D18900.diff
Wed, Dec 24, 1:29 PM
F19071192: D18900.id.diff
Nov 30 2025, 6:41 PM
F19064773: D18900.diff
Nov 29 2025, 11:05 PM
F18944934: D18900.id45316.diff
Nov 11 2025, 5:21 PM
F18901151: D18900.id45356.diff
Nov 7 2025, 9:40 PM
F18900007: D18900.id.diff
Nov 7 2025, 8:26 PM
F18835819: D18900.id.diff
Oct 26 2025, 7:04 PM
F18832789: D18900.diff
Oct 25 2025, 11:03 PM
Subscribers
None

Details

Summary

Ref T13043. In D18898 I moved VCS passwords to the new shared infrastructure.

Before account passwords can move, we need to make two changes:

  • For legacy reasons, VCS passwords and Account passwords have different "digest" algorithms. Both are more complicated than they should be, but we can't easily fix it without breaking existing passwords. Add a PasswordHashInterface so that objects which can have passwords hashes can implement custom digest logic for each password type.
  • Account passwords have a dedicated external salt (PhabricatorUser->passwordSalt). This is a generally reasonable thing to support (since not all hashers are self-salting) and we need to keep it around so existing passwords still work. Add salt support to AuthPassword and make it generate/regenerate when passwords are updated.

Then add a nice story about password digestion.

Test Plan

Ran migrations. Used an existing VCS password; changed VCS password. Tried to use a revoked password. Unit tests still pass. Grepped for callers to legacy PhabricatorHash::digestPassword(), found none.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable