Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable mutual TLS #35

Closed
guoger opened this issue Jul 16, 2020 · 3 comments
Closed

Enable mutual TLS #35

guoger opened this issue Jul 16, 2020 · 3 comments
Assignees

Comments

@guoger
Copy link
Member

guoger commented Jul 16, 2020

No description provided.

@SamYuan1990
Copy link
Member

Will check this one and try with pr in weekend.

@SamYuan1990
Copy link
Member

According to https://github.com/hyperledger/fabric/blob/master/internal/peer/common/peerclient.go#L53
and
https://hyperledger-fabric.readthedocs.io/en/release-2.1/commands/peercommand.html?highlight=mutual%20TLS#usage

it seems we just need to add

		RequireClientCert: true,

as option when create client.

I suppose we don't have test-network supports mutual TLS(I will have an attempt)
but according to
https://hyperledger-fabric.readthedocs.io/en/release-2.1/enable_tls.html?highlight=mutual%20TLS#configuring-tls-for-peers-nodes
it seems we need to upgrade peer server and cli with

CORE_PEER_TLS_CLIENTAUTHREQUIRED = true

pls review it and if it's good enough, I will move forward.

@SamYuan1990
Copy link
Member

Ref to fabric code,
https://github.com/hyperledger/fabric/blob/master/internal/pkg/comm/server.go#L105

so we adding this logic in mock server to test with mutual tls?
the server tls file generated by test-network?

SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 7, 2020
Adding parameter for mock server

Fixs guoger/stupid/Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
@SamYuan1990 SamYuan1990 mentioned this issue Aug 7, 2020
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 8, 2020
Adding parameter for mock server

Fixs guoger/stupid/Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 8, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Fixs guoger/stupid/Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
@SamYuan1990 SamYuan1990 mentioned this issue Aug 8, 2020
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 8, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Fixs guoger/stupid/Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 14, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 14, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 14, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 15, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 15, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 15, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 15, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 17, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 19, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 20, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 21, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
SamYuan1990 added a commit to SamYuan1990/tape that referenced this issue Aug 22, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

Fixs Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
guoger pushed a commit to SamYuan1990/tape that referenced this issue Aug 22, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

fix Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
guoger pushed a commit to SamYuan1990/tape that referenced this issue Aug 22, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

fix Hyperledger-TWGC#35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
@guoger guoger closed this as completed in 54c3ee3 Aug 22, 2020
guoger pushed a commit that referenced this issue Nov 6, 2020
Adding parameter for mock server

add mtls for mock server according to grpc/grpc-go#403

using mtls when create grpc connection

Refactor using node as parameter

Mock server test refactor with gexec

fix #35

Signed-off-by: SamYuan1990 <yy19902439@126.com>
Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants