WeKnora/internal/router
wizardchen 7f3f219f58 feat(mcp): add OAuth2 authorization for MCP services
Support connecting to MCP servers that require OAuth2, with a Cursor-like
zero-config flow: the user provides only a URL and the system performs
metadata discovery, dynamic client registration (DCR), and the
authorization code flow with PKCE on first connect.

- Persist per-user access/refresh tokens and per-service DCR client
  credentials, encrypted at rest (AES-256-GCM)
- Store the PKCE verifier/state during the flow via Redis with an
  in-memory fallback for Lite mode
- Cache MCP clients per (service, user) so tokens stay user-isolated
- Add endpoints for authorize-url, callback, status, and token revoke;
  the callback is allowlisted for unauthenticated access
- Surface a structured "authorization required" hint when a tool call
  hits an unauthorized MCP service
- Frontend: add an auth-type selector with OAuth config, inline
  authorization status/actions, and render the connection test result
  inline in the editor drawer instead of a stacked centered dialog
2026-06-22 20:19:31 +08:00
..
rbac.go feat(system-admin): implement bootstrap for system admin promotion and enhance system settings management 2026-05-26 21:13:56 +08:00
router.go feat(mcp): add OAuth2 authorization for MCP services 2026-06-22 20:19:31 +08:00
router_files_test.go fix: deep-copy stored files and images when cloning a knowledge base 2026-06-03 14:45:59 +08:00
router_presigned_test.go fix(im): make presigned URL flow diagnosable end-to-end 2026-05-28 08:03:57 +08:00
sync_task.go fix(wiki): Lite ingest lock, failed-op requeue, sync task retry parity 2026-04-28 18:27:00 +08:00
task.go fix: mark knowledge delete failures after retry exhaustion 2026-06-16 16:47:46 +08:00
task_inspector.go feat(configuration): update asynq concurrency settings and enhance FAQ handling 2026-06-04 15:48:04 +08:00