diff --git a/src/backend/database/routes/ssh.ts b/src/backend/database/routes/ssh.ts index cdaf7668..0c126f62 100644 --- a/src/backend/database/routes/ssh.ts +++ b/src/backend/database/routes/ssh.ts @@ -226,7 +226,7 @@ router.post( authType, credentialId, key, - keyPassword, + key_password, keyType, pin, enableTerminal, @@ -274,7 +274,7 @@ router.post( if (effectiveAuthType === "password") { sshDataObj.password = password || null; sshDataObj.key = null; - sshDataObj.key_password = null; + sshDataObj.keyPassword = null; sshDataObj.keyType = null; } else if (effectiveAuthType === "key") { sshDataObj.key = key || null; @@ -284,7 +284,7 @@ router.post( } else { sshDataObj.password = null; sshDataObj.key = null; - sshDataObj.key_password = null; + sshDataObj.keyPassword = null; sshDataObj.keyType = null; } @@ -407,7 +407,7 @@ router.put( authType, credentialId, key, - keyPassword, + key_password, keyType, pin, enableTerminal, @@ -458,7 +458,7 @@ router.put( sshDataObj.password = password; } sshDataObj.key = null; - sshDataObj.key_password = null; + sshDataObj.keyPassword = null; sshDataObj.keyType = null; } else if (effectiveAuthType === "key") { if (key) { @@ -474,7 +474,7 @@ router.put( } else { sshDataObj.password = null; sshDataObj.key = null; - sshDataObj.key_password = null; + sshDataObj.keyPassword = null; sshDataObj.keyType = null; } @@ -711,7 +711,7 @@ router.get( authType: resolvedHost.authType, password: resolvedHost.password || null, key: resolvedHost.key || null, - keyPassword: resolvedHost.keyPassword || null, + key_password: resolvedHost.key_password || null, keyType: resolvedHost.keyType || null, folder: resolvedHost.folder, tags: diff --git a/src/backend/utils/field-crypto.ts b/src/backend/utils/field-crypto.ts index 88a1cddf..098b5b8e 100644 --- a/src/backend/utils/field-crypto.ts +++ b/src/backend/utils/field-crypto.ts @@ -17,26 +17,18 @@ class FieldCrypto { private static readonly ENCRYPTED_FIELDS = { users: new Set([ "password_hash", - "passwordHash", "client_secret", - "clientSecret", "totp_secret", - "totpSecret", "totp_backup_codes", - "totpBackupCodes", "oidc_identifier", - "oidcIdentifier", ]), - ssh_data: new Set(["password", "key", "key_password", "keyPassword"]), + ssh_data: new Set(["password", "key", "key_password"]), ssh_credentials: new Set([ "password", "private_key", - "privateKey", "key_password", - "keyPassword", "key", "public_key", - "publicKey", ]), };