带SSL密钥库的Logstash HTTP输入

3

我想要的:

我想使用“Postman”将日志发送到带有SSL的http logstash输入。

我已经完成的:

  1. 我在我的logstash.conf文件中添加了SSL配置,使用了http插件:https://www.elastic.co/blog/introducing-logstash-input-http-plugin
input {
  http {
        port => "5000"
        ssl => on
        keystore => "keystore.jks"
        keystore_password => "1qaz@WSX"
  }
}

接下来我需要keystore.jks。下面的步骤来自:https://blogs.oracle.com/blogbypuneeth/steps-to-create-a-self-signed-certificate-using-openssl

  1. 我创建了私钥cakey.pem和公共证书cacert.pem
openssl req 
 -newkey rsa:2048 
 -x509
 -keyout cakey.pem 
 -out cacert.pem 
 -days 3650
我使用 cakey.pemcacert.pem 创建了 keystore.p12
openssl pkcs12 
 -export 
 -in cacert.pem 
 -inkey cakey.pem
 -certfile cacert.pem 
 -out keystore.p12
  1. 我将keystore.p12转换成keystore.jks
keytool
 -importkeystore 
 -srckeystore keystore.p12 
 -srcstoretype pkcs12 
 -destkeystore keystore.jks 
 -deststoretype JKS
当我尝试使用“Postman”发送日志时,没有任何反应,“Postman”显示“无法获取任何响应” - 应该是“ok”。Curl响应:
 curl: (52) Empty reply from server

Question:

What am I doing wrong?

1个回答

0
在你的HTTP输入中,进行更改
ssl => on

ssl => true

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接