mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +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:
parent
9c8484de32
commit
9b7d5b74d4
2 changed files with 4 additions and 0 deletions
|
@ -81,6 +81,8 @@ final class AlmanacManagementTrustKeyWorkflow
|
||||||
$key->setIsTrusted(1);
|
$key->setIsTrusted(1);
|
||||||
$key->save();
|
$key->save();
|
||||||
|
|
||||||
|
PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache();
|
||||||
|
|
||||||
$console->writeOut(
|
$console->writeOut(
|
||||||
"**<bg:green> %s </bg>** %s\n",
|
"**<bg:green> %s </bg>** %s\n",
|
||||||
pht('TRUSTED'),
|
pht('TRUSTED'),
|
||||||
|
|
|
@ -43,6 +43,8 @@ final class AlmanacManagementUntrustKeyWorkflow
|
||||||
$key->setIsTrusted(0);
|
$key->setIsTrusted(0);
|
||||||
$key->save();
|
$key->save();
|
||||||
|
|
||||||
|
PhabricatorAuthSSHKeyQuery::deleteSSHKeyCache();
|
||||||
|
|
||||||
$console->writeOut(
|
$console->writeOut(
|
||||||
"**<bg:green> %s </bg>** %s\n",
|
"**<bg:green> %s </bg>** %s\n",
|
||||||
pht('TRUST REVOKED'),
|
pht('TRUST REVOKED'),
|
||||||
|
|
Loading…
Reference in a new issue