Skip to content

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

Fix more tests

Fang-Pen Lind792a79da8f6
diff --git a/backend/bdd/features/pki/acme/access-control.feature b/backend/bdd/features/pki/acme/access-control.feature
index 96da3f7c89..3bbc458dbf 100644
--- a/backend/bdd/features/pki/acme/access-control.feature
+++ b/backend/bdd/features/pki/acme/access-control.feature
@@ -126,7 +126,7 @@ Feature: Access Control
"url": "<url>",
"kid": "{acme_account1.uri}"
},
- "raw_payload": "<payload>"
+ "payload": {}
}
"""
Then the value response.status_code should be equal to 404
@@ -140,6 +140,7 @@ Feature: Access Control
| order | .authorizations[0].uri | auth_uri | {auth_uri} | |
| order | .authorizations[0].body.challenges[0].url | challenge_uri | {challenge_uri} | {} |
+
Scenario Outline: Access resources across a different profile with the same key pair
Given I have an ACME cert profile as "acme_profile"
When I have an ACME client connecting to "{BASE_URL}/api/v1/pki/acme/profiles/{acme_profile.id}/directory"
diff --git a/backend/src/ee/services/pki-acme/pki-acme-fns.ts b/backend/src/ee/services/pki-acme/pki-acme-fns.ts
index 08659c8535..d828778912 100644
--- a/backend/src/ee/services/pki-acme/pki-acme-fns.ts
+++ b/backend/src/ee/services/pki-acme/pki-acme-fns.ts
@@ -13,7 +13,7 @@ export const buildUrl = (profileId: string, path: string): string => {
export const extractAccountIdFromKid = (kid: string, profileId: string): string => {
const kidPrefix = buildUrl(profileId, "/accounts/");
if (!kid.startsWith(kidPrefix)) {
- throw new AcmeMalformedError({ message: "KID must start with the profile account URL" });
+ throw new AcmeAccountDoesNotExistError({ message: "KID must start with the profile account URL" });
}
return z.string().uuid().parse(kid.slice(kidPrefix.length));
};