Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Fix bootstrap auth
Fang-Pen Linc4b759b6a876
diff --git a/.gitignore b/.gitignoreindex f2a23324b8..b4e9a07c2f 100644--- a/.gitignore+++ b/.gitignore@@ -71,5 +71,6 @@ frontend-buildcli/infisical-mergecli/test/infisical-merge/backend/binary+backend/bdd/.bdd-infisical-bootstrap-result.json/npm/bindiff --git a/backend/bdd/features/environment.py b/backend/bdd/features/environment.pyindex c77646358b..52615036a7 100644--- a/backend/bdd/features/environment.py+++ b/backend/bdd/features/environment.py@@ -21,7 +21,7 @@ BOOTSTRAP_INFISICAL = int(os.environ.get("BOOTSTRAP_INFISICAL", 0))# Called mostly from a CI to setup the new Infisical instance to get it ready for BDD testsdef bootstrap_infisical(context: Context):- bootstrap_result_file = pathlib.Path.cwd() / ".bootstrap-result.json"+ bootstrap_result_file = pathlib.Path.cwd() / ".bdd-infisical-bootstrap-result.json"if bootstrap_result_file.exists():logger.info("Bootstrap result file exists at %s, loading it now", bootstrap_result_file@@ -45,6 +45,15 @@ def bootstrap_infisical(context: Context):user = body["user"]temp_token = body["token"]+ resp = client.post(+ "/api/v3/auth/select-organization",+ headers={"Authorization": f"Bearer {temp_token}"},+ json={"organizationId": org["id"]},+ )+ resp.raise_for_status()+ body = resp.json()+ temp_token = body["token"]+resp = client.post("/api/v1/auth/token",headers={"Authorization": f"Bearer {temp_token}"},@@ -96,7 +105,7 @@ def bootstrap_infisical(context: Context):)resp.raise_for_status()body = resp.json()- ca = body["certificateAuthorities"]+ ca = bodycert_template_slug = faker.slug()resp = client.post(