Skip to content

Commit aba6f20

Browse files
committed
Create 2020-07-01-2020-07-01-blob-malware-scanning.md
1 parent 15f862a commit aba6f20

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: post
3+
published: false
4+
title: 2020-07-01-blob-malware-scanning
5+
date: '2020-07-01'
6+
---
7+
## Malware scanner for secure upload of Blobs to Azure Storage
8+
9+
### Problem statement
10+
Users can upload files to Azure blob storage for others to download.
11+
12+
We don't want the files downloaded to contain Malware.
13+
14+
### Solution
15+
![Diagram of storage, web app, vm]({{site.baseurl}}/img/blob-upload-malware2.png)
16+
1. User uploads a file to a web app
17+
1. Web app stores upload in container (named **quarantine**)
18+
1. Web app adds message to queue to request scan in [Azure Storage Queue](https://docs.microsoft.com/en-us/azure/storage/queues/storage-dotnet-how-to-use-queues?tabs=dotnet)
19+
1. VM reads message and download file
20+
1. VM scans for malware
21+
1. A malware check is completed and either
22+
- If malware is found the file is moved to a container (named **malwarefound**) and deletes from quarantine
23+
- If file scan is OK then the file is moved to a container (named **scannedok**) and deletes from quarantine
24+
1. Users of the application request download to web app
25+
1. web app returns file from **ScannedOK** container
26+
27+
> Note: VM uses Managed Identity and KeyVault Policy to connect to KeyVault and request queue connection string and SAS tokens enabling read/write from containers
28+
29+
30+
Source code link goes here

0 commit comments

Comments
 (0)