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

Jira Authentication Problem #752

Open
isikozsoy opened this issue Aug 24, 2021 · 12 comments
Open

Jira Authentication Problem #752

isikozsoy opened this issue Aug 24, 2021 · 12 comments

Comments

@isikozsoy
Copy link

Hello,
I could not understand what should I use for user (Jira's attribute). I tried email and full-name. I could not find another option to use for user. Can anybody help me with this? Thanks for your time.

@vchrombie
Copy link
Member

vchrombie commented Aug 24, 2021

Hi @isikozsoy, thanks for opening the issue.

I think the user attribute is the username for the Jira instance.

Please let us know if that solves your doubt.

@isikozsoy
Copy link
Author

isikozsoy commented Aug 24, 2021

Thanks for your response @vchrombie. However, I also checked if I can use username but I think username is not available in Jira. You can check it from the links.

https://confluence.atlassian.com/cloud/blog/2018/06/say-goodbye-to-usernames-in-atlassian-cloud
https://community.atlassian.com/t5/Jira-questions/How-to-find-username-of-my-jira-account/qaq-p/969298

@isikozsoy
Copy link
Author

Is it possible to modify the source code for Jira in a way that api token can be used for authorization like Github or GitLab? @vchrombie

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

@vchrombie
Copy link
Member

Thanks for providing the info, @isikozsoy.

https://confluence.atlassian.com/cloud/blog/2018/06/say-goodbye-to-usernames-in-atlassian-cloud

Didn't know about this. Is this applicable only for the new versions?

Is it possible to modify the source code for Jira in a way that api token can be used for authorization like Github or GitLab? @vchrombie

It should be possible, but I'm wondering if it would break any existing systems. I would like to keep this issue open for more comments from the other community members.

Thanks for reporting the issue.

@isikozsoy isikozsoy changed the title Question about Jira Jira Authentication Problem Aug 25, 2021
@isikozsoy
Copy link
Author

isikozsoy commented Aug 27, 2021

Hello again @vchrombie,
I figured out that we should use email for user and api token for password. Thanks for your time! I am closing the issue. Hope that it will help others as well.

@vchrombie
Copy link
Member

@isikozsoy thanks a lot.

Do you think we can add something to make things clear?
Would you be interested to open a PR for it?

@isikozsoy
Copy link
Author

You're welcome @vchrombie.

We can use email instead of user and token instead of password in the soure code however this might break existing systems so I think it is better if we just modify the explanation for user and password parameters of Jira class by editing the comment. I can open a PR if you also agree with my suggestion.

@vchrombie
Copy link
Member

vchrombie commented Aug 28, 2021

Hello @isikozsoy, I have some more comments.

I figured out that we should use email for user and api token for password

Ok, does it work with email and password?

We can use email instead of user and token instead of password in the soure code however this might break existing systems

We need to check if we can use only the api_token for authentication. The current implementation uses basic_auth which has the username and password. If only token is sufficient then we can maybe change the implementation to use token_auth.
https://github.com/chaoss/grimoirelab-perceval/blob/master/perceval/backends/core/jira.py#L437
https://github.com/chaoss/grimoirelab-perceval/blob/master/perceval/backend.py#L665
https://github.com/chaoss/grimoirelab-perceval/blob/master/perceval/backend.py#L715

If the only api_token method doesn't work, then we can think for email and api_token, maybe something similar to the zulip backend zulip/zulip.py#L230.

Please let me know if you are interested to give it a try. We can help you get started. We are now using Poetry for the project, please check installation - python-poetry.

$ git clone https://github.com/isikozsoy/grimoirelab-perceval
$ cd grimoirelab-perceval
$ poetry install
$ poetry shell
$ perceval jira --help

I think it is better if we just modify the explanation for user and password parameters of Jira class by editing the comment. I can open a PR if you also agree with my suggestion.

Yes, please. As a quick fix, it works and it makes sense. But, I would be interested to see if we can fix the backend too since the data source has changed from the initial version.

@vchrombie
Copy link
Member

Opening the issue as we can open a PR and fix the problem.

@vchrombie vchrombie reopened this Aug 28, 2021
isikozsoy added a commit to isikozsoy/grimoirelab-perceval that referenced this issue Aug 28, 2021
Modify the explanation for user and password parameters of Jira class to make it more clear.

Solves: chaoss#752

Signed-off-by: Işık Özsoy <[email protected]>
@xiao623
Copy link
Contributor

xiao623 commented Sep 29, 2021

Is there any new progress?

@vchrombie
Copy link
Member

Is there any new progress?

I think @isikozsoy need some time to get her work completed on the PR.

@zhifeiyue
Copy link
Contributor

Jira token based authentication resolved in issue #829

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

No branches or pull requests

5 participants