Skip to content

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

Fix type

Carlos Monastyrskie009e21d43c8
diff --git a/backend/src/services/certificate-policy/certificate-policy-dal.ts b/backend/src/services/certificate-policy/certificate-policy-dal.ts
index f44ca6b979..e5d7e25392 100644
--- a/backend/src/services/certificate-policy/certificate-policy-dal.ts
+++ b/backend/src/services/certificate-policy/certificate-policy-dal.ts
@@ -222,7 +222,7 @@ export const certificatePolicyDALFactory = (db: TDbClient) => {
const profileUsage = parseInt((profileCount as unknown as CountResult).count || "0", 10) > 0;
const certCount = await (tx || db)(TableName.Certificate)
- .where({ certificatePolicyId: policyId })
+ .where({ certificateTemplateId: policyId })
.count("*")
.first();
diff --git a/backend/src/services/certificate-v3/certificate-v3-service.test.ts b/backend/src/services/certificate-v3/certificate-v3-service.test.ts
index 28559cf6b6..b0009cfa5d 100644
--- a/backend/src/services/certificate-v3/certificate-v3-service.test.ts
+++ b/backend/src/services/certificate-v3/certificate-v3-service.test.ts
@@ -548,7 +548,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1015,7 +1015,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1037,7 +1037,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1059,7 +1059,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1174,7 +1174,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1196,7 +1196,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1218,7 +1218,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1333,7 +1333,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1355,7 +1355,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1377,7 +1377,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1492,7 +1492,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1514,7 +1514,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
@@ -1536,7 +1536,7 @@ describe("CertificateV3Service", () => {
notBefore: new Date(),
notAfter: new Date(),
caId: "ca-1",
- certificatePolicyId: "template-1",
+ certificateTemplateId: "template-1",
revokedAt: null,
altNames: null,
caCertId: null,
diff --git a/backend/src/services/certificate-v3/certificate-v3-service.ts b/backend/src/services/certificate-v3/certificate-v3-service.ts
index 47c593b5e6..a480c6afc7 100644
--- a/backend/src/services/certificate-v3/certificate-v3-service.ts
+++ b/backend/src/services/certificate-v3/certificate-v3-service.ts
@@ -1570,7 +1570,7 @@ export const certificateV3ServiceFactory = ({
}
}
- const policyId = profile?.certificatePolicyId || originalCert.certificatePolicyId;
+ const policyId = profile?.certificatePolicyId || originalCert.certificateTemplateId;
const policy = policyId
? await certificatePolicyService.getPolicyById({
actor,