Skip to content

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

Fix type errors

Fang-Pen Lin25a08d28d091
diff --git a/backend/src/ee/services/pki-acme/pki-acme-service.ts b/backend/src/ee/services/pki-acme/pki-acme-service.ts
index 237eb2061f..90c5a4ddc4 100644
--- a/backend/src/ee/services/pki-acme/pki-acme-service.ts
+++ b/backend/src/ee/services/pki-acme/pki-acme-service.ts
@@ -267,7 +267,12 @@ export const pkiAcmeServiceFactory = ({
expiresAt: Date;
notBefore?: Date | null;
notAfter?: Date | null;
- authorizations: TPkiAcmeAuths[];
+ authorizations: {
+ id: string;
+ identifierType: string;
+ identifierValue: string;
+ expiresAt: Date;
+ }[];
};
profileId: string;
}): TAcmeOrderResource => {
@@ -276,13 +281,11 @@ export const pkiAcmeServiceFactory = ({
expires: order.expiresAt.toISOString(),
notBefore: order.notBefore?.toISOString(),
notAfter: order.notAfter?.toISOString(),
- identifiers: order.authorizations.map((auth: TPkiAcmeAuths) => ({
+ identifiers: order.authorizations.map((auth) => ({
type: auth.identifierType,
value: auth.identifierValue
})),
- authorizations: order.authorizations.map((auth: TPkiAcmeAuths) =>
- buildUrl(profileId, `/authorizations/${auth.id}`)
- ),
+ authorizations: order.authorizations.map((auth) => buildUrl(profileId, `/authorizations/${auth.id}`)),
finalize: buildUrl(profileId, `/orders/${order.id}/finalize`),
certificate:
order.status === AcmeOrderStatus.Valid ? buildUrl(profileId, `/orders/${order.id}/certificate`) : undefined
@@ -630,7 +633,7 @@ export const pkiAcmeServiceFactory = ({
},
tx
);
- // TODO: log the error
+ logger.error(error, "Failed to sign certificate");
// TODO: audit log the error
if (error instanceof BadRequestError) {
errorToReturn = new AcmeBadCSRError({ detail: `Invalid CSR: ${error.message}` });