Skip to content

Commit

Permalink
Merged PR 1557: [CCv3]Set Blob access as private
Browse files Browse the repository at this point in the history
This PR is to set blob access level.

Changes include :-
- fix arm template to set allowBlobPublicAccess correctly
- upload blob with private access
- updating arm template root schema to latest

Verification done :-
- ARM Template tested ( only storage account verified ).
- Function tested with allowBlobPublicAccess as enabled and disabled.
- Migration from v2 to v3.
- Full ARM Template deployment
  • Loading branch information
Priyank Saxena committed Oct 28, 2020
1 parent 9511873 commit b248c48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Deployment/azuredeploy.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"baseResourceName": {
Expand Down Expand Up @@ -191,7 +191,7 @@
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2018-02-01",
"apiVersion": "2019-06-01",
"location": "[parameters('location')]",
"kind": "Storage",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ public async Task UploadActivityAsync(
CloudBlobContainer container = client.GetContainerReference(Common.Constants.BlobContainerName);
await container.CreateIfNotExistsAsync();

// Set the permissions so the blobs are public.
// Set the permissions so the blobs are private.
BlobContainerPermissions permissions = new BlobContainerPermissions
{
PublicAccess = BlobContainerPublicAccessType.Blob,
PublicAccess = BlobContainerPublicAccessType.Off,
};
await container.SetPermissionsAsync(permissions);
CloudBlockBlob blob = container.GetBlockBlobReference(uploadData.fileName);
Expand Down

0 comments on commit b248c48

Please sign in to comment.