mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 22:28:15 +00:00
Update encryptSecrets.ts
This commit is contained in:
@@ -3,6 +3,7 @@ import crypto from "crypto";
|
|||||||
import { SecretDataProps, Tag } from "public/data/frequentInterfaces";
|
import { SecretDataProps, Tag } from "public/data/frequentInterfaces";
|
||||||
|
|
||||||
import { fetchUserWsKey } from "@app/hooks/api/keys/queries";
|
import { fetchUserWsKey } from "@app/hooks/api/keys/queries";
|
||||||
|
import { SecretType } from "@app/hooks/api/types";
|
||||||
|
|
||||||
import { decryptAssymmetric, encryptSymmetric } from "../cryptography/crypto";
|
import { decryptAssymmetric, encryptSymmetric } from "../cryptography/crypto";
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ interface EncryptedSecretProps {
|
|||||||
secretValueCiphertext: string;
|
secretValueCiphertext: string;
|
||||||
secretValueIV: string;
|
secretValueIV: string;
|
||||||
secretValueTag: string;
|
secretValueTag: string;
|
||||||
type: "personal" | "shared";
|
type: SecretType;
|
||||||
tags: Tag[];
|
tags: Tag[];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,8 +109,8 @@ const encryptSecrets = async ({
|
|||||||
secretCommentTag,
|
secretCommentTag,
|
||||||
type:
|
type:
|
||||||
secret.valueOverride === undefined || secret?.value !== secret?.valueOverride
|
secret.valueOverride === undefined || secret?.value !== secret?.valueOverride
|
||||||
? "shared"
|
? SecretType.Shared
|
||||||
: "personal",
|
: SecretType.Personal,
|
||||||
tags: secret.tags
|
tags: secret.tags
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user