Report this

What is the reason for this report?

How to secure a signed url for uploading to spaces.

Posted on January 18, 2024

In my backend I create a signed url that the client uses for uploading directly to the storage.

I setup content-type and content-length by validating the request, but such parameters are then ignored when proceeding with the upload to the storage. I tried generating the url with one file then switching file and the upload still works fine.

I am worried of security issues with someone using a signed url to upload thousands of files or very large files. How likely is this to happen?

Thanks for your help!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya, @50e0782ec2a94d689f2ac4589feb74

Pre-signed URLs only offer temporary access for unauthorized users and eventually expire.

When generating a pre-signed URL, you can set the following parameters:

  • Bucket – bucket containing or will be containing the object
  • Key – object’s name
  • Expires – amount of time the URL is valid

You can ensure that the signed URLs have a limited expiration time. By setting a short expiration time, you reduce the window of opportunity for malicious activities.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.