Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

misc: updated kmip metadata handling

Sheen Capadnganf43af55ca25e
diff --git a/backend/src/ee/routes/v1/kmip-spec-router.ts b/backend/src/ee/routes/v1/kmip-spec-router.ts
index c7db12de9e..6fcf05d992 100644
--- a/backend/src/ee/routes/v1/kmip-spec-router.ts
+++ b/backend/src/ee/routes/v1/kmip-spec-router.ts
@@ -129,7 +129,7 @@ export const registerKmipSpecRouter = async (server: FastifyZodProvider) => {
id: z.string(),
value: z.string(),
algorithm: z.string(),
- kmipMetadata: z.record(z.any()).optional()
+ kmipMetadata: z.record(z.any()).nullish()
})
}
},
@@ -435,7 +435,7 @@ export const registerKmipSpecRouter = async (server: FastifyZodProvider) => {
key: z.string(),
name: z.string(),
algorithm: z.nativeEnum(SymmetricKeyAlgorithm),
- kmipMetadata: z.record(z.any()).optional()
+ kmipMetadata: z.record(z.any()).nullish()
}),
response: {
200: z.object({
diff --git a/backend/src/ee/services/kmip/kmip-types.ts b/backend/src/ee/services/kmip/kmip-types.ts
index c37d511c66..695f469424 100644
--- a/backend/src/ee/services/kmip/kmip-types.ts
+++ b/backend/src/ee/services/kmip/kmip-types.ts
@@ -78,7 +78,7 @@ export type TKmipRegisterDTO = {
name: string;
key: string;
algorithm: SymmetricKeyAlgorithm;
- kmipMetadata?: Record<string, unknown>;
+ kmipMetadata?: Record<string, unknown> | null;
} & KmipOperationBaseDTO;
export type TSetupOrgKmipDTO = {
diff --git a/backend/src/services/kms/kms-types.ts b/backend/src/services/kms/kms-types.ts
index eaf0adbdec..11badd7a51 100644
--- a/backend/src/services/kms/kms-types.ts
+++ b/backend/src/services/kms/kms-types.ts
@@ -99,5 +99,5 @@ export type TImportKeyMaterialDTO = {
projectId: string;
orgId: string;
keyUsage: KmsKeyUsage;
- kmipMetadata?: Record<string, unknown>;
+ kmipMetadata?: Record<string, unknown> | null;
};