Uploaded image for project: 'Atlassian Ecosystem'
  1. Atlassian Ecosystem
  2. ECO-660

Connect lifecycle Install event has the baseUrl value set as custom domain, when installed on confluence instance with custom domain

XMLWordPrintable

    • Severity 2 - Major

      Issue Summary

      This is reproducible on Data Center: (No)

      For connect-to-forge apps, when the forge app is installed on confluence instance with custom domain, the connect lifecycle install event that gets triggered, has the payload with baseUrl and displayUrl both set to custom domain, rather then the *.atlassian.net domain for baseUrl . This prevents the install event function from making calls to confluence API endpoints, since they need the URL to be in *.atlassian.net format.

      Steps to Reproduce

      1. Setup custom domain for confluence instance
      2. Create a connect app with install lifecycle event and install it to the confluence instance. We can use go.atlassian.com/connect-inspector 
      3. Follow the connect to forge guidelines to create a forge app. An example, manifest
        app:
          runtime:
            name: nodejs22.x
          id: ari:cloud:ecosystem::app/<forge_app_id>
          connect:
            remote: connect
            key: <connect_app_key>
        connectModules:
          "confluence:lifecycle":
            [
              {
                  "key": "connect-lifecycle",
                  "installed": "/log-save/installed"
                }
            ]
        remotes:
          - key: connect
            baseUrl: https://connect-inspector.services.atlassian.com/resources/f4b8d764-5084-4df3-8673-11b405bc1e15
        permissions:
          scopes: [ "read:connect-confluence" ]
        
      4. install the forge app on a confluence instance.
        forge deploy && forge install -s internal.confluence.customdomain.info -p confluence
        
      5. Observe the payload received at the install lifecycle function in connect-inspector.

      Expected Results

      In the event payload baseUrl  should be [subdomain].atlassian.net and displayUrl should be the custom domain name.

      Actual Results

      In the event payload baseUrl and displayUrl are both set to custom domain. Below is an sample from a test: 

      {
        "key": "ac.ci.f4b8d764--snipped--",
        "clientKey": "9938efd4--snipped--",
        "sharedSecret": "--snipped--",
        "baseUrl": "https://internal.confluence.customdomain.info/wiki",
        "productType": "confluence",
        "description": "Atlassian Confluence",
        "eventType": "installed",
        "cloudId": "16c33e5d-60d9-4922--snipped---",
        "installationId": "ari:cloud:ecosystem::installation/4853d4d2-f573--snipped--",
        "publicKey": "--snipped--",
        "serverVersion": "6452",
        "pluginsVersion": "1000.0.0.ibecnb19hj56",
        "displayUrl": "https://internal.confluence.customdomain.info/wiki"
      } 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              6077a33a10e4 Ilnar Taichinov
              de18e5af647f Faisal
              Votes:
              6 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: