logoalt Hacker News

croteyesterday at 4:52 AM2 repliesview on HN

Isn't the whole signed request part a hard requirement for 3rd party access? S3 was originally designed for web use, which means giving not-fully-trusted browsers some access to your storage bucket.

You can't exactly do "this client is allowed to download this one specific file for the next 24 hours (but not use it like their personal CDN and share the link with everyone)" or "this client is allowed to upload a single image file up to 10MB (but not upload a 100GB copy of Friends)" with basic bearer tokens.


Replies

jkrejchayesterday at 4:43 PM

Aside from the fact that you can do this statelessly (you could stuff a JWT or moral equivalent in the header as a Bearer token), if you were okay with server-side state, you can have the token be related to a principal or have permissions in of itself.

eddythompson80yesterday at 5:03 AM

Of course you can do all that with a basic bearer token. It’s just a signed json object with an expiration