Skip to content

Conversation

morphalus
Copy link

Authentication method has apparently been updated at Jira company.

Tell me if I am wrong but i had to do those modifications to make it work.

Please, read NOTE FOR PR REVIEWER in modifications (I should have put that in PR comment, I know)

@ahungry
Copy link
Owner

ahungry commented Oct 17, 2024

I think you're mixing up PATs (personal access tokens) and basic auth (which is largely old/deprecated).

@ahungry ahungry closed this Oct 17, 2024
@morphalus
Copy link
Author

morphalus commented Oct 17, 2024

https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/ but okay...

curl -v https://mysite.atlassian.net --user [email protected]:my-api-token

Indeed, it is a Basic Auth method but that uses user:token.

@ahungry
Copy link
Owner

ahungry commented Oct 17, 2024

You're right - my apologies for being brief 😄 - based on this thread, it seems it may be a bug/inconsistency on the Jira side that this has stopped working as documented:

https://community.atlassian.com/t5/Jira-questions/Jira-authentication-method-Bearer-token-is-not-working/qaq-p/1932923

When I skimmed the PR, I was reading the link 2 lines above your diff, where the PAT page specifically is linked and still suggests using Bearer: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html#UsingPersonalAccessTokens-UsingPATs

I'll re-open, but I think we should wait before changing the docs, to see if they fix on their end (though it apparently has been a problem for most of 2024).

@ahungry ahungry reopened this Oct 17, 2024
@morphalus
Copy link
Author

Indeed it is a strange method of using Bearer tokens by Jira 😅 I thought it was weird too so you're right, we should wait because they apparently broke something.

I guess they do not understand anymore their own software architecture or something like that. It should have already been fixed since then...

@guilherme-salome
Copy link

Hi all, I am having a similar issue. I can get a valid response with a simple call to the API:

curl -v -X GET 'https://company.atlassian.net/rest/agile/1.0/board' \
  -u 'email:token' \
  -H 'Accept: application/json'

Which returns a ton of information about all of the boards I can access. However, I cannot get any valid response through org-jira. I have tried:

  • Adding token to keychain
  • Adding base64 email:token to keychain
  • Setting jiralib-token to Bearer with email and token, email only, token only, same with password
  • Setting jiralib-token to Basic with base 64 email:token

Any ideas on how to tackle this issue?

@DamienCassou
Copy link

I made token-based auth to work in nyyManni/jiralib2#14.

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

Successfully merging this pull request may close these issues.

4 participants