From 9fe53a8d54e946c20614199baeb5da9567bed93d Mon Sep 17 00:00:00 2001 From: Alex Bourret Date: Thu, 12 Mar 2026 19:06:28 +0100 Subject: [PATCH 1/6] removing mtls from recipe and connector --- custom-recipes/api-connect/recipe.json | 21 ------------------- .../api-connect_dataset/connector.json | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/custom-recipes/api-connect/recipe.json b/custom-recipes/api-connect/recipe.json index d590d92..cc0fac3 100644 --- a/custom-recipes/api-connect/recipe.json +++ b/custom-recipes/api-connect/recipe.json @@ -291,27 +291,6 @@ "visibilityCondition": "model.auth_type!='secure_oauth' && model.auth_type!='secure_basic'", "defaultValue": false }, - { - "name": "use_mtls", - "label": "Use mTLS", - "description": "", - "type": "BOOLEAN", - "defaultValue": false - }, - { - "name": "mtls_certificate_path", - "label": "Path to certificate", - "description": "", - "type": "STRING", - "visibilityCondition": "model.use_mtls==true" - }, - { - "name": "mtls_key_path", - "label": "Path to key", - "description": "", - "type": "STRING", - "visibilityCondition": "model.use_mtls==true" - }, { "name": "force_csv_parameters", "label": "Force CSV parameters", diff --git a/python-connectors/api-connect_dataset/connector.json b/python-connectors/api-connect_dataset/connector.json index 0dac288..2f34370 100644 --- a/python-connectors/api-connect_dataset/connector.json +++ b/python-connectors/api-connect_dataset/connector.json @@ -238,27 +238,6 @@ "visibilityCondition": "model.auth_type!='secure_oauth' && model.auth_type!='secure_basic'", "defaultValue": false }, - { - "name": "use_mtls", - "label": " ", - "description": "Use mTLS", - "type": "BOOLEAN", - "defaultValue": false - }, - { - "name": "mtls_certificate_path", - "label": "Path to certificate", - "description": "", - "type": "STRING", - "visibilityCondition": "model.use_mtls==true" - }, - { - "name": "mtls_key_path", - "label": "Path to key", - "description": "", - "type": "STRING", - "visibilityCondition": "model.use_mtls==true" - }, { "name": "force_csv_parameters", "label": " ", From 3bf56eaeed9d42a993fea49bec565d67d447c264 Mon Sep 17 00:00:00 2001 From: Alex Bourret Date: Thu, 12 Mar 2026 19:06:59 +0100 Subject: [PATCH 2/6] Moving mtls to secure and normal presets --- parameter-sets/credential/parameter-set.json | 21 +++++++++++++++++++ .../secure-basic/parameter-set.json | 21 +++++++++++++++++++ .../secure-oauth/parameter-set.json | 21 +++++++++++++++++++ python-lib/rest_api_client.py | 14 ++++++++++--- tests/python/integration/test_scenario.py | 4 ++++ 5 files changed, 78 insertions(+), 3 deletions(-) diff --git a/parameter-sets/credential/parameter-set.json b/parameter-sets/credential/parameter-set.json index 4196159..63f0e15 100644 --- a/parameter-sets/credential/parameter-set.json +++ b/parameter-sets/credential/parameter-set.json @@ -119,6 +119,27 @@ "label": "User key/values", "description": "User defined keys/values that can be used later in url, query string...", "type": "KEY_VALUE_LIST" + }, + { + "name": "use_mtls", + "label": " ", + "description": "Use mTLS", + "type": "BOOLEAN", + "defaultValue": false + }, + { + "name": "mtls_certificate_path", + "label": "Path to certificate", + "description": "", + "type": "STRING", + "visibilityCondition": "model.use_mtls==true" + }, + { + "name": "mtls_key_path", + "label": "Path to key", + "description": "", + "type": "STRING", + "visibilityCondition": "model.use_mtls==true" } ] } diff --git a/parameter-sets/secure-basic/parameter-set.json b/parameter-sets/secure-basic/parameter-set.json index 623d24d..e3181da 100644 --- a/parameter-sets/secure-basic/parameter-set.json +++ b/parameter-sets/secure-basic/parameter-set.json @@ -38,6 +38,27 @@ "label": "NTLM" } ] + }, + { + "name": "use_mtls", + "label": " ", + "description": "Use mTLS", + "type": "BOOLEAN", + "defaultValue": false + }, + { + "name": "mtls_certificate_path", + "label": "Path to certificate", + "description": "", + "type": "STRING", + "visibilityCondition": "model.use_mtls==true" + }, + { + "name": "mtls_key_path", + "label": "Path to key", + "description": "", + "type": "STRING", + "visibilityCondition": "model.use_mtls==true" } ] } diff --git a/parameter-sets/secure-oauth/parameter-set.json b/parameter-sets/secure-oauth/parameter-set.json index 464f9ac..5be17e7 100644 --- a/parameter-sets/secure-oauth/parameter-set.json +++ b/parameter-sets/secure-oauth/parameter-set.json @@ -47,6 +47,27 @@ "label": "Domain", "description": "", "type": "STRING" + }, + { + "name": "use_mtls", + "label": " ", + "description": "Use mTLS", + "type": "BOOLEAN", + "defaultValue": false + }, + { + "name": "mtls_certificate_path", + "label": "Path to certificate", + "description": "", + "type": "STRING", + "visibilityCondition": "model.use_mtls==true" + }, + { + "name": "mtls_key_path", + "label": "Path to key", + "description": "", + "type": "STRING", + "visibilityCondition": "model.use_mtls==true" } ] } diff --git a/python-lib/rest_api_client.py b/python-lib/rest_api_client.py index 57a542e..1ee4519 100644 --- a/python-lib/rest_api_client.py +++ b/python-lib/rest_api_client.py @@ -59,9 +59,17 @@ def __init__(self, credential, secure_credentials, endpoint, custom_key_values={ self.requests_kwargs.update({"verify": False}) else: self.requests_kwargs.update({"verify": True}) - if endpoint.get("use_mtls", False): - mtls_certificate_path = endpoint.get("mtls_certificate_path") - mtls_key_path = endpoint.get("mtls_key_path") + if credential.get("use_mtls", False): + mtls_certificate_path = credential.get("mtls_certificate_path") + mtls_key_path = credential.get("mtls_key_path") + self.requests_kwargs.update( + { + "cert": (mtls_certificate_path, mtls_key_path) + } + ) + if secure_credentials.get("use_mtls", False): + mtls_certificate_path = secure_credentials.get("mtls_certificate_path") + mtls_key_path = secure_credentials.get("mtls_key_path") self.requests_kwargs.update( { "cert": (mtls_certificate_path, mtls_key_path) diff --git a/tests/python/integration/test_scenario.py b/tests/python/integration/test_scenario.py index 63c41af..315b6fc 100644 --- a/tests/python/integration/test_scenario.py +++ b/tests/python/integration/test_scenario.py @@ -57,3 +57,7 @@ def test_run_api_connect_xml_handling(user_dss_clients): def test_run_api_connect_parameters_renaming(user_dss_clients): dss_scenario.run(user_dss_clients, project_key=TEST_PROJECT_KEY, scenario_id="COLUMNPARAMETERRENAMING") + + +def test_run_api_connect_mtls(user_dss_clients): + dss_scenario.run(user_dss_clients, project_key=TEST_PROJECT_KEY, scenario_id="MTLS") From 1875efa601e47c793e5490147554e84ac27c6b5d Mon Sep 17 00:00:00 2001 From: Alex Bourret Date: Fri, 13 Mar 2026 14:48:47 +0100 Subject: [PATCH 3/6] adding warnings --- parameter-sets/credential/parameter-set.json | 4 ++-- parameter-sets/secure-basic/parameter-set.json | 10 ++++++++-- parameter-sets/secure-oauth/parameter-set.json | 10 ++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/parameter-sets/credential/parameter-set.json b/parameter-sets/credential/parameter-set.json index 63f0e15..3035645 100644 --- a/parameter-sets/credential/parameter-set.json +++ b/parameter-sets/credential/parameter-set.json @@ -122,8 +122,8 @@ }, { "name": "use_mtls", - "label": " ", - "description": "Use mTLS", + "label": "Use mTLS", + "description": "", "type": "BOOLEAN", "defaultValue": false }, diff --git a/parameter-sets/secure-basic/parameter-set.json b/parameter-sets/secure-basic/parameter-set.json index e3181da..d54f19d 100644 --- a/parameter-sets/secure-basic/parameter-set.json +++ b/parameter-sets/secure-basic/parameter-set.json @@ -41,11 +41,17 @@ }, { "name": "use_mtls", - "label": " ", - "description": "Use mTLS", + "label": "Use mTLS", + "description": "", "type": "BOOLEAN", "defaultValue": false }, + { + "type": "SEPARATOR", + "label": "Warning", + "description": "Restricting access to this presset will not restrict access to the certificate and key files. This has to be done by setting the appropriate access rights on these two files.", + "visibilityCondition": "model.use_mtls==true" + }, { "name": "mtls_certificate_path", "label": "Path to certificate", diff --git a/parameter-sets/secure-oauth/parameter-set.json b/parameter-sets/secure-oauth/parameter-set.json index 5be17e7..79da6d0 100644 --- a/parameter-sets/secure-oauth/parameter-set.json +++ b/parameter-sets/secure-oauth/parameter-set.json @@ -50,11 +50,17 @@ }, { "name": "use_mtls", - "label": " ", - "description": "Use mTLS", + "label": "Use mTLS", + "description": "", "type": "BOOLEAN", "defaultValue": false }, + { + "type": "SEPARATOR", + "label": "Warning", + "description": "1 - Restricting access to this presset will not restrict access to the certificate and key files. This has to be done by setting the appropriate access rights on these two files.\n2 - Because the OAuth flow is not controled by the plugin, mTLS cannot be used for the retrieving the access token itself.", + "visibilityCondition": "model.use_mtls==true" + }, { "name": "mtls_certificate_path", "label": "Path to certificate", From bd623021c9406070101b9ff728dc991293c0da0d Mon Sep 17 00:00:00 2001 From: Alex Bourret Date: Fri, 13 Mar 2026 16:14:50 +0100 Subject: [PATCH 4/6] beta.4 --- python-lib/dku_constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-lib/dku_constants.py b/python-lib/dku_constants.py index 8bf962b..b20ccde 100644 --- a/python-lib/dku_constants.py +++ b/python-lib/dku_constants.py @@ -2,6 +2,6 @@ class DKUConstants(object): API_RESPONSE_KEY = "api_response" FORBIDDEN_KEYS = ["token", "password", "api_key_value", "secure_token"] FORM_DATA_BODY_FORMAT = "FORM_DATA" - PLUGIN_VERSION = "1.2.7-beta.3" + PLUGIN_VERSION = "1.2.7-beta.4" RAW_BODY_FORMAT = "RAW" REPONSE_ERROR_KEY = "dku_error" From 4cf349067e2cb627474611bfc521973d2cdbf95f Mon Sep 17 00:00:00 2001 From: Alex Bourret Date: Mon, 16 Mar 2026 17:12:45 +0100 Subject: [PATCH 5/6] update tags and category --- plugin.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.json b/plugin.json index afb4273..88ad213 100644 --- a/plugin.json +++ b/plugin.json @@ -6,8 +6,7 @@ "description": "Retrieve data from any REST API", "author": "Dataiku (Alex Bourret)", "icon": "icon-rocket", - "category": "Connect", - "tags": ["API", "Recipe", "Dataset"], + "tags": ["Connector"], "url": "https://www.dataiku.com/product/plugins/api-connect/", "licenseInfo": "Apache Software License", "recipesCategory": "visual" From c5a0c20662b8bc3a7ca61301fe8b72f41bfdb3ed Mon Sep 17 00:00:00 2001 From: Alex Bourret Date: Tue, 24 Mar 2026 16:21:57 +0100 Subject: [PATCH 6/6] removing beta tag --- python-lib/dku_constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-lib/dku_constants.py b/python-lib/dku_constants.py index b20ccde..3736450 100644 --- a/python-lib/dku_constants.py +++ b/python-lib/dku_constants.py @@ -2,6 +2,6 @@ class DKUConstants(object): API_RESPONSE_KEY = "api_response" FORBIDDEN_KEYS = ["token", "password", "api_key_value", "secure_token"] FORM_DATA_BODY_FORMAT = "FORM_DATA" - PLUGIN_VERSION = "1.2.7-beta.4" + PLUGIN_VERSION = "1.2.7" RAW_BODY_FORMAT = "RAW" REPONSE_ERROR_KEY = "dku_error"