gpt4 book ai didi

ssl - 带有 SSL keystore 的 Logstash HTTP 输入

转载 作者:行者123 更新时间:2023-12-04 22:38:04 32 4
gpt4 key购买 nike

我想要的:

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

我已经做过的:

  • 我在我的 中添加了 SSL 配置logstash.conf 使用 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
  • 我创建了私钥 cakey.pem 和公共(public)证书 cacert.pem

  • openssl req 
    -newkey rsa:2048
    -x509
    -keyout cakey.pem
    -out cacert.pem
    -days 3650

  • 我创建了 keystore .p12 使用 cakey.pem cacert.pem

  • openssl pkcs12 
    -export
    -in cacert.pem
    -inkey cakey.pem
    -certfile cacert.pem
    -out keystore.p12

  • 我转换 keystore .p12 keystore .jks

  • keytool
    -importkeystore
    -srckeystore keystore.p12
    -srcstoretype pkcs12
    -destkeystore keystore.jks
    -deststoretype JKS

  • 当我尝试使用“ postman ”发送日志时,什么也没有发生——“ postman ”显示“无法得到任何响应”——应该是“好的”。 curl 回复:

  •  curl: (52) Empty reply from server


    问题:

    我究竟做错了什么?

    最佳答案

    在您的 http 输入中,更改

    ssl => on
    ssl => true

    关于ssl - 带有 SSL keystore 的 Logstash HTTP 输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47408525/

    32 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com