Page MenuHomePhabricator

Make temporary token storage/schema more flexible
ClosedPublic

Authored by epriestley on Mar 16 2016, 1:14 PM.
Tags
None
Referenced Files
F12838060: D15478.id.diff
Thu, Mar 28, 5:49 PM
Unknown Object (File)
Tue, Mar 5, 7:05 PM
Unknown Object (File)
Feb 14 2024, 5:48 AM
Unknown Object (File)
Feb 14 2024, 5:45 AM
Unknown Object (File)
Feb 14 2024, 5:45 AM
Unknown Object (File)
Feb 8 2024, 8:54 PM
Unknown Object (File)
Feb 7 2024, 3:09 PM
Unknown Object (File)
Jan 26 2024, 1:52 AM
Subscribers
None

Details

Summary

Ref T10603. This makes minor updates to temporary tokens:

  • Rename objectPHID (which is sometimes used to store some other kind of identifier instead of a PHID) to tokenResource (i.e., which resource does this token permit access to?).
  • Add a userPHID column. For LFS tokens and some other types of tokens, I want to bind the token to both a resource (like a repository) and a user.
  • Add a properties column. This makes tokens more flexible and supports custom behavior (like scoping LFS tokens even more tightly).
Test Plan
  • Ran bin/storage upgrade -f, got a clean upgrade.
  • Viewed one-time tokens.
  • Revoked one token.
  • Revoked all tokens.
  • Performed a one-time login.
  • Performed a password reset.
  • Added an MFA token.
  • Removed an MFA token.
  • Used a file token to view a file.
  • Verified file token was removed after viewing file.
  • Linked my account to an OAuth1 account (Twitter).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Make temporary token storage/schema more flexible.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Mar 16 2016, 3:17 PM
This revision was automatically updated to reflect the committed changes.