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

Support on-premise installations #48

Open
jneidel opened this issue Aug 17, 2023 · 24 comments
Open

Support on-premise installations #48

jneidel opened this issue Aug 17, 2023 · 24 comments

Comments

@jneidel
Copy link
Contributor

jneidel commented Aug 17, 2023

Authentication via API token is only gonna work for cloud hosted instances.
For supporting on-premise installations an Personal Access Token would need to be used. Ref
Also see the SSO for auth edgecase ref

Describe the solution you'd like

Implement auth via PAT

@mk-5
Copy link
Owner

mk-5 commented Aug 17, 2023

@jneidel I will have a look! thanks for that issue! :)

@mk-5
Copy link
Owner

mk-5 commented Aug 17, 2023

just checked the docs - https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html - it looks pretty straightforward. Access tokens are used via Basic auth like Authroization: Basic base64(user:token) which fjira have in place at the moment.

Personal tokens are used via Bearer token auth. Authorization: Bearer <yourToken>

@mk-5
Copy link
Owner

mk-5 commented Aug 17, 2023

@jneidel it's coming #49

@jneidel
Copy link
Contributor Author

jneidel commented Aug 18, 2023

Cool 🚀
I've subscribed to the PR and will test it once it's done/merged 👍

@mk-5
Copy link
Owner

mk-5 commented Aug 19, 2023

Cool 🚀 I've subscribed to the PR and will test it once it's done/merged 👍

@jneidel it's available in version 0.11.0 https://github.com/mk-5/fjira/releases/tag/0.11.0

CI failed because of chocolatey deployment - the first package version is still in review. / all should be fine except that one :)

@jneidel
Copy link
Contributor Author

jneidel commented Aug 20, 2023

Login works 👍

When opening a board and selecting an assignee to filter by I get 400 and 404 respectively.

And scrolling down with arrow and not vim keys is sacrilege ⛪

@mk-5
Copy link
Owner

mk-5 commented Aug 21, 2023

@jneidel I will have a look .. 400, and 404 - I guess some api-version problems.

Which version of jira-server do you have? What do you mean by "vim keys"? 🤔

@mk-5
Copy link
Owner

mk-5 commented Aug 21, 2023

okay @jneidel I can also confirm that issue. I tried it with dockerized jira server version (https://hub.docker.com/r/atlassian/jira-software). The fix is on the way

@mk-5
Copy link
Owner

mk-5 commented Aug 21, 2023

fix ready in 0.11.2

@jneidel
Copy link
Contributor Author

jneidel commented Aug 23, 2023

vim keys are the superior hjkl (j/k down/up, h/l left/right). They are widely supported in interactive cli apps. Interactive GNU apps (e.g. less), lf, ranger, newsboat, epr and the namesake vim come to mind right now but there are tons more. I also use them in the browser via a plugin.

They allow for much easier use from the home row (touch typing).

@mk-5
Copy link
Owner

mk-5 commented Aug 23, 2023

@jneidel mhmm, I have no problem with binding another keys as an "arrows" in parallel to arrows, but I would not say that arrows are sacrilege ⛪. I think it's quite problematic to use hjkl in fuzzy finder view - you can use letters h j k l in order to search for some results. IMO it's common practice to use arrows in tools like fzf or regrip or simillar 🤔

@mk-5
Copy link
Owner

mk-5 commented Aug 26, 2023

vim keys are the superior hjkl (j/k down/up, h/l left/right). They are widely supported in interactive cli apps. Interactive GNU apps (e.g. less), lf, ranger, newsboat, epr and the namesake vim come to mind right now but there are tons more. I also use them in the browser via a plugin.

They allow for much easier use from the home row (touch typing).

I'm fully with you - but I cannot see how it should work in a search view. You can use h j k l to type the search term, right?

@jneidel
Copy link
Contributor Author

jneidel commented Aug 28, 2023

For fzf I have tab/shift-tab setup to go through the list, like that I don't need to leave the home row.

Yes, I agree, for the fuzzy finder view it does not make sense to use vim keys for scrolling. But there is the issue view which scrolls only with arrow and not vim keys. That's actually the one I meant, sorry for not being more specific 😄

@jneidel
Copy link
Contributor Author

jneidel commented Aug 28, 2023

Board view works as expected now! (vim keys would also work here)

I still get errors on:

  • 400: filter by assignee (in project view)
  • 404: assign user (in issue view)

@mk-5
Copy link
Owner

mk-5 commented Aug 28, 2023

Board view works as expected now! (vim keys would also work here)

I still get errors on:

  • 400: filter by assignee (in project view)
  • 404: assign user (in issue view)

okay, I'll have a look. I think it's similar issue to that one #35 . For now .. I have no clue, but I guess it could be something similar to the previous issue. Jira Cloud accept project keys like 'ABC' or project id like 123. Jira Server doesn't like like it, and it needs to be numeric id.

About vim keys - I can adapt boards view to work with both arrows, and vim keys - it's not a problem

@mk-5
Copy link
Owner

mk-5 commented Sep 7, 2023

@jneidel I was not able to reproduce the first issue with 400 error, but I was able to reproduce the second issue with 404 - it should be fixed now. I'm using that simple docker setup to test it: https://github.com/mk-5/fjira/blob/master/scripts/docker-compose-jira-server.yml

You can test - the latest version 0.11.5

@jneidel
Copy link
Contributor Author

jneidel commented Sep 11, 2023

Both errors are still present.

With assigning a user I get:
Screenshot 2023-09-11 at 11 42 30

And nothing changed on the issue.

@mk-5
Copy link
Owner

mk-5 commented Sep 12, 2023

@jneidel okay ... I think I found one small issue already / let's say "typo" 😅
image

there is missing return after error. This is why there is success message above error one. I will fix it right away - we will see at least what kind of error it is.

@mk-5
Copy link
Owner

mk-5 commented Sep 12, 2023

@jneidel okay / there is a new version 0.11.7. I've fixed that incorrect success message issue + I've extended error message a bit.- could be that it will be pretty wide. Would be awesome if you can try it again with new version.

I found that docs via google: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-assignee-put

according to that documentation this is how do-assignment request looks like:

Request
curl \
   -D- \
   -u charlie:charlie \
   -X PUT \
   --data {see below} \
   -H "Content-Type: application/json" \
   http://localhost:8080/rest/api/2/issue/QA-31

Input data
{
   "fields": {
       "assignee":{"name":"charlie"}
   }
}

It's a bit different comparing it to the Jira Cloud: https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-assignee-put

curl --request PUT \
  --url 'https://your-domain.atlassian.net/rest/api/2/issue/{issueIdOrKey}/assignee' \
  --user 'email@example.com:<api_token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "accountId": "5b10ac8d82e05b22cc7d4ef5"
}'

fjira is sending accountId as an identifier. The weird thing is that I tried it with dockerized version .. and it was fine. Maybe it depends on Jira Version.

I think we will know more after the next fjira version test.

@jneidel
Copy link
Contributor Author

jneidel commented Sep 13, 2023

Error! -Cannot assign user Jonathan Neidel to ticket ORFDV001-9592. Reason: Jira error, status: 400 - request: AccountId: is what I get as an error.

Our Jira Server version is v9.9.0

@mk-5
Copy link
Owner

mk-5 commented Sep 13, 2023

@jneidel all right - thanks! I will check that version. The weird thing is that AccountId is empty

@mk-5
Copy link
Owner

mk-5 commented Sep 13, 2023

@jneidel hurray! I reproduced that error using some jira server instance. The fix is on a way

@mk-5
Copy link
Owner

mk-5 commented Sep 13, 2023

@jneidel okay - assignment request for on-premise installation is fixed in version 0.11.8

@jneidel
Copy link
Contributor Author

jneidel commented Sep 14, 2023

@jneidel okay - assignment request for on-premise installation is fixed in version 0.11.8

Can confirm that assigment works 👍

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

2 participants