-
Notifications
You must be signed in to change notification settings - Fork 68
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
Support Environment Configuration for Enabling TLS When WP-Predis is used. #322
Comments
I'm definitely open to looking at a pull request if you need some code changes! According to the phpredis docs, it may be as easy as prefixing the host with Let me know what your research yields! |
Ooh, I totally missed that it could be as simple adding |
@danielbachhuber so by setting
|
@timnolte That's odd. It seems to work locally for me with this in my $redis_server = [
'host' => 'tls://127.0.0.1',
'port' => 6379,
]; Can you share your configuration? Also, you could try directly entering your values into Lines 1200 to 1213 in 7dae448
|
So further digging seems to point to the fact that this is an issue between trying to use PhpRedis vs Predis. I missed your note that called out the PhpRedis documentation specifically and thought you were referring to PRedis. So I think that
I did realize that I can't test this on my local Docker since the Redis Docker image doesn't support TLS since no SSL/TLS tunnel has been setup with it. But testing in our development environment with AWS ElasticCache Redis didn't work resulting in that wrapper error. |
@danielbachhuber I also found this related issue for PhpRedis that seemed to indicate that PhpRedis doesn't actually support TLS out-of -the-box: phpredis/phpredis#1706 |
Switching to Predis might work but the addon library doesn't support an setting that via a constant configuration variable or looking for |
That makes sense then.
This seems fixable with something like #323
Besides the wrapper error, what else didn't work about it? Can you share more of the diagnostic details you saw?
I don't fully understand all of the details in that thread but it seems that issue is a bit more specific to AWS? |
@danielbachhuber OK, so I just looked ate that PR and I'm wonde ring if that might be our issue then. With that check failing there was no connection being made to Redis at all. In our case we are using an AWS ElasticCache Redis instance. I will see about possibly getting TLS turned back in with our instance and test that code change |
@timnolte Were you able to track this issue down? |
@danielbachhuber I haven't had a chance to coordinate with our SREa to have TLS turned back on for the Redis instance. |
Our hope has been to standardize on this plugin regardless of whether we are hosting client sites with Pantheon or AWS hosting. One challenge is that we want to be able to turn on TLS when using with AWS but the only way to do this is with the HumanMade WP-Predis add-on. However, there is no facility in WP Redis to enable TLS via a global constant like the other configuration items (
CACHE_...
). We are considering the Redis Object Cache plugin since it does support both of those however it doesn't support running on Pantheon out-of-the-box based on environment configuration, since it is using different configuration constants. I may submit a PR for this feature unless I'm missing it when looking at the code and I can accomplish this.The text was updated successfully, but these errors were encountered: