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
F13200330: D18900.diff
Mon, May 13, 11:09 PM
Unknown Object (File)
Thu, May 2, 4:08 PM
Unknown Object (File)
Sun, Apr 28, 4:49 PM
Unknown Object (File)
Fri, Apr 19, 7:07 PM
Unknown Object (File)
Wed, Apr 17, 7:41 PM
Unknown Object (File)
Apr 2 2024, 4:47 PM
Unknown Object (File)
Apr 2 2024, 4:47 PM
Unknown Object (File)
Apr 2 2024, 4:47 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