-
Notifications
You must be signed in to change notification settings - Fork 354
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
[FEATURE] apply new TLS settings after cert renewal #552
Comments
redis-plus-plus is based on hiredis. It seems that hiredis does not support any API to update certs settings. So this feature cannot achieved so far. We can achieve updating password without creating a new connection. However, normally, you seldom modify the password. And the cost should be ignorable. I'll consider make this feature in TODO list, although the priority is low. Thanks for your suggestion! Regards |
I understand hiredis doesn't support update certs for existing connection. While, if TLS server decide FIN these connections, then redis++ reconnect should use latest cert rather than old ones for new connection. |
BTW, another point, hiredis open below config for redisCreateSSLContext to gain SSL context. opts.tls.cert = "/path/to/client/certificate"; // Optional But, sometime, maybe need more configurable options, such as TLS protocol, maybe only TLS1.3 , or cipher list settings etc. I do a simple trial via prepare SSL_CTX and load to hiredis, we can achieve more control for TLS. SSL_CTX *ssl_ctx = SSL_CTX_new(SSLv23_client_method()); SSL *ssl = SSL_new(ssl_ctx); //Apply to hiredis API via SSL. Is it reasonable to extend Redis++ TLS ability? |
This might not be a good idea. In this case, connections in the underlying connection pool have different setting. If something bad happens, it might be hard to debug the problem, e.g. some connection works, while others not.
Regards |
Use redisInitiateSSL to set hiredis TLS with more SSL config is recommended by hiredis code officer. The overall behavior can achieve new TLS connection use renewed certs, and no impact for existing established ones. If stop existing client, and new another redis++ client, it is high cost, and all connection down in spite of TLS server maybe OK to accept. Appreciate Redis++ can open a general interface to allow user to update cert changes, auth passwd changes etc. |
I'm not familiar with TLS stuff. But do you mean that a Redis server can serve with multiple different certificate files? Also, I don't think it's a frequent operation to update certificates. So you seldom need to renew all connections, and that should not be big problem. Right? Regards |
Is your feature request related to a problem? Please describe.
Once the cert installed at redis server expired, it will lead to handshake failed.
Is it possible support new refreshed cert load to redis++ cluster client.
Describe the solution you'd like
Maybe set new values to ConnectionOptions , and redis++ client open a API to apply new TLS config changes.
Describe alternatives you've considered
If can't apply refreshed certs into Redis++, I have to re-instantiate redis++ client.
That maybe high cost compared with load new certs solution.
Additional context
If that is possible and doable to apply new TLS certs to Redis++, how about passwd for auth?
connection_options.password = "auth";
I prefer Redis++ can open interface to update initial settings, such as Certs and Passwd. Thanks.
The text was updated successfully, but these errors were encountered: