SonarQube ignores http.proxyUser and http.proxyPort

301 views
Skip to first unread message

sven.p.s...@googlemail.com

unread,
May 2, 2017, 6:25:54 AM5/2/17
to SonarQube
Hi,

I'm running SonarQube in a Docker container [1]. To define the proxy it should use I copied the default sonar.properties, changed the values 

http.proxyHost=proxy.server
http
.proxyPort=8080
[...]
http
.proxyUser=foo
http
.proxyPassword=bar


and mapped it in the container. But SonarQube seems to only respect the host and port but neither the user nor the password:

sonarqube_1 | 2017.05.02 09:20:45 INFO  app[][o.s.p.m.JavaProcessLauncher] Launch process[ce]: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -Dhttp.proxyHost=proxy.server -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.server -Dhttps.proxyPort=8080 -Djava.awt.headless=true [...]

When checking the code of JavaCommandFactoryImpl [2] I realised that the values for http.proxyUser and http.proxyPassword are not translated from the properties file to the resulting command: 

  private static final String[] PROXY_PROPERTY_KEYS = new String[] {
    HTTP_PROXY_HOST
,
    HTTP_PROXY_PORT
,
   
"http.nonProxyHosts",
    HTTPS_PROXY_HOST
,
    HTTPS_PROXY_PORT
,
   
"http.auth.ntlm.domain",
   
"socksProxyHost",
   
"socksProxyPort"};


It feels like the array PROXY_PROPERTY_KEYS should also contain HTTP_PROXY_USER and HTTP_PROXY_PASSWORD.

Or maybe I'm just missing the way how it's configured correctly.


Thank you very much!


Sven


Reply all
Reply to author
Forward
0 new messages