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

Fix S3 download URI when the method is not GET

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 2023.20, 2021.61
    • Component/s: S3
    • Release Notes Summary:
      S3 presigned URL (generated for direct download) can now be used with the HEAD method to get file info only
    • Backlog priority:
      500

      Description

      As you can see in S3BlobProvider#getURIS3 at https://github.com/nuxeo/nuxeo/blob/2021/modules/core/nuxeo-core-binarymanager-cloud/nuxeo-core-binarymanager-s3/src/main/java/org/nuxeo/ecm/blob/s3/S3BlobProvider.java#L194 the request to get the Presigned URL is built by always using the GET method.

      Because of that, using the S3 download URL with another method (like a HEAD request to read the file info without download the blob) will fail with an error HTTP 403

      Expected behavior: using the S3 URI with a HEAD request returns a result with HTTP 200

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m