Problem with using Jira rest API. I want to hit the jira and has to get the issues,scenarios from jira through java standalone.
My company using Jira with SAML and SSO. If I directly pass jira url https://jira.mycompany.com and with the basic credentials to the jira rest api it throws "peer not authenticated" exception.Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated. when I mouse hover on the JIRA link in my company website it shows the following url.
https://mycompany.com/M2/saml20/logininitial?RequestBinding=HTTPPost&PartnerId=https://jira.mycompany.com/plugins/servlet/samlsso&NameIdFormat=email.
Can some one help me on this how to use jira rest api for this problem? Thanks in advance
I think you need to start with a look at how you have implemented SAML and SSO - what is that expecting incoming connections to do to provide user authentication?
When I click on JIRA it calls the action with post method along with SAMLResponse text and Relaystate as a hidden variables.Like this <form method="post"action="https://jira.mycompany.com/plugins/servlet/samlsso">.
Through browser i can able to get the JSON response from JIRA rest api https://jira.mycompany.com/rest/api/2/issue/key
Ok, so your REST call needs to pass the same tokens that your browser is.
Need to add SAMLResponse at the end of rest call?
Like :/rest/agile/1.0/SAMLResponse_tokens
It looks like you're new here. Sign in or register to get started.