uptime icon indicating copy to clipboard operation
uptime copied to clipboard

ignore ssl cert problems

Open caclifton opened this issue 10 years ago • 4 comments

Trying to get uptime to ignore ssl cert problems on ssl checks. Have tried adding rejectUnauthorized : false in the http plugin options in the edit check dialog, but doesn't seem to work. Does anyone know the correct options syntax to tell uptime to ignore mismatched cert, self signed certs, etc. on ssl checks?

example of error on a check with ssl cert name not matching host: responded with error "Hostname/IP doesn't match certificate's altnames"

caclifton avatar Nov 24 '14 20:11 caclifton

hack workaround is to add the following line just beneath the top var declarations in the top of ./app.js, (line 18-20 or so) process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; Problem with this workaround is it's global, turns off ssl checks for all checks globally. Still need a way to disable ssl checks/verification for a single host/check

caclifton avatar Nov 24 '14 21:11 caclifton

I fixed this, in my fork, i altered the https poller and added the following things:

        this.target.rejectUnauthorized = false;
        this.target.requestCert = true;
        this.target.agent = false;

brantje avatar Feb 16 '15 15:02 brantje

Hi @brantje can you point to me where exactly in your fork you added this fix? tried looking at it and could not locate it.

Thank you.

P.S what other changes have you made to your fork? I see a lot of layout changes!

rjayako avatar Jul 20 '15 17:07 rjayako

https://github.com/brantje/uptime/blob/master/lib/pollers/https/httpsPoller.js#L54

My fork differs from the other forks:

  • User system, separated checks per user
  • Using API key's to prevent fraud (eg false pings)
  • Ability to run a small nodejs cluster Explaining: When you do a node app only a single thread is running, so if that threat dies, then uptime will be offline. With the cluster i spawn some workers, those workers offer the webgui. If a worker dies, then the parent will spawn a new one, and uptime will still be online. Also all load is balanced over the amount of workers. And the amount of workers = core amount.

brantje avatar Jul 21 '15 07:07 brantje