Skip to content

Update Azure DevOps feed permissions - #17270

Merged
mmitche merged 2 commits into
dotnet:mainfrom
mmitche:mmitche/fix-build-promotion-feed-permissions
Aug 6, 2026
Merged

mmitche merged 2 commits into
dotnet:mainfrom
mmitche:mmitche/fix-build-promotion-feed-permissions

Conversation

@mmitche

@mmitche mmitche commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • explicitly grant maestro-build-promotion-mi contributor access on newly-created dnceng feeds
  • reduce the project and project collection Build Service identities to reader access
  • remove the explicit Project Administrators grant and rely on inherited feed administration
  • add focused coverage for public and internal feed ACLs

Fixes #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

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
Copilot AI review requested due to automatic review settings August 6, 2026 14:42
akoeplinger
akoeplinger previously approved these changes Aug 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 dnceng feed permission roles: Build Service identities to reader, and explicitly grant maestro-build-promotion-mi contributor.
  • Remove the explicit Project Administrators permission grant (relying on inherited administration).
  • Add a unit test asserting the expected ACL entries for both public and internal projects.

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.

Copilot AI review requested due to automatic review settings August 6, 2026 14:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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" while b55de4ed... 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 any AzureDevOpsArtifactFeedTests type 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"),

@missymessa missymessa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM shipit

@mmitche
mmitche enabled auto-merge (squash) August 6, 2026 15:07
@mmitche
mmitche merged commit 78231a3 into dotnet:main Aug 6, 2026
9 of 12 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keyless Build Promotion fails to publish to newly-created AzDO feeds

4 participants