Skip to content
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

add support for JIRA / Confluence Server Personal Access Tokens #993

Closed
valentijnscholten opened this issue Jan 8, 2021 · 6 comments · Fixed by #991
Closed

add support for JIRA / Confluence Server Personal Access Tokens #993

valentijnscholten opened this issue Jan 8, 2021 · 6 comments · Fixed by #991
Labels
feature Status: Ready for Release Has been merged into master, but not part of a tagged release.

Comments

@valentijnscholten
Copy link

valentijnscholten commented Jan 8, 2021

Is your feature request related to a problem? Please describe.
In JIRA Server 8.14 and Confluence Server 7.9 atlassian has (finally) added tokens as a way to authenticate to the REST API. Much better then people using their company wide ldap password for this (and storing it in places).

Describe the solution you'd like
I think we should support this new authentication method as JIRA Datacenter will also use it and stay beyond 2024. And basic authentication with passwords will be deprecated by atlassian.

Describe alternatives you've considered
Add support for https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html

Additional context
Please note these personal access tokens are slightly different from the JIRA Cloud api tokens (thank you atlassian).

Cloud: curl -H "Authorization: Basic <base64(<username>:<yourToken>>)" https://{jiraBaseUrl}/rest/api/

Server: curl -H "Authorization: Bearer <yourToken>" https://{jiraBaseUrl}/rest/api/

@oaustegard
Copy link

There's a PR for this here: #991 Worth a review by someone with write access?

@oaustegard
Copy link

There's a PR for this here: #991 Worth a review by someone with write access?

Yeah I see how this conflicts with #896 - until the build is fixed this won't be reviewed

Meanwhile a workaround for anyone looking to use Personal Access Tokens is here: #989 (comment)

@valentijnscholten
Copy link
Author

There's a PR for this here: #991 Worth a review by someone with write access?

Thanks, didn't see that one.

@studioj
Copy link
Collaborator

studioj commented Oct 30, 2021

@valentijnscholten we assume this is closed in below pre-release could you confirm?

https://github.com/pycontribs/jira/releases/tag/3.1.0rc1

@studioj studioj added the Status: Ready for Release Has been merged into master, but not part of a tagged release. label Oct 30, 2021
@valentijnscholten
Copy link
Author

yes (untested)

@adehad
Copy link
Contributor

adehad commented Nov 6, 2021

For completeness:

# Jira Cloud uses the 'Basic' Auth header
jira_cloud_token_auth = JIRA(basic_auth=('email', 'API token'))

# Jira Server/Data Center/Self Hosted uses the 'Bearer' Auth header
jira_server_token_auth = JIRA(token_auth='API token')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Status: Ready for Release Has been merged into master, but not part of a tagged release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants