Skip to content

Commit

Permalink
chore: disable local auth for azure openai
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Apr 23, 2024
1 parent 8fe7be6 commit 065af86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions infra/core/ai/cognitiveservices.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ param publicNetworkAccess string = 'Enabled'
param sku object = {
name: 'S0'
}
param disableLocalAuth bool = false

param allowedIpRules array = []
param networkAcls object = empty(allowedIpRules) ? {
Expand All @@ -30,6 +31,7 @@ resource account 'Microsoft.CognitiveServices/accounts@2023-05-01' = {
customSubDomainName: customSubDomainName
publicNetworkAccess: publicNetworkAccess
networkAcls: networkAcls
disableLocalAuth: disableLocalAuth

Check failure

Code scanning / templateanalyzer

Use identity-based authentication for Cognitive Services accounts. Error

To send requests to Cognitive Services endpoints, each request must include an authentication header. Cognitive Services endpoints supports authentication with keys or tokens. Using an Azure AD token instead of a cryptographic key has some additional security benefits.
With Azure AD authentication, the identity is validated against Azure AD identity provider. Using Azure AD identities centralizes identity management and auditing.
Once you decide to use Azure AD authentication, you can disable authentication using keys.
}
sku: sku
}
Expand Down
1 change: 1 addition & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ module openAi 'core/ai/cognitiveservices.bicep' = {
sku: {
name: openAiSkuName
}
disableLocalAuth: true
deployments: [
{
name: chatGptDeploymentName
Expand Down

0 comments on commit 065af86

Please sign in to comment.