mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 03:31:27 +00:00
misc: integrated custom key usages for issue-cert endpoint
This commit is contained in:
@@ -50,9 +50,7 @@ export const certificateTemplateDALFactory = (db: TDbClient) => {
|
||||
)
|
||||
.first();
|
||||
|
||||
if (certTemplate) {
|
||||
return { ...certTemplate, keyUsages: certTemplate.keyUsages || [] };
|
||||
}
|
||||
return certTemplate;
|
||||
} catch (error) {
|
||||
throw new DatabaseError({ error, name: "Get certificate template by ID" });
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@ export const sanitizedCertificateTemplate = CertificateTemplatesSchema.pick({
|
||||
commonName: true,
|
||||
subjectAlternativeName: true,
|
||||
pkiCollectionId: true,
|
||||
ttl: true
|
||||
ttl: true,
|
||||
keyUsages: true
|
||||
}).merge(
|
||||
z.object({
|
||||
projectId: z.string(),
|
||||
caName: z.string(),
|
||||
keyUsages: z.string().array()
|
||||
caName: z.string()
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user