Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication with JWT successful even if user has another authentication type in 24.8 #572

Open
alsugiliazova opened this issue Dec 18, 2024 · 2 comments

Comments

@alsugiliazova
Copy link

CREATE USER  jwt_user_57bc2d2d_bd74_11ef_930b_49c33636540f IDENTIFIED WITH PLAINTEXT_PASSWORD BY 'password'
<clickhouse>
  <jwt_validators>
    <new_validator>
      <algo>hs256</algo>
      <static_key>some_secret</static_key>
    </new_validator>
  </jwt_validators>
</clickhouse>

echo -e "SELECT currentUser()" | clickhouse client -n --jwt "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJqd3RfdXNlcl81N2JjMmQyZF9iZDc0XzExZWZfOTMwYl80OWMzMzYzNjU0MGYifQ.hsDwIZHQjhTPx1PanLO8tGtrOUQUEjqXn4Hm-96ov7k"

24.8 output:

jwt_user_57bc2d2d_bd74_11ef_930b_49c33636540f

24.3 output (expected):

Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: jwt_user_ea640803_bd74_11ef_930b_49c33636540f: Authentication failed: password is incorrect, or there is no user with such name.. (AUTHENTICATION_FAILED)
@alsugiliazova
Copy link
Author

@zvonand

@zvonand
Copy link
Collaborator

zvonand commented Dec 19, 2024

Shall be fixed by e8c16e5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants