You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some services such as Amazon S3 and Google Cloud files limit the signed URL expiration time to maximum of 7.days. So setting it to 10 years would not fix the problem.
This issue should be fixed by #12683 but it has to be used together with a sensible caching strategy, i.e. in this case expiring the cache once a week by minimum (when using S3). This is because the cache expiration times are not currently controlled in Decidim e.g. for content blocks which means they will stay in the cache as long as there is space left (and the caching system in use does not expire it by itself).
Describe the bug
When you copy the URL of an attachment and share it with other people, the link is broken because the token generated expires.
To Reproduce
Steps to reproduce the behavior:
For instance, try this link of an attachment from MetaDecidim:
https://ajbcn-meta-decidim.s3.eu-west-1.amazonaws.com/3wxq9s5urbsikbj3g8hicagl90wb?response-content-disposition=inline%3B%20filename%3D%22Programa_DecidimFEST22_300ppp.pdf%22%3B%20filename*%3DUTF-8%27%27Programa_DecidimFEST22_300ppp.pdf&response-content-type=application%2Fpdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIARXFVQ5FRJEUZE7HY%2F20221103%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20221103T090332Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=727e4598b330b4138dd89be7a1639a89fce7683397e1a9c6cdea47008a9cc797
Or this link from TryDecidim:
https://try.decidim.org/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDRG9JYTJWNVNTSWhibTlvYjNBeGJuSTNibm93YW10amJIaG9PWFJzWm1ZMk5XTnJZd1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpVVdsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SWtWNFlXMXdiR1ZrYjJOMWJXVnVkQzV3WkdZaU95Qm1hV3hsYm1GdFpTbzlWVlJHTFRnbkowVjRZVzF3YkdWa2IyTjFiV1Z1ZEM1d1pHWUdPd1pVT2hGamIyNTBaVzUwWDNSNWNHVkpJaFJoY0hCc2FXTmhkR2x2Ymk5d1pHWUdPd1pVIiwiZXhwIjoiMjAyMi0xMS0wM1QwOToyMDozNS45ODRaIiwicHVyIjoiYmxvYl9rZXkifX0=--becb950ef99a28a7f748f06a762ae231118408b8/Exampledocument.pdf?content_type=application%2Fpdf&disposition=inline%3B+filename%3D%22Exampledocument.pdf%22%3B+filename%2A%3DUTF-8%27%27Exampledocument.pdf
Expected behavior
I expect to have a permanent URL without any expiration time.
Screenshots
Stacktrace
<Error> <Code>AccessDenied</Code> <Message>Request has expired</Message> <X-Amz-Expires>300</X-Amz-Expires> <Expires>2022-11-03T09:08:32Z</Expires> <ServerTime>2022-11-03T15:29:54Z</ServerTime> <RequestId>BSRQRVRABRNH1YMY</RequestId> <HostId>oTK/txk/mpRii/KCeVaoxpixonf4e4MkblZpU9H7jKfhUzbC2Uq56jAlBefFIHhbSVOKpLkMRXw=</HostId> </Error>
Extra data (please complete the following information):
The text was updated successfully, but these errors were encountered: