Say that I have an application that stores user resources in amazon s3. Let's say that this data is sensitive. I have a table in the database which has resource rows, each containing a url to the resource and a user_id that owns it.
If I am returning the url directly to the user, how can I guarantee that only that user will be able to access it from that session?
A similar question had an answer that used expiring urls, although if someone else also had the link within the expiry period, they could access it as well.
Is there a way that I can facilitate a direct cryptographic exchange between the client and the cloud storage provider where the resource exists? I want to be able to pass the client a link to the cloud resource and have only them be able to decrypt it in their browser at that moment only.