aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-main
diff options
context:
space:
mode:
authorJacek <jacek.poreda@sonarsource.com>2021-06-22 14:53:22 +0200
committersonartech <sonartech@sonarsource.com>2021-06-23 20:03:04 +0000
commitfda0ba7738a8d87d302d460cba6fd490552aca79 (patch)
treeb2ae3131809ae56ca98f713637b1772b0e24ac6b /server/sonar-main
parent6a472ec075f9cf5d0ae58e8ebb0dfe48b7f74f2a (diff)
downloadsonarqube-fda0ba7738a8d87d302d460cba6fd490552aca79.tar.gz
sonarqube-fda0ba7738a8d87d302d460cba6fd490552aca79.zip
SONAR-14854 Support TLSv1.3,TLSv1.2 for Elasticsearch transport connection encryption
Diffstat (limited to 'server/sonar-main')
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java1
-rw-r--r--server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java4
2 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java b/server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java
index 30c5b0e7729..79072191cce 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/es/EsSettings.java
@@ -118,6 +118,7 @@ public class EsSettings {
builder.put("xpack.security.enabled", "true");
builder.put("xpack.security.transport.ssl.enabled", "true");
+ builder.put("xpack.security.transport.ssl.supported_protocols", "TLSv1.3,TLSv1.2");
builder.put("xpack.security.transport.ssl.verification_mode", "certificate");
builder.put("xpack.security.transport.ssl.keystore.path", clusterESKeystoreFileName);
builder.put("xpack.security.transport.ssl.truststore.path", clusterESTruststoreFileName);
diff --git a/server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java b/server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java
index 23722f2624d..cdceb3b305f 100644
--- a/server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java
+++ b/server/sonar-main/src/test/java/org/sonar/application/es/EsSettingsTest.java
@@ -390,7 +390,9 @@ public class EsSettingsTest {
Map<String, String> outputParams = settings.build();
- assertThat(outputParams).containsEntry("xpack.security.transport.ssl.enabled", "true")
+ assertThat(outputParams)
+ .containsEntry("xpack.security.transport.ssl.enabled", "true")
+ .containsEntry("xpack.security.transport.ssl.supported_protocols", "TLSv1.3,TLSv1.2")
.containsEntry("xpack.security.transport.ssl.keystore.path", keystore.getName())
.containsEntry("xpack.security.transport.ssl.truststore.path", truststore.getName());
}