-
Notifications
You must be signed in to change notification settings - Fork 473
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
JAMES-4072 Support Redis TLS/SSL connection #2418
JAMES-4072 Support Redis TLS/SSL connection #2418
Conversation
94e4505
to
3a613e6
Compare
backends-common/redis/src/main/java/org/apache/james/backends/redis/RedisConfiguration.scala
Outdated
Show resolved
Hide resolved
backends-common/redis/src/main/java/org/apache/james/backends/redis/RedisConfiguration.scala
Outdated
Show resolved
Hide resolved
...mmon/redis/src/test/java/org/apache/james/backends/redis/RedisTLSMasterReplicaExtension.java
Outdated
Show resolved
Hide resolved
...rate-limiter-redis/src/main/scala/org/apache/james/rate/limiter/redis/RedisRateLimiter.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a rather big changeset and I would like that we asks ourselves if we could deliver something shorter and more concise. I would suggest investing time (at least a halth day) to try to refactor this.
...ds-common/redis/src/test/java/org/apache/james/backends/redis/RedisTLSSentinelExtension.java
Outdated
Show resolved
Hide resolved
...ds-common/redis/src/test/java/org/apache/james/backends/redis/RedisTLSSentinelExtension.java
Outdated
Show resolved
Hide resolved
...ds-common/redis/src/test/java/org/apache/james/backends/redis/RedisTLSSentinelExtension.java
Outdated
Show resolved
Hide resolved
3a613e6
to
4b651bc
Compare
Broke to smaller commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honeestly quickly stopped reading... I bet like @chibenwa that there should be a much simpler way. I don't really see why the need of duplicated configuration depending if tls or not, I would believe there might be a way to just have one ssl conf for all topologies, like any other implementation we have?
Maybe we should do a MOB around this
backends-common/redis/src/main/java/org/apache/james/backends/redis/RedisConfiguration.scala
Show resolved
Hide resolved
So I had an other check on this... Can't we try to do something similar to RabbitMQ ssl configuration for example? For example, don't try to figure out if ssl or not depending on the URI, have just a conf for that ( We should have in RedisConfiguration a subclass regrouping ssl conf, like looking at rabbitmq conf for example:
I don't know if all of those are necessary but maybe. It seems this PR is expecting keystore for some reason. Not automatically, it depends how ssl is configured on Redis side (cf hostname.verifier and validation.strategy that could bypass those mechanisms for example, and I would bet SSLOptions is the way) Depending on how your SSLConfiguration ends up, you might inject different things in your redis client then. No need to modify all confs that much. => #307 rabbitmq ssl PR I really think we could do something closer to that, let's keep doing things in a similar fashion |
Maybe as well having something like a RedisClientFactory that would build the redis client depending if it's cluster, replica, ssl, etc... could help regroup the RedisClient build amongs the two factories we have? (RedisRateLimiterFactory and RedisEventBusClientFactory) |
Looks like a good idea to me! |
e631d83
to
4df585a
Compare
b718f62
to
f6c46ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, thanks for the refactoring! Still a few comments
backends-common/redis/src/main/java/org/apache/james/backends/redis/RedisClientFactory.scala
Show resolved
Hide resolved
...st/java/org/apache/james/rate/limiter/RedisRateLimiterWithTLSMasterReplicaTopologyTest.scala
Outdated
Show resolved
Hide resolved
...-redis/src/test/java/org/apache/james/rate/limiter/RedisRateLimiterWithTLSSentinelTest.scala
Outdated
Show resolved
Hide resolved
...-limiter-redis/src/test/java/org/apache/james/rate/limiter/RedisRateLimiterWithTLSTest.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good to me.
+1 for the way commits have been refactored.
b4c30c3
to
adc0e93
Compare
adc0e93
to
354a34e
Compare
354a34e
to
b4ad581
Compare
No description provided.