[EXTDAM-299] DamDownloadServlet do not work for S3 assets Created: 20/Sep/21  Updated: 07/Oct/21  Resolved: 06/Oct/21

Status: Closed
Project: External DAMs
Component/s: None
Affects Version/s: 1.0.5
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Evzen Fochr Assignee: Yen Lac Tue
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 2d 2.75h
Original Estimate: Not Specified

Issue Links:
Cloners
clones EXTDAM-262 DamDownloadServlet do not work for S3... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
[ ]* check BYNDER connector for same issue
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: Align with / integrate changes from 2.0-cloud
Sprint: Content Mngmt 14
Story Points: 5

 Description   

Steps to reproduce

  1.  try to access s3 asset through DamDownloadServlet
  2.  

.. Logs, screenshots, gifs...

Expected results

asset is downloaded

.. Justify non-trivial expectations with a link to a doc or a relevant discussion.

Actual results

SC_NOT_FOUND = 404 is sent to client

Workaround

Development notes

info/magnolia/dam/core/download/DamDownloadServlet.java:262 expect PathNotFoundException if asset is not found by path without extension. S3AssetProvidet create new empty asset without contentStream, so no try for getting by path with extension is done.
info/magnolia/dam/core/download/DamDownloadServlet.java:161

Remove DamDownloadServlet from cloud branch.



 Comments   
Comment by Yen Lac Tue [ 06/Oct/21 ]

Investigating results:

The S3 request returns the public link like: https://bucket.s3.amazonaws.com/image.ext

While the DamDownloadServlet only supports the following link patterns:

/dam/provider-id/path.ext
Ex: /dam/jcr/foo/bar/lol.pdf
/dam/jcr:7ecd4045-45a0-4c81-b2b6-f4c4b0cd24ad/

So this servlet is incompatible with S3, I will close this ticket.

Generated at Mon Feb 12 01:53:50 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.