249: Introduce basic and extended ssl settings#312
249: Introduce basic and extended ssl settings#312capuccinofan wants to merge 3 commits intoKarelCemus:masterfrom
Conversation
|
@KarelCemus Could u please have a look? |
KarelCemus
left a comment
There was a problem hiding this comment.
I am not comfortable with this PR as it is binary incompatible and you are introducing plenty of breaking changes, and I am not about to release a new major anytime soon. And it is not appreciated making incompatible changes in minor or even patch releases
I am surprised you proposed changes to your own PR one day after your PR was merged. It makes me feel that your changes were not well thought through, and I probably accepted them to the lib prematurely.
| def verifyPeerMode: Option[VerifyPeerMode] | ||
|
|
||
| def toOptions: SslOptions = { | ||
| override val enabled: Boolean = true |
There was a problem hiding this comment.
Why do you need this? Feels redundant given SSLConfig is optional, meaning if you want to disable it, then don't provide it. This would complicate debugging and I am not sure what the benefits of this would be
|
|
||
| sealed abstract class VerifyPeerMode(val name: String, val value: SslVerifyMode) extends Product with Serializable | ||
|
|
||
| object VerifyPeerMode { |
There was a problem hiding this comment.
For some weird unknown reason, I cannot put the comment at the correct line, it belongs here
def none: VerifyPeerMode = NONE
def full: VerifyPeerMode = FULL
def ca: VerifyPeerMode = CA
Why do you need these aliases?
|
|
||
| sealed abstract class VerifyPeerMode(val name: String, val value: SslVerifyMode) extends Product with Serializable | ||
|
|
||
| object VerifyPeerMode { |
There was a problem hiding this comment.
another case
config.getOption(path, _.getString) match {
case Some(NONE.name) => Some(none)
case Some(FULL.name) => Some(full)
case Some(CA.name) => Some(ca)
case _ => None
}
unrecognized matches shouldn't be ignored silently, it is illegal configuration, I believe it should fail but check other places, how it is usually done there
| } | ||
|
|
||
| object SslResource { | ||
| final case class BasicRedisSslSettingsImpl(enabled: Boolean, verifyPeerMode: Option[VerifyPeerMode]) extends BasicRedisSslSettings |
There was a problem hiding this comment.
Why do we need 2 types of settings?
Yeah, I am sorry, that I didn't take some things into account. The thing is, I need to have an option to enable ssl settings without any settings.
Like existence of object means that ssl should be enabled But it doesn't look very clear, And going to the fact that
That is what I would like to achieve. Probably we can make it with the second approach. What do you think? |
This is very suspicious, how is that possible? Which configuration would be used then? Isn't this basically the extended one with defaults? Could you elaborate more on this? However, I agree that empty object is not the best option but also having Btw there is still the issue of the compatibility to make your changes binary compatible with your previous attempt |
As far as I understood, we should be able to connect using ssl only by enabling It will be backward compatible as well
|
|
@KarelCemus Friendly reminder :) |
|
Not nice but ok |
Let me think more about this topic, maybe I can come up with something else |
No description provided.