You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "rueian (via GitHub)" <gi...@apache.org> on 2023/04/26 12:32:24 UTC

[GitHub] [incubator-kvrocks] rueian opened a new issue, #1403: Syntax of HELLO is different from Redis

rueian opened a new issue, #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-kvrocks/issues) and found no similar issues.
   
   
   ### Version
   
   2.3.0
   
   ### Minimal reproduce step
   
   1. Set `requirepass mypass`
   2. Send command: `HELLO 2 AUTH default mypass` after connected.
   
   
   ### What did you expect to see?
   
   mypass should be accepted.
   
   ### What did you see instead?
   
   `invalid password` error.
   
   ### Anything Else?
   
   Hi, 
   
   According to https://redis.io/commands/hello, the syntax of `HELLO` should be 
   ```
   HELLO [protover [AUTH username password] [SETNAME clientname]]
   ```
   and the default username should be `default`.
   
   However, kvrocks' syntax seems to lack the username part:
   https://github.com/apache/incubator-kvrocks/blob/6889b5916ab560ecd5eed79bb9786e36342f0e17/src/commands/cmd_server.cc#L660
   
   Not sure if this is intended? But I think it will be great if matching redis' syntax.
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] rueian commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "rueian (via GitHub)" <gi...@apache.org>.
rueian commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1525582487

   Hi @tisonkun,
   
   Yes, I am also making a go redis client, rueidis, and got a report that it doesn't work with kvrocks because of the syntax difference with redis: https://github.com/rueian/rueidis/issues/204
   
   But I am not sure if goredis do special work for kvrocks or not, since its latest version doesn't work with kvrocks as well.
   
   For example:
   ```go
   package main
   
   import (
   	"context"
   	"fmt"
   	"github.com/redis/go-redis/v9"
   )
   
   func main() {
   	client := redis.NewClient(&redis.Options{Addr: "127.0.0.1:6666", Password: "mypass"})
   	fmt.Println(client.Ping(context.Background()))
   }
   ```
   goredis actually send `hello 3 auth default mypass` to kvrocs. And then it returned `ping: Syntax error in HELLO option auth` error.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] mapleFU commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1523353142

   Hi @rueian . When I implement "hello", kvrocks didn't support auth like that.
   https://github.com/apache/incubator-kvrocks/pull/881#issuecomment-1249985088


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1525182746

   @rueian IIRC the goredis client handle the `AUTH` command specially for kvrocks. If you're implementing a redis client and hope it can be compatible with kvrocks, feel free to start a discussion to add (compatible) integration tests. As our gocases are written on the top of goredis.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1527731168

   @rueian Thanks for your repro! That's a good new test case we can add to the integration test suite for verifying this issue is resolved :D


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice closed issue #1403: Syntax of HELLO is different from Redis

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice closed issue #1403: Syntax of HELLO is different from Redis
URL: https://github.com/apache/incubator-kvrocks/issues/1403


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1525181575

   I also preferred to allow passing the username, even though it's meaningless to Kvrocks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] rueian commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "rueian (via GitHub)" <gi...@apache.org>.
rueian commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1523414274

   > Hi @rueian, it seems meaningless in kvrocks to give a username, since the AUTH command in kvrocks is used to authorize accessibility to a corresponding [namespace](https://kvrocks.apache.org/docs/namespace/).
   
   Hi @PragmaTwice, I understand.
   
   However, from a redis client implementation perspective, this difference in syntax means that a client implementation may need to treat Kvrocks differently to work with it. I think this may put some barriers for a client to adapt to Kvrocks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tisonkun commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1525187945

   Aha. We change for being compatible with go-redis in https://github.com/apache/incubator-kvrocks/pull/830.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1523356233

   Hi @rueian, it seems meaningless in kvrocks to give a username, since the AUTH command in kvrocks is used to authorize accessibility to a corresponding [namespace](https://kvrocks.apache.org/docs/namespace/).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1525164233

   @rueian Thanks for you explaination. It make sense. I am not averse to accept an `AUTH default <pass>` form. cc @git-hulk 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #1403: Syntax of HELLO is different from Redis

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on issue #1403:
URL: https://github.com/apache/incubator-kvrocks/issues/1403#issuecomment-1523348196

   @mapleFU  could you take a look at this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org