X Tutup
Skip to content

feat: Teams multi-user OAuth, workspace isolation, and admin UI#324

Open
Dumbris wants to merge 7 commits intomainfrom
024-teams-multiuser-oauth
Open

feat: Teams multi-user OAuth, workspace isolation, and admin UI#324
Dumbris wants to merge 7 commits intomainfrom
024-teams-multiuser-oauth

Conversation

@Dumbris
Copy link
Contributor

@Dumbris Dumbris commented Mar 9, 2026

Summary

  • Full OAuth 2.0 + PKCE authentication flow for multi-user server edition (Google, GitHub, Microsoft providers)
  • Per-user workspace isolation with personal upstream servers stored in BBolt
  • Shared server management: admin can share/unshare config servers with all users
  • User-scoped activity logs and diagnostics
  • Per-user agent token management (create, list, revoke, regenerate)
  • Admin dashboard with user management, server management (enable/disable/restart/share), and activity overview
  • Session cookie + JWT bearer token dual auth (Web UI + MCP/API)
  • Complete Vue 3 frontend: Login, AdminDashboard, AdminUsers, AdminServers, UserServers, UserActivity, UserDiagnostics, UserTokens pages
  • Role-based sidebar navigation (admin vs user views)
  • All code behind //go:build server build tag — personal edition unaffected

Test plan

  • go build ./cmd/mcpproxy — personal edition compiles without server code
  • go build -tags server ./cmd/mcpproxy — server edition compiles
  • go test -tags server ./internal/teams/... -v -race — all server tests pass
  • Manual testing: OAuth login flow, token CRUD, server management, activity logs
  • E2E: verify personal edition has no server routes
  • E2E: full OAuth flow with Google provider

🤖 Generated with Claude Code

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 9, 2026

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: efbca20
Status: ✅  Deploy successful!
Preview URL: https://282ab6b8.mcpproxy-docs.pages.dev
Branch Preview URL: https://024-teams-multiuser-oauth.mcpproxy-docs.pages.dev

View logs

claude added 7 commits March 10, 2026 08:42
…ping bugs

- Register admin, user, and activity endpoints in setup.go with teams
  auth middleware (session cookie/JWT), fixing 401 errors on all teams pages
- Implement getDashboard handler with user/session/server stats
- Fix AdminUsers.vue: backend returns array directly, not {users: [...]}
- Fix UserServers.vue: map {personal, shared} response to flat array
- Fix UserActivity.vue: use data.items not data.activities
- Fix UserDiagnostics.vue: map ownership->owner_type, synthesize health
- Fix SidebarNav: remove duplicate Dashboard/Admin Overview, add Sessions
- Add nil-safety for activityFilter in admin and user activity handlers
- Enhance CLI status command to show edition and teams info (OAuth provider,
  admin emails) with build-tag separation for personal/teams editions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… log isolation

- Add `Shared` field to ServerConfig for admin-controlled server sharing
- Add admin REST endpoints: GET /admin/servers, POST /admin/servers/{name}/shared
- Add AdminServers.vue page for toggling servers between shared/private
- Add per-user shared server preferences (BBolt bucket: shared_prefs:{userID})
- Users can now enable/disable shared servers (stored as user preference)
- UserServers.vue shows enable/disable buttons on shared servers
- Wire user identity (UserID, UserEmail) through activity event pipeline
- getAuthMetadata now includes user_id/user_email for session-based auth
- ActivityService extracts _auth_user_id/_auth_user_email from event args
- Per-user activity filtering now works (EnrichRecord data flow complete)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…activity enrichment

Teams infrastructure: OAuth providers (Google/GitHub/Microsoft), JWT session
management, per-user workspace isolation, multiuser MCP routing with tool
filtering, activity log user identity enrichment, and storage model extensions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…edesign

Backend:
- Admin server enable/disable/restart endpoints via management service injection
- Per-user agent token CRUD (create, list, revoke, regenerate) with ownership enforcement
- Extended Dependencies with ManagementService and StorageManager
- Enriched admin server list with shared field from config
- Fixed token list response format (wrapped in {tokens:[...]})

Frontend:
- Rewrote AdminServers.vue: stats row, health badges, search/filter bar, context menu actions
- Improved UserServers.vue: table layout, clickable server names, shared server display
- New UserTokens.vue: full token management with create modal, secret display, revoke/regenerate
- Updated SidebarNav: "Agent Tokens" under user workspace, "Server Management" for admin
- Updated TopHeader: "Add Personal Server" in teams mode
- Added /my/tokens route and API service methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Swagger spec regenerated with default build (no -tags teams) to match
the make swagger-verify check in CI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Auto-fixed by pre-push hooks (trailing whitespace, missing newlines,
gofmt formatting).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add swaggerignore:"true" to Config.Teams field to prevent swag from
non-deterministically parsing build-tagged TeamsConfig definitions.
Without this, swag sometimes picks up teams_config.go and sometimes
teams_config_stub.go, producing different output each run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Dumbris Dumbris force-pushed the 024-teams-multiuser-oauth branch from 3b2e33e to efbca20 Compare March 10, 2026 06:48
@github-actions
Copy link

📦 Build Artifacts

Workflow Run: View Run
Branch: 024-teams-multiuser-oauth

Available Artifacts

  • archive-darwin-amd64 (24 MB)
  • archive-darwin-arm64 (21 MB)
  • archive-linux-amd64 (13 MB)
  • archive-linux-arm64 (11 MB)
  • archive-windows-amd64 (23 MB)
  • archive-windows-arm64 (21 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (26 MB)
  • installer-dmg-darwin-arm64 (24 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 22890655560 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

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.

2 participants

X Tutup