Reputation: 1382
I am currently trying to use amazon s3 for uploading images from IOS app with a Rails Back-end.
I currently don't understand how security works. In their docs
http://docs.aws.amazon.com/mobile/sdkforios/developerguide/s3transfermanager.html
it's not clear to me how to upload/destroy safely objects in sync with the back-end. For instance, in order to post/destroy, I was expecting a mechanism of asking a signature to the Rails server, and only then be able to upload the image to amazon. But I can't find this kind of mechanism.
Has someone gone through this kind with aws?
Upvotes: 1
Views: 221
Reputation: 3759
If you are using your server to generate temporary credentials for the AWS Mobile SDK, we recommend the following approach:
AWSCredentialsProvider
. Take a look at the implementations of AWSWebIdentityCredentialsProvider
and AWSCognitoCredentialsProvider
as examples. This credentials provider should:
- refresh
is called.I encourage you to take a look at Amazon Cognito Identity. With Amazon Cognito, you can create unique end user identifiers for accessing AWS cloud services by using public login providers such as Amazon, Facebook, Google, and any OpenID Connect compatible provider, or by using your own user identity system. It covers many of the custom server use cases, and it is easier to use and manage.
Upvotes: 1