Skip to content

feat: support plugin-owned connection fields and secrets - #629

Open
debba wants to merge 1 commit into
mainfrom
feat/plugin-connection-fields
Open

feat: support plugin-owned connection fields and secrets#629
debba wants to merge 1 commit into
mainfrom
feat/plugin-connection-fields

Conversation

@debba

@debba debba commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add optional per-plugin presentation overrides for common connection fields
  • add plugin-owned connection secrets backed by the OS keychain
  • expose only secret metadata and tri-state changes to UI extensions
  • hydrate secrets only for runtime driver calls and keep them out of persisted connection parameters
  • preserve secret lifecycle across save, update, test, duplicate, delete, import, export, and MCP flows
  • document the additive manifest and UI extension contracts

Compatibility

All new manifest, model, request, and UI context fields are optional or defaulted. Existing manifests, saved connections, UI extensions, and Password-based plugins keep their current behavior.

Stored plugin secrets are never returned to the frontend as plaintext. Existing values are represented only by hasStoredValue, and an unchanged field remains untouched.

Tabularium prerequisite

Tabularium must be updated to accept connection_fields in the driver manifest schema before plugins using this property can be published. The current schema served by registry.tabularis.dev rejects it as an additional property.

This PR updates the host-side schema and documentation, but it does not update the operational Tabularium registry schema. That registry change must be deployed before publishing the dependent BigQuery plugin PR.

Dependent plugin PR: TabularisDB/tabularis-bigquery-plugin#2

Validation

  • cargo test --all-targets: 1137 passed, 4 ignored; integration suite 9 ignored
  • cargo test --all-targets --no-run
  • pnpm exec vitest run: 220 files, 3715 tests passed
  • pnpm build
  • pnpm lint
  • pnpm exec tsc --noEmit
  • plugin API sync and build
  • create-plugin build
  • git diff --check

cargo clippy --all-targets -- -D warnings still reports existing workspace-wide lint debt unrelated to this change. The new code does not add the MSRV incompatibility found during review.

Comment thread src-tauri/src/mcp/mod.rs

if !conn.plugin_secret_keys.is_empty() {
let cache = credential_cache::CredentialCache::default();
crate::plugin_secrets::hydrate_connection(&cache, &mut conn).map_err(|message| {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

WARNING: Plugin secret hydration runs blocking keychain I/O on the async runtime thread.

The adjacent DB-password (line 255) and connection-URI (line 286) reads in this same function both wrap their keychain access in tokio::task::spawn_blocking. hydrate_connectionget_plugin_secret_cachedkeychain_utils::get_plugin_secret performs synchronous keychain reads directly on the async worker thread, which can stall the MCP server's runtime — notably on platforms where keychain access is slow or requires an unlock prompt. Mirror the surrounding pattern and move the hydration into spawn_blocking (one read per secret key, like the URI path does).


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src-tauri/src/mcp/mod.rs 302 Plugin secret hydration performs blocking keychain I/O on the async runtime thread; adjacent password/URI reads use spawn_blocking.
Files Reviewed (38 files)
  • packages/create-plugin/src/cli.ts - 0 issues
  • packages/plugin-api/README.md - 0 issues
  • packages/plugin-api/package.json - 0 issues
  • packages/plugin-api/src/slots.ts - 0 issues
  • packages/plugin-api/src/version.ts - 0 issues
  • plugins/PLUGIN_GUIDE.md - 0 issues
  • plugins/manifest.schema.json - 0 issues
  • src-tauri/src/commands.rs - 0 issues
  • src-tauri/src/connection_cache_tests.rs - 0 issues
  • src-tauri/src/connection_import/analyzer.rs - 0 issues
  • src-tauri/src/connection_import/convert.rs - 0 issues
  • src-tauri/src/connection_import/tabularis.rs - 0 issues
  • src-tauri/src/connection_tags.rs - 0 issues
  • src-tauri/src/credential_cache.rs - 0 issues
  • src-tauri/src/drivers/driver_trait.rs - 0 issues
  • src-tauri/src/drivers/mysql/mod.rs - 0 issues
  • src-tauri/src/drivers/postgres/mod.rs - 0 issues
  • src-tauri/src/drivers/sqlite/mod.rs - 0 issues
  • src-tauri/src/export_import_tests.rs - 0 issues
  • src-tauri/src/keychain_utils.rs - 0 issues
  • src-tauri/src/lib.rs - 0 issues
  • src-tauri/src/mcp/mod.rs - 1 issue
  • src-tauri/src/models.rs - 0 issues
  • src-tauri/src/models_tests.rs - 0 issues
  • src-tauri/src/persistence.rs - 0 issues
  • src-tauri/src/plugin_secrets.rs - 0 issues
  • src-tauri/src/plugins/commands.rs - 0 issues
  • src-tauri/src/plugins/driver.rs - 0 issues
  • src-tauri/src/plugins/manager.rs - 0 issues
  • src-tauri/src/plugins/tests.rs - 0 issues
  • src-tauri/src/sqlite_database.rs - 0 issues
  • src/components/modals/NewConnectionModal.tsx - 0 issues
  • src/contexts/DatabaseContext.ts - 0 issues
  • src/contexts/PluginSlotProvider.tsx - 0 issues
  • src/types/pluginSlots.ts - 0 issues
  • src/types/plugins.ts - 0 issues
  • src/utils/credentials.ts - 0 issues
  • tests/components/modals/NewConnectionModal.test.tsx - 0 issues

Fix these issues in Kilo Cloud


Reviewed by glm-5.2 · Input: 72.1K · Output: 20.6K · Cached: 772.7K

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.

1 participant