For a private Jira Cloud App in development do I need to host an atlassian-connect.json?

Will Streeter October 29, 2018

Hello Everybody,

I have developed  a simple application  using Oauth2 authentication to connect and create issues in Jira. We are currently only developing this application for cloud based Jira instances and for the time being would like to make it private.  I have gone through the process of creating a vendor and listing the application as a private listing with a token.

Following the instructions on    https://developer.atlassian.com/platform/marketplace/registering-apps/

the following section seems to suggest that the atlassian-connect.json must be hosted by the Atlassian Market Place:

 

Installing an app using the Universal Plugin Manager

Installing your app adds it to your Atlassian Cloud application. To be more precise, installing is really just registering the app with the application and the only thing that is stored by the application at this time is the app descriptor. 

You can install an app with the UPM, for version 2.14 or later, as follows:
.....
7.  Enter the URL to the hosted location of your app descriptor. In this example, the URL is similar to the following:  http://localhost:8000/atlassian-plugin.xml. (If you are installing to a cloud site, the URL must be served from the Marketplace, and will look like  //marketplace.atlassian.com/download/plugins/com.example.app/version/39/descriptor? access-token=9ad5037b)

 

and also following  the instructions on the next page (view)

  Installing Cloud Based Apps 

https://developer.atlassian.com/platform/marketplace/installing-cloud-apps/?_ga=2.112958467.66357313.1540757269-566564325.1513122027

Installing apps with access tokens

After generating the token, you can use the token URL to install the app and apply the token in the same process:

  1. Copy your token link from your Private listings page in Marketplace.
  2. Log into the cloud instance where you want to install your app.
  3. Go to Manage add-ons in the administration console.
  4. Click Settings at the bottom of the page.
  5. Check the box to Enable private listings.
  6. Back in the Manage add-ons page, click Upload add-on.
  7. Paste the URL of your descriptor from the Marketplace, and click Upload.Your descriptor is retrieved and installed, and your token is applied. You should see an “Installed and ready to go!” dialog.

 

After clicking on the icon next to the created token in private listing and thereby copying the url to the descriptor, I am attempting to to copy into the Upload add-on.  This action is never really successful, and always produces the error.


 jira-err.jpg

 

What am I doing wrong?


If I need to create my own descriptor file, at what point do I add it to the publication of the app?

If possible could someone kindly provide the steps necessary for successfully registering a private app in the Market Place so we can enable installation as an Add-On in our Jira Cloud instance, which I assume will work for our customer who would also like to review the app?


Thanks

 

2 answers

0 votes
Yatish Madhav
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2025

Hi. Many years later ... but this link may help to validate the JSON app descriptor

https://json-schema.app/start 

Yatish

0 votes
david
Atlassian Partner
October 29, 2018

Hi @Will Streeter every Cloud app needs to be hosted in some way, it doesn't matter if is for development or not.

We use ngrok to create an easy tunnel to your local environment for development apps. You can find more info here: https://developer.atlassian.com/cloud/jira/platform/getting-started/

Cheers,

David

Will Streeter October 30, 2018

Thanks @david for responding to my question.  I have set up NGROK as the documentation suggest, however, I am getting an error.

When I try to upload the atlassian-connect.json, I am getting a 404 error from the 

 

"lifecycle": {
"installed": "/installed",
"uninstalled": "/uninstalled"
},


which I believe is preventing me from successfully completing the add on process.


I am wondering if I need lifecycle as I am not using modules. I am assuming that modules are used to surface a widget on the Jira Instance views.  Currently we are not developing an app that will surface any kind of GUI with the Jira Instance.  Our app will do the following:

1) Uses Oauth2 to validate user
2) Get the Projects associated with the authenticated User
3) Get the Issues Types associated with the Projects
4) Create Issues based on those Issue Types  in Projects associated with the User


{
"modules": {},
"key": "biz_jira_integration_local-v1",
"name": "NGROK_BIZ_JIRA_INTEGRATION",
"description": "Enables a user to create Jira base Story and Epic issues through BIZ Product Management application.",
"vendor": {
"name": "BIZ",
"url": "https://www.biz.com/"
},
"links": {
"self": "https://960b4PETER.ngrok.io/__static/affiliates/jira/local/atlassian-connect.json"
},
"lifecycle": {
"installed": "/installed",
"uninstalled": "/uninstalled"
},
"baseUrl": "https://960b4PETER.ngrok.io/__static/affiliates/jira/local",
"authentication": {
"type": "jwt"
},
"enableLicensing": false,
"scopes": [
"read",
"write"
]
}


Thus, far I have been able to accomplish these task by creating an app in  https://developer.atlassian.com.

Question:
1) Do I need to incorporate    https://....atlassian-connect/all.js in my application, if I am not using modules and do not wish to surface a GUI with in the users Jira Cloud Views?

2) Do I need to surface an lifecycle paths for Authentication if I am not using modules.

3) What should my atlassian-connect.json  look like in order to achieve my current applications aims?

david
Atlassian Partner
October 31, 2018

Hi Will, I'll try to answer your questions:

  1. Is recommended to use it, because it handles the handsake and helps you with the CORS. Even though you don't have UI, you will need to define an entry point in Jira (like a button or menu option) to access your app. You can find more info about the all.js here https://developer.atlassian.com/cloud/jira/platform/about-the-javascript-api/
  2. Yes, you can rely on connect framework to handle everything, you just need to store the authentication data in your database. Check out this document, specially the Installation part https://developer.atlassian.com/cloud/jira/platform/getting-started/
  3. Is difficult to say, yours seem ok so far but you need to define an entry point to your app

I hope this helps,

David

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events