Skip to content

feat(rbac): add tools.execute permission to team-scoped viewer role#3882

Open
kimsehwan96 wants to merge 1 commit intoIBM:mainfrom
kimsehwan96:feat/viewer-tools-execute
Open

feat(rbac): add tools.execute permission to team-scoped viewer role#3882
kimsehwan96 wants to merge 1 commit intoIBM:mainfrom
kimsehwan96:feat/viewer-tools-execute

Conversation

@kimsehwan96
Copy link
Copy Markdown
Contributor

🔗 Related Issue

Closes #3881


📝 Summary

Add tools.execute permission to the team-scoped viewer role so team members can invoke MCP tools without requiring the developer role (which also grants create/update/delete permissions). platform_viewer (global) is not modified.


🏷️ Type of Change

  • Bug fix
  • Feature / Enhancement
  • Documentation
  • Refactor
  • Chore (deps, CI, tooling)
  • Other (describe below)

🧪 Verification

Check Command Status
Lint suite make lint pass
Unit tests make test pass
Coverage ≥ 80% make coverage pass

I also checked e2e / playwright test in local environment.


✅ Checklist

  • Code formatted (make black isort pre-commit)
  • Tests added/updated for changes
  • Documentation updated (if applicable)
  • No secrets or credentials committed

📓 Notes (optional)

Allow team members with the viewer role to execute MCP tools within
their team scope without requiring the developer role, which also
grants mutation permissions (create/update/delete).

platform_viewer (global, auto-assigned) is intentionally not modified.

Signed-off-by: kimsehwan96 <sktpghks138@gmail.com>
@crivetimihai crivetimihai added enhancement New feature or request SHOULD P2: Important but not vital; high-value items that are not crucial for the immediate release rbac Role-based Access Control security Improves security labels Mar 29, 2026
@crivetimihai crivetimihai added this to the Release 1.0.0 milestone Mar 29, 2026
@crivetimihai
Copy link
Copy Markdown
Member

Thanks @kimsehwan96 — this addresses #3878 cleanly. One concern: the viewer role is documented as read-only in CLAUDE.md and docs/docs/manage/rbac.md. Adding tools.execute changes the security model for all deployments. Consider:

  1. Should this be a new role (e.g., executor) instead of modifying viewer?
  2. If modifying viewer is the right call, the docs need updating.
  3. DCO Signed-off-by line is required.

What are your thoughts?

@kimsehwan96
Copy link
Copy Markdown
Contributor Author

kimsehwan96 commented Mar 29, 2026

@crivetimihai Thanks, good point.

Docs update: Both docs/docs/manage/rbac.md and CLAUDE.md are already updated in this PR — the viewer role table includestools.execute.
DCO Signed-off-by: Already present in the commit, and the DCO check is passing

I still think there's a reasonable argument for viewer having tools.execute — most MCP tools carry their own auth (OAuth, etc.), so the gateway-level restriction can feel like double-gating. But I understand the concern about breaking the read-only contract across all deployments.

What's your take — would you prefer keeping viewer strictly read-only, or is there room to reconsider?

If you'd rather keep it as-is, I can close this PR.

Copy link
Copy Markdown
Collaborator

@marekdano marekdano left a comment

Choose a reason for hiding this comment

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

Summary

This PR addresses issue #3881 by adding tools.execute permission to the team-scoped viewer role. This enables team members to execute MCP tools without requiring the developer role, which grants full CRUD permissions.


✅ Technical Implementation: Excellent

✅ Security Model: Correct Design

This is a least-privilege security enhancement, not a breaking change. Here's why:

Context from Issue #3881

PR #3390 added servers.use to viewer roles, allowing them to connect to Virtual Servers. However, without tools.execute, this permission was effectively useless for MCP workflows. The only alternative was granting the developer role, which includes full CRUD permissions—creating unnecessary operational risk.

This PR's Approach

  • Team-scoped only: viewer (team members) gains tools.execute
  • Global unchanged: platform_viewer (auto-assigned, no team membership) remains read-only
  • Visibility filtering enforced: Team viewers can only execute:
    • Own team's tools ✅
    • Public tools ✅
    • NOT other teams' private tools (blocked by Layer 1 scoping) ❌

Operational Benefits

  • Prevents forcing admins to grant developer role just for tool execution
  • Reduces risk of accidental configuration changes
  • Enables safe MCP tool usage for team members
  • Addresses real multi-team deployment needs

✅ Test Coverage: Comprehensive

Updated tests verify:

  • Team-scoped viewer can execute tools via /rpc tools/call
  • Cookie-based session tokens work correctly ✅
  • Cross-team isolation maintained (Layer 1 scoping) ✅
  • Permission matrix tests updated ✅
  • E2E MCP RBAC transport tests updated ✅

📝 Minor Suggestion

Consider adding a note in CHANGELOG.md for release notes:

### Enhanced
- **RBAC:** Added `tools.execute` permission to team-scoped `viewer` role, enabling team members to execute MCP tools without requiring `developer` role (which grants full CRUD permissions). Addresses #3881. `platform_viewer` (global scope) remains read-only.

Otherwise LGTM 🚀

@marekdano marekdano added the release-fix Critical bugfix required for the release label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request rbac Role-based Access Control release-fix Critical bugfix required for the release security Improves security SHOULD P2: Important but not vital; high-value items that are not crucial for the immediate release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE][AUTH]: Add tools.execute to team-scoped viewer role

3 participants