nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.82k stars 305 forks source link

acl / disable all commands except needed #76

Closed undying closed 11 years ago

undying commented 11 years ago

Hello! It would be perfect if webdis will have possibility to disable all commands in acl except enabled one. I mean desable all commands except [ "GET", "SET" ].

Is there a plans to do so?

Thanks in advance!

nicolasff commented 11 years ago

Hi,

I think this is a good idea, I'll see if it is already possible and if not I'll add this feature.

Thanks for the suggestion!

nicolasff commented 11 years ago

@undying you can use an ACL block to disallow all commands, followed by a block to allow the ones you want:

"acl": [
    {
        "disabled": ["*"]
    },
    {
        "enabled": ["GET", "SET"]
    }
]

The above configuration will allow only GET and SET, nothing else.

undying commented 11 years ago

Thanks a lot! I thought I tried this way but looks like I was a mistake. Now it works. Thank you once again.