Add support for `AUTH` command
Add support for the AUTH command in DiceDB similar to Redis' AUTH Command. Please refer to how AUTH is implemented in Redis.
Write unit and integration tests for the command referring to the tests written in the Redis codebase 7.2.5. For integration tests, you can refer to the tests folder. Note: they have used TCL for the test suite, and we need to port that to our way of writing integration tests using the relevant helper methods. Please refer to our tests directory.
For the command, benchmark the code and measure the time taken and memory allocs using benchmem and try to keep them to the bare minimum.
Redis functionality
Prior to Redis 6, authentication for a connection was enabled by passing in requirepass in the redis.conf or while starting the redis server. If the above config is set, prior to any command, the authentication has to be by running the following command:
AUTH '<password>'
After Redis 6, the concept of ACLs was introduced which allowed users to define a combination of users with multiple passwords per user. ACLs also provided the ability to restrict usage based on Commands, Channels, Keys, etc.
Some ACL functionalities from the Redis documentation can be found here :
- Enable and disallow users
- Allow and disallow commands
- Allow and disallow certain keys and key permissions
- Allow and disallow Pub/Sub channels
- Configure valid passwords for the user
- Configure selectors for the user
Implementation phases
The implementation for the AUTH should be broken down into the following phases:
- Allow users to define Username/Password(s) combination and perform authentication on the configured input
- Provide authorisation actions on different objects using ACLs.
@arpitbbhayani @JyotinderSingh Please assign this task to me.
@arpitbbhayani @JyotinderSingh Please assign this task to me.
Assigned
hello, can u assign me for this task, i can see the task is unassigned to no one
I can work on this !!!
@JyotinderSingh Looks like I will not be able to spend much time on this issue this week. You can assign the issue to someone else if it's required a little earlier. For others, there is a draft PR that you may want to take up https://github.com/DiceDB/dice/pull/179
@JyotinderSingh Looks like I will not be able to spend much time on this issue this week. You can assign the issue to someone else if it's required a little earlier.
For others, there is a draft PR that you may want to take up https://github.com/DiceDB/dice/pull/179
You already have significant progress on the issue, Gaurav. I would recommend you stick with it. No rush to complete this, please take your time.
However, if you do want to give up this issue, let me know.
Thanks @JyotinderSingh , I will continue on the same and will try to have a reviewable PR by the weekend
but u can publish PR in order to other guys continue this task
@JyotinderSingh can you assign it to me?
@JyotinderSingh can you assign it to me?
Assigned
https://github.com/DiceDB/dice/pull/179
@gauravsarma1992 Are you going to support ACL in the same PR?