Page MenuHomePhabricator

Make temporary token storage/schema more flexible
ClosedPublic

Authored by epriestley on Mar 16 2016, 1:14 PM.
Tags
None
Referenced Files
F18599782: D15478.id37311.diff
Sat, Sep 13, 8:12 AM
F18595035: D15478.id37311.diff
Fri, Sep 12, 8:10 PM
F18594523: D15478.id37304.diff
Fri, Sep 12, 6:27 PM
F18594498: D15478.id37304.diff
Fri, Sep 12, 6:23 PM
F18594465: D15478.id.diff
Fri, Sep 12, 6:18 PM
F18594350: D15478.diff
Fri, Sep 12, 5:53 PM
F18594138: D15478.diff
Fri, Sep 12, 5:09 PM
Unknown Object (File)
Jul 5 2025, 3:46 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
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.