kcl icon indicating copy to clipboard operation
kcl copied to clipboard

UserCRAM was created success but cannot authenticate to cluster

Open tommy04062019 opened this issue 4 years ago • 6 comments

Command:

/kcl --config-path config.toml admin user-scram alter --set user=user1,mechanism=scram-sha-512,iterations=8192,password=123456

Error:

org.apache.kafka.common.errors.SaslAuthenticationException: Authentication failed during authentication due to invalid credentials with SASL mechanism SCRAM-SHA-512

tommy04062019 avatar Dec 21 '21 07:12 tommy04062019

What's the output of running the first command?

twmb avatar Dec 24 '21 02:12 twmb

What's the output of running the first command?

It's here:

{
  "Version": 0,
  "ThrottleMillis": 0,
  "Results": [
    {
      "User": "user1",
      "ErrorCode": 0,
      "ErrorMessage": "",
      "UnknownTags": {}
    }
  ],
  "UnknownTags": {}
}

Something wrong with password.:(

tommy04062019 avatar Dec 24 '21 15:12 tommy04062019

Hi @twmb have u checked this? Your tool is great, It only lacks this part. I hope you have a look at it soon

tommy04062019 avatar Dec 28 '21 08:12 tommy04062019

Sorry, kcl is a bit lower priority for me at the moment. Everything above looks correct: what's the output of using the password? I remember when I tried this a bit ago that it was working. I could potentially try again -- not sure if I have a docker compose stashed around that enables the authorizer.

twmb avatar Jan 06 '22 03:01 twmb

Sorry, kcl is a bit lower priority for me at the moment. Everything above looks correct: what's the output of using the password? I remember when I tried this a bit ago that it was working. I could potentially try again -- not sure if I have a docker compose stashed around that enables the authorizer.

Ahh!, I knew where your code wrong.

case "pasword":
  password = v

You missed s when check key password. After correcting, it works fine for me now. Thanks for responding

tommy04062019 avatar Jan 07 '22 07:01 tommy04062019

Looks like an easy fix, mind opening a PR?

twmb avatar Jan 13 '22 21:01 twmb