Giter Site home page Giter Site logo

Login fails about ejira HOT 7 OPEN

nyymanni avatar nyymanni commented on August 28, 2024
Login fails

from ejira.

Comments (7)

nyyManni avatar nyyManni commented on August 28, 2024 1

The cookie-auth does work for me currently, I am using it on a daily basis.

If you could create a pull request with a working OAuth, it would be greatly appreciated. Even if you did one which replaces the cookie authentication with OAuth I could then stitch that code into ejira to work with both.

One thing that I would propose, though, is to make the pull request to https://github.com/nyyManni/jiralib2, as it was recently extracted away from Ejira. I will remove jiralib2.el from this repository in the "near future".

from ejira.

suzil avatar suzil commented on August 28, 2024

I was trying for awhile today to make it work, but had problems with connecting. It looks like Jira is deprecating cookie-based authentication.

The deprecation period for this functionality has ended. From June 3rd, 2019, we will be progressively disabling the usage of this authentication method. If you are using a REST endpoint in Jira with basic authentication, update your app or integration to use API tokens, OAuth, or Atlassian Connect.

https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/

Is the performance of basic auth with a token poor enough that this project would not work? Would oauth work better?

from ejira.

nyyManni avatar nyyManni commented on August 28, 2024

I would love to implement OAuth or token auth, but unfortunately our company is using JIRA Server instead of JIRA Cloud and it does not seem to support either of those (or I do not have enough access rights to enable them). Thus I do not have anything to test these login methods with, which makes them difficult to implement.

Atlassian completely deprecating cookie-based auth is unfortunate for Ejira.

They seems to offer a free evaluation for JIRA Cloud, but it is only 7 days, so it would make for a quite agile feaure release 😅

JIRA Server has a 30 day evaluation period. I could run it locally and check if I can get OAuth tokens working there, as I would be the admin. But that hard deadline might still be too much for my calendar.

from ejira.

suzil avatar suzil commented on August 28, 2024

Aha yeah it looks like API tokens are a no-go for Jira Server.

Jira Server does not provide those specific types of API tokens that can be used in basic auth, like Jira Cloud does. If you want to create a token in Jira Server for use in REST calls, you need to create an OAuth token, which has an expectation of creating an application link as described in Jira Server Devleoper page on OAuth.

Maybe Ejira could be migrated to support both token-based and OAuth-based authentication? I have setup API tokens and it seems to work fine (maybe a bit slow to load issues but I'm already used to that when working with Jira).

I could make a PR to replace the current not-working (or does it work for you?), soon-to-be-deprecated cookie-based approach with the token approach. And then in a later PR I could try to setup OAuth?

from ejira.

nyyManni avatar nyyManni commented on August 28, 2024

Repository at https://github.com/nyyManni/jiralib2 now updated with support for cookie, basic and token auth. Tested with a self-hosted JIRA Server and a JIRA Cloud trial. Would be nice if you could give it a try before my JIRA Cloud trial expires after 7 days 😄.

OAuth approach is a bit more involved, I might get into that #later.

from ejira.

yqrashawn avatar yqrashawn commented on August 28, 2024

Just tested it. Login successfully to jira cloud with api token.
But get error when calling ejira-guess-epic-sprint-fields. We don't have any sprint on jira.

Attempting to auto-configure Ejira custom fields...
REQUEST [error] Error (error) while connecting to https://company.atlassian.net/rest/api/2/issue/nil/editmeta.
user-error: Request failed: Wrong URL path

from ejira.

nyyManni avatar nyyManni commented on August 28, 2024

@yqrashawn

It seems that either of the queries in ejira-guess-epic-sprint-fields does not return any results.
The queries are:

  • "type = <ejira-epic-field>" for an epic (to get the epic summary field name)
  • "type != <ejira-epic-field>" for a regular issue (to get the epic link and sprint field names)

It is more likely that it is the first one which is failing. What is your setting of ejira-epic-type-name and does it correspond to the type name of an Epic on your JIRA?

from ejira.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.