Skip to content

Commit

Permalink
Using ssh default profile(user/password/port) without host (#10076)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianaflous authored Feb 24, 2025
1 parent ab87099 commit 934cdff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tabby-core/src/services/vault.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ export class VaultService {
if (!vault) {
return null
}
return vault.secrets.find(s => s.type === type && this.keyMatches(key, s)) ?? null
let vaultSecret = vault.secrets.find(s => s.type === type && this.keyMatches(key, s))
if (!vaultSecret) {
// search for secret without host in vault (like a default user/password used in multiple servers)
key['host'] = null
vaultSecret = vault.secrets.find(s => s.type === type && this.keyMatches(key, s))
}
return vaultSecret ?? null
}

async addSecret (secret: VaultSecret): Promise<void> {
Expand Down

0 comments on commit 934cdff

Please sign in to comment.