mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
feat: move vault ssh signing into a plugin (C5)
This commit is contained in:
1 parent
b027717c46
commit
6e56c90aac
198 files changed
+19717
-3445
No files matched your search
@@ -50,7 +50,6 @@ describe("omitOwnerSshAuthFromSharedEdit", () => {
|
||||
key: "owner-key",
|
||||
keyPassword: "owner-passphrase",
|
||||
keyType: "ssh-ed25519",
|
||||
vaultProfileId: "9",
|
||||
overrideCredentialUsername: true,
|
||||
shareSshAuth: true,
|
||||
sudoPassword: "owner-sudo",
|
||||
@@ -70,7 +69,6 @@ describe("omitOwnerSshAuthFromSharedEdit", () => {
|
||||
for (const field of [
|
||||
"authType",
|
||||
"credentialId",
|
||||
"vaultProfileId",
|
||||
"overrideCredentialUsername",
|
||||
"shareSshAuth",
|
||||
"password",
|
||||
@@ -128,32 +126,6 @@ describe("buildHostEditorPayload auth field isolation", () => {
|
||||
expect(payload.password).toBe("newpass");
|
||||
});
|
||||
|
||||
it("drops the vaultProfileId when switching a host away from vault auth", () => {
|
||||
const form = {
|
||||
...createHostEditorForm(null),
|
||||
authType: "password" as const,
|
||||
password: "newpass",
|
||||
vaultProfileId: "9",
|
||||
};
|
||||
|
||||
const payload = buildHostEditorPayload(form, sshOnly);
|
||||
|
||||
expect(payload.vaultProfileId).toBeNull();
|
||||
expect(payload.password).toBe("newpass");
|
||||
});
|
||||
|
||||
it("sends vaultProfileId when authType is vault", () => {
|
||||
const form = {
|
||||
...createHostEditorForm(null),
|
||||
authType: "vault" as const,
|
||||
vaultProfileId: "9",
|
||||
};
|
||||
|
||||
const payload = buildHostEditorPayload(form, sshOnly);
|
||||
|
||||
expect(payload.vaultProfileId).toBe(9);
|
||||
});
|
||||
|
||||
it("sends credentialId and optional password when authType is credential", () => {
|
||||
const form = {
|
||||
...createHostEditorForm(null),
|
||||
|
||||
Reference in new issue
Block a user