mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Moved
This commit is contained in:
@@ -11,4 +11,10 @@ export {
|
||||
encryptSymmetric128BitHexKeyUTF8,
|
||||
generateAsymmetricKeyPair
|
||||
} from "./encryption";
|
||||
export {
|
||||
decryptIntegrationAuths,
|
||||
decryptSecretApprovals,
|
||||
decryptSecrets,
|
||||
decryptSecretVersions
|
||||
} from "./secret-encryption";
|
||||
export { generateSrpServerKey, srpCheckClientProof } from "./srp";
|
||||
|
||||
@@ -11,9 +11,8 @@ import {
|
||||
TSecretApprovalRequestsSecrets,
|
||||
TSecrets,
|
||||
TSecretVersions
|
||||
} from "@app/db/schemas";
|
||||
|
||||
import { decryptAsymmetric } from "../crypto";
|
||||
} from "../../db/schemas";
|
||||
import { decryptAsymmetric } from "./encryption";
|
||||
|
||||
const DecryptedValuesSchema = z.object({
|
||||
id: z.string(),
|
||||
@@ -42,15 +41,15 @@ const DecryptedSecretVersionsSchema = z.object({
|
||||
original: SecretVersionsSchema
|
||||
});
|
||||
|
||||
export const DecryptedSecretApprovalsSchema = z.object({
|
||||
const DecryptedSecretApprovalsSchema = z.object({
|
||||
decrypted: DecryptedValuesSchema,
|
||||
original: SecretApprovalRequestsSecretsSchema
|
||||
});
|
||||
|
||||
export type DecryptedSecret = z.infer<typeof DecryptedSecretSchema>;
|
||||
export type DecryptedSecretVersions = z.infer<typeof DecryptedSecretVersionsSchema>;
|
||||
export type DecryptedSecretApprovals = z.infer<typeof DecryptedSecretApprovalsSchema>;
|
||||
export type DecryptedIntegrationAuths = z.infer<typeof DecryptedIntegrationAuthsSchema>;
|
||||
type DecryptedSecret = z.infer<typeof DecryptedSecretSchema>;
|
||||
type DecryptedSecretVersions = z.infer<typeof DecryptedSecretVersionsSchema>;
|
||||
type DecryptedSecretApprovals = z.infer<typeof DecryptedSecretApprovalsSchema>;
|
||||
type DecryptedIntegrationAuths = z.infer<typeof DecryptedIntegrationAuthsSchema>;
|
||||
|
||||
type TLatestKey = TProjectKeys & {
|
||||
sender: {
|
||||
@@ -79,7 +78,7 @@ const decryptCipher = ({
|
||||
};
|
||||
|
||||
const getDecryptedValues = (data: Array<{ ciphertext: string; iv: string; tag: string }>, key: string | Buffer) => {
|
||||
const results = [];
|
||||
const results: string[] = [];
|
||||
|
||||
for (const { ciphertext, iv, tag } of data) {
|
||||
if (!ciphertext || !iv || !tag) {
|
||||
@@ -16,6 +16,12 @@ import {
|
||||
import { TSecretApprovalRequestDALFactory } from "@app/ee/services/secret-approval-request/secret-approval-request-dal";
|
||||
import { TSecretApprovalRequestSecretDALFactory } from "@app/ee/services/secret-approval-request/secret-approval-request-secret-dal";
|
||||
import { RequestState } from "@app/ee/services/secret-approval-request/secret-approval-request-types";
|
||||
import {
|
||||
decryptIntegrationAuths,
|
||||
decryptSecretApprovals,
|
||||
decryptSecrets,
|
||||
decryptSecretVersions
|
||||
} from "@app/lib/crypto";
|
||||
import {
|
||||
decryptAsymmetric,
|
||||
encryptSymmetric128BitHexKeyUTF8,
|
||||
@@ -23,12 +29,6 @@ import {
|
||||
infisicalSymmetricEncypt
|
||||
} from "@app/lib/crypto/encryption";
|
||||
import { logger } from "@app/lib/logger";
|
||||
import {
|
||||
decryptIntegrationAuths,
|
||||
decryptSecretApprovals,
|
||||
decryptSecrets,
|
||||
decryptSecretVersions
|
||||
} from "@app/lib/secret";
|
||||
import { QueueJobs, QueueName, TQueueJobTypes, TQueueServiceFactory } from "@app/queue";
|
||||
|
||||
import { TIntegrationAuthDALFactory } from "../integration-auth/integration-auth-dal";
|
||||
|
||||
Reference in New Issue
Block a user