-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the behavior of --cert
#6720
Comments
This is likely a good first issue too -- someone can check what the actual behavior is and document it properly in the help string for the option. :) |
@serhii73 would you like to work on this? |
Yes, I can. |
@serhii73 You should start with https://pip.pypa.io/en/stable/development/getting-started/ -- then I suggest you skim this rough bit of documentation #6637 , play around with the existing help for the pip options on the command line, use |
@brainwane I'm on it. |
|
@serhii73 Please feel free to ask questions if you have any. :) |
What does it mean?
This is I got it. But what next is no. |
Do I need to read PEP 517 too? |
@pradyunsg @brainwane plz assign this issue to @serhii73 on the GitHub UI. TIA. |
@serhii73 PEP517/518 is unrelated to this issue |
@serhii73 how is this going? If you are working on this issue and have questions, please feel free to ask them here, in |
Thank you very much, Sumana! |
Sorry, I don't understand what function or class to do it in our package.
Ok, need to find
Do you know? |
Hi @serhii73! Thanks for continuing to work on this! pip's option handling infrastructure passes the return value of The "cert" attribute on |
first - |
Not fully understand how it working.
In |
For debugging with pdb need a real certificate? |
I seem stuck in this task. |
Run |
Right, since options.cert is being assigned to session.verify, you'd wanna check what session.verify affects/means. If you look at the value/type of session, you'll notice it's a PipSession (a class defined within pip). That's inheriting from a vendored copy of requests.sessions.Session. Thus, the next step would be to see what the verify attribute does on a requests.Session object. Googling for "python requests session" lead me to https://2.python-requests.org/en/master/user/advanced/#ssl-cert-verification, which basically describes verify attribute is a path to a CA bundle, used for verifying SSL Certificates, that replaces the default bundle. There's also https://2.python-requests.org/en/master/api/#requests.Session.verify but that doesn't contain much detail. In any case, this information answers OP's (original post/poster) question -- it needs to be a path to a CA bundle, and that it replaces the use of any pre-existing bundle. With that answered, our next steps are to check whether the existing documentation could be augmented and the explanation from OP points out two such locations. With all this information, our next step would be to mention in the help text of --cert, that it replaces the default CA bundle. @serhii73 does this help? Lemme know if something in my description above seems odd or not clear and I'll be happy to elaborate. :) (I'm on mobile, apologies if there's typos and for the lack of use of markdown syntax) |
I bet this loosely corresponds to the TLS verification mode (https://docs.python.org/3/library/ssl.html#ssl.SSLContext.verify_mode) allowing the user to ignore untrusted certificates. |
Yep yep -- that's --trusted-host in pip -- though Idk if that's how we handle that option. |
@serhii73 I'm unassigning you since I think this isn't the best first issue for you -- I suggest you look at one of the other "good first issue" bugs. |
Thanks for your work on this! |
Some information on the current state of pip (a6b0605) with respect to SSL verification:
Which I think would translate into the following actions for this issue:
|
I would like to work on this. |
@mdebi please go ahead! I suggest you start a work-in-progress ("WIP") pull request as soon as you start. |
Thanks @mdebi! The info in my comment is still accurate, so the two items I mentioned should act as a guide for tackling this. Please let us know if we can help in any way! |
Sure @brainwane @chrahunt . Thank you. |
As assumed above, on CentOS/RHEL, |
@chrahunt where can one find these versions for installation on Debian and Fedora? In the versions I've found they are still using bundled cert rather than these system certs. |
Environment
Description
The documentation for the
--cert
option currently just says "Path to alternate CA bundle."This leaves the user wondering: does the specified bundle replace the default set of trust roots, or augment it?
(Also, it would be nice if
--trusted-host
had a mention of--cert
since many people use the former when they could more securely be using the latter.)The text was updated successfully, but these errors were encountered: