Amazon has an AWS SDK for iOS, along with several sample apps. In their samples, they put the API credentials in a Constants.h
file:
// Constants used to represent your AWS Credentials.
#define ACCESS_KEY_ID @"CHANGE ME"
#define SECRET_KEY @"CHANGE ME"
My concern is that these can be extracted by a determined hacker. Is there any way to securely include API keys in an app?
The one option I've seen is to include a server of my own as a go-between: the app talks to my server, my server talks to S3. I can see the value in doing this, but one is still presented with the problem: do I allow the app to make API calls on my server without any kind of authentication? Including my own API key in the app has the same problem as including AWS API keys.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…