Repository navigation
Update Azure DevOps feed permissions - #17270
Conversation
Grant the build promotion managed identity contributor access, limit build services to reader access, and rely on inherited administrator permissions. Co-authored-by: Copilot <[email protected]> Copilot-Session: 0be10439-8976-4cbe-a912-1ca4dc2fb611
There was a problem hiding this comment.
Pull request overview
Updates the default Azure DevOps Artifacts feed ACL seeding for newly created dnceng feeds so that the keyless build-promotion identity can push, while build service identities are reduced to read-only. This fits into Microsoft.DotNet.Build.Tasks.Feed as part of the feed provisioning logic used during publishing.
Changes:
- Adjust
dncengfeed permission roles: Build Service identities toreader, and explicitly grantmaestro-build-promotion-micontributor. - Remove the explicit Project Administrators permission grant (relying on inherited administration).
- Add a unit test asserting the expected ACL entries for both
publicandinternalprojects.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs | Updates the seeded AzDO feed permissions to include the WIF publishing identity and reduce Build Service access. |
| src/Microsoft.DotNet.Build.Tasks.Feed.Tests/AzureDevOpsArtifactFeedTests.cs | Adds coverage validating the exact seeded permission entries for dnceng feeds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (4)
src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs:46
- The inline comments for the two Build Service identities appear swapped: the GUID ending in
7ea9116e...was previously labeled "Project Collection Build Service" whileb55de4ed...was labeled "internal Build Service". Keeping the comments accurate helps avoid future ACL regressions.
// internal Build Service
new AzureDevOpsFeedPermission("Microsoft.TeamFoundation.ServiceIdentity;116cce53-b859-4624-9a95-934af41eccef:Build:7ea9116e-9fac-403d-b258-b31fcf1bb293", "reader"),
// Project Collection Build Service
new AzureDevOpsFeedPermission("Microsoft.TeamFoundation.ServiceIdentity;116cce53-b859-4624-9a95-934af41eccef:Build:b55de4ed-4b5a-4215-a8e4-0a0a5f71e7d8", "reader"),
src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs:49
- Typo in comment: "Project Collection value users" should be "Project Collection valid users" (matching the term used elsewhere in the doc comment).
// Project Collection value users (see class comment for info)
src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs:16
- The XML documentation tag is malformed (
<remarks>>). This can break XML doc processing (and can produce compiler warnings when docs are generated).
/// <remarks>>
/// When creating a new feed, we want to set up permissions based on the org and project.
/// Right now, only dnceng's public and internal projects are supported.
/// New feeds automatically get the feed administrators and project collection administrators as owners,
/// but we want to automatically add some additional permissions so that the publishing identity can push to them,
src/Microsoft.DotNet.Build.Tasks.Feed/src/AzureDevOpsArtifactFeed.cs:48
- The PR description's test command filters on
FullyQualifiedName~AzureDevOpsArtifactFeedTests, but there doesn't appear to be anyAzureDevOpsArtifactFeedTeststype in the repo. Either the testing instructions need updating, or the intended new tests aren't included in this change.
// maestro-build-promotion-mi
new AzureDevOpsFeedPermission("Microsoft.VisualStudio.Services.Claims.AadServicePrincipal;72f988bf-86f1-41af-91ab-2d7cd011db47\\2e3264a8-9ab9-408e-a29f-4de38d20b852", "contributor"),

Summary
maestro-build-promotion-micontributor access on newly-created dnceng feedsFixes #17269
Testing
eng/common/dotnet.ps1 test src/Microsoft.DotNet.Build.Tasks.Feed.Tests/Microsoft.DotNet.Build.Tasks.Feed.Tests.csproj --no-restore --configuration Debug --filter FullyQualifiedName~AzureDevOpsArtifactFeedTests --nologo