Skip to content

Commit

Permalink
Using ssh default profile(user/password/port) without host
Browse files Browse the repository at this point in the history
Lint correction
  • Loading branch information
ianaflous committed Dec 17, 2024
1 parent 6196f3b commit 12429b5
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 12429b5

Please sign in to comment.