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
provide a way to pass ca certs instead of using self signed certs for https requests #1121
Comments
After some looking through, found an alternative for this as well. option to provide ignoreHostHttpsErrors option here in your code would be awesome Please let me know if this is feasible. |
Hi @sidtagirisa, Would you be able to provide some of the errors for our reference? I want to make sure we are solving the right problem. A set of known errors will help us assure it gets fixed, fully, in the correct place. If that's not feasible, I understand. We'll look into this request, as it makes sense to provide as an option. We can also chat further to find other interim workarounds or solutions that will fit your application, if that's helpful. |
hi, @LouManglass found a way to pass the certificate and it is working. Since you are using mockttp and they are honoring this env: NODE_EXTRA_CA_CERTS, if we set NODE_EXTRA_CA_CERTS='path to pem file' it is not throwing self-signed cert error. |
I would love to provide any additional details if you still require me to, please let me know. |
@sidtagirisa Oh, this is great, thanks for the follow-up! To clarify: you set the If that's true, I think I have enough to get this added to our documentation this week, though I'd appreciate the opportunity to see your work in action. If you have some time, here's my calendly, and I can also be flexible around those hours with some notice. Otherwise, I'll dig into the documentation and reach out with any further questions as they come up. |
@LouManglass Yes, that’s correct. Sure, I can show you it in action, I will setup a call probably sometime next week. In the meantime if you have anymore questions please don’t hesitate to reach out. Also, the latest documentation, it is so much better than last year, nice work on that ✌🏼. Thanks for this library, it helps a lot. |
@sidtagirisa Thanks for the kind words, I'll pass them along to the team! We're always looking to make our documentation better, and we appreciate that you noticed. And also thanks for your time, I'll keep an eye out for that appointment. |
hi @LouManglass I am not sure if this helps or not. I have a setup where the API being tested is a remote existing service When I run the test suite, which exercises the API, optic is failing with the self signed issue.
Terminal of running optic
|
Debugging a little bit more. neither of these options work Option 1 - provide optic (mockhttp, http api) with the CA Cert of the server
the cert is wrong as well :-) no it can't be changed. Option 2 - tell mockhttp to ignore the cert issue
as per @sidtagirisa attempt to work around, by telling mockhttp to ignore
this changed nothing, but I suspect I need to recompile the TypeScript (been a long time since TS :-D ) |
Hi @rbuckland , I'm sorry to hear about these issues. From the sound of it, I suspect it will benefit from some pairing time. I see a calendar appointment with you later today, would that be a good time for us to dig in together? Or were you expecting to go over something else? |
* type external correctly * bump version again
right now we are trying to intercept traffic of an environment that is rejecting because of self-signed certificate and disabling that check is not an option in that server, so please let me know if there is a way I can provide certs to be used instead of self-signed certificates being created in your code.
The text was updated successfully, but these errors were encountered: