How should token look like?
There doesn’t seem to be any discussion regarding this, so I’m opening it as an issue. Could someone confirm the correct format for the token? Should it be <email:PAT> encoded in Base64?
Here’s what I’ve tried so far:
- Plain Personal Access Token (PAT)
- Base64-encoded string in the format Basic
<base64(email:PAT)> email:PATdirectly
None of these approaches worked, and all resulted in a 404 Not Found error. Additionally, it’s challenging to debug as there’s no log of the actual endpoint being called. Error:
{
"error": {
"name": "Error",
"message": "Request failed with status 404 Not Found, {\n \"error\": \"No Jira project found with key IKS\"\n}"
},
"response": {
"statusCode": 404
}
}
app-config.yaml
jiraDashboard:
instances:
- name: default
token: Basic <base64Encoded>
baseUrl: https://myOrg.atlassian.net/rest/api/3
annotation in catalog-info.yaml of my service:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: iksapi
description: IKS API
annotations:
...
jira.com/project-key: IKS
specs:
...
Is there something I’m missing regarding the token format or the configuration?
I also tested calling the endpoint directly via Postman using Basic Auth, and it worked perfectly. Apologies for my confusion, and thanks in advance for your help!
If you are using the "non-cloud" version of Jira you can use the PAT directly like:
jiraDashboard:
instances:
- name: default
token: Basic <PAT>
baseUrl: https://myOrg.atlassian.net/rest/api/3
If you are using the "non-cloud" version of Jira you can use the PAT directly like:
jiraDashboard: instances: - name: default token: Basic <PAT> baseUrl: https://myOrg.atlassian.net/rest/api/3
What about for the SaaS version of Jira? I'm also struggling to figure out the PAT format
After some research I think are not able to use PATs with "Jira Cloud". The docs about PATs says that it's only for "server/data center" jira. Also this old response here says that this is not possible in "Jira Cloud".
There was a regression in "@axis-backstage/plugin-jira-dashboard-backend" version 4.5.0. If this has not been resolved try again with the latest version (4.5.1).
@Rades98, were you able to resolve this? We have Data Center and I am unable to retrieve issues for project:
error Could not find Jira project DST: Failed to get project info for project key DST with error: Request failed with status code 404: Not Found
I have tried
jiraDashboard:
token: ${JIRA_TOKEN}
baseUrl: ${JIRA_BASE_URL}
jiraDashboard:
token: **Basic** ${JIRA_TOKEN}
baseUrl: ${JIRA_BASE_URL}
jiraDashboard:
token: **Bearer** ${JIRA_TOKEN}
baseUrl: ${JIRA_BASE_URL}
Where my personal access token looks like: MDUzNjMzNDY2Mz************wW+dr4sEEMV7aFE
No, I used the other plugin instead
Thanks everyone for the input on this issue 🙌 It’s been open for quite a while without recent activity, and we don’t currently have any plans to prioritize this work.
I’m going to close it for now to keep the issue tracker tidy. If someone is interested in picking it up in the future, feel free to reopen.
There is new documentation for how to configure auth with jira cloud.
https://github.com/AxisCommunications/backstage-plugins/tree/main/plugins/jira-dashboard-backend#authentication-examples-and-trouble-shooting