【问题标题】:How to set up a secure connection between Filbeat and Elasticsearch using SSL如何使用 SSL 在 Filbeat 和 Elasticsearch 之间建立安全连接
【发布时间】:2018-06-07 15:18:39
【问题描述】:

我无法在 Filebeat 和 Elasticsearch 之间建立 SSL 连接。

我缺乏关于 SSL 的知识。我正在使用 X-Pack 使用 certutil 命令生成证书。 bin/xpack/certutil ca 生成名为 elastic-stack-ca.p12 的证书颁发机构。

然后

$ bin/x-pack/certutil cert --ca elastic-stack-ca.p12

我相信这会创建由该 CA 签名的证书。这将生成文件elastic-certificates.p12。从这里我一无所知。

我尝试通过设置到 ES 的 HTTPS 连接来测试证书是否有效。

我放了

xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.key:  /path/to/elastic-certificates.p12
xpack.security.http.ssl.certificate: /path/to/elastic-certificates.p12 
xpack.security.http.ssl.certificate_authorities: [ "/path/to/elastic-stack-ca.p12" ]

但是,这会带来很多错误,其中之一是

caught exception while handling client http traffic, closing connection

当我在 Kibana 中添加https IP 和 CA 时,它无法连接到 ES。

我想知道如何成功设置 https。此外,如何在两台服务器之间建立 SSL 连接。一个包含 Filebeat,但没有 X-Pack 和带有 ES 的接收服务器以及安装了 X-Pack。

【问题讨论】:

    标签: kibana elastic-stack filebeat


    【解决方案1】:

    在您的elasticsearch.yml 中添加这些 SSL 设置后,您还需要将密码添加到 Elasticsearch 密钥库和信任库。您应该在运行certutil 命令时设置密码。你可以这样做:

    $ echo password | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin xpack.security.transport.ssl.keystore.secure_password
    $ echo password | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin xpack.security.transport.ssl.truststore.secure_password
    

    确保在进行这些更改后重新启动 Elasticsearch。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-13
      • 2011-09-14
      • 1970-01-01
      • 1970-01-01
      • 2020-10-14
      • 2022-06-14
      • 2014-04-29
      相关资源
      最近更新 更多