dataiku / dataiku/dataiku-api-client-python
Dataikuapi is not correctly honoring "DKU_NO_CHECK_CERTIFICATE" in requests
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 44
- Forks
- 29
- Merge moyen
- 3 h 34 min
- PR mergées (30 j)
- 2
Description
In theory, Dataiku supports using self-signed certificates by setting e.g. using an environmental variable DKU_NO_CHECK_CERTIFICATE or by setting no_check_certificate=True in the set_remote function call of the non-open source dataiku package.
However, this parameter is not passed to the api_client(), which causes requests to fail which are made to Dataiku instances using self-signed certificates. It is possible to mitigate this by setting the verify value of the internal Session object to false:
client = dataiku.api_client()
client._session.verify = False
Which is not obvious and requires looking through the internals of the package.
A fix at the central call site of the dataikuapi package, _perform_http:
https://github.com/dataiku/dataiku-api-client-python/blob/fc51e29a12a1f50717771522e1b450ae91ff4d87/dataikuapi/dssclient.py#L1228-L1233
would only be possible in parts by duplicating the logic to check the "DKU_NO_CHECK_CERTIFICATE" variable or config files, but would still fail for Dataiku session set up by using the set_remote_dss function call.
The best option would be to add a "no_check_certificate" parameter to the DSSClient class that can be set when creating an instance of the class. But as the DSSClient is also used by the closed-source dataiku package, it seems to me that this can't be solved by contributing to the open source dataikuapi package.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par lire DSSClient et _perform_http dans dataikuapi/dssclient.py, puis suivez la manière dont les sessions sont créées via api_client() et set_remote_dss(). Déterminez si les paramètres de vérification des certificats peuvent être propagés sans dépendre du paquet propriétaire dataiku. Le travail est terminé lorsque requests respecte DKU_NO_CHECK_CERTIFICATE et la valeur configurée de no_check_certificate lors de l’utilisation de certificats autosignés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- api, backend
- Type d'issue
- Bug
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100