Connect Jira and Confluence Server to Slack Today!

48 comments

Luiz Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 22, 2019

Hi @Luke Noel-Storr

As far as I know, Slack doesn't have a fixed IP range so whitelisting isn't possible.

I've heard some customers have setup a reverse proxy to verify the SSL certificate that signs the requests coming from Slack.

I don't know any other solution that doesn't involve doing some manual work but I cannot advise on that.

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2019
Luke Noel-Storr November 25, 2019

@Gonchik Tsymzhitov - these articles seem to be for traffic related to users using Slack, rather than Slack integrations/bots accessing external servers behind firewalls.

MSP Suppliers February 5, 2020

I can't seem to get this to work my jira instance is behind a firewall (outbound connections allowed to everywhere and all ports)

"If your Jira or Confluence instance is behind a corporate firewall, the Slack integrations will work in “limited connectivity” mode."

But after setting up the custom app in Slack and filling out this stuff in jira:

Client ID

Client Secret

Signing Secret

Verification Token

OAuth Access Token

Bot User OAuth Access Token

I always get the message "The credentials you entered are invalid. Please, check if you entered all fields correctly."

Michael Woffenden
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2020

Quick question ... We've starting using Slack with Jira and Confluence Server.

While the setup was quick and easy ... we have a few aspects that are not working quite as expected.

Where do we report bugs and/or request features for the official Jira/Confluence Slack apps?

Luiz Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2020

Hey @MSP Suppliers

If you manually created a new app recently, it might have been created with Slack's new scopes. The Server apps for Jira, Confluence, and Bitbucket use classic scopes.

If that's the case, you will need to re-created the App starting from this link: https://api.slack.com/apps?new_classic_app=1

Documentation is updated with this information if you need the details. Check it out.

Luiz Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2020

Hey @Michael Woffenden

There's a Jira project in which you can open feature requests, bugs, and search for existing ones: https://jira.atlassian.com/browse/API

MSP Suppliers February 13, 2020

Hey @Luiz Silva Thanks for updating the documentation! I'm now connected in limited mode but don't have/can't see the option to set up notifications. When i click "connect your Slack account" I get "redirect_uri did not match any configured URIs. Passed URI:" I guess this is because my Jira is behind a firewall. So where I do set up the notifications in limited mode?2020-02-13 14_50_16-Slack integration - MovieStarPlanet JIRA.png

Davor Fisher April 21, 2020

Hello,

 

Our jira-slack integration suddenly stopped working and there was no changes to our JIRA DC environment that would break this. When i say stopped working i am referring to ability to preview an issue in a slack channel. The notification functions are still working fine and the integration is showing connected. 


Has anyone experienced similar issue, and if so were you able to find a root cause?


Davor

Mykhailo Vlasov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 22, 2020

Hello @Davor Fisher!

It could happen that some of the Jira admins disabled issue previews for specific or all projects in Slack configuration - Advanced settings screen.

Davor Fisher April 22, 2020

@Mykhailo Vlasov I wish that was the case; i am both slack and jira admin and issue preview has not been disabled on specific or all projects in jira. 

Mykhailo Vlasov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2020

@Davor Fisher Try to check then if Jira Server bot is in the channel you post issue keys to. The plugin automatically invites the bot to a channel when it is linked to a Jira project, but it's possible to manually kick Jira Server bot out of the channel. It would be enough to block plugin from receiving new message webhooks and, therefore, providing an issue preview.

Davor Fisher April 24, 2020

@Mykhailo Vlasov I have tried this as well; re adding the bot back to the channel and trying to preview an issue from JIRA. The notification works if i set it on project level to show issues created,updated, transition and if i run command /jira_server issuekey but just typing the issue key in the slack channel does not - see attached 

Screen Shot 2020-04-24 at 12.57.05 PM.png

Luiz Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2020

Hey @Davor Fisher,

I'm sorry that this is not working for you anymore.

Unfortunately, this issue is not easy to diagnose as there are multiple parts involved between when you send a Slack message and the integration responds with the corresponding unfurl. It's important to narrow down where the problem is.

I can think on a number of reasons by this weird sudden issue:

  • Something might have broken the app configuration in Slack. 
    I'm not sure whether this your setup uses a custom manually-created app or the default app provided in Slack. Someone might have migrated the app for the new granular scopes API, which for now it shouldn't be done, or Slack itself might have corrupted setup on an internal migration.
    It's just a guess but in this case it would help if you re-create the app configuration in Slack from scratch.
  • Slash commands and events come from Slack in different ways. If you have a firewall, it might be allowing the former and blocking the latter. 
    In this case, what might help is looking into the logs. You might want enable debugging for the integration as described in the documentation and then reproducing the issue to check if the instance actually gets the Slack event. 
    Depending whether the Slack message event reaches Jira or not, it would help a lot to narrow down where the problem is.
  • Did you upgrade the integration any time near when it stopped working? You might want to try uninstalling the integration and manually installing a previous version.
  • Did you upgrade Jira around that time? If so, to which version?

Cheers!

Davor Fisher April 24, 2020

@Luiz Silva Thanks for your response. 

  • We are using the default app provided in Slack; this is not a custom app. On the slack side i believe i can only disable the app but cannot actually uninstall. I could try to this on the JIRA side with the JIRA Slack app. I have tried to disable/enable on JIRA end but no help there. I even went through the integration configuration section and made sure everything looks good.
  • I will look into logs further more but if i recall correctly we did look into this and we could not determine the root cause when the issue was first reported. I'll have to revisit this. Is there anything specific i should be looking at in the logs?
  • We upgraded JIRA to 8.5  on March 28th but had user confirmation that the app  stopped working before the upgrade. As far as the slack app in the JIRA Marketplace we are on the latest version 2.0.7 and that version came out on March 25th so i am assuming that app was updated on 25h or before 28th. 

 

Thanks

Davor

Luiz Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2020

@Davor Fisher What you need to look for in the debugging logs is the following:

  1. An incoming request. The integration will write logs if it actually got the request from Slack regarding the message you've sent.
  2. Information about the issue key. The integration will log the issue keys in the received messages, even if not yet resolved to an actual issue.
  3. Finally, a request to Slack. The integration will post the message to Slack, so you should look for an attempt to post a message to Slack.

Any error around these logs or their absence would help.

Davor Fisher April 28, 2020

@Luiz Silva Looking at the logs from today while making the call from Slack these were posted in atlassian-jira.log

  • 2020-04-28 14:08:55,165 http-nio-8080-exec-1407 url:/slack/issuepanel/data/MHESPTI-130 username:davor_fisher url:/rest/slack/1.0...l/data/MHESPTI-130 username:davor_fisher DEBUG davor_fisher 848x2281475x2 lrl4xh 192.243.80.182,10.228.4.253 /slack/issuepanel/data/MHESPTI-130 [c.a.j.p.s.storage.json.JsonPropertyStoreStorageStrategy] Getting entity of type 'interface com.atlassian.jira.plugins.slack.model.DedicatedChannel' for issueId=511600 with key=slack.issue.dedicated.channel: None
  • 2020-04-28 14:08:55,394 http-nio-8080-exec-1615 url:/slack/issue-me...ESPTI-130/channels username:davor_fisher url:/rest/slack/1.0...ESPTI-130/channels username:davor_fisher DEBUG davor_fisher 848x2281481x2 lrl4xh 192.243.80.182,10.228.4.253 /slack/issue-mentions/MHESPTI-130/channels [c.a.j.p.s.storage.json.JsonPropertyStoreStorageStrategy] Getting all enities of type 'class com.atlassian.jira.plugins.slack.model.mentions.IssueMention' for issueId=511600: {}
  • 2020-04-28 14:08:55,394 http-nio-8080-exec-1615 url:/slack/issue-me...ESPTI-130/channels username:davor_fisher url:/rest/slack/1.0...ESPTI-130/channels username:davor_fisher DEBUG davor_fisher 848x2281481x2 lrl4xh 192.243.80.182,10.228.4.253 /slack/issue-mentions/MHESPTI-130/channels [c.a.j.p.s.storage.json.JsonPropertyStoreStorageStrategy] No entity of type 'class com.atlassian.jira.plugins.slack.model.mentions.IssueMention' found for issueId=511600
Luiz Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 29, 2020

@Davor Fisher These log lines are all for rendering the issue view panel where mentions to the issue are displayed. If that's all there is, I'd say the request is not reaching your instance and you should look either on an misconfiguration or bug in the Slack side or something network-related.

As this is an open thread and I'd like to avoid filling up dozens of people's inboxes with specifics on this case, I'd suggest moving this to a more specialized channel, i.e., another question or maybe use a support ticket if you need further assistance. I appreciate if you can understand that.

Cheers!

Davor Fisher April 29, 2020

@Luiz Silva sure thing, totally understandable. I have opened a case with Atlassian and Slack. Thanks for your help.

Davor

Josh Nielsen January 28, 2021

 

(Duplicate – Deleted)

 

Josh Nielsen January 28, 2021

@Luiz Silva I have a question on the documentation provided. Forgive the lengthy explanatory & visual tutorial.

I am following the section about how to set up "multiple JIRA Server instances". It took me several attempts to figure out what was going wrong but I created the app as directed with legacy / classic scopes, got it approved by our Slack admin, but then something goes wrong after the last step in the document where it is written:

"In the Jira config screen, click the "Connect to a new Team" menu item. Then click on "advanced" for connection type. You'll need to copy each of the settings from your Slack app configuration into this screen. Once completed, you'll be able to start using your Jira Server integration."

This is actually only step 1 of 2 to complete the integration, and I have an issue at step 2. I am able to type in all the info like the Client ID and then successfully connect to the Slack workspace. My issue is with step #2, as you can hopefully see in this image where it says "Connect your Slack account":

ConnectSlack.png

When I select "Connect your Slack account" it comes up with a screen indicating to me that it is going to CHANGE THE SCOPES that I dutifully created the first time as directed to do earlier in the instructions for all the classic scopes that must be used. You can see that here:

Screen Shot 2021-01-28 at 4.56.00 PM.png

When I look in Slack it tells me it wants to change the scopes to this specifically:

Screen Shot 2021-01-28 at 5.46.14 PM.png

Compared to these scopes which following the documentation to the letter actually created:

Screen Shot 2021-01-28 at 5.47.54 PM.png

Something in how the scopes change is causing our site admin to reject the app when it gets resubmitted because it grants itself additional privileges otherwise.

My question is why is there this second round of app approval with additional scopes. I sure didn't request the additional scopes, so it must be the Slack app in JIRA which puts the official "Slack" in the sidebar on JIRA which is altering my custom Slack API App's scopes. Why can't these scopes just be set up ahead of time and then when step #2 is needed to send notifications it just seamlessly works without having to resubmit the app for approval?

Maybe ours is a special case though since for security our administrators don't just let apps fly by without going through an approval/rejection process.

Best regards,
Josh

Luiz Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2021

Hi @Josh Nielsen,

By the information provided, it seems your Slack App was migrated to Granular Bot Permissions.

We (Atlassian) do not have control over your Slack App (we provide some sort of template for basic installations). Either a Slack admin on your workspace or Slack itself has performed such migration.

What you can do, depends on the following:

- If the integration was setup with advanced configuration, it means a Slack admin has manually created the Slack App at some point in the past. In this case, the Slack admin can go to the Slack App settings and check which scopes are selected there.
- If the integration was setup with basic configuration, you should contact Slack to understand what happened because such Apps are controlled by Slack only.

AFAIK it’s not possible reverting the migration to GBP, so you should contact Slack about the possibility to maintain a legacy app that’s compatible with the Server Apps. 

A possible workaround is creating a new legacy App from scratch as explained in our documentation.

We have also contacted Slack to understand if they are enforcing GBP migrations and will take actions according to their response.

 

Hope that helps. Cheers!

Luiz Silva
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 29, 2021

(Something's wrong here. My last message just disappeared, so I'm posting again.)

Hi @Josh Nielsen,

By the information provided, it seems your Slack App was migrated to Granular Bot Permissions.

We (Atlassian) do not have control over your Slack App (we provide some sort of template for basic installations). Either a Slack admin on your workspace or Slack itself has performed such migration.

What you can do, depends on the following:

- If the integration was setup with advanced configuration, it means a Slack admin has manually created the Slack App at some point in the past. In this case, the Slack admin can go to the Slack App settings (api.slack.com/apps) and check which scopes are selected there.
- If the integration was setup with basic configuration, you should contact Slack to understand what happened because such Apps are controlled by Slack only.

AFAIK it’s not possible reverting the migration to GBP, so you should contact Slack about the possibility to maintain a legacy app that’s compatible with the Server Apps. 

A possible workaround is creating a new legacy App from scratch as explained in our documentation, i.e., starting from https://api.slack.com/apps?new_classic_app=1.

We have also contacted Slack to understand if they are enforcing GBP migrations and will take actions according to their response.

 

Hope that helps. Cheers!

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events