I am writing an API for an iOS app where the user's login with the Facebook API on iOS. The server validates the user against the token Facebook issues to the iOS user and issues a temporary Session Token. From this point, the user needs to download content that is stored in S3. This content only belongs to the user and a subset of his friends. This user can add more content to S3 which can be accessed by the same bunch of people. I guess it is similar to attaching a file to a Facebook group...
There are 2 ways a user can interact with S3... leave it to the server or get the server to issue a temporary S3 token (not sure of the possibilities here) and the user can hit upon the content URLs directly to S3.
So the questions:
- Is there a way to limit a user to access only some content on S3 when a temporary token is issued? How can I do this? Assume there's... say 100,000 or more users.
- Is it a good idea to let the iOS device pull this content out directly?
- Or should let the server control all content passing (this solves the security of course)? Does this mean I have to download all content to the server before handing it down to the connected users?
- If you know rails... can I use paperclip and aws-sdk gems to achieve this kinda setup?