Skip to content

How should token look like? #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Rades98 opened this issue Apr 8, 2025 · 6 comments
Open

How should token look like? #282

Rades98 opened this issue Apr 8, 2025 · 6 comments

Comments

@Rades98
Copy link

Rades98 commented Apr 8, 2025

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:PAT directly

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!

@anicke
Copy link
Contributor

anicke commented Apr 10, 2025

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

@dylanmtaylor
Copy link

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

@anicke
Copy link
Contributor

anicke commented Apr 24, 2025

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".

@anicke
Copy link
Contributor

anicke commented May 7, 2025

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).

@Cord-Thomas
Copy link

Cord-Thomas commented Jun 10, 2025

@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

@Rades98
Copy link
Author

Rades98 commented Jun 11, 2025

No, I used the other plugin instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants