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
F18524504: D18900.diff
Sat, Sep 6, 12:58 PM
F17781834: D18900.diff
Jul 24 2025, 7:10 AM
F17767755: D18900.id45316.diff
Jul 23 2025, 5:59 AM
F17765463: D18900.id45356.diff
Jul 23 2025, 1:57 AM
F17754111: D18900.diff
Jul 22 2025, 10:12 AM
F17638200: D18900.id45356.diff
Jul 11 2025, 4:28 PM
F17638196: D18900.id45316.diff
Jul 11 2025, 4:27 PM
F17638193: D18900.id.diff
Jul 11 2025, 4:27 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
Branch
revoke10
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 19103
Build 25787: Run Core Tests
Build 25786: arc lint + arc unit