Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-17164

http.nonProxyHost is ignored if proxy authentication is configured

    XMLWordPrintable

Details

    Description

      Summary

      Setting http.proxyUser and http.proxyPassword breaks forward proxy configuration

      Steps to Reproduce

      1. Use the following configuration in catalina.properties, setenv.sh or the Windows Service.
        #web proxy settings
        http.proxyHost=localhost
        http.proxyPort=8888
        http.nonProxyHosts=localhost
        http.proxyUser=admin
        http.proxyPassword=admin
        

        Does not need to be a valid proxy server as we are testing against the nonProxyHosts
        This problem also occurs if the proxy configuration is set in Bamboo's setenv.sh rather than in catalina.properties

      2. Start Bamboo
      3. Start Stash on the same server
      4. Attempt to create application link to the Stash server using the localhost address

      Expected Results

      The link should be created despite the invalid proxy configuration as localhost is whitelisted in http.nonProxyHost

      Actual Results

      The below exception is thrown in the atlassian-bamboo.log file:

      2016-01-28 21:26:05,565 INFO [http-nio-8085-exec-22] [AccessLogFilter] admin GET http://10.60.3.18:8085/bamboo/rest/applinks/3.0/manifest.json?_=1453987487624 348848kb
      2016-01-28 21:26:05,578 ERROR [http-nio-8085-exec-21] [CreateApplicationLinkUIResource] Exception thrown while retrieving manifest
      com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: org.apache.http.auth.MalformedChallengeException: Authentication challenge is empty
      	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2203)
      	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
      	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
      	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
      

      Notes

      Removing the the username and password field, despite using an invalid proxy ip and port, works as localhost is whitelisted as nonProxyHosts

      Workaround

      Since the problem only affects configurations in which a proxy is used that requires credentials to be provided, a potential workaround is to change the configuration of the proxy server such that it allows connections from the IP address of the machine that Bamboo is running on without requiring credentials.

      Attachments

        Issue Links

          Activity

            People

              achystoprudov Alexey Chystoprudov
              dlee@atlassian.com Deric Lee (Inactive)
              Votes:
              10 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: