Skip to content

Conversation

@eerhardt
Copy link
Member

@eerhardt eerhardt commented Jul 8, 2025

Description

The CognitiveServicesOpenAIContributor role is too permissive as it allows an app to modify deployments (i.e. models). Instead we should be defaulting to CognitiveServicesOpenAIUser which allows the app to do inference, but not modify the resources.

Checklist

The CognitiveServicesOpenAIContributor role is too permissive as it allows an app to modify deployments (i.e. models). Instead we should be defaulting to CognitiveServicesOpenAIUser which allows the app to do inference, but not modify the resources.
Copilot AI review requested due to automatic review settings July 8, 2025 23:26
@eerhardt eerhardt added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Jul 8, 2025
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jul 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Updates the default Azure OpenAI role assignment from Contributor to User, limiting permissions to inference only.

  • Change default built-in role in AddAzureOpenAI extension from Contributor to User
  • Update unit tests to expect the User role GUID
  • Modify sample Bicep module to assign the User role

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/Aspire.Hosting.Azure.Tests/AzureOpenAIExtensionsTests.cs Updated role resource and GUID in tests to use User instead of Contributor
src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIExtensions.cs Swapped default role assignment parameter to User
playground/OpenAIEndToEnd/OpenAIEndToEnd.AppHost/openai-roles.module.bicep Changed Bicep role assignment resource to use User role

@eerhardt eerhardt merged commit 742cda3 into dotnet:main Jul 9, 2025
252 checks passed
@eerhardt eerhardt deleted the FixOpenAIDefaultRole branch July 9, 2025 14:18
@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages breaking-change Issue or PR that represents a breaking API or functional change over a prerelease.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants