steelThread / redmon

A web interface for managing redis: cli, admin, and live monitoring
http://steelthread.github.com/redmon/
1.57k stars 127 forks source link

Disable CLI #73

Open bradherman opened 10 years ago

bradherman commented 10 years ago

Any way to disable the CLI? We don't want someone to accidentally be able to wipe our caches from CLI (or hack it and disable)

steelThread commented 10 years ago

@bradherman - not currently. You have a couple of options if you don't want to submit a PR and want to do something in your fork:

  1. Add the administrative (server) commands that you want to be ignored (unsupported) here. This would still give you cli functionality without supporting commands like flushall and flushdb.
  2. If you don't want the CLI feature al together you could, in addition to #1, clear out the markdown sections for the CLI tab and the CLI tab body.

If you are mostly interested in #1 this is something that we could easily support via a config opt, something along the lines of allow_admin_cmds (defaults to true).

It would be slightly more work to configure the sinatra app and the view to completely turn off the cli feature all together.

Thoughts?

bradherman commented 10 years ago

I like the first option. I'm going to add that in and open a pr for you in the next few days. Also need to make sure redmon works with redis labs slowlog, so look for that soon as well.