forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add method to return dynamic SecureTransportParameters from SecureTra…
…nsportSettingsProvider interface (opensearch-project#16387) (opensearch-project#16388) * Add isDualModeEnabled to SecureTransportSettingsProvider interface * Add default impl * Respond to comments, update usages and update docstring * Address feedback * Add ExperimentalApi and add to CHANGELOG * Move DefaultSecureTransportParameters to separate file and add javadoc --------- (cherry picked from commit f346788) Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6db8124
commit 3ef3455
Showing
4 changed files
with
53 additions
and
3 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
28 changes: 28 additions & 0 deletions
28
server/src/main/java/org/opensearch/plugins/DefaultSecureTransportParameters.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,28 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.opensearch.plugins; | ||
|
||
import org.opensearch.common.network.NetworkModule; | ||
import org.opensearch.common.settings.Settings; | ||
|
||
/** | ||
* Default implementation of {@link SecureTransportSettingsProvider.SecureTransportParameters}. | ||
*/ | ||
class DefaultSecureTransportParameters implements SecureTransportSettingsProvider.SecureTransportParameters { | ||
private final Settings settings; | ||
|
||
DefaultSecureTransportParameters(Settings settings) { | ||
this.settings = settings; | ||
} | ||
|
||
@Override | ||
public boolean dualModeEnabled() { | ||
return NetworkModule.TRANSPORT_SSL_DUAL_MODE_ENABLED.get(settings); | ||
} | ||
} |
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