Oauth SignatureException jira-rest-api-oauth-authentication

Christophe Bordier September 23, 2019

Hi

I'm attempting to get the JIRA OAuth 1.0a working with a minimalist Java Spring boot project.

I followed the steps described in this Atlassian Tutorial : https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication/#overview

The only difference is that I'm running the project as a Spring boot project , not a simple java projet. Normally, it has no effect on the code executed.

I'm facing this error :

java.security.SignatureException: Signature length not correct: got 256 but was expecting 128

I have followed all the provided instructions on the key generation :

openssl genrsa -out jira_privatekey.pem 1024
openssl req -newkey rsa:1024 -x509 -key jira_privatekey.pem -out jira_publickey.cer -days 365
openssl pkcs8 -topk8 -nocrypt -in jira_privatekey.pem -out jira_privatekey.pcks8
openssl x509 -pubkey -noout -in jira_publickey.cer > jira_publickey.pem

I have added the public key in the Application Link administration menu.

What I am doing wrong ?

I have uploaded my maven project here :

https://github.com/chris282/jira_oauth_springboot

I have added :  the error from the server side (Jira), and capture from JIRA Administration panel too.

Do we need to add the certificate to the .jks file of this jira instance to get it working ? Do we need to update the jdk1.8.0_112\jre\lib\security\cacerts file ?

Any idea ?

Please give me some help on this topic, I see there is plenty of guys facing the same issue without resolving it. :(

 

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2019

Hi @Christophe Bordier ,

I may not be the best person to answer this question, however please notice that you are following the documentation for Jira Cloud while it is my understanding that you are using Jira Server instead.

The documentation for Jira Server is the below one:

Can you kindly review above page (and code samples) and let us know if you still have issues?

 

Finally, for the future, please notice that this might not be the best place to get help on development  related questions. In case further help will be needed on this topic, you might want to ask the developers community instead, or open a ticket in the developers service desk:

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer