-
Notifications
You must be signed in to change notification settings - Fork 144
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
[FABCN-412] TLS support for chaincode server #164
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mbwhite
reviewed
Jun 15, 2020
This patch adds TLS support for chaincode server. To enable TLS, set tlsProps in the second argument for shim.server, or add --chaincode-tls-cert-file and --chaincode-tls.key-file for CLI. Client certificate validation can be enabled via tlsProps.clientCACerts for shim.server or --chaincode-tls-client-cacert-file for CLI. Also the -path options (for base64 encoded files) are supported. Signed-off-by: Taku Shimosawa <[email protected]>
mbwhite
approved these changes
Jun 16, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
shimos
added a commit
to shimos/fabric-chaincode-node
that referenced
this pull request
Jun 16, 2020
This patch adds TLS support for chaincode server. To enable TLS, set tlsProps in the second argument for shim.server, or add --chaincode-tls-cert-file and --chaincode-tls.key-file for CLI. Client certificate validation can be enabled via tlsProps.clientCACerts for shim.server or --chaincode-tls-client-cacert-file for CLI. Also the -path options (for base64 encoded files) are supported. Signed-off-by: Taku Shimosawa <[email protected]>
shimos
added a commit
to shimos/fabric-chaincode-node
that referenced
this pull request
Jun 17, 2020
This patch adds TLS support for chaincode server. To enable TLS, set tlsProps in the second argument for shim.server, or add --chaincode-tls-cert-file and --chaincode-tls.key-file for CLI. Client certificate validation can be enabled via tlsProps.clientCACerts for shim.server or --chaincode-tls-client-cacert-file for CLI. Also the -path options (for base64 encoded files) are supported. Signed-off-by: Taku Shimosawa <[email protected]>
mbwhite
added a commit
that referenced
this pull request
Jun 17, 2020
* [FABCN-408] Separate message handler from client (#155) This patch divides the ChaincodeSupportClient class into two classes: ChaincodeSupportClient, which represents a chaincode client that connects to a peer, and ChaincodeMessageHandler, which handles messages in communciation with the peer through a stream. Because the latter part is common in both client and server model, the ChaincodeMessageHandler class will be used in the future implementation for a chaincode gRPC server. Signed-off-by: Taku Shimosawa <[email protected]> Co-authored-by: Matthew B White <[email protected]> * [FABCN-409] Chaincode gRPC server w/o TLS (#159) This patch adds the ChaincodeServer class to support the server mode of chaincode. It also adds the server() method, which creates a new instance of the ChaincodeServer class, to the Shim class, the entrypoint of the fabric-shim library. Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-411] Add server command to CLI (#161) This patch adds a "server" command to the "fabric-chaincode-node" CLI. The command starts the contracts as a chaincode server. Example: fabric-chaincode-node server --chaincode-address 0.0.0.0:9999 \ --chaincode-id mycc_v0:a1233bb13227a05932 Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-413] Add e2e test for chaincode server (#162) This patch adds new e2e test for the chaincode gRPC server feature. The test performs as following: - Create a package which contains server and cc information - Build a container image of the chaincode - Install the package into peers - Obtain the installed package ID from the peers - Start the chaincode container with the package ID - Approve and commit the chaincode definition - Invoke and query the chaincode "rush test:e2e" will perform both tests for both server and client mode. This patch also modifies "rush start-fabric" to use external builder scripts. Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-414] Update TypeScript definition (#165) This patch updates the type defintion file for TypeScript to add classes and interfaces related to the chaincode server feature. Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-412] TLS support for chaincode server (#164) This patch adds TLS support for chaincode server. To enable TLS, set tlsProps in the second argument for shim.server, or add --chaincode-tls-cert-file and --chaincode-tls.key-file for CLI. Client certificate validation can be enabled via tlsProps.clientCACerts for shim.server or --chaincode-tls-client-cacert-file for CLI. Also the -path options (for base64 encoded files) are supported. Signed-off-by: Taku Shimosawa <[email protected]> Co-authored-by: Matthew B White <[email protected]>
mbwhite
added a commit
that referenced
this pull request
Nov 10, 2020
* [FABCI-482] Update Nexus URL's to Artifactory Signed-off-by: Brett Logan <[email protected]> * [FABCN-377] Prepare v2.0 release Signed-off-by: James Taylor <[email protected]> * Fix docker tag Tag needs to include hyperledger to match the publish command Signed-off-by: James Taylor <[email protected]> * [FABCN-377] Bump version to 2.0.1 Signed-off-by: James Taylor <[email protected]> * [FABCN-378] Publish jsdoc Signed-off-by: James Taylor <[email protected]> * Re-enable tests Signed-off-by: James Taylor <[email protected]> * [FABCN-381] Access localmspid Signed-off-by: James Taylor <[email protected]> * Update audit level Temporarily raise audit level to moderate to work around current minimist audit failures Can be reverted after grpc, rc, and tar dependecies have been updated to pull in updated versions of mkdirp and minimist Signed-off-by: James Taylor <[email protected]> * Expand node engine version range Signed-off-by: James Taylor <[email protected]> * FABCN-391 Use version 2.1 of fabric docker images Signed-off-by: heatherlp <[email protected]> * FABCN-391 Update test/chaincodes to use node 10 and add a missing hat Signed-off-by: heatherlp <[email protected]> * [FABCN-377] Prepare for v2.1 unstable builds (WIP) Signed-off-by: James Taylor <[email protected]> * [FABCN-373] Compatibility Matrix Ammended all the node-engines in package.json to match that in the docker image Signed-off-by: Matthew B White <[email protected]> Change-Id: Ia536ed66daf857679adf9f858b35d206a4f1007f * [FABCN-382] fix compatibility.md title Signed-off-by: Andrew Hurt <[email protected]> * Improve build reliability It looks like rushjs symlinking can cause issues with the CopyFiles task. Use a script instead as suggested in microsoft/azure-pipelines-tasks#9046 Signed-off-by: James Taylor <[email protected]> * Add readme to redirect to site Signed-off-by: Ry Jones <[email protected]> * FABCN-241 Remove to.be.ok Signed-off-by: lesleyannj <[email protected]> * FABCN-241 Change to.be.ok Signed-off-by: lesleyannj <[email protected]> * FABCN-241 Remove to.be.ok Signed-off-by: lesleyannj <[email protected]> * fix: remove semicolon Signed-off-by: Johnny Da Costa <[email protected]> * FABCN-391 Set docker images to use node 10 - reflect this in compatibility.md - update some out of date tutorial lines Signed-off-by: heatherlp <[email protected]> * FABCN-391 Build against release-2.x Signed-off-by: heatherlp <[email protected]> * FABCN-391 Remove references to 2.0 and 2.0.0 - replace with 2.x Signed-off-by: heatherlp <[email protected]> * [FABCN-392] Update to Node 12 Set node engine to be the latest LTS at time of commit 12.6.1 Due to issues with comibation of the 12.6 and rewire, unit tests are run with node 12.5.0 Updated timeout as Typescript compilation seems to have slowed down. Signed-off-by: Matthew B White <[email protected]> * [FABCN-391] Publish JSDoc to release-2.1 Signed-off-by: James Taylor <[email protected]> * FABCN-391 v2.1.0 Release (#112) * FABCN-391 v2.1.0 Release - also fixed nodeenv images to use node 12 Signed-off-by: heatherlp <[email protected]> * Update timeout (#114) Signed-off-by: Brett Logan <[email protected]> Co-authored-by: Brett Logan <[email protected]> * FABCN-391 Bump to 2.1.1 and fix docker tag (#122) * FABCN-391 Remove "latest" from tag name on docker image publishing for tagged versions Signed-off-by: heatherlp <[email protected]> * FABCN-391 Bump version number to 2.1.1 Signed-off-by: heatherlp <[email protected]> * [FABCN-391] fix directory for api doc publish (#125) Signed-off-by: James Taylor <[email protected]> * [FABCN-394] Update typescript interface file (#128) Updated both typescript definition files to match the case and the existance of the implementation function. Signed-off-by: Matthew B White <[email protected]> * Prepare 2.1.1 release (#133) Signed-off-by: James Taylor <[email protected]> * Bump version (#134) Signed-off-by: James Taylor <[email protected]> * [FABCN-397] State queries limited to 100 results (#141) Errow was the new version of protobufjs used to create the bundle.js gave a different property to the 'has more' field. hasMore replaced has_more As this accessed as JS property it didn't fail, but meant only a limited number could be accessed. corrected, added test for 229 results. bit of dead code pruning Signed-off-by: Matthew B White <[email protected]> * [FABCN-396] Add notes on minimum 1.4 module version for node 12 (#139) Stated that 1.4.5 and above are the versions that work with node 12 Added a better example for the use of the chaincode node runtime environment variable Signed-off-by: Matthew B White <[email protected]> * FABCN-395: Use @grpc/grpc-js for Node.js chaincode (#143) (#144) Signed-off-by: Simon Stone <[email protected]> * FABCN-401 Correct use of Yargs api (#145) * FABCN-401 Correct use of Yargs api Change from package.json to api parser configuration Signed-off-by: Matthew B White <[email protected]> * Force build Signed-off-by: Matthew B White <[email protected]> * Fix broken tutorials link (#137) (#138) Signed-off-by: NIKHIL E GUPTA <[email protected]> Co-authored-by: NIKHIL E GUPTA <[email protected]> Co-authored-by: NIKHIL E GUPTA <[email protected]> * Prepare 2.1.2 release (#148) Signed-off-by: James Taylor <[email protected]> * Bump version to 2.1.3 (#149) Signed-off-by: James Taylor <[email protected]> * FABCN-405 Fix tutorial reference (#150) (#152) Updated to use 2.1 modules Signed-off-by: Ry Jones <[email protected]> Co-authored-by: Matthew B White <[email protected]> Signed-off-by: Matthew B White <[email protected]> Co-authored-by: Ry Jones <[email protected]> * [FABCN-407] Update protos (#154) (#157) To prepare for the implementation of chaincode gRPC server, this patch updates protobuf definitions to the latest ones. Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-410] Use new lifecycle for fv/e2e tests (#160) This patch enables v2.0 feature in the test Hyperledger Fabric network and uses new lifecycle commands in the fv and e2e tests. Signed-off-by: Taku Shimosawa <[email protected]> * Fix 'rush install' error in release-2.x (#163) This patch upgrades pnpm to fix the "Could not find peer dependency 'google-auth-library'" error. Signed-off-by: Taku Shimosawa <[email protected]> * Cheery-pick chaincode server feature to release-2.x (#166) * [FABCN-408] Separate message handler from client (#155) This patch divides the ChaincodeSupportClient class into two classes: ChaincodeSupportClient, which represents a chaincode client that connects to a peer, and ChaincodeMessageHandler, which handles messages in communciation with the peer through a stream. Because the latter part is common in both client and server model, the ChaincodeMessageHandler class will be used in the future implementation for a chaincode gRPC server. Signed-off-by: Taku Shimosawa <[email protected]> Co-authored-by: Matthew B White <[email protected]> * [FABCN-409] Chaincode gRPC server w/o TLS (#159) This patch adds the ChaincodeServer class to support the server mode of chaincode. It also adds the server() method, which creates a new instance of the ChaincodeServer class, to the Shim class, the entrypoint of the fabric-shim library. Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-411] Add server command to CLI (#161) This patch adds a "server" command to the "fabric-chaincode-node" CLI. The command starts the contracts as a chaincode server. Example: fabric-chaincode-node server --chaincode-address 0.0.0.0:9999 \ --chaincode-id mycc_v0:a1233bb13227a05932 Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-413] Add e2e test for chaincode server (#162) This patch adds new e2e test for the chaincode gRPC server feature. The test performs as following: - Create a package which contains server and cc information - Build a container image of the chaincode - Install the package into peers - Obtain the installed package ID from the peers - Start the chaincode container with the package ID - Approve and commit the chaincode definition - Invoke and query the chaincode "rush test:e2e" will perform both tests for both server and client mode. This patch also modifies "rush start-fabric" to use external builder scripts. Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-414] Update TypeScript definition (#165) This patch updates the type defintion file for TypeScript to add classes and interfaces related to the chaincode server feature. Signed-off-by: Taku Shimosawa <[email protected]> * [FABCN-412] TLS support for chaincode server (#164) This patch adds TLS support for chaincode server. To enable TLS, set tlsProps in the second argument for shim.server, or add --chaincode-tls-cert-file and --chaincode-tls.key-file for CLI. Client certificate validation can be enabled via tlsProps.clientCACerts for shim.server or --chaincode-tls-client-cacert-file for CLI. Also the -path options (for base64 encoded files) are supported. Signed-off-by: Taku Shimosawa <[email protected]> Co-authored-by: Matthew B White <[email protected]> * [FABCN-415] Lock grpc-js to 1.0.3 (#170) @grpc/grpc-js updated to 1.1.0; this has caused the initial request to the peer on chaincode start to fail. Dropping back to 1.0.3 resolves the issue. See FABCN-415 Signed-off-by: Matthew B White <[email protected]> * [FABCN-416] Release v2.1.3 (#171) For resolving grpc version dependency Signed-off-by: Matthew B White <[email protected]> * Specify exact version of winston dependency Work around for issue winstonjs/winston#1814 Signed-off-by: James Taylor <[email protected]> * Prepare 2.1.4 release (#174) Signed-off-by: James Taylor <[email protected]> * [FABCN-393] Fix broken links in documents (#169) This patch fixes broken links to the fabric documents. This patch also fixes links to point to those for the proper version (2.1). Signed-off-by: Taku Shimosawa <[email protected]> * Bump version to 2.1.5 (#175) Signed-off-by: James Taylor <[email protected]> * [FABCN-319] Update dependnency versions (#176) - Update grpc-js and winston to pre-lock levels - General update of dependcies - Note add about shirnkwrap. - Corrected test cases Signed-off-by: Matthew B White <[email protected]> * [FABCN-420] Remove Azure pipeline warnings (#177) Used new coverage merge tool to joing coverage together Signed-off-by: Matthew B White <[email protected]> * Use Official CouchDB 3.1 Image (#180) Fabric 2.2 removes official support for CouchDB 2.x. The migration to 3.1 was to address fsync issues in the underlying storage implementation in Couch. This change moves to CouchDB 3.1 which requires the user to now set an admin identity at startup. Node 12.18.2 is the latest LTS Signed-off-by: Brett Logan <[email protected]> * [FABCN-421] release: 2.2.0 LTS release (#181) Signed-off-by: Matthew B White <[email protected]> * Bump version to 2.2.1 (#184) Signed-off-by: James Taylor <[email protected]> * Fix: ChaincodeStub.getMspID should be in lowerCamelCASE Signed-off-by: winderica <[email protected]> * [FABCN-422] Add release guide (#187) Signed-off-by: James Taylor <[email protected]> * [FABCN-433] Update typescript and @types/node (#199) Need current supported levels. Signed-off-by: Matthew B White <[email protected]> * [FABCN-241] Remove to.be.ok (#204) Signed-off-by: lesleyannj <[email protected]> * [FABCN-435] OOM on Large Arg Size (#207) Incorrect trace point logging entire binary message Signed-off-by: Matthew B White <[email protected]> * v2.x tutorials updated (#217) Signed-off-by: Kestutis Gudynas <[email protected]> * [FABCN-430] Fix type for timestamp.second (#194) (#209) This patch fixes the type definition for the second field in the Timestamp, which is actually Long (int64). Signed-off-by: Taku Shimosawa <[email protected]> Co-authored-by: Matthew B White <[email protected]> Co-authored-by: Taku Shimosawa <[email protected]> * [FABCN-432] - Update class transformer dependency (#213) * [FABCN-241] Remove to.be.ok Signed-off-by: lesleyannj <[email protected]> * [FABCN-1627]-Update class transformer dependency Signed-off-by: lesleyannj <[email protected]> * Release v2.3.0 Signed-off-by: Kestutis Gudynas <[email protected]> * Bump version to 2.3.1 Signed-off-by: Kestutis Gudynas <[email protected]> Co-authored-by: Brett Logan <[email protected]> Co-authored-by: heatherlp <[email protected]> Co-authored-by: Matthew B White <[email protected]> Co-authored-by: Andrew Hurt <[email protected]> Co-authored-by: Ry Jones <[email protected]> Co-authored-by: lesleyannj <[email protected]> Co-authored-by: Johnny Da Costa <[email protected]> Co-authored-by: Matthew B White <[email protected]> Co-authored-by: heatherlp <[email protected]> Co-authored-by: Simon Stone <[email protected]> Co-authored-by: nikhil550 <[email protected]> Co-authored-by: NIKHIL E GUPTA <[email protected]> Co-authored-by: Taku Shimosawa <[email protected]> Co-authored-by: winderica <[email protected]> Co-authored-by: LAJ <[email protected]> Co-authored-by: Kestutis Gudynas <[email protected]> Co-authored-by: Kestutis Gudynas <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch adds TLS support for chaincode server.
To enable TLS, set tlsProps in the second argument for shim.server,
or add --chaincode-tls-cert-file and --chaincode-tls.key-file to CLI.
Client certificate validation can be enabled via tlsProps.clientCACerts
for shim.server or --chaincode-tls-client-cacert-file for CLI.
Also the *-path options (for base64 encoded files) are supported.
Signed-off-by: Taku Shimosawa [email protected]