Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-65887

Proposed fix for __MSG_gadget.activity where the HttpClientBuilder is used

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • None
    • None
    • None
    • 2
    • 7
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Problem Statement:

      Our environment requires mutual client/server authentication. There are times when Jira reaches back to itself to get information. One of these is when you go to add gadgets and it calls to get information of them, another is during the healthcheck when the baseurl is said to be bad.

      We are using the following variables in our installation for the certificates:
      javax.net.ssl.trustStore
      javax.net.ssl.trustStorePassword
      javax.net.ssl.keyStore
      javax.net.ssl.keyStorePassword

      As of Jira 7.4.3, Jira's implementation of both of these uses the HttpClientBuilder (org.apache.http.impl.client.HttpClientBuilder). In order for the HttpClientBuilder to supportthe keyStore and keyStorePassword variables the "useSystemProperties()" needs to be called during it's setup. For some reason without specifying this, only some of the variables are supported like the trustStore/trustStorePassword variables.

      Jira's implementation of the gadget plugin (atlassian-gadgets-opensocial-plugin v4.2.21) and the healthcheck plugin (plugin-jira v1.0.2 previously jira-healthcheck-plugin) does not use the "useSystemProperties()" method when building the HttpClient. This prevents the keystore being loaded in needed for client authentication. (Apparently the truststore is loaded in regardless, but that is a separate issue.)

      Due to this, when the server tries to authenticate back to itself it does not provide it's certificate and the connection is rejected. Therefore you get the "__MSG_gadget.activity" gadget names and invalid baseurl message from the health check plugin.

      I have seen similar issues on Atlassian's website on how to fix this issue, but none pointing to this solution. Typically it refers to a misconfiguration of the server Jira is deployed on which is not the case here. Would like to request this fix be applied to these classes where the HttpClientBuilder is used.

      Proposed Fix:

      After taking down the two jar source files and inserting the line:

      httpClientBuilder.useSystemProperties();

      After line 77 (where the httpClientBuilder is intialized) in the com.atlassian.troubleshooting.jira.healthcheck.support.BaseUrlHealthCheck class.

      and After line 104 (where the httpClientBuilder is intialized) in the com.atlassian.gadgets.renderer.internal.http.HttpClientFetcher class.

      and then repackaging and redeploying the jars to our server, everything is fixed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bmcelveen Branden McElveen (Inactive)
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: