Per-agent identity RBAC and developer pre-flight checks#7651
Merged
trangevi merged 6 commits intoAzure:mainfrom Apr 10, 2026
Merged
Per-agent identity RBAC and developer pre-flight checks#7651trangevi merged 6 commits intoAzure:mainfrom
trangevi merged 6 commits intoAzure:mainfrom
Conversation
…ts and enhance agent identity RBAC management. Fixes Azure#7637
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the azure.ai.agents extension’s RBAC handling to use per-agent identities (instead of a shared project identity) and adds a pre-deploy developer permission check for hosted agent deployments, with an opt-out flag for CI/CD scenarios.
Changes:
- Adds a developer RBAC pre-flight check to validate Foundry Project and ACR permissions before deploying hosted agents.
- Switches post-deploy RBAC assignment from a single shared identity to per-agent identities, scoped to the Foundry Project.
- Introduces
AZD_AGENT_SKIP_ROLE_ASSIGNMENTSto skip both the pre-flight checks and post-deploy role assignments.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/extensions/azure.ai.agents/internal/project/developer_rbac_check.go | Implements developer RBAC pre-flight checks for Foundry Project + ACR permissions. |
| cli/azd/extensions/azure.ai.agents/internal/project/developer_rbac_check_test.go | Adds unit tests around role constants/lists and ACR login server normalization behavior. |
| cli/azd/extensions/azure.ai.agents/internal/project/agent_identity_rbac.go | Updates RBAC assignment to per-agent identities and adds the skip mechanism. |
| cli/azd/extensions/azure.ai.agents/internal/project/agent_identity_rbac_test.go | Updates tests for per-agent identity naming, project scope parsing, and skip flag parsing. |
| cli/azd/extensions/azure.ai.agents/internal/exterrors/codes.go | Adds new structured error codes for RBAC-related failures. |
| cli/azd/extensions/azure.ai.agents/internal/cmd/listen.go | Runs developer pre-flight checks in predeploy and performs per-agent RBAC setup in postdeploy. |
cli/azd/extensions/azure.ai.agents/internal/project/developer_rbac_check_test.go
Outdated
Show resolved
Hide resolved
cli/azd/extensions/azure.ai.agents/internal/project/developer_rbac_check.go
Outdated
Show resolved
Hide resolved
cli/azd/extensions/azure.ai.agents/internal/project/developer_rbac_check.go
Outdated
Show resolved
Hide resolved
cli/azd/extensions/azure.ai.agents/internal/project/developer_rbac_check.go
Show resolved
Hide resolved
trangevi
approved these changes
Apr 10, 2026
cli/azd/extensions/azure.ai.agents/internal/project/developer_rbac_check.go
Show resolved
Hide resolved
jongio
reviewed
Apr 10, 2026
cli/azd/extensions/azure.ai.agents/internal/project/agent_identity_rbac.go
Outdated
Show resolved
Hide resolved
trangevi
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7637
Switches agent identity RBAC from the shared project-level identity to per-agent identities, adds developer RBAC pre-flight checks before deploy, and provides an opt-out mechanism for CI/CD.
Changes
Per-agent identity RBAC (postdeploy)
Developer RBAC pre-flight checks (predeploy)
Skip mechanism