feat(security): encrypt local credentials and guide data migration
This commit is contained in:
58 files changed
+8831
-435
No files matched your search
@@ -61,18 +61,27 @@ describe("WebDAV sync HTTP API", () => {
|
||||
expect(lastCall(fetchMock)).toEqual({ url: "/api/cloud-sync/webdav/forget-sync-secrets-passphrase", body: {} });
|
||||
|
||||
const editorSettings = { theme: "dark" };
|
||||
await webdavSyncUpload(config, editorSettings, "sync-passphrase");
|
||||
await webdavSyncUpload(config, editorSettings, "sync-passphrase", true);
|
||||
expect(lastCall(fetchMock)).toEqual({
|
||||
url: "/api/cloud-sync/webdav/upload",
|
||||
body: { config, editorSettings, secretsPassphrase: "sync-passphrase" },
|
||||
body: { config, editorSettings, secretsPassphrase: "sync-passphrase", includeSecrets: true },
|
||||
});
|
||||
|
||||
await webdavSyncDownload(config, "sync-passphrase");
|
||||
await webdavSyncDownload(config, "sync-passphrase", true);
|
||||
expect(lastCall(fetchMock)).toEqual({
|
||||
url: "/api/cloud-sync/webdav/download",
|
||||
body: { config, secretsPassphrase: "sync-passphrase" },
|
||||
body: { config, secretsPassphrase: "sync-passphrase", restoreSecrets: true },
|
||||
});
|
||||
});
|
||||
|
||||
it("accepts the migration cleanup endpoint's empty 204 response", async () => {
|
||||
const fetchMock = vi.fn().mockResolvedValue(new Response(null, { status: 204 }));
|
||||
vi.stubGlobal("fetch", fetchMock);
|
||||
const { migrationCleanupBackups } = await import("@/lib/backend/http");
|
||||
|
||||
await expect(migrationCleanupBackups()).resolves.toBeUndefined();
|
||||
expect(lastCall(fetchMock)).toEqual({ url: "/api/migration/cleanup-backups", body: {} });
|
||||
});
|
||||
});
|
||||
|
||||
describe("GitLab snippet sync HTTP API", () => {
|
||||
|
||||
@@ -385,6 +385,10 @@ export const saveSavedSqlEditorPositions = forward("saveSavedSqlEditorPositions"
|
||||
export const loadTransferTaskLibrary = forward("loadTransferTaskLibrary");
|
||||
export const saveTransferTaskLibrary = forward("saveTransferTaskLibrary");
|
||||
export const webdavSyncTest = forward("webdavSyncTest");
|
||||
export const migrationStatus = forward("migrationStatus");
|
||||
export const migrationStart = forward("migrationStart");
|
||||
export const migrationRetry = forward("migrationRetry");
|
||||
export const migrationCleanupBackups = forward("migrationCleanupBackups");
|
||||
export const webdavPasswordStatus = forward("webdavPasswordStatus");
|
||||
export const saveWebdavSavedPassword = forward("saveWebdavSavedPassword");
|
||||
export const forgetWebdavSavedPassword = forward("forgetWebdavSavedPassword");
|
||||
|
||||
@@ -175,6 +175,12 @@ import type {
|
||||
} from "@/lib/backend/tauri";
|
||||
import type { QueryEditability } from "@/lib/sql/sqlAnalysis";
|
||||
import type { CsvQuoteMode } from "@/lib/export/csvQuoteMode";
|
||||
import type { MigrationPreflight, MigrationReport } from "./migration";
|
||||
export type { MigrationPreflight, MigrationReport } from "./migration";
|
||||
export const migrationStatus = (): Promise<MigrationPreflight> => get("/api/migration/status");
|
||||
export const migrationStart = (): Promise<MigrationReport> => post("/api/migration/start", {});
|
||||
export const migrationRetry = (): Promise<MigrationReport> => post("/api/migration/retry", {});
|
||||
export const migrationCleanupBackups = (): Promise<void> => post("/api/migration/cleanup-backups", {});
|
||||
import { isTerminalTransferProgress } from "@/lib/backend/transferProgress";
|
||||
import type {
|
||||
DataGridColumnDistinctValuesSqlOptions,
|
||||
@@ -316,6 +322,7 @@ async function post<T>(url: string, body: unknown): Promise<T> {
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
if (!res.ok) throw await backendResponseError(res);
|
||||
if (res.status === 204) return undefined as T;
|
||||
return res.json();
|
||||
}
|
||||
|
||||
@@ -2380,16 +2387,17 @@ export async function forgetWebdavSyncSecretsPassphrase(): Promise<void> {
|
||||
return post("/api/cloud-sync/webdav/forget-sync-secrets-passphrase", {});
|
||||
}
|
||||
|
||||
export async function webdavSyncUpload(config: WebDavConfig, editorSettings?: unknown, secretsPassphrase?: string): Promise<WebDavSyncSummary> {
|
||||
export async function webdavSyncUpload(config: WebDavConfig, editorSettings?: unknown, secretsPassphrase?: string, includeSecrets = false): Promise<WebDavSyncSummary> {
|
||||
return post("/api/cloud-sync/webdav/upload", {
|
||||
config,
|
||||
editorSettings,
|
||||
secretsPassphrase,
|
||||
includeSecrets,
|
||||
});
|
||||
}
|
||||
|
||||
export async function webdavSyncDownload(config: WebDavConfig, secretsPassphrase?: string): Promise<WebDavDownloadResult> {
|
||||
return post("/api/cloud-sync/webdav/download", { config, secretsPassphrase });
|
||||
export async function webdavSyncDownload(config: WebDavConfig, secretsPassphrase?: string, restoreSecrets = true): Promise<WebDavDownloadResult> {
|
||||
return post("/api/cloud-sync/webdav/download", { config, secretsPassphrase, restoreSecrets });
|
||||
}
|
||||
|
||||
export async function snippetSyncTest(config: SnippetSyncConfig): Promise<void> {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
export type MigrationState = "pending" | "running" | "succeeded" | "failed" | "not_required";
|
||||
export interface MigrationPreflight {
|
||||
migrationId: string;
|
||||
state: MigrationState;
|
||||
needsMigration: boolean;
|
||||
keyProviderAvailable: boolean;
|
||||
keyCreationAllowed?: boolean;
|
||||
databasePlaintextCount: number;
|
||||
connectionCount: number;
|
||||
pluginSecretCount: number;
|
||||
aiSecretCount: number;
|
||||
tunnelSecretCount: number;
|
||||
syncCredentialCount: number;
|
||||
legacyJsonFiles: { name: string; exists: boolean; bytes: number }[];
|
||||
backupRequired: boolean;
|
||||
backupPath?: string | null;
|
||||
errorMessage?: string | null;
|
||||
errorCode?: string | null;
|
||||
dataDir?: string;
|
||||
backupDir?: string;
|
||||
keyFileConfigured?: boolean;
|
||||
keyFileReadable?: boolean;
|
||||
persistentKeyConfigured?: boolean;
|
||||
keySource?: "explicit_file" | "explicit_env" | "managed_data_dir" | "platform_store" | "unavailable" | string;
|
||||
}
|
||||
export interface MigrationReport {
|
||||
migrationId: string;
|
||||
state: MigrationState;
|
||||
backupPath?: string | null;
|
||||
databasePlaintextCount: number;
|
||||
legacyJsonFiles: string[];
|
||||
verifiedSecretCount: number;
|
||||
errorCode?: string | null;
|
||||
errorMessage?: string | null;
|
||||
}
|
||||
@@ -12,6 +12,13 @@ function invoke<T>(command: string, args?: Record<string, unknown>): Promise<T>
|
||||
assertUpdateAllowsCommand(command);
|
||||
return tauriInvoke<T>(command, args);
|
||||
}
|
||||
|
||||
import type { MigrationPreflight, MigrationReport } from "./migration";
|
||||
export type { MigrationPreflight, MigrationReport } from "./migration";
|
||||
export const migrationStatus = (): Promise<MigrationPreflight> => invoke("migration_status");
|
||||
export const migrationStart = (): Promise<MigrationReport> => invoke("migration_start");
|
||||
export const migrationRetry = (): Promise<MigrationReport> => invoke("migration_retry");
|
||||
export const migrationCleanupBackups = (): Promise<void> => invoke("migration_cleanup_backups");
|
||||
import type { DetachedTabHandoff } from "@/lib/app/detachedTabHandoff";
|
||||
import { BackendErrorException, type BackendError } from "@/lib/backend/errorUtils";
|
||||
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
||||
@@ -967,16 +974,17 @@ export async function forgetWebdavSyncSecretsPassphrase(): Promise<void> {
|
||||
return invoke("forget_webdav_sync_secrets_passphrase");
|
||||
}
|
||||
|
||||
export async function webdavSyncUpload(config: WebDavConfig, editorSettings?: unknown, secretsPassphrase?: string): Promise<WebDavSyncSummary> {
|
||||
export async function webdavSyncUpload(config: WebDavConfig, editorSettings?: unknown, secretsPassphrase?: string, includeSecrets = false): Promise<WebDavSyncSummary> {
|
||||
return invoke("webdav_sync_upload", {
|
||||
config,
|
||||
editorSettings,
|
||||
secretsPassphrase,
|
||||
includeSecrets,
|
||||
});
|
||||
}
|
||||
|
||||
export async function webdavSyncDownload(config: WebDavConfig, secretsPassphrase?: string): Promise<WebDavDownloadResult> {
|
||||
return invoke("webdav_sync_download", { config, secretsPassphrase });
|
||||
export async function webdavSyncDownload(config: WebDavConfig, secretsPassphrase?: string, restoreSecrets = true): Promise<WebDavDownloadResult> {
|
||||
return invoke("webdav_sync_download", { config, secretsPassphrase, restoreSecrets });
|
||||
}
|
||||
|
||||
export async function snippetSyncTest(config: SnippetSyncConfig): Promise<void> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { ConnectionConfig, SidebarLayout, TunnelProfile } from "@/types/database";
|
||||
import { buildConnectionConfigBundle, parseConnectionConfigObject, selectConnectionConfigBundle, snapshotConnectionsForExport } from "./connectionConfigTransfer";
|
||||
import { buildConnectionConfigBundle, parseConnectionConfigObject, prepareConnectionConfigImport, scrubConnectionForPlaintextExport, scrubTunnelProfileForPlaintextExport, selectConnectionConfigBundle, snapshotConnectionsForExport } from "./connectionConfigTransfer";
|
||||
|
||||
function conn(id: string, name: string, extras: Partial<ConnectionConfig> = {}): ConnectionConfig {
|
||||
return {
|
||||
@@ -83,11 +83,76 @@ describe("connectionConfigTransfer", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps stable ids and removes secrets from plaintext exports", () => {
|
||||
const exported = scrubConnectionForPlaintextExport(
|
||||
conn("stable", "A", {
|
||||
password: "db-password",
|
||||
init_script: "CREATE USER secret",
|
||||
connection_string: "postgres://user:password@host/db",
|
||||
url_params: "applicationName=dbx&PASSWORD=url-password&sslmode=require",
|
||||
connection_secrets: { api_token: "plugin-token" },
|
||||
transport_layers: [{ type: "ssh", id: "layer", host: "bastion", port: 22, user: "root", password: "ssh-password", key_passphrase: "key-password" }],
|
||||
external_config: { auth: { password: "nested-password" }, safe: "value" },
|
||||
}),
|
||||
);
|
||||
expect(exported.id).toBe("stable");
|
||||
expect(exported.password).toBe("");
|
||||
expect(exported.connection_secrets).toEqual({});
|
||||
expect(JSON.stringify(exported)).not.toContain("db-password");
|
||||
expect(JSON.stringify(exported)).not.toContain("nested-password");
|
||||
expect(JSON.stringify(exported)).not.toContain("plugin-token");
|
||||
expect(exported.url_params).toBe("applicationName=dbx&PASSWORD=&sslmode=require");
|
||||
expect(JSON.stringify(exported)).not.toContain("url-password");
|
||||
expect(scrubTunnelProfileForPlaintextExport({ type: "http_tunnel", id: "t", url: "https://example", token: "token" })).toMatchObject({ id: "t", token: "" });
|
||||
});
|
||||
|
||||
it("redacts structured API key auth without removing unrelated values or mutating the source", () => {
|
||||
const source = conn("mq", "MQ", {
|
||||
external_config: {
|
||||
auth: { kind: "apiKey", header: "X-Api-Key", value: "api-key-secret" },
|
||||
value: "public-root",
|
||||
nested: [{ auth: { kind: "apiKey", header: "Authorization", value: "nested-api-key" } }, { auth: { kind: "basic", username: "user", password: "basic-password", value: "public-auth" } }, { kind: "apiKey", value: "public-non-auth" }],
|
||||
},
|
||||
});
|
||||
|
||||
const exported = scrubConnectionForPlaintextExport(source);
|
||||
|
||||
expect(exported.external_config).toEqual({
|
||||
auth: { kind: "apiKey", header: "X-Api-Key", value: "" },
|
||||
value: "public-root",
|
||||
nested: [{ auth: { kind: "apiKey", header: "Authorization", value: "" } }, { auth: { kind: "basic", username: "user", password: "", value: "public-auth" } }, { kind: "apiKey", value: "public-non-auth" }],
|
||||
});
|
||||
expect(source.external_config).toMatchObject({ auth: { value: "api-key-secret" } });
|
||||
expect(JSON.stringify(exported)).not.toContain("api-key-secret");
|
||||
expect(JSON.stringify(exported)).not.toContain("nested-api-key");
|
||||
expect(JSON.stringify(exported)).not.toContain("basic-password");
|
||||
});
|
||||
|
||||
it("parses legacy arrays and dbx-config payloads without inventing a layout", () => {
|
||||
expect(parseConnectionConfigObject([conn("a", "A")])).toEqual({ connections: [conn("a", "A")] });
|
||||
expect(parseConnectionConfigObject({ format: "dbx-config", connections: [conn("a", "A")] })).toEqual({ connections: [conn("a", "A")] });
|
||||
});
|
||||
|
||||
it("remaps ordinary import IDs on collision and updates tunnel/layout references", () => {
|
||||
const imported = prepareConnectionConfigImport(
|
||||
{
|
||||
connections: [conn("same", "Imported", { transport_layers: [{ type: "ssh", id: "layer", host: "", port: 22, user: "", profile_id: "tp" }] })],
|
||||
tunnelProfiles: [{ ...tunnel1, id: "tp" }],
|
||||
layout: { groups: [], order: [{ type: "connection", id: "same" }] },
|
||||
},
|
||||
["same"],
|
||||
["tp"],
|
||||
(() => {
|
||||
let n = 0;
|
||||
return () => `new-${++n}`;
|
||||
})(),
|
||||
);
|
||||
expect(imported.connections[0].id).toBe("new-1");
|
||||
expect(imported.connections[0].transport_layers?.[0].profile_id).toBe("new-2");
|
||||
expect(imported.tunnelProfiles?.[0].id).toBe("new-2");
|
||||
expect(imported.layout?.order[0]).toEqual({ type: "connection", id: "new-1" });
|
||||
});
|
||||
|
||||
it("selects a preview subset without mutating the original preview", () => {
|
||||
const preview = {
|
||||
connections: [conn("a", "A"), conn("b", "B"), conn("c", "C")],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ConnectionConfig, SidebarLayout, TunnelProfile } from "@/types/database";
|
||||
import { filterSidebarLayoutByConnectionIds as filterLayoutByConnectionIds } from "@/lib/sidebar/sidebarLayout";
|
||||
import { filterSidebarLayoutByConnectionIds as filterLayoutByConnectionIds, remapSidebarLayoutConnectionIds } from "@/lib/sidebar/sidebarLayout";
|
||||
|
||||
export type ConnectionExportProtection = { mode: "encrypted"; passphrase: string } | { mode: "plaintext" };
|
||||
|
||||
@@ -60,6 +60,74 @@ export function snapshotConnectionsForExport(connections: ConnectionConfig[], op
|
||||
}));
|
||||
}
|
||||
|
||||
/** Remove every credential-bearing field before creating a plaintext bundle. */
|
||||
export function scrubConnectionForPlaintextExport(connection: ConnectionConfig): ConnectionConfig {
|
||||
const scrubbed: ConnectionConfig = JSON.parse(JSON.stringify(connection)) as ConnectionConfig;
|
||||
scrubbed.password = "";
|
||||
scrubbed.url_params = scrubUrlParams(scrubbed.url_params);
|
||||
scrubbed.init_script = undefined;
|
||||
scrubbed.connection_string = undefined;
|
||||
scrubbed.redis_sentinel_password = "";
|
||||
scrubbed.connection_secrets = {};
|
||||
scrubbed.transport_layers = (scrubbed.transport_layers ?? []).map((layer) => {
|
||||
const copy = { ...layer } as typeof layer;
|
||||
if (copy.type === "ssh") {
|
||||
copy.password = "";
|
||||
copy.key_passphrase = "";
|
||||
} else if (copy.type === "proxy") {
|
||||
copy.password = "";
|
||||
} else {
|
||||
copy.token = "";
|
||||
}
|
||||
return copy;
|
||||
});
|
||||
scrubbed.external_config = scrubExternalConfig(scrubbed.external_config);
|
||||
return scrubbed;
|
||||
}
|
||||
|
||||
export function scrubTunnelProfileForPlaintextExport(profile: TunnelProfile): TunnelProfile {
|
||||
const scrubbed = { ...profile };
|
||||
if (scrubbed.type === "ssh") {
|
||||
scrubbed.password = "";
|
||||
scrubbed.key_passphrase = "";
|
||||
} else if (scrubbed.type === "proxy") {
|
||||
scrubbed.password = "";
|
||||
} else {
|
||||
scrubbed.token = "";
|
||||
}
|
||||
return scrubbed;
|
||||
}
|
||||
|
||||
function scrubExternalConfig(value: unknown): unknown {
|
||||
if (Array.isArray(value)) return value.map(scrubExternalConfig);
|
||||
if (!value || typeof value !== "object") return value;
|
||||
const output: Record<string, unknown> = {};
|
||||
for (const [key, child] of Object.entries(value as Record<string, unknown>)) {
|
||||
if (/password|passphrase|secret|token|api[_-]?key|clientsecret|accesstoken|privatekey/i.test(key)) {
|
||||
output[key] = typeof child === "string" ? "" : null;
|
||||
} else if (key === "auth" && child && typeof child === "object" && !Array.isArray(child) && (child as Record<string, unknown>).kind === "apiKey") {
|
||||
output[key] = { ...(scrubExternalConfig(child) as Record<string, unknown>), value: "" };
|
||||
} else {
|
||||
output[key] = scrubExternalConfig(child);
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
function scrubUrlParams(value: string | undefined): string | undefined {
|
||||
if (typeof value !== "string") return value;
|
||||
return value
|
||||
.split("&")
|
||||
.map((part) => {
|
||||
const separator = part.indexOf("=");
|
||||
if (separator < 0) return part;
|
||||
const key = part.slice(0, separator);
|
||||
const normalized = key.trim().toLowerCase().replace(/[_-]/g, "");
|
||||
return /password|passphrase|secret|token|apikey|privatekey|clientsecret/.test(normalized) ? key + "=" : part;
|
||||
})
|
||||
.join("&");
|
||||
}
|
||||
|
||||
export function buildConnectionConfigBundle(connections: ConnectionConfig[], layout: SidebarLayout | null | undefined, tunnelProfiles: TunnelProfile[], selectedIds?: Iterable<string>): ConnectionConfigBundle {
|
||||
const selectedConnections = filterConnectionsByIds(connections, selectedIds);
|
||||
const selectedConnectionIds = selectedConnections.map((connection) => connection.id);
|
||||
@@ -110,3 +178,84 @@ export function selectConnectionConfigBundle(bundle: ConnectionConfigBundle, sel
|
||||
tunnelProfiles: filterTunnelProfilesByIds(bundle.tunnelProfiles ?? [], referencedTunnelProfileIds(selectedConnections)),
|
||||
};
|
||||
}
|
||||
|
||||
/** Ordinary file imports deduplicate connections while keeping cloud sync's ID merge policy separate. */
|
||||
export function prepareConnectionConfigImport(bundle: ConnectionConfigBundle, existingConnections: Iterable<Pick<ConnectionConfig, "id" | "name" | "host" | "port"> | string>, existingTunnelProfileIds: Iterable<string>, createId: () => string): ConnectionConfigBundle {
|
||||
const existingConnectionList = Array.from(existingConnections);
|
||||
const existingConnectionIds = new Set(existingConnectionList.map((connection) => (typeof connection === "string" ? connection : connection.id)));
|
||||
const existingByIdentity = new Map<string, string>();
|
||||
for (const connection of existingConnectionList) {
|
||||
if (typeof connection === "string") continue;
|
||||
existingByIdentity.set(connectionIdentity(connection), connection.id);
|
||||
}
|
||||
|
||||
const sourceConnections = bundle.connections.map((connection, index) => ({
|
||||
...connection,
|
||||
// Anonymous legacy entries need a stable key for layout/reference remapping.
|
||||
id: connection.id?.trim() || `__dbx_import_${index}`,
|
||||
}));
|
||||
const connectionIds = new Map<string, string>();
|
||||
const importedConnections: ConnectionConfig[] = [];
|
||||
const importedByIdentity = new Map<string, string>();
|
||||
const seenSourceIds = new Set<string>();
|
||||
const occupiedConnectionIds = new Set(existingConnectionIds);
|
||||
|
||||
for (const source of sourceConnections) {
|
||||
if (seenSourceIds.has(source.id)) throw new Error("DUPLICATE_IMPORT_ID");
|
||||
seenSourceIds.add(source.id);
|
||||
|
||||
const identity = connectionIdentity(source);
|
||||
const duplicateId = existingByIdentity.get(identity) ?? importedByIdentity.get(identity);
|
||||
if (duplicateId) {
|
||||
connectionIds.set(source.id, duplicateId);
|
||||
continue;
|
||||
}
|
||||
|
||||
let targetId = createId();
|
||||
while (!targetId || occupiedConnectionIds.has(targetId)) targetId = createId();
|
||||
occupiedConnectionIds.add(targetId);
|
||||
connectionIds.set(source.id, targetId);
|
||||
importedByIdentity.set(identity, targetId);
|
||||
importedConnections.push({ ...source, id: targetId });
|
||||
}
|
||||
|
||||
const sourceProfiles = new Map<string, TunnelProfile>();
|
||||
for (const profile of bundle.tunnelProfiles ?? []) {
|
||||
const id = profile.id?.trim();
|
||||
if (id && !sourceProfiles.has(id)) sourceProfiles.set(id, { ...profile, id });
|
||||
}
|
||||
const profileIds = new Map<string, string>();
|
||||
const importedTunnelProfileIds = new Set<string>();
|
||||
const occupiedProfileIds = new Set(existingTunnelProfileIds);
|
||||
for (const connection of importedConnections) {
|
||||
for (const layer of connection.transport_layers ?? []) {
|
||||
const sourceProfileId = layer.profile_id;
|
||||
if (!sourceProfileId || !sourceProfiles.has(sourceProfileId) || profileIds.has(sourceProfileId)) continue;
|
||||
let targetId = sourceProfileId;
|
||||
if (occupiedProfileIds.has(targetId)) {
|
||||
targetId = createId();
|
||||
while (!targetId || occupiedProfileIds.has(targetId)) targetId = createId();
|
||||
}
|
||||
occupiedProfileIds.add(targetId);
|
||||
profileIds.set(sourceProfileId, targetId);
|
||||
importedTunnelProfileIds.add(sourceProfileId);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
connections: importedConnections.map((connection) => ({
|
||||
...connection,
|
||||
transport_layers: connection.transport_layers?.map((layer) => ({
|
||||
...layer,
|
||||
// Never leave an unresolved source ID pointing at an unrelated local profile.
|
||||
profile_id: layer.profile_id ? profileIds.get(layer.profile_id) : undefined,
|
||||
})),
|
||||
})),
|
||||
tunnelProfiles: Array.from(importedTunnelProfileIds, (sourceId) => ({ ...sourceProfiles.get(sourceId)!, id: profileIds.get(sourceId)! })),
|
||||
layout: bundle.layout ? filterSidebarLayoutByConnectionIds(remapSidebarLayoutConnectionIds(bundle.layout, connectionIds), connectionIds.values()) : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
function connectionIdentity(connection: Pick<ConnectionConfig, "name" | "host" | "port">): string {
|
||||
return JSON.stringify([connection.name, connection.host, connection.port]);
|
||||
}
|
||||
Reference in new issue
Block a user