Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Version 1.2.7](https://github.com/dataiku/dss-plugin-api-connect/releases/tag/v1.2.7) - Feature - 2026-02-18

- Detecting dialect for better csv decoding
- Adding mutual TLS authentication
- Fixing duplication of last line in csv APIs using the recipe

## [Version 1.2.6](https://github.com/dataiku/dss-plugin-api-connect/releases/tag/v1.2.6) - Feature - 2025-09-24
Expand Down
21 changes: 21 additions & 0 deletions custom-recipes/api-connect/recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,27 @@
"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": "redirect_auth_header",
"label": "Redirect authorization header",
Expand Down
21 changes: 21 additions & 0 deletions python-connectors/api-connect_dataset/connector.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,27 @@
"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": "redirect_auth_header",
"label": " ",
Expand Down
3 changes: 2 additions & 1 deletion python-lib/dku_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def get_endpoint_parameters(configuration):
"requests_per_minute",
"pagination_type",
"next_page_url_key", "is_next_page_url_relative", "next_page_url_base",
"top_key", "skip_key", "maximum_number_rows"
"top_key", "skip_key", "maximum_number_rows",
"use_mtls", "mtls_certificate_path", "mtls_key_path",
]
parameters = {
endpoint_parameter: configuration.get(endpoint_parameter) for endpoint_parameter in endpoint_parameters if configuration.get(endpoint_parameter) is not None
Expand Down
8 changes: 8 additions & 0 deletions python-lib/rest_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ 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")
self.requests_kwargs.update(
{
"cert": (mtls_certificate_path, mtls_key_path)
}
)
self.redirect_auth_header = endpoint.get("redirect_auth_header", False)
self.timeout = endpoint.get("timeout", -1)
if self.timeout > 0:
Expand Down