Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-29310

When computing driveEditUrl, do not assume a particular URL format

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Bug
    • Affects Version/s: 10.10
    • Fix Version/s: None
    • Component/s: Nuxeo Drive, Web UI

      Description

      In https://github.com/nuxeo/nuxeo-web-ui/blob/master/addons/nuxeo-drive/elements/nuxeo-drive-edit-button.js#L97 and https://github.com/nuxeo-archives/nuxeo-drive-server/blob/10.10/nuxeo-drive-web-ui/src/main/resources/web/nuxeo.war/ui/nuxeo-drive/nuxeo-drive-edit-button.html#L86 , the driveEditUrl is computed based on the usual Nuxeo download URL format, which breaks with S3 Direct Download URL format.

      The symptom, on Drive client side is:

      2020-06-24 09:45:44 16968 4627312064 WARNING  nxdrive.gui.application User <b>[USERNAME]</b> on server <a href="https://nuxeo-app-prod[...].s3.[...].amazonaws.com/binaries/[...]?response-content-disposition=attachment; filename*=UTF-8''[FILENAME.EXTENSION]&response-content-type=image/jpeg&X-Amz-Security-Token=[...]&X-Amz-Algorithm=[...]&X-Amz-Date=[...]&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Credential=[...]&X-Amz-Signature=[...]">https://nuxeo-app-prod-[...].amazonaws.com/binaries/[...]?response-content-disposition=attachment; filename*=UTF-8''FILENAME.EXTENSION&response-content-type=image/jpeg&X-Amz-Security-Token=[...]&X-Amz-Algorithm=[...]&X-Amz-Date=[...]&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Credential=[...]&X-Amz-Signature=[...]</a> is not signed in Nuxeo Drive on this computer. (values=['[USERNAME]', "https://nuxeo-app-prod-[...].s3.[...].amazonaws.com/binaries/[...]?response-content-disposition=attachment; filename*=UTF-8''FILENAME.EXTENSION&response-content-type=image/jpeg&X-Amz-Security-Token=[...]&X-Amz-Algorithm=[...]&X-Amz-Date=[...]&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Credential=[...]&X-Amz-Signature=[...]", 'Nuxeo Drive'])
      

      This boils down to S3 direct download URL which is not at all in the format /nxfile/ expected by WebUI.
      => When the server property nuxeo.s3storage.directdownload=true is met, WebUI should compute the driveEditUrl in a different way.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pabgrall Patrick Abgrall
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.