diff --git a/backend/bdd/features/steps/pki_acme.py b/backend/bdd/features/steps/pki_acme.py index c5627bb8b..02074f92c 100644 --- a/backend/bdd/features/steps/pki_acme.py +++ b/backend/bdd/features/steps/pki_acme.py @@ -350,15 +350,14 @@ def step_impl(context: Context, var_path: str, hostname: str): if hostname != "localhost": raise ValueError("Currently only localhost is supported") challenge = eval_var(context, var_path, as_json=False) - acme_challenge = challenge.chall - response, validation = acme_challenge.response_and_validation( + response, validation = challenge.response_and_validation( context.acme_client.net.key ) resource = standalone.HTTP01RequestHandler.HTTP01Resource( - chall=acme_challenge, response=response, validation=validation + chall=challenge, response=response, validation=validation ) # TODO: make port configurable - servers = standalone.HTTP01DualNetworkedServers(("", 8087), resource) + servers = standalone.HTTP01DualNetworkedServers(("0.0.0.0", 8087), resource) # Start client standalone web server. web_server = threading.Thread(name="web_server", target=servers.serve_forever) web_server.daemon = True 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 d6cf92a48..f1d60b241 100644 --- a/backend/src/ee/services/pki-acme/pki-acme-service.ts +++ b/backend/src/ee/services/pki-acme/pki-acme-service.ts @@ -413,7 +413,7 @@ export const pkiAcmeServiceFactory = ({ // RFC 8555 suggests a token with at least 128 bits of entropy // We are using 256 bits of entropy here, should be enough for now // ref: https://datatracker.ietf.org/doc/html/rfc8555#section-11.3 - token: crypto.randomBytes(32).toString("base64"), + token: crypto.randomBytes(32).toString("base64url"), // TODO: read config from the profile to get the expiration time instead expiresAt: new Date(Date.now() + 24 * 60 * 60 * 1000) },