Does basic HTTP-Authentication work for Google Apps bound JIRA on Demand instances?

Long title, short question.

I've tried to get some explanations and answers from the documentation and API, also did some CURL-Tests, but none seemed to work.

I'm running JIRA onDemand coupled with Google Apps, so the Authentication works via Google Apps.

When using the REST API to access JIRA, how do I have to authenticate? Does basic HTTP Authentication work there? When yes, which username/password is provided? That one from my Google-User?

Or do I have to create a special User in JIRA for that?

Thanks in advance for every pointer into the right direction.

1 answer

1 accepted

This widget could not be displayed.

Yes, it does work, but it does not use your Google credentials. When you first signed in to your OnDemand instance via Google Apps, you would have been prompted to create an 'OnDemand password' to authenticate with services like Subversion, WebDAV, the API, private RSS feeds, etc.

If you don't recall this password, you can have your administrator set your password to something known (which they can do via OnDemand's user management page). You can then set the password to whatever you want from your profile page. There are some more details here.

thanks for that information.

Seems i have to digg deeper, my example still doesn't work.

When trying to get an issue via REST i get an error:

curl -D -u emailaddress:password -X GET -H "Content-Type: application/json" https://mysubdomain.atlassian.net/rest/api/latest/issue/TKT-1

curl: (6) Could not resolve host: emailaddress:password; nodename nor servname provided, or not known

A couple of things:

  1. You need to append "?os_authType=basic" to your URL to prompt JIRA to ask for HTTP basic authentication.
  2. I believe you need to supply a filename to "-D"

Example (with -D option omitted):

curl -u 'myuser:mypass' -X GET -H 'Content-Type: application/json' 'https://test.atlassian.net/rest/api/latest/issue/TEST-1?os_authType=basic'

Thats it, it works now!

Amazing, thanks for that perfect support!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

586 views 25 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you