8

I need to authenticate to JIRA using Okta via REST, how can I do that on ruby? It is possible? I never did that before, I just only want to get an attached file from a ticket in JIRA

Robin Green
  • 32,079
  • 16
  • 104
  • 187
Marco Herrarte
  • 1,540
  • 5
  • 21
  • 42

2 Answers2

3

It turns out that you can just send the JSESSIONID cookie from a logged-in user (such as yourself) to the REST API. You can get the cookie manually from the browser, or write a browser extension to get the cookie and then invoke your Ruby script with that cookie's value as a command-line argument. For Chrome, you could use Chrome Native Messaging for this.

Robin Green
  • 32,079
  • 16
  • 104
  • 187
1

You should be able to do it by setting up an Application Link to a ruby web application with 2-way OAuth, but this is quite complicated and heavyweight.

I would like to figure out a way to do it with just basic auth and no Application Link, but I haven't figured out how to yet.

Robin Green
  • 32,079
  • 16
  • 104
  • 187