Skip to content

Commit a095449

Browse files
authored
Disable key-based storage account access in Bicep (#1518)
* Configure Azure Developer Pipeline * Configure Azure Developer Pipeline * Update pricing calculator link * Disable key access for our storage accounts
1 parent a2df481 commit a095449

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

app/backend/approaches/retrievethenread.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
from typing import Any, AsyncGenerator, Optional, Union
32

43
from azure.search.documents.aio import SearchClient
@@ -9,10 +8,6 @@
98
from core.authentication import AuthenticationHelper
109
from core.messagebuilder import MessageBuilder
1110

12-
# Replace these with your own values, either in environment variables or directly here
13-
AZURE_STORAGE_ACCOUNT = os.getenv("AZURE_STORAGE_ACCOUNT")
14-
AZURE_STORAGE_CONTAINER = os.getenv("AZURE_STORAGE_CONTAINER")
15-
1611

1712
class RetrieveThenReadApproach(Approach):
1813
"""

app/backend/approaches/retrievethenreadvision.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
from typing import Any, AsyncGenerator, Awaitable, Callable, Optional, Union
32

43
from azure.search.documents.aio import SearchClient
@@ -14,10 +13,6 @@
1413
from core.imageshelper import fetch_image
1514
from core.messagebuilder import MessageBuilder
1615

17-
# Replace these with your own values, either in environment variables or directly here
18-
AZURE_STORAGE_ACCOUNT = os.getenv("AZURE_STORAGE_ACCOUNT")
19-
AZURE_STORAGE_CONTAINER = os.getenv("AZURE_STORAGE_CONTAINER")
20-
2116

2217
class RetrieveThenReadVisionApproach(Approach):
2318
"""

infra/main.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ module storage 'core/storage/storage-account.bicep' = {
448448
location: storageResourceGroupLocation
449449
tags: tags
450450
allowBlobPublicAccess: false
451+
allowSharedKeyAccess: false
451452
publicNetworkAccess: 'Enabled'
452453
sku: {
453454
name: storageSkuName
@@ -473,6 +474,7 @@ module userStorage 'core/storage/storage-account.bicep' = if (useUserUpload) {
473474
location: storageResourceGroupLocation
474475
tags: tags
475476
allowBlobPublicAccess: false
477+
allowSharedKeyAccess: false
476478
publicNetworkAccess: 'Enabled'
477479
isHnsEnabled: true
478480
sku: {

0 commit comments

Comments
 (0)