Skip to content

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

Fix EAB cal

Fang-Pen Lin72717cdc584a
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 930e22872b..2dee5e7f15 100644
--- a/backend/src/ee/services/pki-acme/pki-acme-service.ts
+++ b/backend/src/ee/services/pki-acme/pki-acme-service.ts
@@ -352,11 +352,8 @@ export const pkiAcmeServiceFactory = ({
// Make sure the JWK in the EAB payload matches the one provided in the outer JWS payload
const decoder = new TextDecoder();
const decodedEabPayload = decoder.decode(eabPayload);
- const eabPayloadJson = JSON.parse(decodedEabPayload);
- const eabPayloadJwkThumbprint = await calculateJwkThumbprint(
- eabPayloadJson.jwk as JsonWebKey,
- alg as "sha256" | "sha384" | "sha512"
- );
+ const eabJWK = JSON.parse(decodedEabPayload);
+ const eabPayloadJwkThumbprint = await calculateJwkThumbprint(eabJWK, "sha256");
if (eabPayloadJwkThumbprint !== publicKeyThumbprint || eabAlg !== alg) {
throw new AcmeBadPublicKeyError({
message: "External account binding public key thumbprint or algorithm mismatch"