getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.
http://redash.io/
BSD 2-Clause "Simplified" License
25.98k stars 4.34k forks source link

Jira Server Authentication not working #5671

Open mkrauser opened 2 years ago

mkrauser commented 2 years ago

Issue Summary

The Authentication for Jira only works for the Cloud Version. Jira Server requires the Authentication-Token to be provided as bearer token (see https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html).

This works for me (Jira v8.19.0), but an auth-header with username and Token does not:

curl -D- \
   -X GET \
   -H "Authorization: Bearer my-jira-token" \
   -H "Content-Type: application/json" \
   "https://jira-server-url/rest/api/2/issue/PROJ-1"

Steps to Reproduce

  1. Add a on-premise Jira-Server as Data-Source and test the connection

Technical details:

nathan-protempo commented 2 years ago

Hi, I'm pretty sure this is working as intended - the JIRA data source is for JIRA Cloud, it specifically links to instructions for getting a JIRA Cloud API token from the data source documentation. It should be renamed on the website to JIRA Cloud to avoid confusion though.

It looks like an on-premise JIRA server would require a different data source to be implemented to handle the different authentication mechanism.

susodapop commented 2 years ago

Thanks @nathan-protempo I'm happy to implement the name change. Also happy to help guide an effort to add on-premise JIRA as a data source to Redash. I imagine it's not too different.

mkrauser commented 2 years ago

For Jira-Server it does work when you enter your jira-password instead of the API-Token in the "API-Token" field.

@susodapop The only change in a Jira-Server-Connector would be the authentication. The username is not require for jira-server and the API-Token must be submitted as Bearer-Token like in my curl-snippet above.

I'd be happy to test this.