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

Newman lib ignores insecure and sslExtraCaCerts option #2992

Open
wandi34 opened this issue Jul 14, 2022 · 2 comments
Open

Newman lib ignores insecure and sslExtraCaCerts option #2992

wandi34 opened this issue Jul 14, 2022 · 2 comments

Comments

@wandi34
Copy link

wandi34 commented Jul 14, 2022

  1. Newman Version (can be found via newman -v): 5.3.2
  2. OS details (type, version, and architecture): Win 10 x64
  3. Are you using Newman as a library, or via the CLI? Library in Node 16 app
  4. Did you encounter this recently, or has this bug always been there: always been there
  5. Expected behaviour: Newman should respect insecure and sslExtraCaCerts options to allow requests to sites with not valid certs
  6. Command / script used to run Newman:
newman.run({
   collection: chosenCollection,
   environment: chosenEnvironment,
   folder: folder.name,
   reporters: ['htmlextra'],
   reporter: {
     htmlextra: htmlExtraConfig
   },
   sslClientCert: path.join(__dirname, './some.cer'),
   sslClientKey: path.join(__dirname, './secrets/some.key'),
   sslClientPassphrase: secrets.passphrase,
   sslExtraCaCerts: path.join(__dirname, './some-website.pem'),
   insecure: true,

Steps to reproduce the problem:

  1. Have a collection with requests against https sites using self signed certificates
  2. Use newman as a lib inside a node application. (Node 16 used)
  3. Run the application and check result
  4. Newman has no problems running requests against websites with valid certificates. But running requests against sites with not-valid certificates returns HTTP-503 status with response body like:

Untrusted SSL Server Certificate
Your request contacted a host which presented a certificate signed by an untrusted issuer.
This is typically caused by a Web Site presenting an incorrect or invalid certificate, but could be because of a configuration error.

This error should not exist with option insecure: true set or with custom sslExtraCaCerts of the requested site.

Running this collection in postman works with switched off "SSL certificate validation"

@Laktus
Copy link

Laktus commented Jul 25, 2022

When will this issue be addressed? I face the same problem.

@tomaszwojciechowski
Copy link

Are there plans for fixing this bug?

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

No branches or pull requests

4 participants