You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "gaurav-narula (via GitHub)" <gi...@apache.org> on 2024/02/26 17:54:16 UTC
[PR] KAFKA-16305: Avoid optimisation in handshakeUnwrap [kafka]
gaurav-narula opened a new pull request, #15434:
URL: https://github.com/apache/kafka/pull/15434
Fixes `SslTransportLayer` such that it tries to invoke `SSLEngine::unwrap` correctly. Also added a test with the Netty based OpenSSL provider
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-16305: Avoid optimisation in handshakeUnwrap [kafka]
Posted by "rajinisivaram (via GitHub)" <gi...@apache.org>.
rajinisivaram merged PR #15434:
URL: https://github.com/apache/kafka/pull/15434
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-16305: Avoid optimisation in handshakeUnwrap [kafka]
Posted by "ijuma (via GitHub)" <gi...@apache.org>.
ijuma commented on code in PR #15434:
URL: https://github.com/apache/kafka/pull/15434#discussion_r1503149170
##########
clients/src/test/java/org/apache/kafka/common/security/ssl/NettySslEngineFactory.java:
##########
@@ -0,0 +1,159 @@
+package org.apache.kafka.common.security.ssl;
+
+import io.netty.buffer.ByteBufAllocator;
+import io.netty.handler.ssl.SslContext;
+import io.netty.handler.ssl.SslContextBuilder;
+import io.netty.handler.ssl.SslProvider;
+import org.apache.kafka.common.KafkaException;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+import org.apache.kafka.common.config.types.Password;
+import org.apache.kafka.common.network.Mode;
+import org.apache.kafka.common.utils.SecurityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLParameters;
+import javax.net.ssl.TrustManagerFactory;
+import java.security.KeyStore;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public class NettySslEngineFactory extends DefaultSslEngineFactory {
Review Comment:
I would expect a unit test versus a test that adds a third party dependency.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-16305: Avoid optimisation in handshakeUnwrap [kafka]
Posted by "rajinisivaram (via GitHub)" <gi...@apache.org>.
rajinisivaram commented on PR #15434:
URL: https://github.com/apache/kafka/pull/15434#issuecomment-1968572233
Test failures not related, merging to trunk
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-16305: Avoid optimisation in handshakeUnwrap [kafka]
Posted by "gaurav-narula (via GitHub)" <gi...@apache.org>.
gaurav-narula commented on code in PR #15434:
URL: https://github.com/apache/kafka/pull/15434#discussion_r1504044580
##########
clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java:
##########
@@ -1467,4 +1476,51 @@ int updateAndGet(int actualSize, boolean update) {
}
}
}
+
+ /**
+ * Refer KAFKA-16305.
Review Comment:
Thanks! Addressed in [d954393](https://github.com/apache/kafka/pull/15434/commits/d9543932dcb63efb45c2d6e5704f044cb44ba95a)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-16305: Avoid optimisation in handshakeUnwrap [kafka]
Posted by "rajinisivaram (via GitHub)" <gi...@apache.org>.
rajinisivaram commented on code in PR #15434:
URL: https://github.com/apache/kafka/pull/15434#discussion_r1504009367
##########
clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java:
##########
@@ -1467,4 +1476,51 @@ int updateAndGet(int actualSize, boolean update) {
}
}
}
+
+ /**
+ * Refer KAFKA-16305.
Review Comment:
Can we summarize the description from the ticket in a couple of sentences instead of adding a reference to the ticket?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] KAFKA-16305: Avoid optimisation in handshakeUnwrap [kafka]
Posted by "gaurav-narula (via GitHub)" <gi...@apache.org>.
gaurav-narula commented on code in PR #15434:
URL: https://github.com/apache/kafka/pull/15434#discussion_r1503432226
##########
clients/src/test/java/org/apache/kafka/common/security/ssl/NettySslEngineFactory.java:
##########
@@ -0,0 +1,159 @@
+package org.apache.kafka.common.security.ssl;
+
+import io.netty.buffer.ByteBufAllocator;
+import io.netty.handler.ssl.SslContext;
+import io.netty.handler.ssl.SslContextBuilder;
+import io.netty.handler.ssl.SslProvider;
+import org.apache.kafka.common.KafkaException;
+import org.apache.kafka.common.config.SslConfigs;
+import org.apache.kafka.common.config.internals.BrokerSecurityConfigs;
+import org.apache.kafka.common.config.types.Password;
+import org.apache.kafka.common.network.Mode;
+import org.apache.kafka.common.utils.SecurityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLParameters;
+import javax.net.ssl.TrustManagerFactory;
+import java.security.KeyStore;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public class NettySslEngineFactory extends DefaultSslEngineFactory {
Review Comment:
👍 Reverted that commit and added the unit test in 79902f5
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org