Skip to content

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

fix: use originalCert.profileId to enforce original issuance profile on renewal

bernie-g7013e8aac67b
diff --git a/backend/src/services/certificate-v3/certificate-v3-service.ts b/backend/src/services/certificate-v3/certificate-v3-service.ts
index 614344a61b..f6ca952597 100644
--- a/backend/src/services/certificate-v3/certificate-v3-service.ts
+++ b/backend/src/services/certificate-v3/certificate-v3-service.ts
@@ -2333,8 +2333,12 @@ export const certificateV3ServiceFactory = ({
const projectId = profile?.projectId || originalCert.projectId;
if (originalCert.applicationId) {
+ const originalProfile = await certificateProfileDAL.findByIdWithConfigs(originalCert.profileId!);
+ if (!originalProfile) {
+ throw new NotFoundError({ message: "Original certificate profile not found" });
+ }
await $resolveApplicationIdForProfile(
- profile,
+ originalProfile,
originalCert.applicationId,
{
actor,