django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 574 forks source link

The request signature we calculated does not match the signature you provided. #1451

Closed eriktelepovsky closed 3 months ago

eriktelepovsky commented 3 months ago

I have an issue with S3 object storage and django-filer. When I configure django storages to use storages.backends.s3.S3Storage or storages.backends.s3boto3.S3Boto3Storage I can successfully upload files using django-filer admin to my bucket of the endpoint but I am not able to download it using download button or opening the URL. I get following error:

<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. For more information, see REST Authentication and SOAP Authentication for details.</Message>
<RequestId>647e0209:188b96d0ca5:12a083:1723d</RequestId>
<AWSAccessKeyId>akia8b3bd03c8748d86c</AWSAccessKeyId>
<StringToSign>GET 1710765586 x-emc-namespace:120bb652cb5743558aef65ddc00ef6b4 /local/files/e4/68/e4688504-b912-4842-97b1-14ab793f5504/plot.log</StringToSign>
<SignatureProvided>jl224Fi++5SiPf9iO0upN/OJXTU=</SignatureProvided>
<StringToSignBytes>47 45 54 0a 0a 0a 31 37 31 30 37 36 35 35 38 36 0a 78 2d 65 6d 63 2d 6e 61 6d 65 73 70 61 63 65 3a 31 32 30 62 62 36 35 32 63 62 35 37 34 33 35 35 38 61 65 66 36 35 64 64 63 30 30 65 66 36 62 34 0a 2f 6c 6f 63 61 6c 2f 66 69 6c 65 73 2f 65 34 2f 36 38 2f 65 34 36 38 38 35 30 34 2d 62 39 31 32 2d 34 38 34 32 2d 39 37 62 31 2d 31 34 61 62 37 39 33 66 35 35 30 34 2f 70 6c 6f 74 2e 6c 6f 67</StringToSignBytes>
</Error>
eriktelepovsky commented 3 months ago

Closing the issue. The problem was in configuration of AWS_S3_SIGNATURE_VERSION in django-storages.