Whitelist /plugins/servlet/remotepageview endpoint for AC add-ons

XMLWordPrintable

      Summary

      We would like to implement complete Confluence page rendering in our Confluence Cloud add-on (render page in add-on's iframe). Like Jira Service Desk Knowledge Base does (please see the screen): https://www.evernote.com/l/AQGNAv0UVnhF9JicXM3rPDCnYpgCwWj3h2I
      But it is necessary to whitelist Confluence endpoint /plugins/servlet/remotepageview for this purpose (currently 403 returns to properly jwt-signed server to server request).

      Request code is looks like:

      ac.url("/plugins/servlet/remotepageview?pageId=196615").get().whenCompleteAsync(
                      (resp,ex) -> {
                          System.out.println(resp.getStatus());
                          System.out.println(resp.getStatusText());
                          System.out.println(resp.getBody());
                      }, httpExecutionContext.current());
      

      We have already explored other available options (which are already whitelisted) to get Confluence Cloud page rendered outside like /rpc/json-rpc/confluenceservice-v2/renderContent and /wiki/rest/api/content/1234?expand=body.styled_view but results are not acceptable for our purposes. These resources doesn't provide custom macro rendering.
       

      Expected Results

      Get the exact details being returned by /plugins/servlet/remotepageview.

      Actual Results

      The http response data are as follows:
      Status code: 403
      Status text: Forbidden
      Response body (full page html omitted): <h1>HTTP Status 403 - Request not in an authorized API scope</h1>

      At this stage, this issue is blocker for our Confluence Cloud add-on development (we are porting our server add-on to cloud).

            Assignee:
            Unassigned
            Reporter:
            Dmitry Zagorovsky [StiltSoft]
            Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: