misc: add kmip metadata to the other kmip routes

This commit is contained in:
Sheen Capadngan
2025-10-29 18:12:11 +08:00
parent f31c593855
commit 0d3ab1158a
3 changed files with 8 additions and 4 deletions

View File

@@ -182,7 +182,8 @@ export const registerKmipSpecRouter = async (server: FastifyZodProvider) => {
algorithm: z.string(),
isActive: z.boolean(),
createdAt: z.date(),
updatedAt: z.date()
updatedAt: z.date(),
kmipMetadata: z.record(z.any()).nullish()
})
}
},
@@ -384,7 +385,8 @@ export const registerKmipSpecRouter = async (server: FastifyZodProvider) => {
isActive: z.boolean(),
algorithm: z.string(),
createdAt: z.date(),
updatedAt: z.date()
updatedAt: z.date(),
kmipMetadata: z.record(z.any()).nullish()
})
.array()
})

View File

@@ -341,7 +341,8 @@ export const kmipOperationServiceFactory = ({
algorithm: completeKeyDetails.internalKms.encryptionAlgorithm,
isActive: !key.isDisabled,
createdAt: key.createdAt,
updatedAt: key.updatedAt
updatedAt: key.updatedAt,
kmipMetadata: key.kmipMetadata as Record<string, unknown>
};
};

View File

@@ -112,7 +112,8 @@ export const kmskeyDALFactory = (db: TDbClient) => {
...KmsKeysSchema.parse(entry),
isActive: !entry.isDisabled,
algorithm: entry.internalKmsEncryptionAlgorithm,
version: entry.internalKmsVersion
version: entry.internalKmsVersion,
kmipMetadata: entry.kmipMetadata as Record<string, unknown>
}));
} catch (error) {
throw new DatabaseError({ error, name: "Find project cmeks" });