Skip to content

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

Tell server challenge is ready

Fang-Pen Linb989777ed60a
diff --git a/backend/bdd/features/pki/acme/challenge.feature b/backend/bdd/features/pki/acme/challenge.feature
index 2079b9a576..e6b0b78854 100644
--- a/backend/bdd/features/pki/acme/challenge.feature
+++ b/backend/bdd/features/pki/acme/challenge.feature
@@ -18,4 +18,5 @@ Feature: Challenge
Then I submit the certificate signing request PEM csr_pem certificate order to the ACME server as order
Then I select challenge with type http-01 for domain localhost from order at order as challenge
Then I serve challenge response for challenge at localhost
+ Then I tell ACME server that challenge is ready to be verified
diff --git a/backend/bdd/features/steps/pki_acme.py b/backend/bdd/features/steps/pki_acme.py
index 1c88b0c23a..7562cfd2c5 100644
--- a/backend/bdd/features/steps/pki_acme.py
+++ b/backend/bdd/features/steps/pki_acme.py
@@ -364,3 +364,12 @@ def step_impl(context: Context, var_path: str, hostname: str):
web_server.daemon = True
web_server.start()
context.web_server = web_server
+
+
+@then("I tell ACME server that {var_path} is ready to be verified")
+def step_impl(context: Context, var_path: str):
+ challenge = eval_var(context, var_path, as_json=False)
+ acme_challenge = challenge.chall
+ acme_client = challenge.acme_client
+ response, validation = acme_challenge.response_and_validation(acme_client.net.key)
+ acme_client.answer_challenge(acme_challenge, response)