-
Notifications
You must be signed in to change notification settings - Fork 117
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
Password-protected Redis storage provider connection errors #1557
Comments
WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. |
As mentioned in the original issue, this appears to be a regression for standalone password-protected Redis connections, as running v0.169.0 of router with equivalent config does not result in the same error and successfully connects:
|
@cadams93 Thank you for the extremely clear issue write up! I'm going to get a fix for this out ASAP |
Hey @cadams93 , we just released a fix in [email protected]. Let me know if that works for you! |
Appreciate the quick turnaround @df-wg . I have tested the latest changes and it is now working for us. |
Component(s)
router
router version
v0.170.0
What happened?
Description
The recent PR #1499 has introduced the ability to connect to Redis, when running in cluster-mode, which was previously unsupported. As a result of this change, it is my understanding that connecting to Redis clusters or indeed standalone instances with a password is no longer functioning correctly.
https://github.com/wundergraph/cosmo/pull/1499/files#diff-3173118cd9e8f3849a4d398d232609e32cac4991fd962e78280d9c68c14b67abR26 -
NewRedisCloser
is passed an options bundle, which never hasPassword
populated (hence will be""
).cluster_mode: false
, the password parsed from the URL using thego-redis
library is replaced by the value provided in this options struct.cluster_mode: true
, the password is mapped into thego-redis
library'sClusterOptions
structIn both cases, having an
""
value will cause issues for connections requiring authentication, and result in aNOAUTH
response from the Redis server.Additionally TLS connections using the
rediss://
URL scheme appear to be unsupported when usingcluster_enabled: true
. The manual stripping of the scheme from each URL strips onlyredis://
(non-TLS) URLs. Doing this outside of thego-redis
library also neglects to configure theClusterOptions.TLSConfig
option, which results in a non-TLS connection being attempted to a TLS Redis instance, also failing.fwiw: a symmetrical function to
redis.ParseURL
exists in the backinggo-redis
library, specifically for parsing cluster-mode URLs into theClusterOptions
struct, calledredis.ParseClusterURL
. If used, this would provide greater flexibility for consumers, allowing timeouts, connection pools, etc to be configured.Steps to Reproduce
docker run -p 6379:6379 redis
redis-cli
and running:(For the TLS issue, supply
rediss://
as the scheme, and notice this is not stripped in the URLs supplied to the underlying library)Expected Result
Connection to Redis cluster-mode and/or standalone instances over non-TLS and/or TLS connections, with the ability to supply a valid password.
Actual Result
failed to bootstrap router: failed to create a functioning redis client
Log output
The text was updated successfully, but these errors were encountered: