feat: kms db schema changes to support external and internal kms uniformly

This commit is contained in:
=
2024-07-10 12:48:35 +05:30
parent ebbccdb857
commit 71c49c8b90
9 changed files with 266 additions and 10 deletions
+2 -7
View File
@@ -5,20 +5,15 @@
import { z } from "zod";
import { zodBuffer } from "@app/lib/zod";
import { TImmutableDBKeys } from "./models";
export const KmsKeysSchema = z.object({
id: z.string().uuid(),
encryptedKey: zodBuffer,
encryptionAlgorithm: z.string(),
version: z.number().default(1),
description: z.string().nullable().optional(),
isDisabled: z.boolean().default(false).nullable().optional(),
isReserved: z.boolean().default(true).nullable().optional(),
projectId: z.string().nullable().optional(),
orgId: z.string().uuid().nullable().optional()
orgId: z.string().uuid(),
slug: z.string()
});
export type TKmsKeys = z.infer<typeof KmsKeysSchema>;