Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JIRA SD basic auth rest api

Lia August 17, 2020

Hi Experts


I'm new to JIRA SD and wanted to connect to an internal JIRA SD endpoint
What's JIRA SD basic auth endpoint? I didn't find example on https://docs.atlassian.com/jira-servicedesk/REST/4.11.0/#authentication (example link deprecated). Is there sth like  /servicedesk/rest/auth/1/xxxx?

1 answer

1 accepted

0 votes
Answer accepted
Najjar _Innovura_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 17, 2020

Hi @Lia

Welcome to Atlassian Community

You may use any endpoint, as long as the endpoint needs authentication.if the endpoint return two different responses 200 and 401, then it would be a valid way of authentication

JIRA Service Desk REST API uses the same authentication methods as JIRA. The preferred authentication methods are OAuth and HTTP Basic Auth. 

When user is authenticated the first time Jira sends back a response with a cookie that may look like this:

JSESSIONID=6AD97CC4450456CD968B22F7201220A7; atlassian.xsrf.token=BWP3-NZB2-6EDY-6C7K_d3ec7ed6f227879ac4cf6aee83f28e085e49227b_lin

We store the user's cookie in their session and we use it every time we send a API request to Jira rest api on their behalf (so we don't keep the password stored in our session for security reasons) 

 

As cookie is a valid authentication method for Jira service desk api.

Lia August 17, 2020

Thanks. I'm actually have some working code with JIRA rest api 
JIRA_domain/jira/rest/auth/1/session + username/password passed working
But when I change it to
JIRASD_domain/jira/rest/auth/1/session + username/password it failed with error like "you found a dead link"
Hence I'm thinking the JIRASD_domain should be followed by sth else

Lia August 17, 2020

As Najja mentioned above, login actually worked with basic auth wit any endpoint. Issue actual comes from trusted certs 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events