Page MenuHomePhabricator

Make temporary token storage/schema more flexible
ClosedPublic

Authored by epriestley on Mar 16 2016, 1:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 5:00 PM
Unknown Object (File)
Sun, Apr 7, 10:53 PM
Unknown Object (File)
Thu, Mar 28, 5:49 PM
Unknown Object (File)
Mar 5 2024, 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
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
Branch
lfs3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11165
Build 13846: Run Core Tests
Build 13845: arc lint + arc unit

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.