# Jira Cloud Connect App "Spring Boot App" Missing shared secret

**URL:** <https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790>\
**Category:** Jira Cloud\
**Tags:** ac-spring-boot, lifecycle, atlassian-connect\
**Created:** [December 27, 2023, 10:25am UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790 "2023-12-27T10:25:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SALAHAbderraouf](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@SALAHAbderraouf](https://community.developer.atlassian.com/u/SALAHAbderraouf)\
**Post date:** [December 27, 2023, 10:25am UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/1 "2023-12-27T10:25:26Z")

</div>

this is my descriptor

```json
{
  "key": "${addon.key}",
  "baseUrl": "https://eae8-105-104-99-29.ngrok-free.app",
  "name": "Fields Cloud",
  "description": "This plugin will allow you to create new type of custom field",
  "apiVersion": 1,
  "enableLicensing": true,
  "vendor": {
    "name": "Technologies",
    "url": "https://www.technologies.com/"
  },
  "authentication": {
    "type": "jwt"
  },
  "lifecycle": {
    "installed": "/api/v1/lifecycle/installed",
    "uninstalled": "/uninstalled"
  },
  "scopes": [
    "READ",
    "ADMIN"
  ],
  "modules": {
    "generalPages": [
      {
        "key": "sql-cf-config-page",
        "location": "system.top.navigation.bar",
        "name": {
          "value": " Custom Field Config",
          "i18n": "generalPages.sql-cf-config-page.name"
        },
        "conditions": [
          {
            "condition": "user_is_admin"
          }
        ],
        "url": "-cloud-config"
      }
    ],
    "webPanels": [
      {
        "key": "cloud-section",
        "location": "atl.jira.view.issue.left.context",
        "name": {
          "value": "Fields Section",
          "i18n": "webPanels.sql-cf-cloud-section.name"
        },
        "url": "/fields"
      }
    ]
  }
}

```

i am missing the shared secret in the response Body .

---

<div class="post-metadata">

**Author:** ![markrekveld](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/markrekveld/32/36150_2.png) [@markrekveld](https://community.developer.atlassian.com/u/markrekveld)\
**Post date:** [December 27, 2023, 10:51am UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/2 "2023-12-27T10:51:53Z")

</div>

Hi @SALAHAbderraouf,

Welcome to the community!

> [@SALAHAbderraouf](#):
>
> i am missing the shared secret in the response Body .

The shared secret is not a part of the app descriptor but is data that is shared using the lifecycle events. These events are send to your app when an admin (un)installs your app on there Jira Cloud instance.  
See also the docs on this [Multitenancy in Connect](https://developer.atlassian.com/developer-guide/multitenancy/#multitenancy-in-connect)

Cheers,  
Mark

---

<div class="post-metadata">

**Author:** ![SALAHAbderraouf](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@SALAHAbderraouf](https://community.developer.atlassian.com/u/SALAHAbderraouf)\
**Post date:** [December 27, 2023, 11:18am UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/3 "2023-12-27T11:18:40Z")

</div>

Hello;  
I know that the shared secret is not part of the app descriptor. What I meant is that as soon as I install the plugin, I do not get the shared secret, which is important in the management of JWT.  
This is the response from the Chrome Network Response after the installation process

```json
{
    "links": {
        "self": "/rest/plugins/1.0/SqlCustomFieldCloud-key",
        "plugin-summary": "/rest/plugins/1.0/SqlCustomFieldCloud-key/summary",
        "plugin-icon": "/rest/plugins/1.0/SqlCustomFieldCloud-key/media/plugin-icon",
        "plugin-logo": "/rest/plugins/1.0/SqlCustomFieldCloud-key/media/plugin-logo",
        "manage": "https://salah16.atlassian.net/plugins/servlet/upm?fragment=manage%2FSqlCustomFieldCloud",
        "delete": "/rest/plugins/1.0/SqlCustomFieldCloud-key"
    },
    "key": "SqlCustomFieldCloud",
    "enabled": true,
    "enabledByDefault": true,
    "version": "1.0",
    "description": "This plugin will allow you to create new type of custom field. SQL custom field has different type: Autocomplete, select, table, checkbox and radio buttons.",
    "name": "Kepler - SQL Query Fields Cloud",
    "modules": [],
    "userInstalled": true,
    "optional": true,
    "unrecognisedModuleTypes": false,
    "unloadable": false,
    "static": false,
    "usesLicensing": true,
    "remotable": true,
    "vendor": {
        "name": "Kepler Technologies AlgÃ©rie",
        "marketplaceLink": "https://www.kepler-technologies.com/",
        "link": "https://www.kepler-technologies.com/"
    }
}

```

---

<div class="post-metadata">

**Author:** ![markrekveld](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/markrekveld/32/36150_2.png) [@markrekveld](https://community.developer.atlassian.com/u/markrekveld)\
**Post date:** [December 27, 2023, 11:36am UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/4 "2023-12-27T11:36:27Z")

</div>

Hi @SALAHAbderraouf,

Not sure how you are using the Chrome Network Response in the installation flow, but to my knowledge the lifecycle events are only shared with your app using the lifecycle endpoints configured in the app descriptor. They are never shared with the user that managing the app.

Looking at your descriptor you should see a request come in on [https://eae8-105-104-99-29.ngrok-free.app/api/v1/lifecycle/installed](https://eae8-105-104-99-29.ngrok-free.app/api/v1/lifecycle/installed) with the app installed lifecycle event.

By using ngrok, you should see this being logged in the console of the ngrok client if you start the ngrok tunnel using a separate console process.

You may also want to look at the app logs for the package `com.atlassian.connect.spring.internal.lifecycle` This is where the `LifecycleController` lives and it does log when it received install and uninstall events.

Cheers,  
Mark

---

<div class="post-metadata">

**Author:** ![SALAHAbderraouf](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@SALAHAbderraouf](https://community.developer.atlassian.com/u/SALAHAbderraouf)\
**Post date:** [December 27, 2023, 1:58pm UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/5 "2023-12-27T13:58:07Z")

</div>

Thank you for your prompt response, i asked this question because i got this from the official documentation here :  
Your app should have an endpoint at `/installed` and expect data to be POSTed to it. Here’s is an example of the data object that will be sent:

```json
{
  "key": "installed-addon-key",
  "clientKey": "unique-client-identifier",
  "sharedSecret": "a-secret-key-not-to-be-lost",
  "serverVersion": "server-version",
  "pluginsVersion": "version-of-connect",
  "baseUrl": "https://example.atlassian.net",
  "displayUrl": "https://docs.example.com",
  "productType": "jira",
  "description": "Atlassian Jira at https://example.atlassian.net",
  "serviceEntitlementNumber": "SEN-number",
  "eventType": "installed"
}

```

> When you receive this data, save it to your persistent data store and index against the `clientKey` as the unique identifier.

in my case i cannot see “sharedSecret”: “a-secret-key-not-to-be-lost”, attribute in the received JSON  
Kind regards

---

<div class="post-metadata">

**Author:** ![markrekveld](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/markrekveld/32/36150_2.png) [@markrekveld](https://community.developer.atlassian.com/u/markrekveld)\
**Post date:** [January 1, 2024, 10:30pm UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/6 "2024-01-01T22:30:37Z")

</div>

Hi @SALAHAbderraouf

First off happy new year!

Second, what `authentication` setting you do you have in your descriptor?  
I think this requires to be set to `jwt` in order to get the `sharedSecret` in the event payload.

add this to your descriptor of you don’t have `authentication` set

```auto
"authentication": {
  "type": "jwt"
}

```

---

<div class="post-metadata">

**Author:** ![SALAHAbderraouf](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@SALAHAbderraouf](https://community.developer.atlassian.com/u/SALAHAbderraouf)\
**Post date:** [January 1, 2024, 10:54pm UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/7 "2024-01-01T22:54:01Z")

</div>

Hi @markrekveld  
Happy New Year to you too! 🎉

Thank you for your prompt response and suggestion. I appreciate your help.  
Regarding your question, I’ve already set the authentication type in my app descriptor to “jwt.” Here’s a snippet for your reference: “authentication”: {  
“type”: “jwt”  
} i would like to retrieve this sharedSecret

---

<div class="post-metadata">

**Author:** ![markrekveld](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/markrekveld/32/36150_2.png) [@markrekveld](https://community.developer.atlassian.com/u/markrekveld)\
**Post date:** [January 2, 2024, 9:35am UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/8 "2024-01-02T09:35:44Z")

</div>

Hi @SALAHAbderraouf

You may need to uninstall and reinstall the app.  
The shared secret is not send in the event body when authentication is not set or set to `none` in the app descriptor.

If you change this from `none`/missing to `jwt` that you need to uninstall & reinstall the app so that your app will get the new lifecycle event body which should include the shared secret in the event body.

If you are still having issues then maybe from someone from Atlassian can pitch in. @ibuchanan do you have any ideas?

---

<div class="post-metadata">

**Author:** ![ibuchanan](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/ibuchanan/32/35815_2.png) [@ibuchanan](https://community.developer.atlassian.com/u/ibuchanan)\
**Post date:** [January 2, 2024, 1:06pm UTC](https://community.developer.atlassian.com/t/jira-cloud-connect-app-spring-boot-app-missing-shared-secret/75790/9 "2024-01-02T13:06:57Z")

</div>

@SALAHAbderraouf,

I don’t have better ideas than @markrekveld. Like his advice, I suspected the `authentication` module. What would really help is posting a bit more about what you are trying to accomplish and what you have tried. Otherwise, the only thing I can say is the very useless, “It works for me.”
