kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maulin Vasavada <maulin.vasav...@gmail.com>
Subject Re: [DISCUSS] KIP-519: Make SSL context/engine configuration extensible
Date Wed, 11 Sep 2019 07:28:48 GMT
Hi all,

Since the "custom config" seems the main topic of interest let us talk
about it.

1. I want to confirm that I interpret the definition of 'custom config of
SslEngineFactory' the same way Clement is suggesting - "a config that does
not exist in Kafka but is specified by a custom implementation of
SslEngineFactory".  If there is a disagreement to that we have to bring it
up here sooner.

2. I've been thinking about it and I question why we are trying to make a
custom config a first class citizen in standard config?
The reasoning for that question is-
Kafka wants to delegate creation of SSLEngine to a class which is "not"
part of Kafka's distribution. Since the interface for SSLEngine creator
will be defined by the public method of createSSLEngine(), why would Kafka
care what does the implementation do other than fulfilling the contract of
creation of SSLEngine. The implementation can use any special configs i.e.
configs coming from input Map OR configs defined in a new file only known
to itself. Making the configs part of the interface contract in any way is
not necessary. This way we keep it simple and straightforward.

3. Now, 2nd point raises a question - if we follow that suggestion - how
can we ever re-create the SSLEngineFactory object and allow new object to
be created when something changes in the implementation. That is a valid
question. If you noticed in the KIP section titled "Other challenge" - we
do have scenario where the SslEngineFactory implementation ONLY knows that
something changed - example: keystore got updated by a local daemon process
only known to the specific implementation. This means we have a need of
"push notification" from the SslEngineFactory's implementation to the
SslFactory actually. I feel if we build the "push notification" via adding
a method in the interface as "public void
registerReconfigurableListener(Reconfigurable r)" and make SslFactory
register itself with the SslEngineFactory's impl class, we can trigger the
reconfiguration of SslEngineFactory implementation based on its own terms
and conditions without getting into making custom configs complicated.

I am just thinking out loud here and expressing my opinion not to avoid
addressing custom configs BUT what I genuinely believe might be a better
approach.

Thanks
Maulin



















On Tue, Sep 10, 2019 at 9:06 PM Pellerin, Clement <Clement_Pellerin@ibi.com>
wrote:

> Regarding what I labeled the simplest solution below, SslConfigs could
> instantiate the custom interface only if the yet to be validated configs
> were passed in to the call to get the list of known SSL configs.
>
> -----Original Message-----
> From: Pellerin, Clement
> Sent: Tuesday, September 10, 2019 11:36 AM
> To: dev@kafka.apache.org
> Subject: [EXTERNAL]RE: [DISCUSS] KIP-519: Make SSL context/engine
> configuration extensible
>
> Another solution could be a new standard ssl config that holds a list of
> extra custom configs to accept.
> Using a custom SslEngineFactory with custom configs would require setting
> two configs, one for the class name and another for the list of custom
> configs.
> In SslConfigs, we see that declaring a single config takes 5 values, so
> I'm not sure how it would work exactly.
>
> We could also declare a new interface to return the list of custom ssl
> configs and the extra standard ssl config I'm proposing holds the name of
> the implementation class instead. The reason a different interface is
> needed is because it would be instantiated by SslConfigs, not SslFactory.
> This seems the simplest solution.
>
> Anyway, the point of this exercise is to prove an acceptable solution for
> custom configs is not affecting the public API in KIP-519.
>
>
> -----Original Message-----
> From: Pellerin, Clement
> Sent: Tuesday, September 10, 2019 9:35 AM
> To: dev@kafka.apache.org
> Subject: [EXTERNAL]RE: [DISCUSS] KIP-519: Make SSL context/engine
> configuration extensible
>
> Custom config is a term I invented to mean a config that does not exist in
> Kafka but is specified by a custom implementation of SslEngineFactory.
> The problem with custom configs (as I remember it) is that the list of
> configs is static in SslConfigs and config names are checked before
> SslFactory is created.
> ==> You must solve this problem because that is what killed KIP-383 and
> therefore is the sole reason why KIP-519 exists.
> ==> Your KIP does not have to implement the solution since it can be done
> in a future KIP, but your KIP must be compatible with the solution found.
> ==> A method to return the list of configs would help. This cannot be a
> static method in the interface since it cannot be overridden.
> ==> You could require a static method in the implementation class by
> convention, just like the constructor you require.
>
> This email did not originate from inside Information Builders.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message