Skip to content

Commit

Permalink
Address code review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta committed Mar 15, 2024
1 parent c8c0ad8 commit 13127a5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
import io.netty.handler.ssl.ApplicationProtocolNegotiationHandler;
import io.netty.handler.ssl.SslHandler;

/**
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/http/netty/SecuritySSLNettyHttpServerTransport.java">SecuritySSLNettyHttpServerTransport</a>
*/
public class SecureNetty4HttpServerTransport extends Netty4HttpServerTransport {
private static final Logger logger = LogManager.getLogger(SecureNetty4HttpServerTransport.class);
private final SecureTransportSettingsProvider secureTransportSettingsProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
* SSL Check will be done by sending an OpenSearch Ping to see if server is replying to pings.
* Following that a custom client hello message will be sent to the server, if the server
* side has OpenSearchPortUnificationHandler it will reply with server hello message.
*
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/util/SSLConnectionTestUtil.java">SSLConnectionTestUtil</a>
*/
class SecureConnectionTestUtil {
private static final Logger logger = LogManager.getLogger(SecureConnectionTestUtil.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
import io.netty.handler.codec.DecoderException;
import io.netty.handler.ssl.SslHandler;

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

private static final Logger logger = LogManager.getLogger(SecureNetty4Transport.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

import io.netty.buffer.ByteBuf;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,19 @@ public interface SecureTransportSettingsProvider {
/**
* An exception handler for errors that might happen while secure transport handle the requests.
*
* @see <a href="https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/ssl/SslExceptionHandler.java">SslExceptionHandler</a>
*
* @opensearch.experimental
*/
@ExperimentalApi
@FunctionalInterface
interface ServerExceptionHandler {
static ServerExceptionHandler NOOP = new ServerExceptionHandler() {
@Override
public void onError(Throwable t) {
// NOOP
}
};
static ServerExceptionHandler NOOP = t -> {};

/**
* Handler for errors happening during the server side processing of the requests
* @param t the error
*/
void onError(Throwable t);
}

Expand Down

0 comments on commit 13127a5

Please sign in to comment.