Skip to content
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

Unable to make request when used with Proxy #117

Closed
satrox28 opened this issue Mar 5, 2023 · 10 comments
Closed

Unable to make request when used with Proxy #117

satrox28 opened this issue Mar 5, 2023 · 10 comments

Comments

@satrox28
Copy link

satrox28 commented Mar 5, 2023

Hi,

Thanks for creating such a nice tool.

When I am trying to explore the tool for any request, am getting certificate error since am using a http proxy.

Error invoking  remote method "send-http-request": Error: unable to verify the first certificate.

As its a nodejs application, I would like to set the environmental variable for NODE_EXTRA_CA_CERTS and pass the proxy certificate.

Can you help me on how to pass this env for this application.

@helloanoop
Copy link
Contributor

helloanoop commented Mar 6, 2023

@satrox28

Glad that you like Bruno !
Currently Bruno does not support using Custom Certificates.

We should be able to build support this feature easily.

I would like to set the environmental variable for NODE_EXTRA_CA_CERTS and pass the proxy certificate.

The way of using environment variables to pass certificates is a "postman" way of doing it. Since bruno stores your collection locally, we can approach this in a way how a developer normally would. We can store the certificates inside a folder and reference it in the config.

Here is what I am thinking

| payment-api-collection
   |-- certs
       |-- ca-bundle.crt
   |-- request1.bru
   |-- request2.bru
   |-- bruno.json

There is bruno.json in every repository. See example
I am thinking of adding a key called security in the config like below.

{
  "version": "1",
  "name": "github rest api",
  "type": "collection",
  "ssl": {
    "cert": "certs/ca-bundle.pem",
    "key": "certs/private.pem",
    "passphrase": "secret",
    "rejectUnauthorized": false // disable cert verification
  }
}

What do you think?

@SanichKotikov
Copy link

I have almost the same error: unable to get local issuer certificate.

@satrox28
Copy link
Author

satrox28 commented Mar 8, 2023

@helloanoop

Thanks for checking on the feature request. Only concern I have on your proposal is, if we have multiple collections have to modify the json every where correct?. Since it's a nodejs app, can we create a file under the Applications directory with env variable NODE_EXTRA_CA_CERTS and then when nodejs launches the app, based on the value it decides whether to use proxy or not. Can we able to do something like this?.

@helloanoop
Copy link
Contributor

@satrox28
When you mentioned

I would like to set the environmental variable for NODE_EXTRA_CA_CERTS and pass the proxy certificate.

I thought you were talking about postman environment variables.
If I am understanding correctly, you are talking about setting a system env variable called as NODE_EXTRA_CA_CERTS. Is that right ?

if we have multiple collections have to modify the json every where correct?

Good point. It makes sense to setup one time at one place.

@satrox28
Copy link
Author

satrox28 commented Mar 8, 2023

@satrox28 When you mentioned

I would like to set the environmental variable for NODE_EXTRA_CA_CERTS and pass the proxy certificate.

I thought you were talking about postman environment variables. If I am understanding correctly, you are talking about setting a system env variable called as NODE_EXTRA_CA_CERTS. Is that right ?

if we have multiple collections have to modify the json every where correct?

Good point. It makes sense to setup one time at one place.

Yes, when the app launches it should have the env injected. I already have http and https proxy as system env variable but it doesn't work with it.

@DRob1260
Copy link

DRob1260 commented Sep 7, 2023

Was anyone encountering this issue able to solve this or work around it? I'm definitely interested in using Bruno (coming from Postman). But I need a way to use it with a custom cert

@helloanoop
Copy link
Contributor

@DRob1260 Which OS are you currently using?

We recently shipped support for disabling ssl verification in #168
Currently this functionality is present in Windows and Linux builds.
Mac builds are delayed due to notarization issues and expected to be fixed by Sep 15th 2023

@DRob1260
Copy link

DRob1260 commented Sep 7, 2023

I am indeed on a Mac. Looking forward to the update. Thanks!

@helloanoop
Copy link
Contributor

@DRob1260 Mac builds have been released. Yuu should be able disabled ssl verification in the app preferences.

@DRob1260
Copy link

@DRob1260 Mac builds have been released. Yuu should be able disabled ssl verification in the app preferences.

I saw that, thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants