Ajit Goel
Ajit Goel

Reputation: 4418

Integration of Desktop application with AWS S3: Security best practices

We are working on a desktop application which will allow any internet user to transcribe upload large audio\video files to AWS S3 and transcribe it using AWS Transcribe. The plan is to write a lambda function to process payment, once the file is successfully transcribed. We want to avoid writing custom API gateway endpoints to process these files and integrate with Amazon S3 in our custom API gateway endpoints. We could obfuscate the AWS S3 AWSAccessKey and AWSSecretKey in the desktop application(when integrating AWS S3 with the desktop application), but I am not sure if this is a security best practice.

What would be the security best practices that we need to consider (in our desktop application integration with AWS S3) so we are not a "sitting duck" for all the bad actors in the world? The desktop application is being build in .Net Core Blazor 6.0, if that matters.

Upvotes: 0

Views: 464

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 270089

The normal process would be:

  • The desktop app authenticates with your back-end (which controls billing and access)
  • The back-end responds with a set of temporary credentials created by AWS Security Token Service (AWS STS)
  • The desktop app uses those credentials to communicate directly with AWS services

When generating the temporary credentials with AWS STS, the back-end can specify:

  • Permissions to grant (eg just Amazon Transcribe and enough permission to upload/download their files to S3)
  • Duration of the temporary credentials (after which they need to re-authenticate with your back-end)

The down-side is that the back-end has no knowledge of what requests were submitted to AWS. This would make billing challenging, since it would need to crawl CloudTrail logs to identify what they did. The StartTranscriptionJob() API call does not have any condition keys to force the provision of tags, which would have made this easier.

It is relatively safe from a security standpoint since the app only has limited permissions for a limited duration (but there is no control on how many times requests are made within those limitations).

An alternative approach is for the desktop app to call your back-end via an API, passing through the work to be done. The back-end would then submit the job on behalf of the desktop app, thereby tracking usage and having more control over what the app can do, such as limiting the number of requests.

Upvotes: 1

Related Questions