From 71db9a4726f2f04a76cf5edbb124c7aa954d8b1c Mon Sep 17 00:00:00 2001 From: Lyle Xu Date: Mon, 22 Apr 2024 09:50:08 +0800 Subject: [PATCH] disable local auth for service bus and cosmos db --- Environments/AKS-Store-Demo/app/servicebus.bicep | 3 +++ .../AKS-Store-Demo/core/database/cosmos/cosmos-account.bicep | 1 + Environments/AKS/core/database/cosmos/cosmos-account.bicep | 1 + Environments/APIM/core/database/cosmos/cosmos-account.bicep | 1 + .../core/database/cosmos/cosmos-account.bicep | 1 + .../core/database/cosmos/cosmos-account.bicep | 1 + .../ContainerApp/core/database/cosmos/cosmos-account.bicep | 1 + .../core/database/cosmos/cosmos-account.bicep | 1 + .../core/database/cosmos/cosmos-account.bicep | 1 + .../core/database/cosmos/cosmos-account.bicep | 1 + .../StaticWeb/core/database/cosmos/cosmos-account.bicep | 1 + .../Todo-Mongo-ACA/core/database/cosmos/cosmos-account.bicep | 1 + .../Todo-Mongo-AKS/core/database/cosmos/cosmos-account.bicep | 1 + .../core/database/cosmos/cosmos-account.bicep | 1 + .../core/database/cosmos/cosmos-account.bicep | 1 + .../Todo-Shared-AKS/core/database/cosmos/cosmos-account.bicep | 1 + 16 files changed, 18 insertions(+) diff --git a/Environments/AKS-Store-Demo/app/servicebus.bicep b/Environments/AKS-Store-Demo/app/servicebus.bicep index 778485d4..b940c47b 100644 --- a/Environments/AKS-Store-Demo/app/servicebus.bicep +++ b/Environments/AKS-Store-Demo/app/servicebus.bicep @@ -14,6 +14,9 @@ resource serviceBusNamespace 'Microsoft.ServiceBus/namespaces@2022-01-01-preview sku: { name: 'Standard' } + properties: { + disableLocalAuth: true + } } // Service Bus Namespace Authorization Rule diff --git a/Environments/AKS-Store-Demo/core/database/cosmos/cosmos-account.bicep b/Environments/AKS-Store-Demo/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/AKS-Store-Demo/core/database/cosmos/cosmos-account.bicep +++ b/Environments/AKS-Store-Demo/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/AKS/core/database/cosmos/cosmos-account.bicep b/Environments/AKS/core/database/cosmos/cosmos-account.bicep index 6bc1f2eb..e77ee4b8 100644 --- a/Environments/AKS/core/database/cosmos/cosmos-account.bicep +++ b/Environments/AKS/core/database/cosmos/cosmos-account.bicep @@ -27,6 +27,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.0' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/APIM/core/database/cosmos/cosmos-account.bicep b/Environments/APIM/core/database/cosmos/cosmos-account.bicep index 6bc1f2eb..e77ee4b8 100644 --- a/Environments/APIM/core/database/cosmos/cosmos-account.bicep +++ b/Environments/APIM/core/database/cosmos/cosmos-account.bicep @@ -27,6 +27,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.0' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/App-Base-WebApp-ACA/core/database/cosmos/cosmos-account.bicep b/Environments/App-Base-WebApp-ACA/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/App-Base-WebApp-ACA/core/database/cosmos/cosmos-account.bicep +++ b/Environments/App-Base-WebApp-ACA/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/App-Base-WebApp-AKS/core/database/cosmos/cosmos-account.bicep b/Environments/App-Base-WebApp-AKS/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/App-Base-WebApp-AKS/core/database/cosmos/cosmos-account.bicep +++ b/Environments/App-Base-WebApp-AKS/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/ContainerApp/core/database/cosmos/cosmos-account.bicep b/Environments/ContainerApp/core/database/cosmos/cosmos-account.bicep index 6bc1f2eb..e77ee4b8 100644 --- a/Environments/ContainerApp/core/database/cosmos/cosmos-account.bicep +++ b/Environments/ContainerApp/core/database/cosmos/cosmos-account.bicep @@ -27,6 +27,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.0' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/Contoso-Base-Shared-AKS-Dev/core/database/cosmos/cosmos-account.bicep b/Environments/Contoso-Base-Shared-AKS-Dev/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/Contoso-Base-Shared-AKS-Dev/core/database/cosmos/cosmos-account.bicep +++ b/Environments/Contoso-Base-Shared-AKS-Dev/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/Contoso-Base-Shared-AKS-Prod/core/database/cosmos/cosmos-account.bicep b/Environments/Contoso-Base-Shared-AKS-Prod/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/Contoso-Base-Shared-AKS-Prod/core/database/cosmos/cosmos-account.bicep +++ b/Environments/Contoso-Base-Shared-AKS-Prod/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/Contoso-Base-Shared-AKS-Test/core/database/cosmos/cosmos-account.bicep b/Environments/Contoso-Base-Shared-AKS-Test/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/Contoso-Base-Shared-AKS-Test/core/database/cosmos/cosmos-account.bicep +++ b/Environments/Contoso-Base-Shared-AKS-Test/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/StaticWeb/core/database/cosmos/cosmos-account.bicep b/Environments/StaticWeb/core/database/cosmos/cosmos-account.bicep index 6bc1f2eb..e77ee4b8 100644 --- a/Environments/StaticWeb/core/database/cosmos/cosmos-account.bicep +++ b/Environments/StaticWeb/core/database/cosmos/cosmos-account.bicep @@ -27,6 +27,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.0' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/Todo-Mongo-ACA/core/database/cosmos/cosmos-account.bicep b/Environments/Todo-Mongo-ACA/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/Todo-Mongo-ACA/core/database/cosmos/cosmos-account.bicep +++ b/Environments/Todo-Mongo-ACA/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/Todo-Mongo-AKS/core/database/cosmos/cosmos-account.bicep b/Environments/Todo-Mongo-AKS/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/Todo-Mongo-AKS/core/database/cosmos/cosmos-account.bicep +++ b/Environments/Todo-Mongo-AKS/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/Todo-Nodejs-Mongo-ACA/core/database/cosmos/cosmos-account.bicep b/Environments/Todo-Nodejs-Mongo-ACA/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/Todo-Nodejs-Mongo-ACA/core/database/cosmos/cosmos-account.bicep +++ b/Environments/Todo-Nodejs-Mongo-ACA/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/Todo-Nodejs-Mongo-AKS/core/database/cosmos/cosmos-account.bicep b/Environments/Todo-Nodejs-Mongo-AKS/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/Todo-Nodejs-Mongo-AKS/core/database/cosmos/cosmos-account.bicep +++ b/Environments/Todo-Nodejs-Mongo-AKS/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } } diff --git a/Environments/Todo-Shared-AKS/core/database/cosmos/cosmos-account.bicep b/Environments/Todo-Shared-AKS/core/database/cosmos/cosmos-account.bicep index 6f8747f5..a742d875 100644 --- a/Environments/Todo-Shared-AKS/core/database/cosmos/cosmos-account.bicep +++ b/Environments/Todo-Shared-AKS/core/database/cosmos/cosmos-account.bicep @@ -28,6 +28,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = { enableMultipleWriteLocations: false apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} capabilities: [ { name: 'EnableServerless' } ] + disableLocalAuth: true } }