Installing (private) apps To Jira with access tokens

Will Streeter October 26, 2018

Hello Community,

In Atlassian Developer I created a simple app the uses Oauth2  to authenticated a user and allow them to publish jira issues to a selected project. The application is in development stage and I want to enable the various members of my team to use the app through our website.  However, I am still the only who can use the feature on our website. ( cloud based website that is not publicly accessible). I need qa, design, some customers, etc. to work with it.  I went to the Installing cloud apps page and followed the instructions for   Creating the Marketplace Listing  ( as a private), generating an access token and following the instruction steps in Installing apps with access tokens.   However,  I can not get Jira to upload the app, step 7.  when I copy the  url  from step 1. ( Copy your token link from your Private listings page in Marketplace), I always get an error.

jira-err.jpg

As a private listing, the documentation should accept the generated  token that is create from clicking on the link--- the  httpss://..... atlassian-connect.json?access-token=c3cf.... 
What am I doing wrong?

1 answer

0 votes
Daniel Wester October 27, 2018

Your descriptor is missing the authentication object. If you add that then things should be good.

You can also ask these types of questions on the developer community: https://community.decrlopers.atlassian.com. 

Will Streeter October 28, 2018

Hi Daniel,

1st:  Thanks for responding.

The link you offered above is incorrect, however , I did try to post the following in the https://community.developer.atlassian.com/c/Jira message group.

I realized that I do not have the authentication listing in my descriptor, but I am not sure how it is to be included.

This privately listed app that I am attempting to make part of my Jira Installation, is an app we eventually hope to distribute to our customer, but for now we would like it to remain private.  The instructions suggest  on the page

  https://developer.atlassian.com/platform/marketplace/registering-apps/

in the following section: 

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:

  1. Log in to the Atlassian application interface as an admin or a system administrator. If you started the application with Atlassian’s SDK, the  default username/password combination is admin/admin.
  2. Choose  cog icon > Add-ons from the menu. The Administration page will display.
  3. Choose the Manage add-ons option.
  4. Scroll to the page’s bottom and click the Settings link. The Settings dialog will display. 
  5. Make sure the Private listings option is checked and click Apply.
  6. Scroll to the top of the page and click the Upload Add-on link.
  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)

 

Following these instructions, it seems suggest that the url that is generated  from the  private link / access-token will supply the descriptor that I am to use, and more specifically ( according to step 7)  that it should be served from the  MarketPlace. 

and my link follows the pattern from 


Thus moving on to the next page  Installing Cloud Based Apps 

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

 
I created my private listing to the Jira Cloud Base App and I have generate a token to be associated with my private listing. Clicking on the icon to the right of the private listing a link opens up contains the following information, missing any reference to the authentication object,



view-of-atlassian-connect-json.jpg

 In this listing, I do not see the "authentication object" and is the Link pointing to this file the one that I should be using in the Upload Add-on



Never the less I continued with the following instructions on that same page, as my link to the right of the listing that displays the information above.. appears much like the link from step 7.

https://marketplace.atlassian.com/files/1.0.1-AC/artifact/descriptor/#####-###a-###-#####-########atlassian-connect.json?access-token=c3####

 

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.

 

And here is where the error appears, in the Jira Admin Console when I try to add this as an ADD-ON. 

The image before these instructions seems to suggest that there is a url to the customers cloud server. I do not see this url produced when I create a private listing with a token.

marketplace-instruction.jpgPerhaps, this is not necessary and is only generated after it is successfully installed as an add on. If it is part of the problem, how and where do I included this.  At any rate, when I create this private listing and the click on the icon next to the token listing, an attlasian-connect.json appears that does not include this authentication that you mentioned in your answer.   

How am I to include this authentication object, you described in your response  :

" your descriptor is missing the authentication object" . ,

if the Market Place vendor is not generating it when I create the private listing  based on following the instructions as I have outlined above ?


Any help in solving this would be much appreciated. 

Thanks in Advance



 

 

Will Streeter October 28, 2018

 

 

Will Streeter October 28, 2018

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events