Skip to content

Commit 774d3d3

Browse files
authored
Enforce RBAC only for non-free search service (#1502)
* Configure Azure Developer Pipeline * Configure Azure Developer Pipeline * Update pricing calculator link * Enforce RBAC only for search service * Rm unneeded change * Remove it from main.bicep
1 parent 9e76dc3 commit 774d3d3

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

infra/core/search/search-services.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ resource search 'Microsoft.Search/searchServices@2021-04-01-preview' = {
4747
// The free tier does not support managed identity
4848
identity: searchIdentityProvider
4949
properties: {
50-
authOptions: authOptions
50+
authOptions: disableLocalAuth ? null : authOptions
5151
disableLocalAuth: disableLocalAuth
5252
disabledDataExfiltrationOptions: disabledDataExfiltrationOptions
5353
encryptionWithCmk: encryptionWithCmk

infra/main.bicep

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,7 @@ module searchService 'core/search/search-services.bicep' = {
418418
name: !empty(searchServiceName) ? searchServiceName : 'gptkb-${resourceToken}'
419419
location: !empty(searchServiceLocation) ? searchServiceLocation : location
420420
tags: tags
421-
authOptions: {
422-
aadOrApiKey: {
423-
aadAuthFailureMode: 'http401WithBearerChallenge'
424-
}
425-
}
421+
disableLocalAuth: !useSearchServiceKey
426422
sku: {
427423
name: searchServiceSkuName
428424
}

0 commit comments

Comments
 (0)