Deploy C# client application (S3) with Amazon AWS secret key?
I've written my hello world AWS program today - simple file upload to a premade S3 bucket.
In the context of this program deployed to a clie开发者_运维技巧nt desktop (for arguments sake), is my Secret Access Key safe?
using (AmazonS3Client a = new AmazonS3Client("MyAccessKey", "MySecretAccessKey"))
{
foreach (ListViewItem lvi in listView1.Items)
{
TransferUtilityUploadRequest tr = new TransferUtilityUploadRequest()
.WithBucketName("test_mydomain_com")
.WithFilePath(((FileInfo)lvi.Tag).FullName)
.WithTimeout(5 * 60 * 1000);
TransferUtility tu = new TransferUtility(a);
tu.Upload(tr);
MessageBox.Show("Win!");
}
}
In short, no - not really. See this question Storing My Amazon Credentials in C# Desktop App which expands on why and what you can do about it.
精彩评论