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) * Add isDualModeEnabled to SecureTransportSettingsProvider interface Signed-off-by: Craig Perkins <[email protected]> * Add default impl Signed-off-by: Craig Perkins <[email protected]> * Respond to comments, update usages and update docstring Signed-off-by: Craig Perkins <[email protected]> * Address feedback Signed-off-by: Craig Perkins <[email protected]> * Add ExperimentalApi and add to CHANGELOG Signed-off-by: Craig Perkins <[email protected]> * Move DefaultSecureTransportParameters to separate file and add javadoc Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]>
- Loading branch information
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