vaersaagod / dospaces

DigitalOcean Spaces integration for Craft CMS
MIT License
35 stars 8 forks source link

403 Forbidden #27

Closed andres112 closed 9 months ago

andres112 commented 9 months ago

Hello guys I'm using dospace in craft running in a pod in k8s, unfortunately I'm receiving 403 Forbidden, when the plugin try to HEAD the resource. Particularly the Digital Ocean space is returning this response.

This is not the case when is running locally, using the the same credentials everything works perfectly in local env.

The question is, why using the same configuration is running locally but now when is running on a pod in k8s?

The second question, is if is required maybe to do an extra configuration both in Digital Ocean side or in craft side to avoid this 403 response?

{main} {"memory":7258864,"exception":"[object] (craft\\errors\\FsException(code: 0): Unable to check if Screenshot-2023-12-13-at-15.57.30.png exists at /app/vendor/craftcms/flysystem/src/base/FlysystemFs.php:151)
[previous exception] [object] (League\\Flysystem\\UnableToCheckFileExistence(code: 0): Unable to check existence for: Screenshot-2023-12-13-at-15.57.30.png at /app/vendor/league/flysystem/src/UnableToCheckExistence.php:19)
[previous exception] [object] (Aws\\S3\\Exception\\S3Exception(code: 0): Error executing \"HeadObject\" on \"https://bucket-name.reg1.digitaloceanspaces.com/files-test/Screenshot-2023-12-13-at-15.57.30.png\"; AWS HTTP error: Client error: `HEAD https://bucket-name.reg1.digitaloceanspaces.com/files-test/Screenshot-2023-12-13-at-15.57.30.png` resulted in a `403 Forbidden` response  (client): 403 Forbidden (Request-ID: tx0000012356465789-006546cdf6565-rt6u77f00) -  at /app/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:196)
[previous exception] [object] (GuzzleHttp\\Exception\\ClientException(code: 403): Client error: `HEAD https://bucket-name.reg1.digitaloceanspaces.com/files-test/Screenshot-2023-12-13-at-15.57.30.png` resulted in a `403 Forbidden` response at /app/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113)"}