feat(doctor): detect missing OpenAI data-plane RBAC on Foundry resource#307
Merged
Merged
Conversation
Adds a new `security.missing_openai_data_plane_rbac` check to `agentops doctor` that resolves the signed-in principal from the access token `oid` claim and lists role assignments at the Foundry account scope using `azure-mgmt-authorization`. When none of *Cognitive Services OpenAI User*, *Cognitive Services OpenAI Contributor* or *Cognitive Services Contributor* is present (directly or inherited), Doctor surfaces a WARNING with an actionable `az role assignment create` command pre-populated with the principal object id and Foundry account scope. The check is read-only and skips silently when the SDK, principal or scope cannot be resolved, matching the existing Doctor fail-open pattern. Closes #228 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 14, 2026
Merged
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.
Closes #228
Adds a new security.missing_openai_data_plane_rbac check to
agentops doctorthat resolves the signed-in principal (viaoidclaim of the access token) and lists role assignments at the Foundry account scope usingazure-mgmt-authorization. Surfaces a WARNING with an actionableaz role assignment createcommand when none of:is granted (directly or inherited).
Validation
tests/unit/test_agent_checks_rbac_openai_data_plane.pypytest tests/unit -x -q→ 964 passed, 1 skippedCo-authored-by: Copilot 223556219+Copilot@users.noreply.github.com