Ref T9967
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T9967: Provide a more straightforward way to revoke SSH keys by finding and destroying the objects
- Commits
- Restricted Diffusion Commit
rP8eec9e2c0ef2: Provide a more straightforward way to revoke SSH keys by finding and… - Required Signatures
L28 Phacility Individual Contributor License Agreement
Ran migrations.
Verified database populated properly with PHIDs (SELECT * FROM auth_sshkey;).
Ran auth.querypublickeys conduit method to see phids show up
Ran bin/remove destroy <phid>.
Viewed the test key was gone.
Diff Detail
- Repository
- rP Phabricator
- Branch
- master
- Lint
Lint Passed - Unit
Tests Skipped - Build Status
Buildable 9656 Build 11566: arc lint + arc unit
Event Timeline
This is great, thanks! Couple of minor inlines.
src/applications/auth/phid/PhabricatorAuthSSHKeyPHIDType.php | ||
---|---|---|
34–35 | SSH keys don't really have any interesting properties (like name or URL), but you could maybe do something like this: $handle->setName(pht('SSH Key %d', $key->getID())); For example, I think that will make bin/remove destroy render things a little more cleanly. As-is, it will render something like this: ... This object will be destroyed forever: - PHID-AKEY-irxjvgxviobklieu2677 (PhabricatorAuthSSHKey) Unknown Object (SSH Key) Are you absolutely certain you want to destroy this object? [y/N] ...but if you use setName() it should render something a little nicer, more like this: This object will be destroyed forever: - PHID-AKEY-irxjvgxviobklieu2677 (PhabricatorAuthSSHKey) SSH Key 234 Are you absolutely certain you want to destroy this object? [y/N] | |
src/applications/auth/storage/PhabricatorAuthSSHKey.php | ||
105 | Stray debugging print. | |
106–110 | You don't need to do this, since we're only deleting the object itself (SSH Keys don't have any sub-objects or sub-rows, like Owners do), and the $this->delete() call on line 112 will take care of deleting the object. So the body should be fine as just this: $this->openTransaction(); $this->delete(); $this->saveTransaction(); |
Thanks! I added you to Blessed Committers, so you should be able to land this yourself.
(The project page also has some instructions on how to get access configured, now.)