--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Adam,The 401 unauthorized response is _not_ because your JWT token is incorrect. It is because your add-on does not have permission to access that particular REST API. Have you added the "READ" scope to your add-on descriptor?Best,Seb
On Wed, Apr 23, 2014 at 4:53 PM, Adam Malcontenti-Wilson wrote:
Hi all,
I've been attempting to use JWT for authentication of the JIRA REST API from a JIRA Addon and have been running into some problems getting authenticated. I'm running an instance of the atlassian plugin sdk locally, and trying to authenticate to this url:
http://atlassian.dev/jira/rest/api/2/project?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJqaXJhOjBjYTI2YzYxLWQ3MjctNGQ0Mi05OWM4LTY1MTg3MTI2OTkzMCIsImlhdCI6MTM5ODIyNjMxNywiZXhwIjoxMzk4MjI2NDk3LCJxc2giOiIzNzZiODZiZTIyNmJlNmVkMjIxZjdhNWMxZmY5YmFmZGY0OTUwMzY3NzMyNjRlMjI4MjJkYmZmNjhlOGFlYWZhIiwic3ViIjoiYWRtaW4ifQ.GynWdD9-6x8MMr1H9tZT6hC6BKrjeRVN9Fl0TvnRg58
I've found these two tools which are handy for debugging the JWT token, one which allows you to edit the JSON of the JWT and sign it with a secret key at http://openidtest.uninett.no/jwt, and another which helps to validate the query string hash parameter is correct at http://jwt-decoder.herokuapp.com/jwt/decode. I've passed in the JWT token generated and both of these tools indicate that it is correct, however when I navigate to it I find I get a 401 unauthorised error, and there's nothing in the log file to indicate more information about the failure.
I'm running JIRA 6.2-OD-08-034 (6251) / Atlassian SDK 4.2.20 and starting the server with the following command:
atlas-run-standalone --http-port 2990 --server atlassian.dev --product jira --version 6.2-OD-10-004-WN --bundled-plugins com.atlassian.plugins:atlassian-connect-plugin:1.0.0,com.atlassian.jwt:jwt-plugin:1.0.0,com.atlassian.bundles:json-schema-validator-atlassian-bundle:1.0-m0,com.atlassian.upm:atlassian-universal-plugin-manager-plugin:2.15 -Dallow.google.tracking=false --jvmargs -Datlassian.upm.on.demand=true
Cheers,
Adam--
Seb RuizAtlassian
--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.