Skip to content

Commit

Permalink
Disable key-based storage account access in Bicep (Azure-Samples#1518)
Browse files Browse the repository at this point in the history
* Configure Azure Developer Pipeline

* Configure Azure Developer Pipeline

* Update pricing calculator link

* Disable key access for our storage accounts
  • Loading branch information
pamelafox authored Apr 11, 2024
1 parent a2df481 commit a095449
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
5 changes: 0 additions & 5 deletions app/backend/approaches/retrievethenread.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from typing import Any, AsyncGenerator, Optional, Union

from azure.search.documents.aio import SearchClient
Expand All @@ -9,10 +8,6 @@
from core.authentication import AuthenticationHelper
from core.messagebuilder import MessageBuilder

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


class RetrieveThenReadApproach(Approach):
"""
Expand Down
5 changes: 0 additions & 5 deletions app/backend/approaches/retrievethenreadvision.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from typing import Any, AsyncGenerator, Awaitable, Callable, Optional, Union

from azure.search.documents.aio import SearchClient
Expand All @@ -14,10 +13,6 @@
from core.imageshelper import fetch_image
from core.messagebuilder import MessageBuilder

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


class RetrieveThenReadVisionApproach(Approach):
"""
Expand Down
2 changes: 2 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ module storage 'core/storage/storage-account.bicep' = {
location: storageResourceGroupLocation
tags: tags
allowBlobPublicAccess: false
allowSharedKeyAccess: false
publicNetworkAccess: 'Enabled'
sku: {
name: storageSkuName
Expand All @@ -473,6 +474,7 @@ module userStorage 'core/storage/storage-account.bicep' = if (useUserUpload) {
location: storageResourceGroupLocation
tags: tags
allowBlobPublicAccess: false
allowSharedKeyAccess: false
publicNetworkAccess: 'Enabled'
isHnsEnabled: true
sku: {
Expand Down

0 comments on commit a095449

Please sign in to comment.