-
-
Notifications
You must be signed in to change notification settings - Fork 428
Admin: Ability to toggle whitelist-only mode #270
Copy link
Copy link
Closed
Labels
Description
Would be nice when someone is trying to take down a server "for fun" to have a command that whitelists the pubkeys of all connected users (maybe older than M minutes?) and enables whitelist-only mode. Then another command to turn off whitelist-only mode.
Should be fairly straight forward to implement:
- Right now whitelist mode is determined if there is anyone in the whitelist set. So we'll need to add a flag instead: https://github.com/shazow/ssh-chat/blob/master/auth.go#L65
- The rest is just adding a command to the host.
Maybe something like:
/whitelist on/whitelist off/whitelist import [AGE]Import all connected pubkeys (older than AGE, e.g. 5min)/whitelist add PUBKEY|USERNAME/whitelist remove PUBKEY|USERNAME
(I thought we had a whitelist command once upon a time? But I can't find it now, guess it got removed at some point. IIRC we also supported whitelisting Github usernames by importing the github.com/username.keys URL)
Reactions are currently unavailable