Skip to content

feat(doctor): detect missing OpenAI data-plane RBAC on Foundry resource#307

Merged
placerda merged 1 commit into
developfrom
feature/issue-228-doctor-rbac-openai-user
Jun 14, 2026
Merged

feat(doctor): detect missing OpenAI data-plane RBAC on Foundry resource#307
placerda merged 1 commit into
developfrom
feature/issue-228-doctor-rbac-openai-user

Conversation

@placerda

Copy link
Copy Markdown
Contributor

Closes #228

Adds a new security.missing_openai_data_plane_rbac check to agentops doctor that resolves the signed-in principal (via oid claim of the access token) and lists role assignments at the Foundry account scope using azure-mgmt-authorization. Surfaces a WARNING with an actionable az role assignment create command when none of:

  • Cognitive Services OpenAI User
  • Cognitive Services OpenAI Contributor
  • Cognitive Services Contributor

is granted (directly or inherited).

Validation

  • 18 new unit tests in tests/unit/test_agent_checks_rbac_openai_data_plane.py
  • Full suite: pytest tests/unit -x -q964 passed, 1 skipped

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

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>
@placerda placerda merged commit fc97981 into develop Jun 14, 2026
2 of 8 checks passed
@placerda placerda deleted the feature/issue-228-doctor-rbac-openai-user branch June 14, 2026 15:56
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.

1 participant