Page MenuHomePhabricator

Add a `bin/auth revoke` revoker for SSH keys
ClosedPublic

Authored by epriestley on Jan 20 2018, 5:19 PM.
Tags
None
Referenced Files
F13090352: D18893.diff
Thu, Apr 25, 2:20 AM
Unknown Object (File)
Fri, Apr 19, 7:06 PM
Unknown Object (File)
Thu, Apr 11, 12:42 PM
Unknown Object (File)
Thu, Apr 4, 12:25 PM
Unknown Object (File)
Tue, Apr 2, 4:45 PM
Unknown Object (File)
Tue, Apr 2, 4:45 PM
Unknown Object (File)
Tue, Apr 2, 4:45 PM
Unknown Object (File)
Tue, Apr 2, 4:45 PM
Subscribers
None

Details

Summary

Ref T13043. Adds CLI support for revoking SSH keys. Also retargets UI language from "Deactivate" to "Revoke" to make it more clear that this is a one-way operation. This operation is already correctly implemented as a "Revoke" operation.

Test Plan

Used bin/auth revoke --type ssh to revoke keys, verified they became revoked (with proper transactions) in the UI. Revoked keys from the web UI flow.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Is there a reason that this flow updates the SSH keys to mark them as revoked, instead of deleting the rows entirely like the other new revokers?

This revision is now accepted and ready to land.Jan 22 2018, 8:15 PM

When we delete a conduit token, session, or temporary token, there's no way for users to "put it back": it's permanently useless and any attacker who stole a copy of it is out of luck. For example, you can't go into the Conduit API Tokens interface and add a specific token you happen to have on hand: you can only generate a new random one.

With passwords and SSH keys, users can put them back: they can pick "hunter2" as their password again even though Cloudflare put it into public cache, or upload the same SSH public key with the private key on the laptop they left at a bar.

In all cases our goal is to permanently invalidate the relevant credentials (i.e., revoke, not just delete) but for anything where the secret is a random thing we generate rather than something the user provides us, deleting is good enough and tends to be a lot simpler.

This revision was automatically updated to reflect the committed changes.