aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-main/src/main/java
diff options
context:
space:
mode:
authorTrabelsi Tobias <tobias.trabelsi@sonarsource.com>2021-10-19 08:24:20 +0200
committersonartech <sonartech@sonarsource.com>2021-10-22 20:03:27 +0000
commit959f7f05fc7ee9a75669fe75f27c624930b284d7 (patch)
treec630afed3b38a38fb97aa4ad353e36060744d53b /server/sonar-main/src/main/java
parente2faf2d86511c2b843f2ac82a811579c937a768c (diff)
downloadsonarqube-959f7f05fc7ee9a75669fe75f27c624930b284d7.tar.gz
sonarqube-959f7f05fc7ee9a75669fe75f27c624930b284d7.zip
DOCKER-27 disable FIPS mode
Diffstat (limited to 'server/sonar-main/src/main/java')
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/CeJvmOptions.java4
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java2
-rw-r--r--server/sonar-main/src/main/java/org/sonar/application/command/WebJvmOptions.java3
3 files changed, 9 insertions, 0 deletions
diff --git a/server/sonar-main/src/main/java/org/sonar/application/command/CeJvmOptions.java b/server/sonar-main/src/main/java/org/sonar/application/command/CeJvmOptions.java
index 57b367fe9cc..cf7c70207d3 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/command/CeJvmOptions.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/CeJvmOptions.java
@@ -45,6 +45,10 @@ public class CeJvmOptions extends JvmOptions<CeJvmOptions> {
res.put("--add-opens=java.base/sun.nio.ch=ALL-UNNAMED", "");
res.put("--add-opens=java.management/sun.management=ALL-UNNAMED", "");
res.put("--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED", "");
+
+ // disable FIPS mode for the JVM so SonarQube can use certain algorithms
+ res.put("-Dcom.redhat.fips=", "false");
+
return res;
}
}
diff --git a/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java b/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
index 975b5a7071e..89a2e99aae0 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/EsJvmOptions.java
@@ -126,6 +126,8 @@ public class EsJvmOptions extends JvmOptions<EsJvmOptions> {
* parsing will break in an incompatible way for some date patterns and locales.
*/
res.put("-Djava.locale.providers=", "COMPAT");
+ // disable FIPS mode for the JVM so SonarQube can use certain algorithms
+ res.put("-Dcom.redhat.fips=", "false");
}
public void writeToJvmOptionFile(File file) {
diff --git a/server/sonar-main/src/main/java/org/sonar/application/command/WebJvmOptions.java b/server/sonar-main/src/main/java/org/sonar/application/command/WebJvmOptions.java
index b4eb48796c6..608a38de1b9 100644
--- a/server/sonar-main/src/main/java/org/sonar/application/command/WebJvmOptions.java
+++ b/server/sonar-main/src/main/java/org/sonar/application/command/WebJvmOptions.java
@@ -49,6 +49,9 @@ public class WebJvmOptions extends JvmOptions<WebJvmOptions> {
res.put("--add-opens=java.base/sun.nio.ch=ALL-UNNAMED", "");
res.put("--add-opens=java.management/sun.management=ALL-UNNAMED", "");
res.put("--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED", "");
+
+ // disable FIPS mode for the JVM so SonarQube can use certain algorithms
+ res.put("-Dcom.redhat.fips=", "false");
return res;
}