Skip to content

feat(ui): add admin UI for RBAC/ABAC policy engine#3810

Open
WilliamChen000 wants to merge 4 commits intoIBM:mainfrom
WilliamChen000:feature/issue-2019-policy-engine-phase3
Open

feat(ui): add admin UI for RBAC/ABAC policy engine#3810
WilliamChen000 wants to merge 4 commits intoIBM:mainfrom
WilliamChen000:feature/issue-2019-policy-engine-phase3

Conversation

@WilliamChen000
Copy link
Copy Markdown

🔗 Related Issue

Closes #2019(Phase3)


📝 Summary

Implements Phase 3 of #2019 - Admin UI for the centralized RBAC/ABAC Policy Engine.


🧪 Verification

Check Command Status
Lint suite make lint passed
Unit tests make test passed


📓 Notes (optional)

What was accomplished

  • mcpgateway/templates/policy_partial.html - New admin UI template with:
    • Engine health status cards (Native/OPA/Cedar/MAC)
    • Native RBAC rules table with add/delete support
    • Policy tester/simulator (subject + action + resource → allow/deny result)
    • Cache statistics display
  • mcpgateway/main.py - Wire PolicyDecisionPoint singleton into app.state at startup
  • mcpgateway/admin.py - 7 new API routes under /admin/policy/*:
    • GET /admin/policy/partial
    • GET /admin/policy/rules
    • POST /admin/policy/rules
    • DELETE /admin/policy/rules/{rule_id}
    • POST /admin/policy/test
    • GET /admin/policy/health
    • GET /admin/policy/cache/stats
  • mcpgateway/templates/admin.html - Policy Engine tab and panel in sidebar
  • mcpgateway/static/admin.js - Tab loader and event delegation for policy UI
  • Verified engine health cards show Native engine as Healthy
  • Verified rules can be added and deleted via the UI
  • Verified policy tester returns correct ALLOW/DENY decisions
  • Verified cache stats display correctly

@crivetimihai crivetimihai changed the title FEATURE(POLICY): add Phase 3 admin UI for RBAC/ABAC policy engine (#2019) feat(ui): add admin UI for RBAC/ABAC policy engine Mar 29, 2026
@crivetimihai crivetimihai added enhancement New feature or request COULD P3: Nice-to-have features with minimal impact if left out; included if time permits ui User Interface rbac Role-based Access Control labels Mar 29, 2026
@crivetimihai crivetimihai added this to the Release 1.1.0 milestone Mar 29, 2026
@crivetimihai
Copy link
Copy Markdown
Member

Thanks @WilliamChen000. Will review the UI implementation and integration with the policy engine.

@gcgoncalves
Copy link
Copy Markdown
Collaborator

Hi, @ WilliamChen000, thanks for your PR. We recently switched our UI to a new pattern, replacing the admin.js file with multiple smaller modules. Would you refactor to the new pattern?

@gcgoncalves gcgoncalves force-pushed the feature/issue-2019-policy-engine-phase3 branch from ab03afc to c450f00 Compare April 13, 2026 13:59
@gcgoncalves gcgoncalves force-pushed the feature/issue-2019-policy-engine-phase3 branch 4 times, most recently from c024657 to d0fc4d9 Compare April 14, 2026 08:36
@gcgoncalves gcgoncalves force-pushed the feature/issue-2019-policy-engine-phase3 branch from d0fc4d9 to b244594 Compare April 15, 2026 14:59
WilliamChen000 and others added 4 commits April 15, 2026 15:59
Signed-off-by: WilliamChen000 <chenwi@tcd.ie>
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
Signed-off-by: Gabriel Costa <gabrielcg@proton.me>
@gcgoncalves gcgoncalves force-pushed the feature/issue-2019-policy-engine-phase3 branch from b244594 to f5af6f8 Compare April 15, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

COULD P3: Nice-to-have features with minimal impact if left out; included if time permits enhancement New feature or request rbac Role-based Access Control ui User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Centralized configurable RBAC/ABAC policy engine

4 participants