HomePhabricator

Dirty the SSH key cache when usernames change

Description

Dirty the SSH key cache when usernames change

Summary:
Fixes T12554. The SSH key cache contains usernames, but is not currently dirtied on username changes.

An alternative solution would be to use user PHIDs instead of usernames in the file, which would make this unnecessary, but that would make debugging a bit harder. For now, I think this small added complexity is worth the easier debugging, but we could look at this again if cache management gets harder in the future.

Test Plan:

  • Added a key as ducksey, ran bin/ssh-auth, saw key immediately.
  • Renamed ducksey to ducker, ran bin/ssh-auth, saw username change immediately.
  • Added another key as ducker, ran bin/ssh-auth, saw key immediately.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12554

Differential Revision: https://secure.phabricator.com/D17687

Details