1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 00:32:42 +01:00

Purge ssh-auth key cache after trust/untrust

Summary: See PHI358. The `bin/almanac [un]trust-key` workflows don't properly purge the SSH key cache, but should.

Test Plan:
  - Added key `ssh-rsa xyz` to a device.
  - Used `bin/ssh-auth | grep xyz` to test for the presence of the key.
  - Before patch: Saw it not present, trusted it, saw it still not present.
  - After patch: Saw it not present, trusted it, saw it now present. Untrusted it, saw it no longer present.

Differential Revision: https://secure.phabricator.com/D19053
This commit is contained in:
epriestley 2018-02-09 14:47:34 -08:00
parent 9c8484de32
commit 9b7d5b74d4
2 changed files with 4 additions and 0 deletions

View file

@ -81,6 +81,8 @@ final class AlmanacManagementTrustKeyWorkflow
$key->setIsTrusted(1);
$key->save();
PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache();
$console->writeOut(
"**<bg:green> %s </bg>** %s\n",
pht('TRUSTED'),

View file

@ -43,6 +43,8 @@ final class AlmanacManagementUntrustKeyWorkflow
$key->setIsTrusted(0);
$key->save();
PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache();
$console->writeOut(
"**<bg:green> %s </bg>** %s\n",
pht('TRUST REVOKED'),