Using self-signed SSL certificates with Postman

This post is applicable to the Postman Chrome app only. If you're using the Mac app, head to our documentation for details on ignoring SSL errors.

Self-signed certificates are often used in testing and development environments to provide a layer of security for an API. As they are not verified by a trusted authority, accessing  an API endpoint with something like https://<ip> through the Postman Chrome App, would throw up an error like this:

Screen Shot 2016-06-30 at 16.24.19

With the legacy app, you could go to the root URL in Chrome and allow the browser to access URLs with self-signed certificates. But this doesn't work with the new packaged app. If you try to hit a URL with a self-signed SSL certificate, you would get a 500 error as Chrome would decline the certificate:

ssl_error

Turns out that there is a better solution to solve this a problem, and it also avoids adding an exception to Chrome every time you start the browser. This is how you do it:

  1. Go to the root URL in your browser. For ex. https://localhost
  2. Click on the lock icon on the top left in the URL bar.
  3. Open the Connection tab in the dropdown that comes up
  4. Click on certificate information

The dialog that comes up now depends on the operating system you are on. Chrome uses the underlying OS layer to handle SSL certificates.

Mac OS X

  1. In the dialog that comes up, click 'View Certificate', and drag the certificate icon to your desktop to create a *.cer file
    Screen Shot 2016-06-30 at 16.24.40
    Screen Shot 2016-06-30 at 16.24.46

  2. Double click on the file to open the OS X Keychain Access tool.

  3. Add the certificate to the System keychain and select "Always trust"
    Screen Shot 2016-06-30 at 16.30.05

  4. Once the certificate is added, double click it to open more details

  5. Expand the Trust item

  6. Select "Always trust"
    Screen Shot 2016-06-30 at 16.26.50
  7. Close Keychain Access and restart Chrome

Windows

  1. In the certificates window, go to the Details tab

ssl_win_2
2. Select Copy to File
3. Save the certificate file on your disk. Close the certificate window.

ssl_win_3
4. Go to Chrome > Settings, search for SSL (chrome://settings/search#ssl) and click on Manage certificates

ssl_win_4
5. Go to the Trusted Root Certification Authorities tab and click on import
6. Select the file you saved on your disk in step 3.

ssl_win_5
7. Close this window and restart Chrome.

Linux

  1. Go to the Details tab

ssl_linux_1
2. Select Export and save the file on your disk

ssl_linux_2
3. Go to Chrome > Settings, search for SSL (chrome://settings/search#ssl) and click on Manage certificates
4. Go into the Authorities tab

ssl_linux_3
5. Import the certificate
6. Restart Chrome

You should be able to fire requests to the endpoints validated by this certificate. The SSL warning will not show up in Chrome even if you restart the browser. Do make sure that you have verified the IP where the certificate comes from. This should only be done for verified IP addresses. This method also works for certificates for localhost. Make sure that the common name of the certificate while generating the certificate is localhost.

Let me know in the comments if you face any problems with this.

35 thoughts on “Using self-signed SSL certificates with Postman”

    1. I have tested it on OS X. Seems to be working perfectly. Make sure you are going through all the steps and you are adding the certificate to the trusted root authority.

      1. I've tried on OSX and in Win7. I don't have the locked lock when I try to https to localhost. I think I must have missed something in your writeup or explanation.

        1. Here's a nifty idea that I've only tested on Windows so far.

          1. Go to Settings and add another user: jerome.postman for me.

          2. Use the desktop icon that I forgot to tell you to choose previously.

          3. Go to the properties of that icon and add to the Target:
          "–ignore-certificate-errors"

          4. I've only done this on that particular Chrome user so the rest of my shortcuts should be fine.

          Win7+Chrome worked perfectly the first time.

  1. I am trying to access service with pfx file. In soap ui it works but it does not work with postman. Followed mentioned steps of adding pfx to trusted root and tried creation of user with ignore certification error. None of it works. Can you please let me know what maybe wrong

  2. I am using Xubuntu 14.04 and i tried to export the certificate as you have mentioned in the above steps and imported the same in the Google Chrome browser(Version 34.0.1847.132). After the browser restart the Postman app in browser works fine but the packaged app throws 401 error. What could be the issue ?

  3. This solution doesn't work.

    What about the case when Postman makes a direct connection for Access Token Request. See RFC-6749: http://tools.ietf.org/html/rfc6749#section-4.1.3

    In this case if the SSL certificate of OAuth2.0 Provider server is self-signed, then it fails with Error: A website error has occurred. The website administrator has been notified of the issue. Sorry for the temporary inconvenience.

    Essentially this URL: https://www.getpostman.com/oauth2/callback?code=09D7F681C0827BC663D90148DE4EFE8F82F412C2&state=

    I believe that the Chrome Postman extension should have an option to specify a workaround so that http://www.getpostman.com knows that the target server is a self-signed certificate.

  4. Worked before. Now, with chrome v 37 they changed the SSL checking. The CN now HAS TO match the site you visit and there seems to be no option to disable that enduser bs. In my case I got a cert that has no URL CN given, which makes it impossible to postman to work with it. Can't belive google has not build in an dev option to disable ssl checking for certain sites and / or options to disable some SSL-check options (like CN checking).

    BTW maybe interesting for this article: with chrome v 38 there is an experimental flag to "remember" (for some time) the "trust this site anyway" option. However, in my case this dosn't help: CN will be checked anyway.

  5. This solution is not working…..I followed the following steps but still,I am not able to do the POST request.

  6. is there a way by which we can disable the ssl authentication ,
    Seems like solution is not working on my MAC .
    I am using OS X yosemite 10.10.5

  7. Localhost only solution:

    Visit: chrome://flags/
    Search for (Ctrl+F, Cmd+F): Allow invalid certificates for resources loaded from localhost

    Enable it.

  8. not working. worked the first time. But on subsequent tests, i get the same error 'Could not get any response'

Leave a Reply

Your email address will not be published. Required fields are marked *