如何在 Influxdb2.4 客户端中启用 TLS 验证

问题描述 投票:0回答:1

我已经使用 openssl 生成了自签名证书,并使用certificate.key 和certificates.crt 启动了 influxd

当我想用 influx2cli 连接 influxdb 服务器时,我找不到让 influx2cli 用我的证书连接 influxdb 的命令行,我找到的唯一相关命令是 --skip-verify 来跳过 TLS 验证。

但是我想知道是否有命令可以告知 influx2cli 我的certificate.key的路径

# echo "poconnect,to=4838,from=5412 orphan_directory=0,waiting_directory=0,no_remote_directory=1" |  influx write -c ctrlflux-dev --bucket BUCKET
Error: failed to write data: Post "https://ctrlflux-dev.pol.be:8086/api/v2/write?bucket=BUCKETS&org=MYORG&precision=ns": tls: failed to verify certificate: x509: certificate signed by unknown authority
[root@gvcantw-ffs ~][1]#

如何通过检查证书避免消息,并且不消除任何可能的未来安全性的想法?

ssl https verification influxdb-2
1个回答
-1
投票

使用开源版本,我们可能会陷入跳过选项。或者类似地,使用 -k 标志跳过证书验证。查看更多详细信息这里,InfluxData 似乎还没有解决这个问题

但是,您可以通过在 influxdb-meta.conf 文件中设置此配置来让服务器知道您正在使用自签名证书并使其在企业版中工作:

  # If using a self-signed certificate:
  https-insecure-tls = true

查看更多详情这里

© www.soinside.com 2019 - 2024. All rights reserved.