Question

How to secure a signed url for uploading to spaces.

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!


Submit an answer


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!

Sign In or Sign Up to Answer

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.

alexdo
Site Moderator
Site Moderator badge
January 22, 2024

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!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.