You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
would like the module/CLI to work in environments that validate client certificates and have their own certificate authority certs published for server cert validation on the client side (2-way SSL).
i'm happy to submit a PR on this but wanted to create an issue to track in case someone else has already looked at it. basically you just need to accept a string (and potentially convert to boolean for backward compat) for the ssl_verify attribute of the GitLab class which would pass the path of a CA cert list in PEM encoding to the requests module (as the verify parameter, as well as a certs parameter for requests which packs two values: the client cert and matching private key (both PEM encoded, unencrypted in the case of the private key).
In some spare time I put together this commit you could try if indeed your web server which serves your GitLab instance requires client certificates. Although, it looks like 1) upstream has wrapped "ssl_verify" and 2) your particular case requires first passing in the path to a list of CA certs that includes the needed portion of the signing chain (I assume you're using a private CA) so that your client side calls work.
If you're using a self-signed server cert (which is not the same as a server cert signed by a private CA), then you could simply supply the path of that server cert as a string for the "ssl_verify" argument (non-positional) of the GitLab class constructor.
I haven't had delved into writing tox style tests for python packages just yet, so I hesitate to make a pull request, unless of course the author comments here with a willingness to advise.
Activity
nuvoladev commentedon Dec 13, 2016
Hi mxmader,
I'm interested in this feature enabling client certificates as I got a 'certificate verify failed' error when I try to connet to GitLab using https:
May I ask you when you plan to deliver that feature ?
I thank you in advance
nuvoladev
mxmader commentedon Dec 13, 2016
In some spare time I put together this commit you could try if indeed your web server which serves your GitLab instance requires client certificates. Although, it looks like 1) upstream has wrapped "ssl_verify" and 2) your particular case requires first passing in the path to a list of CA certs that includes the needed portion of the signing chain (I assume you're using a private CA) so that your client side calls work.
If you're using a self-signed server cert (which is not the same as a server cert signed by a private CA), then you could simply supply the path of that server cert as a string for the "ssl_verify" argument (non-positional) of the GitLab class constructor.
https://github.com/mxmader/python-gitlab/commit/ae8ccd14f501be827205caa6afb270882427ae47
I haven't had delved into writing tox style tests for python packages just yet, so I hesitate to make a pull request, unless of course the author comments here with a willingness to advise.
nuvoladev commentedon Dec 13, 2016
Hi mxmader,
thanks a lot for your suggestion, it works!