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
Add quote for jq
Fang-Pen Lin5b2c0583e080
diff --git a/backend/bdd/features/pki/acme/auth.feature b/backend/bdd/features/pki/acme/auth.featureindex b1b8ee5ae1..dd824d18f9 100644--- a/backend/bdd/features/pki/acme/auth.feature+++ b/backend/bdd/features/pki/acme/auth.feature@@ -17,8 +17,8 @@ Feature: AuthorizationThen I sign the certificate signing request csr with private key cert_key and output it as csr_pem in PEM formatThen I submit the certificate signing request PEM csr_pem certificate order to the ACME server as orderThen the value order.authorizations[0].uri with jq . should match pattern {BASE_URL}/api/v1/pki/acme/profiles/{acme_profile.id}/authorizations/(.+)- Then the value order.authorizations[0].body with jq .status should be equal to "pending"- Then the value order.authorizations[0].body with jq .challenges | map(pick(.type, .status)) | sort_by(.type) should be equal to json+ Then the value order.authorizations[0].body with jq ".status" should be equal to "pending"+ Then the value order.authorizations[0].body with jq ".challenges | map(pick(.type, .status)) | sort_by(.type)" should be equal to json"""[{@@ -27,8 +27,8 @@ Feature: Authorization}]"""- Then the value order.authorizations[0].body with jq .challenges | map(.status) | sort should be equal to ["pending"]- Then the value order.authorizations[0].body with jq .identifier should be equal to json+ Then the value order.authorizations[0].body with jq ".challenges | map(.status) | sort" should be equal to ["pending"]+ Then the value order.authorizations[0].body with jq ".identifier" should be equal to json"""{"type": "dns",diff --git a/backend/bdd/features/pki/acme/cert-profile.feature b/backend/bdd/features/pki/acme/cert-profile.featureindex 042f86e399..564b060132 100644--- a/backend/bdd/features/pki/acme/cert-profile.feature+++ b/backend/bdd/features/pki/acme/cert-profile.feature@@ -16,11 +16,11 @@ Feature: ACME Cert Profile}"""Then the value response.status_code should be equal to 200- Then the value response with jq .certificateProfile.id should be present- Then the value response with jq .certificateProfile.slug should be equal to "{profile_slug}"- Then the value response with jq .certificateProfile.caId should be equal to "{CERT_CA_ID}"- Then the value response with jq .certificateProfile.certificateTemplateId should be equal to "{CERT_TEMPLATE_ID}"- Then the value response with jq .certificateProfile.enrollmentType should be equal to "acme"+ Then the value response with jq ".certificateProfile.id" should be present+ Then the value response with jq ".certificateProfile.slug" should be equal to "{profile_slug}"+ Then the value response with jq ".certificateProfile.caId" should be equal to "{CERT_CA_ID}"+ Then the value response with jq ".certificateProfile.certificateTemplateId" should be equal to "{CERT_TEMPLATE_ID}"+ Then the value response with jq ".certificateProfile.enrollmentType" should be equal to "acme"Scenario: Reveal EAB secretGiven I make a random slug as profile_slug@@ -41,5 +41,5 @@ Feature: ACME Cert ProfileAnd I memorize response with jq ".certificateProfile.id" as profile_idWhen I send a GET request to "/api/v1/pki/certificate-profiles/{profile_id}/acme/eab-secret/reveal"Then the value response.status_code should be equal to 200- Then the value response with jq .eabKid should be equal to "{profile_id}"- Then the value response with jq .eabSecret should be present+ Then the value response with jq ".eabKid" should be equal to "{profile_id}"+ Then the value response with jq ".eabSecret" should be presentdiff --git a/backend/bdd/features/pki/acme/order.feature b/backend/bdd/features/pki/acme/order.featureindex d9cf5c2689..1ba2c3570f 100644--- a/backend/bdd/features/pki/acme/order.feature+++ b/backend/bdd/features/pki/acme/order.feature@@ -45,7 +45,7 @@ Feature: OrderThen I create a RSA private key pair as cert_keyThen I sign the certificate signing request csr with private key cert_key and output it as csr_pem in PEM formatThen I submit the certificate signing request PEM csr_pem certificate order to the ACME server as order- Then the value order.body with jq .identifiers | sort_by(.value) should be equal to json+ Then the value order.body with jq ".identifiers | sort_by(.value)" should be equal to json"""[{"type": "dns", "value": "example.com"},@@ -71,7 +71,7 @@ Feature: OrderThen I sign the certificate signing request csr with private key cert_key and output it as csr_pem in PEM formatThen I submit the certificate signing request PEM csr_pem certificate order to the ACME server as orderThen I send an ACME post-as-get to order.uri as fetched_order- Then the value fetched_order with jq .status should be equal to "pending"- Then the value fetched_order with jq .identifiers should be equal to [{"type": "dns", "value": "localhost"}]- Then the value fetched_order with jq .finalize should match pattern {BASE_URL}/api/v1/pki/acme/profiles/{acme_profile.id}/orders/(.+)/finalize- Then the value fetched_order with jq all(.authorizations[]; startswith("{BASE_URL}/api/v1/pki/acme/profiles/{acme_profile.id}/authorizations/")) should be equal to true+ Then the value fetched_order with jq ".status" should be equal to "pending"+ Then the value fetched_order with jq ".identifiers" should be equal to [{"type": "dns", "value": "localhost"}]+ Then the value fetched_order with jq ".finalize" should match pattern {BASE_URL}/api/v1/pki/acme/profiles/{acme_profile.id}/orders/(.+)/finalize+ Then the value fetched_order with jq "all(.authorizations[]; startswith('{BASE_URL}/api/v1/pki/acme/profiles/{acme_profile.id}/authorizations/'))" should be equal to truediff --git a/backend/bdd/features/steps/pki_acme.py b/backend/bdd/features/steps/pki_acme.pyindex 4c33b42b1f..855195ac5f 100644--- a/backend/bdd/features/steps/pki_acme.py+++ b/backend/bdd/features/steps/pki_acme.py@@ -314,7 +314,7 @@ def step_impl(context: Context, var_path: str, jq_query: str):)-@then("the value {var_path} with jq {jq_query} should be present")+@then('the value {var_path} with jq "{jq_query}" should be present')def step_impl(context: Context, var_path: str, jq_query: str):value, result = apply_value_with_jq(context=context,@@ -326,7 +326,7 @@ def step_impl(context: Context, var_path: str, jq_query: str):)-@then("the value {var_path} with jq {jq_query} should be equal to {expected}")+@then('the value {var_path} with jq "{jq_query}" should be equal to {expected}')def step_impl(context: Context, var_path: str, jq_query: str, expected: str):value, result = apply_value_with_jq(context=context,@@ -339,7 +339,7 @@ def step_impl(context: Context, var_path: str, jq_query: str, expected: str):)-@then("the value {var_path} with jq {jq_query} should match pattern {regex}")+@then('the value {var_path} with jq "{jq_query}" should match pattern {regex}')def step_impl(context: Context, var_path: str, jq_query: str, regex: str):value, result = apply_value_with_jq(context=context,