-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Streaming Indexing] Ensure support of the new transport by security …
…plugin (#13174) Signed-off-by: Andriy Redko <[email protected]>
- Loading branch information
Showing
14 changed files
with
938 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
...s/transport-netty4/src/test/java/org/opensearch/transport/netty4/ssl/TrustAllManager.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...ansport-reactor-netty4/src/main/java/org/opensearch/http/reactor/netty4/ssl/SslUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
package org.opensearch.http.reactor.netty4.ssl; | ||
|
||
import org.opensearch.OpenSearchSecurityException; | ||
|
||
import javax.net.ssl.SSLContext; | ||
import javax.net.ssl.SSLEngine; | ||
|
||
import java.security.NoSuchAlgorithmException; | ||
|
||
/** | ||
* Helper class for creating default SSL engines | ||
*/ | ||
public class SslUtils { | ||
private static final String[] DEFAULT_SSL_PROTOCOLS = { "TLSv1.3", "TLSv1.2", "TLSv1.1" }; | ||
|
||
private SslUtils() {} | ||
|
||
/** | ||
* Creates default server {@link SSLEngine} instance | ||
* @return default server {@link SSLEngine} instance | ||
*/ | ||
public static SSLEngine createDefaultServerSSLEngine() { | ||
try { | ||
final SSLEngine engine = SSLContext.getDefault().createSSLEngine(); | ||
engine.setEnabledProtocols(DEFAULT_SSL_PROTOCOLS); | ||
engine.setUseClientMode(false); | ||
return engine; | ||
} catch (final NoSuchAlgorithmException ex) { | ||
throw new OpenSearchSecurityException("Unable to initialize default server SSL engine", ex); | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...ort-reactor-netty4/src/main/java/org/opensearch/http/reactor/netty4/ssl/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
/** | ||
* SSL supporting utility classes | ||
*/ | ||
package org.opensearch.http.reactor.netty4.ssl; |
Oops, something went wrong.