-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new feature to integrate azure services using managed identities #442
base: main
Are you sure you want to change the base?
Added new feature to integrate azure services using managed identities #442
Conversation
Hey there @thivy @davidxw , |
Hi, any updates on this? I would really like to use this solution with managed identities. Thank you in advance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 13 changed files in this pull request and generated no suggestions.
Files not reviewed (7)
- infra/main.bicep: Language not supported
- infra/main.json: Language not supported
- infra/resources.bicep: Language not supported
- src/package.json: Language not supported
- src/features/common/services/document-intelligence.ts: Evaluated as low risk
- src/features/common/services/openai.ts: Evaluated as low risk
- src/features/chat-page/chat-services/chat-document-service.ts: Evaluated as low risk
Comments skipped due to low confidence (2)
src/features/common/services/ai-search.ts:24
- Rename function to follow camelCase convention: getCredential.
export const GetCredential = () => {
src/features/common/services/azure-storage.ts:20
- [nitpick] The error message should specify the exact environment variable name, e.g., "AZURE_STORAGE_ACCOUNT_NAME or AZURE_STORAGE_ACCOUNT_KEY environment variable is not set".
throw new Error("Azure Storage Account not configured correctly, check environment variables.");
Hey @FreddyAyala thanks so much for the work you've put into this PR, it looks great.
|
@@ -889,7 +940,8 @@ | |||
"kind": "OpenAI", | |||
"properties": { | |||
"customSubDomainName": "[variables('openai_dalle_name')]", | |||
"publicNetworkAccess": "Enabled" | |||
"publicNetworkAccess": "Enabled", |
Check failure
Code scanning / templateanalyzer
Restrict Cognitive Service endpoints. Error
Configure service endpoints and private links where appropriate.
@@ -889,7 +940,8 @@ | |||
"kind": "OpenAI", | |||
"properties": { | |||
"customSubDomainName": "[variables('openai_dalle_name')]", | |||
"publicNetworkAccess": "Enabled" | |||
"publicNetworkAccess": "Enabled", |
Check failure
Code scanning / templateanalyzer
Use Cognitive Service Private Endpoints. Error
Data exfiltration is an attack where an malicious actor does an unauthorized data transfer. Private Endpoints help prevent data exfiltration by an internal or external malicious actor. They do this by providing clear separation between public and private endpoints. As a result, broad access to public endpoints which could be operated by a malicious actor are not required.
@@ -889,7 +940,8 @@ | |||
"kind": "OpenAI", | |||
"properties": { | |||
"customSubDomainName": "[variables('openai_dalle_name')]", | |||
"publicNetworkAccess": "Enabled" | |||
"publicNetworkAccess": "Enabled", | |||
"disableLocalAuth": "[parameters('disableLocalAuth')]" |
Check failure
Code scanning / templateanalyzer
Use identity-based authentication for Cognitive Services accounts. Error
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.
@@ -917,7 +969,169 @@ | |||
"location": "[parameters('location')]", | |||
"tags": "[parameters('tags')]", | |||
"kind": "StorageV2", | |||
"sku": "[parameters('storageServiceSku')]" | |||
"sku": "[parameters('storageServiceSku')]", | |||
"properties": { |
Check failure
Code scanning / templateanalyzer
Configure Azure Storage firewall. Error
After changing the default action from Allow to Deny, configure one or more rules to allow traffic. Traffic can be allowed from: Azure services on the trusted service list. IP address or CIDR range. Private endpoint connections. Azure virtual network subnets with a Service Endpoint.
@@ -917,7 +969,169 @@ | |||
"location": "[parameters('location')]", | |||
"tags": "[parameters('tags')]", | |||
"kind": "StorageV2", | |||
"sku": "[parameters('storageServiceSku')]" | |||
"sku": "[parameters('storageServiceSku')]", | |||
"properties": { |
Check failure
Code scanning / templateanalyzer
Storage Account minimum TLS version. Error
Storage Accounts lets you disable outdated protocols and enforce TLS 1.2. By default, TLS 1.0, TLS 1.1, and TLS 1.2 is accepted.
@@ -917,7 +969,169 @@ | |||
"location": "[parameters('location')]", | |||
"tags": "[parameters('tags')]", | |||
"kind": "StorageV2", | |||
"sku": "[parameters('storageServiceSku')]" | |||
"sku": "[parameters('storageServiceSku')]", | |||
"properties": { |
Check failure
Code scanning / templateanalyzer
Disallow anonymous access to blob service. Error
Anonymous access to blobs or containers can be restricted by setting allowBlobPublicAccess to false. This enhanced security setting for a storage account overrides the individual settings for blob containers. When you disallow public access for a storage account, blobs are no longer accessible anonymously.
@@ -463,6 +474,7 @@ | |||
properties: { | |||
customSubDomainName: openai_dalle_name | |||
publicNetworkAccess: 'Enabled' | |||
disableLocalAuth: disableLocalAuth |
Check failure
Code scanning / templateanalyzer
Use identity-based authentication for Cognitive Services accounts. Error
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.
@@ -506,6 +519,9 @@ | |||
tags: tags | |||
kind: 'StorageV2' | |||
sku: storageServiceSku | |||
properties:{ |
Check failure
Code scanning / templateanalyzer
Configure Azure Storage firewall. Error
After changing the default action from Allow to Deny, configure one or more rules to allow traffic. Traffic can be allowed from: Azure services on the trusted service list. IP address or CIDR range. Private endpoint connections. Azure virtual network subnets with a Service Endpoint.
@@ -506,6 +519,9 @@ | |||
tags: tags | |||
kind: 'StorageV2' | |||
sku: storageServiceSku | |||
properties:{ |
Check failure
Code scanning / templateanalyzer
Storage Account minimum TLS version. Error
Storage Accounts lets you disable outdated protocols and enforce TLS 1.2. By default, TLS 1.0, TLS 1.1, and TLS 1.2 is accepted.
@@ -506,6 +519,9 @@ | |||
tags: tags | |||
kind: 'StorageV2' | |||
sku: storageServiceSku | |||
properties:{ |
Check failure
Code scanning / templateanalyzer
Disallow anonymous access to blob service. Error
Anonymous access to blobs or containers can be restricted by setting allowBlobPublicAccess to false. This enhanced security setting for a storage account overrides the individual settings for blob containers. When you disallow public access for a storage account, blobs are no longer accessible anonymously.
@thivy @davidxw @FreddyAyala this PR is now ready for your review and testing! Thanks so much Freddy for the original work you did on this one. |
This pull request introduces:
add_localdev_roles.ps1
helper script - add the required RBAC roles to the locally logged-in user to enable local dev.appreg_setup.ps1
- automated creation of the App Registration in Entra and updates the web app too.Documentation Updates:
docs/10.managed-identities.md
README.md
Infrastructure Updates:
disableLocalAuth
ininfra/main.bicep
to toggle authentication by key, enforcing RBAC using Managed Identities. (infra/main.bicep
) [1] [2]infra/main.json
to include thedisableLocalAuth
parameter and its usage across various Azure services configurations. (infra/main.json
) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]Deployment Configuration:
azd
environment (/.azure/<env_name>/.env
) this enables developers (or Copilot) to copy most of the values directly into.env.local
disableLocalAuth
is set totrue
for using Managed Identities and updated environment variables accordingly. (infra/main.json
) [1] [2]These changes collectively enhance the security posture of the Azure Chat deployment by leveraging Managed Identities, while also simplifying secret management and access control.
Code changes:
New Scripts:
add_localdev_roles.ps1
- adds the required RBAC roles to the locally logged-in user to enable local devappreg_setup.ps1
- automated creation of the App Registration