gpt4 book ai didi

hyperledger-fabric - super 账本结构 : Do we need to pass TLS cert/key files while joining channel?

转载 作者:行者123 更新时间:2023-12-04 07:57:45 24 4
gpt4 key购买 nike

我有一个多组织网络结构网络,并从不同的主机运行。

对等方的 docker 容器启用了 TLS。 peer的构建配置:

- CORE_PEER_TLS_ENABLED=true
- CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
- CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
- CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt

在创建和加入 channel 时,我关注了 byfn docs并且在加入 channel 时没有提供对等方的 TLS 证书/文件。所有的同行都能够加入 channel 。

但是,当我尝试使用 peer channel fetch newest -o orderer.example.com:7050 -c examplechannel 获取最新块时,我得到了错误:

Serve failed to complete security handshake from "ip:43402": tls: first record does not look like a TLS handshake



此外,我提到了 this doc在 TLS 和 this doc
在使用上述 fetch 命令传递对等方的 TLS 证书时:
peer channel fetch newest -o orderer.example.com:7050 -c examplechannel --tls --certfile $CORE_PEER_TLS_CERT_FILE --keyfile $CORE_PEER_TLS_KEY_FILE --cafile $CORE_PEER_TLS_ROOTCERT_FILE

这给出了一个新错误:

grpc: Server.Serve failed to complete security handshake from "ip:43496": remote error: tls: bad certificate



Debugging TLS issues doc 指出当服务器不信任客户端证书时会发生这种情况。因此,在我的情况下,我推断排序者不信任对等方正在传递的证书。

所以
  • 这是否意味着我应该在提议从此对等方加入 channel 时传递 TLS_CERT、TLS_KEY 和 TLS_ROOT 证书?
  • 如果 #1 为真,我可以在不关闭网络并使用证书重新加入 channel 的情况下传递这些证书吗?
  • 在创建 channel 时,它使用 orderer 的 ca-cert。另外,在提交 anchor 对等交易时,它使用排序者的 CA 证书?那么我是否应该将 Orderer 的 ca 证书也用于 peer fetch 命令?
  • 如果 #3 为真,那么在生产环境中,我们是否需要构建对等容器,使其包含订购者的 ca-cert?
  • 最佳答案

    您的问题中包含多个概念。重要的是要了解使用 peer 之间的区别。运行对等节点-- peer node start -- 并使用 peer作为 CLI(例如 peer channel fetch )。

    当对等方作为服务器运行时,不需要为 channel 传递加密 Material ,因为对等方实际上从 peer channel join ... 中传递的配置块中提取所需的 TLS 证书信息。命令。

    当对等体在 CLI 模式下运行时,您确实需要提供 TLS 证书信息以连接到各种端点。与对等方通信时,此信息从对等方配置中提取(在 core.yaml 中或从相应的 CORE_ 环境变量中)。与订购者通信时,有用于设置 TLS Material 的特定命令行标志。

    关于hyperledger-fabric - super 账本结构 : Do we need to pass TLS cert/key files while joining channel?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51999598/

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