Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

External Chaincode Mutual TLS

未关闭
#625 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
grpc, java

调研方向

Start by reading ChaincodeBase.getChaincodeServerConfig() and NettyGrpcServer.configureTls(), then trace how client_auth_required and trustCertCollectionFile are applied for an external server. Reproduce the Java chaincode setup with invalid client_key and client_cert values. Done means client authentication is enforced when requested and the invalid client credentials do not permit peer communication.

由索引模型根据 Issue 内容生成。

描述

bug
Description

When using the Java shim as an external chaincode server, setting client_auth_required to true in the packaged connection.json does not appear to enable mutual TLS with the default server configuration.

NettyGrpcServer.configureTls() only requires and validates client certificates when ChaincodeServerProperties.trustCertCollectionFile is set. However, ChaincodeBase.getChaincodeServerConfig() enables TLS and sets the server certificate and key, but does not set that trust-certificate property.

In my test, the peer connected and chaincode communication succeeded even though connection.json contained invalid client_key and client_cert values. I expected the connection to fail if client authentication was required. This is an observation from my Java chaincode setup.

Steps to reproduce
  1. Start a Java external chaincode server with TLS enabled, configuring its server certificate and key but not a trust certificate collection for peer client certificates.

  2. Set client_auth_required to true in the external chaincode package’s connection.json.

  3. Set client_key and client_cert to invalid test values, for example:

    {
      "client_auth_required": "true",
      "client_key": "invalid test key",
      "client_cert": "invalid test certificate"
    }
主要语言
Java
星标
322
派生
210
平均合并
15 小时 16 分钟
30 天内合并 PR
29

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

hyperledger/fabric-chaincode-java 的其他 Issue

查看 hyperledger/fabric-chaincode-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。