You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lein repl
user=> (require '[taoensso.carmine :as car :refer (wcar)])
nil
user=> (def conn {:pool {} :spec {:uri "redis://default:[REDACTED]@localhost:6379/"}})
#'user/conn
user=> (car/wcar conn (car/ping))
Execution error (ExceptionInfo) at taoensso.carmine.protocol/get-unparsed-reply (protocol.clj:143).
WRONGPASS invalid username-password pair or user is disabled.
user=> (def conn {:pool {} :spec {:uri "redis://srv_usr:[REDACTED]@localhost:6379/"}})
#'user/conn
user=> (car/wcar conn (car/ping))
Execution error (ExceptionInfo) at taoensso.carmine.protocol/get-unparsed-reply (protocol.clj:143).
WRONGPASS invalid username-password pair or user is disabled.
Solution
The namespace taoensso.carmine.connections at commit 1ee8781 destructures the user name, but never uses it afterwards. Hence, Carmine always uses the user default made by Redis instead of the one provided.
At a quick glance, it seems it requires changes to 3 places to get it fixed:
Redis support for auth [<username>] <password> was added to Redis in v6, and this isn't yet supported by Carmine.
Would be happy to see a PR to add support. Otherwise will do this myself next time I'm working on Carmine.
At a quick glance, it seems it requires changes to 3 places to get it fixed
Sounds correct to me! (Though please don't modify the commands.edn, that'll be covered by #251)
Connection discards user name
Reproduce the issue
The steps below assume
bash
,gpg
,Docker
anddocker-compose
are installed.Starting from carmine root directory
Set up a docker-compose file
Download Redis default configuration
Remove Redis protected mode
Add a password on user
default
. This user is created by Redis.Add another user
srv_usr
with the same passwordPut the password in
redis-cli.env
Start Redis Docker container
Test the connection
default
without passworddefault
with passwordsrv_usr
without passworddefault
with passwordGood !
Test carmine
Fire up REPL
Replace the password
[REDACTED]
with yoursGood !
The problem
When I disable the user
default
, usersrv_usr
also stop working. However, redis-cli correctly handlessrv_usr
.Restart
carmine-test
Docker container.Test well-behave redis-CLI
VS carmine
Solution
The namespace
taoensso.carmine.connections
at commit1ee8781
destructures the user name, but never uses it afterwards. Hence, Carmine always uses the userdefault
made by Redis instead of the one provided.At a quick glance, it seems it requires changes to 3 places to get it fixed:
I don't want to engage myself into this issue, but I will take a stab at it.
The text was updated successfully, but these errors were encountered: