WeKnora/internal/container
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
..
audit_sink.go feat(retriever): activate OpenSearch k-NN driver (PR 3 of 3) 2026-05-29 16:32:27 +08:00
audit_sink_test.go feat(retriever): activate OpenSearch k-NN driver (PR 3 of 3) 2026-05-29 16:32:27 +08:00
cleanup.go init commit 2025-08-05 15:08:07 +08:00
container.go feat(mcp): add OAuth2 authorization for MCP services 2026-06-22 20:19:31 +08:00
engine_factory.go feat: support Milvus database selection for vector stores 2026-06-05 15:11:37 +08:00
engine_factory_opensearch_test.go feat(retriever): activate OpenSearch k-NN driver (PR 3 of 3) 2026-05-29 16:32:27 +08:00
engine_factory_test.go feat: support Milvus database selection for vector stores 2026-06-05 15:11:37 +08:00
reset_pending_tasks.go fix(container): correct resetPendingTasks SQL on startup 2026-05-29 15:46:11 +08:00
reset_pending_tasks_test.go fix(container): correct resetPendingTasks SQL on startup 2026-05-29 15:46:11 +08:00