add rustls-native-certs to support MITM enterprise proxy#1365
add rustls-native-certs to support MITM enterprise proxy#1365Purexo wants to merge 3 commits intovolta-cli:mainfrom
Conversation
|
after test from other command I see other attohttpc usage. So I added the load certs on all attohttpc call. If someone known how ensure the rustls-native-certs is call only once, and configure attohttpc to always use theses certs, I take |
|
OK, all attohttpc use rustls-native-certs now. |
|
Hi @Purexo, thanks for taking this on! I believe there are some potential issues, not with your changes, but with how Instead, I'm proposing to take the same approach and skip over any native certs that don't parse correctly, which should make this more robust to those issues. Once that lands, the changes on the Volta side would be limited to enabling the feature flag within If that doesn't wind up working, however, this will be a great starting point to get those situations working! |
|
I understand your concerns, but About the rest of my PR, what do you think about wrap the attohttpc usage in a subcrate to have the same version of attohttpc in all the projec without need to redeclare attohttpc in differents cargo files ? |
A good thought, but I think the right solution for that is actually #1367, which will manage that automatically without needing the extra indirection. |
|
Issue is fixed by #1375. Just one question, #1375 is merged since one month now, I can use personally volta on work because I build it for testing and it's perfect. But I wait a new release to share this software with my colleague. Do you have a date @charlespierce or @chriskrycho in mind for a new release ? |
Hello,
I wanted to use Volta on my work computer. Like lot of developpers working for large enterprise, I'm behind a MITM Corporate Proxy. Because of that, all our network is decrypted by the proxy and reencrypted with another certificate, signed by a Corporate CA Authority. and the public certificate of the CA Authority is installed on all computers of the enterprise.
So after installing Volta, I ran
volta install nodeand errorIo Error: invalid peer certificate contents: invalid peer certificate: UnknownIssuerappend.I am used to this type of error. Native langages and ssl lib do not work well by default with private CA installed on windows. So I search if volta had a configuration or a variable environment to add CA files like Node.js have
NODE_EXTRA_CA_CERTS. I don't find it.I search at least something to disable SSL check (very insecure…). I don't find it either.
I search if ssl deps of volta (rustls, attohttpc) had a env variable for this. No, it doesn't exist.
I found
add_root_certificatemethod in attohttpc, andrustls-native-certscrate.So I used it in
archivecrate (only zip, wich is use by windows). and it seems working.I'm not a rust developer. So don't hesitate to fix my code if you can do better (I'm not familliar with mut / borrow with rust).
Also, if you know how to load once the certificates store for all attohttpc call. It could be a great improvement.
Resources: