ioBroker / ioBroker.influxdb

Store history data in InfluxDB (not for Windows)
MIT License
36 stars 25 forks source link

Error: self signed certificate in certificate chain #331

Closed poldiderjungdrache closed 10 months ago

poldiderjungdrache commented 1 year ago

IMG_0318 Hello, I am getting ‘Error: self signed certificate in certificate chain‘ message when testing the DB connection to my influx 2.0. To my understanding he should just ignore the self signed cert as I don’t tell him to ‘Vaildate SSL certificate’. So how come this error pops up? Full explanation I have an internal CA that has signed the cert. The full chain is added to influx. So my understanding is he does not like the rootCA, which of course is not trusted. But then again why does he even care if I tell him not to? I’ve also tried to add my rootCA to the trust store of the OS (raspbian). curl is happy with the cert presented:

pi@iobroker-master:~ $ curl https://influx.tianmimi.infra:18086
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="InfluxDB is a time series platform, purpose-built by InfluxData for storing metrics and events, provides real-time visibility into stacks, sensors, and systems."><title>InfluxDB</title><base href="/"><link rel="shortcut icon" href="/favicon.ico"></head><body><div id="react-root" data-basepath=""></div><script src="/4ba86f89e6.js"></script></body></html>

To Reproduce
Steps to reproduce the behavior:

  1. Go to adapter config
  2. Set up connection to influxDB using HTTPs (DB should be set up with self signed cert or chain of trust with an untrusted RootCA), don’t set ‘Validate SSL certificate’
  3. Push ‘Test connection’
  4. recieve error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots & Logfiles
added

Versions:

Apollon77 commented 1 year ago

Is the error only happening in "test connection"? Does adapter work if you safe it or do you get te same error?

poldiderjungdrache commented 1 year ago

Well at first I thought data will not be send. However the adapter starts and checking after a couple of hours now I see data arriving in my DB. So it seems the adapter does work after all.

Apollon77 commented 1 year ago

Ok, so I assume that the "ignore ssl cert" flag is not transported correctly when checking connection, ok, thx. Will look at it

Marc-Berg commented 10 months ago

The issue can be closed. https://github.com/ioBroker/ioBroker.influxdb/pull/337