Skip to content

Commit 13127a5

Browse files
committed
Address code review comments
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
1 parent c8c0ad8 commit 13127a5

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

modules/transport-netty4/src/main/java/org/opensearch/http/netty4/ssl/SecureNetty4HttpServerTransport.java

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
import io.netty.handler.ssl.ApplicationProtocolNegotiationHandler;
5656
import io.netty.handler.ssl.SslHandler;
5757

58+
/**
59+
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/http/netty/SecuritySSLNettyHttpServerTransport.java">SecuritySSLNettyHttpServerTransport</a>
60+
*/
5861
public class SecureNetty4HttpServerTransport extends Netty4HttpServerTransport {
5962
private static final Logger logger = LogManager.getLogger(SecureNetty4HttpServerTransport.class);
6063
private final SecureTransportSettingsProvider secureTransportSettingsProvider;

modules/transport-netty4/src/main/java/org/opensearch/transport/netty4/ssl/DualModeSslHandler.java

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
/**
3535
* Modifies the current pipeline dynamically to enable TLS
36+
*
37+
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/transport/DualModeSSLHandler.java">DualModeSSLHandler</a>
3638
*/
3739
public class DualModeSslHandler extends ByteToMessageDecoder {
3840

modules/transport-netty4/src/main/java/org/opensearch/transport/netty4/ssl/SecureConnectionTestUtil.java

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
* SSL Check will be done by sending an OpenSearch Ping to see if server is replying to pings.
2929
* Following that a custom client hello message will be sent to the server, if the server
3030
* side has OpenSearchPortUnificationHandler it will reply with server hello message.
31+
*
32+
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/util/SSLConnectionTestUtil.java">SSLConnectionTestUtil</a>
3133
*/
3234
class SecureConnectionTestUtil {
3335
private static final Logger logger = LogManager.getLogger(SecureConnectionTestUtil.class);

modules/transport-netty4/src/main/java/org/opensearch/transport/netty4/ssl/SecureNetty4Transport.java

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
import io.netty.handler.codec.DecoderException;
6666
import io.netty.handler.ssl.SslHandler;
6767

68+
/**
69+
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/transport/SecuritySSLNettyTransport.java">SecuritySSLNettyTransport</a>
70+
*/
6871
public class SecureNetty4Transport extends Netty4Transport {
6972

7073
private static final Logger logger = LogManager.getLogger(SecureNetty4Transport.class);

modules/transport-netty4/src/main/java/org/opensearch/transport/netty4/ssl/SslUtils.java

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020

2121
import io.netty.buffer.ByteBuf;
2222

23+
/**
24+
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/util/TLSUtil.java">TLSUtil</a>
25+
*/
2326
public class SslUtils {
2427
private static final String[] DEFAULT_SSL_PROTOCOLS = { "TLSv1.3", "TLSv1.2", "TLSv1.1" };
2528

server/src/main/java/org/opensearch/plugins/SecureTransportSettingsProvider.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,19 @@ public interface SecureTransportSettingsProvider {
2828
/**
2929
* An exception handler for errors that might happen while secure transport handle the requests.
3030
*
31+
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/SslExceptionHandler.java">SslExceptionHandler</a>
32+
*
3133
* @opensearch.experimental
3234
*/
3335
@ExperimentalApi
36+
@FunctionalInterface
3437
interface ServerExceptionHandler {
35-
static ServerExceptionHandler NOOP = new ServerExceptionHandler() {
36-
@Override
37-
public void onError(Throwable t) {
38-
// NOOP
39-
}
40-
};
38+
static ServerExceptionHandler NOOP = t -> {};
4139

40+
/**
41+
* Handler for errors happening during the server side processing of the requests
42+
* @param t the error
43+
*/
4244
void onError(Throwable t);
4345
}
4446

0 commit comments

Comments
 (0)