made certificates store PK and chain in relation to the main table, added /bundle endpoints, new audit log and permission entries

This commit is contained in:
x
2025-04-30 00:33:46 -04:00
parent e81c49500b
commit e475774910
10 changed files with 239 additions and 24 deletions
@@ -72,7 +72,6 @@ export const getCertificateCredentials = async ({
projectDAL,
kmsService
});
const kmsDecryptor = await kmsService.decryptWithKmsKey({
kmsId: keyId
});
@@ -80,7 +79,7 @@ export const getCertificateCredentials = async ({
cipherTextBlob: certificateSecret.encryptedPrivateKey
});
const skObj = crypto.createPrivateKey({ key: decryptedPrivateKey, format: "der", type: "pkcs8" });
const skObj = crypto.createPrivateKey({ key: decryptedPrivateKey, format: "pem", type: "pkcs8" });
const certPrivateKey = skObj.export({ format: "pem", type: "pkcs8" }).toString();
const pkObj = crypto.createPublicKey(skObj);