mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 05:20:01 +00:00
Using ssh default profile(user/password/port) without host (#10076)
This commit is contained in:
parent
ab87099b8b
commit
934cdff0f8
@ -195,7 +195,13 @@ export class VaultService {
|
|||||||
if (!vault) {
|
if (!vault) {
|
||||||
return null
|
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> {
|
async addSecret (secret: VaultSecret): Promise<void> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user