Skip to content

Commit

Permalink
Merge branch 'main' of github.com:opensearch-project/security into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
derek-ho committed Nov 14, 2024
2 parents 3c635c9 + 4aa7b1c commit 6ae7090
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -698,8 +698,8 @@ dependencies {

// Only osx-x86_64, osx-aarch_64, linux-x86_64, linux-aarch_64, windows-x86_64 are available
if (osdetector.classifier in ["osx-x86_64", "osx-aarch_64", "linux-x86_64", "linux-aarch_64", "windows-x86_64"]) {
testImplementation "io.netty:netty-tcnative-classes:2.0.61.Final"
testImplementation "io.netty:netty-tcnative-boringssl-static:2.0.61.Final:${osdetector.classifier}"
testImplementation "io.netty:netty-tcnative-classes:2.0.66.Final"
testImplementation "io.netty:netty-tcnative-boringssl-static:2.0.66.Final:${osdetector.classifier}"
}
// JUnit build requirement
testCompileOnly 'org.apiguardian:apiguardian-api:1.1.2'
Expand All @@ -710,7 +710,7 @@ dependencies {
}
testRuntimeOnly 'org.scala-lang:scala-library:2.13.15'
testRuntimeOnly 'com.typesafe.scala-logging:scala-logging_3:3.9.5'
testRuntimeOnly('org.apache.zookeeper:zookeeper:3.9.2') {
testRuntimeOnly('org.apache.zookeeper:zookeeper:3.9.3') {
exclude(group:'ch.qos.logback', module: 'logback-classic' )
exclude(group:'ch.qos.logback', module: 'logback-core' )
}
Expand Down
22 changes: 18 additions & 4 deletions src/main/java/org/opensearch/security/ssl/SslSettingsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.logging.log4j.Logger;

import org.opensearch.OpenSearchException;
import org.opensearch.common.Booleans;
import org.opensearch.common.settings.Settings;
import org.opensearch.env.Environment;
import org.opensearch.security.ssl.config.CertType;
Expand Down Expand Up @@ -374,10 +375,23 @@ void openSslWarnings(final Settings settings) {

LOGGER.debug("OpenSSL available ciphers {}", OpenSsl.availableOpenSslCipherSuites());
} else {
LOGGER.warn(
"OpenSSL not available (this is not an error, we simply fallback to built-in JDK SSL) because of {}",
OpenSsl.unavailabilityCause()
);
boolean openSslIsEnabled = false;

if (settings.hasValue(SECURITY_SSL_HTTP_ENABLE_OPENSSL_IF_AVAILABLE) == true) {
openSslIsEnabled |= Booleans.parseBoolean(settings.get(SECURITY_SSL_HTTP_ENABLE_OPENSSL_IF_AVAILABLE));
}

if (settings.hasValue(SECURITY_SSL_TRANSPORT_ENABLE_OPENSSL_IF_AVAILABLE) == true) {
openSslIsEnabled |= Booleans.parseBoolean(settings.get(SECURITY_SSL_TRANSPORT_ENABLE_OPENSSL_IF_AVAILABLE));
}

if (openSslIsEnabled == true) {
/* only print warning if OpenSsl is enabled explicitly but not available */
LOGGER.warn(
"OpenSSL not available (this is not an error, we simply fallback to built-in JDK SSL) because of ",
OpenSsl.unavailabilityCause()
);
}
}
}

Expand Down

0 comments on commit 6ae7090

Please sign in to comment.