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

Activity Stream using General Configurations Base URL for content

      In previous versions of JIRA, the Activity Stream populated content using the baseurl from the incoming request. To be more specific, it would populate data using the URL that the user connected to JIRA with.

      In newer versions of JIRA, 5.0+ as far as I know, the Activity Stream data is populated using the Base URL in the General Configuration. I have been advised that this is not the intended usage of of how the Activity Stream supposedly works.

            [JRASERVER-27836] Activity Stream using General Configurations Base URL for content

            McBag added a comment -

            Well, it's not as easy as i expected. How about more trivial solution - can i just edit template file used to render main page with activity stream and place there fixed url?

            McBag added a comment - Well, it's not as easy as i expected. How about more trivial solution - can i just edit template file used to render main page with activity stream and place there fixed url?

            MartinK added a comment -

            1) In streams-jira-plugin JiraSessionManager get rid of JiraThreadLocalUtils pre/postCall.
            2) Add for /plugins/servlet/streams* a context filter, which sets up DefaultVelocityRequestContextFactory.cacheVelocityRequestContext.

            MartinK added a comment - 1) In streams-jira-plugin JiraSessionManager get rid of JiraThreadLocalUtils pre/postCall. 2) Add for /plugins/servlet/streams* a context filter, which sets up DefaultVelocityRequestContextFactory.cacheVelocityRequestContext.

            Hi piotr.gomola,

            You can view/clone the streams code at http://bitbucket.org/atlassian/atlassian-streams. I'd probably start in the streams-jira-plugin module (the JIRA part of the plugin). I'd look at replacing uses of com.atlassian.streams.internal.ActivityProvider#getBaseUrl with com.atlassian.jira.util.velocity.VelocityRequestContext#getBaseUrl. Bear in mind this is not a trivial undertaking.

            As this is quickly becoming a development question and we don't provide development support on JAC, please ask any further questions on https://answers.atlassian.com.

            Regards,
            Eric

            Eric Dalgliesh added a comment - Hi piotr.gomola , You can view/clone the streams code at http://bitbucket.org/atlassian/atlassian-streams . I'd probably start in the streams-jira-plugin module (the JIRA part of the plugin). I'd look at replacing uses of com.atlassian.streams.internal.ActivityProvider#getBaseUrl with com.atlassian.jira.util.velocity.VelocityRequestContext#getBaseUrl. Bear in mind this is not a trivial undertaking. As this is quickly becoming a development question and we don't provide development support on JAC, please ask any further questions on https://answers.atlassian.com . Regards, Eric

            McBag added a comment -

            Another question then, can i modify activity stream template by myself to use detected url instead base url? How i can do that?

            McBag added a comment - Another question then, can i modify activity stream template by myself to use detected url instead base url? How i can do that?

            Hi piotr.gomola, that's not something I really know much about, I'm sorry. Support can have a chat to you about this and make some suggestions, but they can't help you set it up or provide support for it. You can contact them at https://support.atlassian.com.

            Regards,
            Eric

            Eric Dalgliesh added a comment - Hi piotr.gomola , that's not something I really know much about, I'm sorry. Support can have a chat to you about this and make some suggestions, but they can't help you set it up or provide support for it. You can contact them at https://support.atlassian.com . Regards, Eric

            McBag added a comment -

            Hi,
            Thanks for the reply,
            In this case, can i use an tomcat add-on: http://code.google.com/p/urlrewritefilter/ to forward all incoming/outgoing help.mycompany.com requests to IP based requests?

            McBag added a comment - Hi, Thanks for the reply, In this case, can i use an tomcat add-on: http://code.google.com/p/urlrewritefilter/ to forward all incoming/outgoing help.mycompany.com requests to IP based requests?

            Hi piotr.gomola,

            I strongly recommend you look at limiting access to the instance from outside the organisation, perhaps through your VPN or proxy setup. JIRA does not support multiple Base URLs (though we do go to an effort to make sure that it will work most of the time), and has difficulties in situations like this (for example, your users will receive emails with links based on the Base URL, not the external URL, causing difficulties when clicking on links in notifications from outside the network).

            This is an issue that we want to fix, but we don't have a fix yet and I can't tell you when one will be ready.

            Regards,

            Eric

            Eric Dalgliesh added a comment - Hi piotr.gomola , I strongly recommend you look at limiting access to the instance from outside the organisation, perhaps through your VPN or proxy setup. JIRA does not support multiple Base URLs (though we do go to an effort to make sure that it will work most of the time), and has difficulties in situations like this (for example, your users will receive emails with links based on the Base URL, not the external URL, causing difficulties when clicking on links in notifications from outside the network). This is an issue that we want to fix, but we don't have a fix yet and I can't tell you when one will be ready. Regards, Eric

            McBag added a comment -

            Hi,
            We are running Jira 6.0 on tomcat instance for internal and external use, and now we also have problem with urls in activity stream. Everything runs fine on LAN, because base URL is just an IP address, but from external network used address is different, like help.mycompany.com:555, being forwarded on internal firewall device.

            Now we have following situation:
            People accessing JIRA from internet can't use activity stream because every link is a base url. We could change base url, but we don't want all people in company know that JIRA is accessible from outside of organization.

            Any solution for that?

            McBag added a comment - Hi, We are running Jira 6.0 on tomcat instance for internal and external use, and now we also have problem with urls in activity stream. Everything runs fine on LAN, because base URL is just an IP address, but from external network used address is different, like help.mycompany.com:555, being forwarded on internal firewall device. Now we have following situation: People accessing JIRA from internet can't use activity stream because every link is a base url. We could change base url, but we don't want all people in company know that JIRA is accessible from outside of organization. Any solution for that?

            DaveT added a comment -

            We have exactly the same problem that Gary described above:

            We have a similar problem where our JIRA instance is accessed using two different reverse proxies: one for internal users and one for external users. Some links for the external users are going to the internal users' proxy where they are not authenticated, leading to a flood of password dialogs which they cannot satisfy. If they cancel all of the dialogs they get some functionality, but not full, and no icons.

            Similarly, email notifications have links pointing to the internal proxy URLs. It would be helpful if we could set this per user, or possibly send URLs with both prefixes.

            In the past, we've been able to use a single Jira instance that's for both internal and external use. Since 5.0, Jira is basically unusable for doing that. With Jira 6.0 coming quickly, I'm sad to see no movement on this issue.

            DaveT added a comment - We have exactly the same problem that Gary described above: We have a similar problem where our JIRA instance is accessed using two different reverse proxies: one for internal users and one for external users. Some links for the external users are going to the internal users' proxy where they are not authenticated, leading to a flood of password dialogs which they cannot satisfy. If they cancel all of the dialogs they get some functionality, but not full, and no icons. Similarly, email notifications have links pointing to the internal proxy URLs. It would be helpful if we could set this per user, or possibly send URLs with both prefixes. In the past, we've been able to use a single Jira instance that's for both internal and external use. Since 5.0, Jira is basically unusable for doing that. With Jira 6.0 coming quickly, I'm sad to see no movement on this issue.

            Like Andreas suggested, I would change activity streams to use relative URLs for internal content as this gives the best flexibility.
            This could even work when accessing the server through a ssh forward.

            Michael Meß added a comment - Like Andreas suggested, I would change activity streams to use relative URLs for internal content as this gives the best flexibility. This could even work when accessing the server through a ssh forward.

              rtekhov Roman Tekhov (Inactive)
              itse Ivan Tse
              Affected customers:
              14 This affects my team
              Watchers:
              29 Start watching this issue

                Created:
                Updated:
                Resolved: