GithubHelp home page GithubHelp logo

Comments (8)

julien-herrero-tab avatar julien-herrero-tab commented on July 30, 2024 1

Hi @danepowell , I've tried with your fork (danepowell/gajira-login@bearer) but I still have a 401 Unauthorized

    status: 401,
    body: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>401</status-code><message>Client must be authenticated to access this resource.</message></status>

Do I have to do some thing in particular to make it work ? I've also tried @luisiturrios1 suggestion, still failing.

My token is OK with curl, with a JIRA cloud server for information.

from gajira-login.

patrickc91 avatar patrickc91 commented on July 30, 2024

So...these plugins are basically dead right?

from gajira-login.

danepowell avatar danepowell commented on July 30, 2024

Yeah, you'll need to fork this action and update it to use Bearer auth instead of basic auth, which is actually fairly simple:

headers.Authorization = `Basic ${Buffer.from(`${this.email}:${this.token}`).toString('base64')}`

Ironically, basic auth still works for Jira server / on-premise even though this plugin explicitly denies support for Jira server.

from gajira-login.

luisiturrios1 avatar luisiturrios1 commented on July 30, 2024

Create the encoded token in the format of base64Encode(:<api_token>). For example, if the username is [email protected] and the token is 954c38744be9407ab6fb, then [email protected]:954c38744be9407ab6fb needs to be base64 encoded to form Y2lAZXhhbXBsZS5jb206OTU0YzM4NzQ0YmU5NDA3YWI2ZmI=

from gajira-login.

julien-herrero-tab avatar julien-herrero-tab commented on July 30, 2024

Well, after some investigation I'm not sure but I guess we need to configure PAT for Bearer usage. Unfortunately unavailable on my Jira Cloud...

Finally, my journey has ended here: master...acquia:server aka acquia/gajira-login@server (thanks again @danepowell !). With downgrading to the rest API version, we can use again MAIL+API_TOKEN authentication.
That's a shame, and I don't know if it's sustainable, but it seems working for now 🤷

from gajira-login.

danepowell avatar danepowell commented on July 30, 2024

I've thoroughly confused myself at this point trying to sort out every combination of install type (server / cloud), api version (2/3), and authentication method (bearer, basic, token, password...)

But I think if you want to use mail + token (or is it mail + password?) via Basic authentication and server install, you should use the server branches of these packages:

If you want to use personal access tokens (i.e. bearer authentication), use the bearer branches of those packages.

I no longer maintain my personal forks (danepowell/gajira-login and danepowell/gajira-create).

from gajira-login.

mboudreau avatar mboudreau commented on July 30, 2024

This actions still works as shown with our own actions that runs on every push and logs into Jira cloud.

I did get into a similar issue by using the wrong API tokens. As per the documentation, follow the instructions here to how to get the correct API tokens to be used in this action.

I'll close this ticket for now unless there's something else not working with it.

from gajira-login.

danepowell avatar danepowell commented on July 30, 2024

I apologize that I can't recall the full history of this issue, but the current problem for me is that our Jira instance only supports personal access tokens, hence the need for our fork at https://github.com/acquia/gajira-login

from gajira-login.

Related Issues (13)

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.