It's all about the answers!

Ask a question

Jazz and REST Client


Ahmed EL-BERDHI (1515) | asked Apr 19 '19, 9:08 a.m.

 Hey everyone,

I want to consume Jazz resources using a REST Client like POSTMAN or Google Chrome add-on, how can authorize the REST Client to access Jazz ?
Thanks  

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Apr 20 '19, 8:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Apr 23 '19, 5:00 a.m.
For option 3, in Jim's answer, this has worked for me to use Postman 7.0.7 to login to an application with public uri https://localhost:9443/<APP>, where <APP> is jts, ccm, qm: 

Request
POST https://localhost:9443/<APP>/j_security_check

Request Header

Accept:*/*
OSLC-Core-Version:2.0
X-Requested-With:XMLHttpRequest
Content-Type:application/x-www-form-urlencoded
Cookie:
Request Body (use raw)
j_username=<userid>&j_password=<userpassword>

Where <userid> is the user ID e.g. user1
<userpassword> is the users password e.g. password123

E.g. j_username=user1&j_password=password123

Once authenticated subsequent requests (even in another tab) contain the required cookies and session ID's.
Save the request and it is easy enough to use.

Ahmed EL-BERDHI selected this answer as the correct answer

Comments
Ralph Schoon commented Apr 20 '19, 8:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

No guarantee that this is the minimum headers. Eclipse Lyo uses these hearers and they work.

3 other answers



permanent link
Jim Amsden (29337) | answered Apr 19 '19, 3:19 p.m.

There are three different Postman applications:

1. A Chrome extension "Tabbed Postman - REST Client" https://chrome.google.com/webstore/search/coohjcphdfgbiolnekdpbcijmhambjff runs in a Chrome tab.

2. Postman 5.5.4 is a (deprecated) Chrome APP that can use the Postman Interceptor 0.2.24 Chrome extension to share browser state information between Chrome and Postman.

3. Postman 7.0.7 is a standalone app: https://www.getpostman.com/downloads/. This requires you to know the details of how to login, and manage the credentials and cookies yourself. Powerful, but not very convenient.

1 and 2 allow you login to login to the CLM application with the Chrome browser, and then use the authentication tokens with Postman. This is very convenient, but may introduce security issues, and the deprecated Chrome app may be withdrawn at some point. 


permanent link
Andrew Berezovskyi (764) | answered Jul 17 '19, 9:41 a.m.
You can also use a valid certificate for free: https://letsencrypt.org/

Cheers,
Andrew
(Eclipse Lyo project lead)

permanent link
Ahmed EL-BERDHI (1515) | answered Apr 23 '19, 3:27 a.m.

 Thank you for your responses, i tried to follow the instructions but still dont work ..

Got this error :
Could not get any response
There was an error connecting to https://localhost:9443/jts/j_security_check.
Why this might have happened:
  • The server couldn't send a response:
    Ensure that the backend is working properly
  • Self-signed SSL certificates are being blocked:
    Fix this by turning off 'SSL certificate verification' in Settings > General
  • Proxy configured incorrectly
    Ensure that proxy is configured correctly in Settings > Proxy
  • Request timeout:
    Change request timeout in Settings > General


Comments
Ralph Schoon commented Apr 23 '19, 4:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You can not even connect your server. Find out the public uri root of your server . You use the public uri root to connect. If you know that and can login with a browser, you can try the next steps.


Also note that you might have to change the SSL settings in postman to be able to work against your server, if your certificate is invalid.


Ralph Schoon commented Apr 26 '19, 1:08 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The error is related to SSL certificate verification being on.

  • Self-signed SSL certificates are being blocked:
    Fix this by turning off 'SSL certificate verification' in Settings > General


Ahmed EL-BERDHI commented Apr 29 '19, 3:25 a.m.

 Thank you :)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.