├── .github └── stale.yml ├── .gitignore ├── LICENSE ├── README.md ├── docker ├── Dockerfile └── scripts │ └── init.sh ├── docs ├── CONTRIBUTING.md ├── SECURITY.md └── TESTING.md ├── fabric-rest.yaml ├── package.json ├── packages ├── fabric-rest │ ├── LICENSE │ ├── README.md │ ├── client │ │ └── README.md │ ├── common │ │ └── models │ │ │ ├── access-token.json │ │ │ ├── user-credential.json │ │ │ ├── user-identity.json │ │ │ └── user.json │ ├── fabric-rest-server │ ├── package.json │ └── server │ │ ├── component-config.json │ │ ├── component-config.production.json │ │ ├── config.json │ │ ├── datasources-tls.json.template │ │ ├── datasources.json.template │ │ ├── middleware.development.json │ │ ├── middleware.json │ │ ├── model-config.json │ │ ├── models │ │ ├── args.js │ │ ├── args.json │ │ ├── block.js │ │ ├── block.json │ │ ├── chaincode-info.js │ │ ├── chaincode-info.json │ │ ├── chaincode-install-request.js │ │ ├── chaincode-install-request.json │ │ ├── chaincode-instantiate.js │ │ ├── chaincode-instantiate.json │ │ ├── chaincode-query-response.js │ │ ├── chaincode-query-response.json │ │ ├── channel-id.js │ │ ├── channel-id.json │ │ ├── channel-info.js │ │ ├── channel-info.json │ │ ├── channel-query-response.js │ │ ├── channel-query-response.json │ │ ├── channel-response.js │ │ ├── channel-response.json │ │ ├── channel.js │ │ ├── channel.json │ │ ├── fabric-1-0.js │ │ ├── fabric-1-0.json │ │ ├── install-result.js │ │ ├── install-result.json │ │ ├── orderer-response.js │ │ ├── orderer-response.json │ │ ├── peer-opts.js │ │ ├── peer-opts.json │ │ ├── peer.js │ │ ├── peer.json │ │ ├── processed-transaction.js │ │ ├── processed-transaction.json │ │ ├── transaction-proposal.js │ │ ├── transaction-proposal.json │ │ ├── transaction.js │ │ └── transaction.json │ │ ├── providers.json.template │ │ ├── server.js │ │ └── wallet.js └── loopback-connector-fabric │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── lib │ ├── Common.js │ ├── connectorStub.js │ └── fabricconnector.js │ └── package.json ├── setup.sh └── tests ├── authentication ├── authentication.js └── ldapserver.js ├── basic-network ├── .env ├── config │ ├── Org1MSPanchors.tx │ ├── channel.tx │ └── genesis.block ├── configtx.yaml ├── crypto-config.yaml ├── crypto-config │ ├── ordererOrganizations │ │ └── example.com │ │ │ ├── ca │ │ │ ├── a5565867400a95609aa42041a82a7c9cc1d1bb994f9b393cc3b93bed0f98dc01_sk │ │ │ └── ca.example.com-cert.pem │ │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ ├── orderers │ │ │ └── orderer.example.com │ │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── Admin@example.com-cert.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.example.com-cert.pem │ │ │ │ ├── keystore │ │ │ │ │ └── 21efa9f2e42bea9e5fcb0ef6bd6af3d37485e2df83c8baaa8551599bf6f84858_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── orderer.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── server.crt │ │ │ │ └── server.key │ │ │ ├── tlsca │ │ │ ├── 65be05aa77879a7a642bc25b8ef17fbcfcab82bd309ab3300db939e6c6f80723_sk │ │ │ └── tlsca.example.com-cert.pem │ │ │ └── users │ │ │ └── Admin@example.com │ │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.example.com-cert.pem │ │ │ ├── keystore │ │ │ │ └── 64c268ae7e0c4fdf41911c7152b5a373667c41e8842e9906681e9b0810212b71_sk │ │ │ ├── signcerts │ │ │ │ └── Admin@example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── server.crt │ │ │ └── server.key │ └── peerOrganizations │ │ └── org1.example.com │ │ ├── ca │ │ ├── 34cfa63a451588a2c05950c48577cac2ce20cd5731ad600214192b75deef12f4_sk │ │ └── ca.org1.example.com-cert.pem │ │ ├── msp │ │ ├── admincerts │ │ │ └── Admin@org1.example.com-cert.pem │ │ ├── cacerts │ │ │ └── ca.org1.example.com-cert.pem │ │ └── tlscacerts │ │ │ └── tlsca.org1.example.com-cert.pem │ │ ├── peers │ │ ├── peer0.org1.example.com │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ │ ├── keystore │ │ │ │ │ └── 8a1d3ef861de041fca8e9fbd76e6c7bae5d277aa7820629592eafaf819d13288_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── peer0.org1.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── server.crt │ │ │ │ └── server.key │ │ ├── peer1.org1.example.com │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ │ ├── keystore │ │ │ │ │ └── 3868e73578b107d78acf3934d43650806665f8aa86edb3beedc0fbf446f77abc_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── peer1.org1.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── server.crt │ │ │ │ └── server.key │ │ └── peer2.org1.example.com │ │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ ├── keystore │ │ │ │ └── 2a37e152904426ce7a867fc4e94217f44d7a1124a18ca74df2d15c166d189144_sk │ │ │ ├── signcerts │ │ │ │ └── peer2.org1.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── server.crt │ │ │ └── server.key │ │ ├── tlsca │ │ ├── e42ba32f8555378729d665001d2d8a54627b951aba505cabeb69c5ce6c3b7a08_sk │ │ └── tlsca.org1.example.com-cert.pem │ │ └── users │ │ ├── Admin@org1.example.com │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ ├── keystore │ │ │ │ └── 76a418cdbae4e5b4f2face00d19ca477acbe5a159d6eb491a5547ce9c60a301f_sk │ │ │ ├── signcerts │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── server.crt │ │ │ └── server.key │ │ └── User1@org1.example.com │ │ ├── msp │ │ ├── admincerts │ │ │ └── User1@org1.example.com-cert.pem │ │ ├── cacerts │ │ │ └── ca.org1.example.com-cert.pem │ │ ├── keystore │ │ │ └── 63d29f566b1a9dfd0c88bb71680f7ce5b80dabfd65a8ad214a44812e996252fe_sk │ │ ├── signcerts │ │ │ └── User1@org1.example.com-cert.pem │ │ └── tlscacerts │ │ │ └── tlsca.org1.example.com-cert.pem │ │ └── tls │ │ ├── ca.crt │ │ ├── server.crt │ │ └── server.key ├── docker-compose-tls.yml ├── docker-compose.yml ├── generate.sh ├── start-tls.sh ├── start.sh ├── stop-tls.sh ├── stop.sh ├── teardown-tls.sh └── teardown.sh ├── fabric_rest.py ├── fullRun.sh ├── input ├── installFabcar.tar.gz ├── installTest.tar.gz └── src │ ├── fabcar │ └── fabcar.go │ └── marbles02 │ └── marbles_chaincode.go ├── logs └── .gitkeep ├── test_authentication.sh ├── test_channel_setup.py ├── test_channel_setup_tls.py ├── test_fabcar.py └── tlsNetworkfullRun.sh /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # SPDX-License-Identifier: Apache-2.0 2 | # Number of days of inactivity before an issue becomes stale 3 | daysUntilStale: 0 4 | # Number of days of inactivity before a stale issue is closed 5 | daysUntilClose: 1 6 | # Issues with these labels will never be considered stale 7 | # CAUTION: These issues are likely to get _less_ attention since stale bot 8 | # will never nag anyone about them. Stale bot just reflects the community's 9 | # actual priorities and adding labels to this list will not change that. 10 | # If issues you care about are going stale, you need to work with the 11 | # community to raise their profile, e.g. add more information, reach out on 12 | # Rocket.Chat, join a community call, etc. 13 | # WARNING: Please do not change these labels without seeking community 14 | # consensus first! 15 | # Label to use when marking an issue as stale 16 | staleLabel: stale 17 | only: pulls 18 | # Comment to post when marking an issue as stale. Set to `false` to disable 19 | markComment: > 20 | Thank you for your contribution! 21 | Please use gerrit for the changes, see 22 | [documentation here](https://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html) 23 | # Comment to post when closing a stale issue. Set to `false` to disable 24 | closeComment: > 25 | Thank you for your contribution! 26 | Please use gerrit for the changes, see 27 | [documentation here](https://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html) 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.pyc 3 | datasources.json 4 | *.log 5 | tests/cookies.txt 6 | **/private/ 7 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright IBM Corp. All Rights Reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | # Use the same docker image that is used as the hyperledger base image 8 | FROM hyperledger/fabric-baseos:x86_64-0.4.2 9 | 10 | RUN mkdir -p /tmp/scripts 11 | COPY scripts /tmp/scripts 12 | RUN cd /tmp/scripts && \ 13 | ./init.sh && \ 14 | rm -rf /tmp/scripts 15 | #ENV GOPATH=/opt/gopath 16 | #ENV GOROOT=/opt/go 17 | #ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin 18 | 19 | RUN npm install fabric-rest 20 | 21 | EXPOSE 3000 22 | CMD node node_modules/fabric-rest 23 | 24 | ### Command to use when building locally 25 | # docker build -t fabric-rest:latest . 26 | -------------------------------------------------------------------------------- /docker/scripts/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM All Rights Reserved. 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | # Stop on first error 9 | set -e 10 | set -x 11 | 12 | # Update the entire system to the latest releases 13 | apt-get update -qq 14 | apt-get dist-upgrade -qqy 15 | 16 | # install common tools 17 | COMMON_TOOLS="python git net-tools netcat-openbsd autoconf automake libtool curl make g++ unzip build-essential tar" 18 | apt-get install -y $COMMON_TOOLS 19 | 20 | # Set Go environment variables needed by other scripts 21 | # export GOPATH="/opt/gopath" 22 | # export GOROOT="/opt/go" 23 | 24 | # ---------------------------------------------------------------- 25 | # Install Golang 26 | # ---------------------------------------------------------------- 27 | # mkdir -p $GOPATH 28 | # ARCH=`uname -m | sed 's|i686|386|' | sed 's|x86_64|amd64|'` 29 | # BINTARGETS="x86_64 ppc64le s390x" 30 | # GO_VER=1.9 31 | # 32 | # # Install Golang binary if found in BINTARGETS 33 | # if echo $BINTARGETS | grep -q `uname -m`; then 34 | # cd /tmp 35 | # wget --quiet --no-check-certificate https://storage.googleapis.com/golang/go${GO_VER}.linux-${ARCH}.tar.gz 36 | # tar -xvf go${GO_VER}.linux-${ARCH}.tar.gz 37 | # mv go $GOROOT 38 | # chmod 775 $GOROOT 39 | # # Otherwise, build Golang from source 40 | # else 41 | # # Install Golang 1.6 binary as a bootstrap to compile the Golang GO_VER source 42 | # apt-get -y install golang-1.6 43 | # 44 | # cd /tmp 45 | # wget --quiet --no-check-certificate https://storage.googleapis.com/golang/go${GO_VER}.src.tar.gz 46 | # tar -xzf go${GO_VER}.src.tar.gz -C /opt 47 | # 48 | # cd $GOROOT/src 49 | # export GOROOT_BOOTSTRAP="/usr/lib/go-1.6" 50 | # ./make.bash 51 | # apt-get -y remove golang-1.6 52 | # fi 53 | # 54 | # PATH=$GOROOT/bin:$GOPATH/bin:$PATH 55 | # 56 | # cat </etc/profile.d/goroot.sh 57 | # export GOROOT=$GOROOT 58 | # export GOPATH=$GOPATH 59 | # export PATH=\$PATH:$GOROOT/bin:$GOPATH/bin 60 | # EOF 61 | 62 | # ---------------------------------------------------------------- 63 | # Install NodeJS 64 | # ---------------------------------------------------------------- 65 | NODE_VER=8.4.0 66 | 67 | ARCH=`uname -m | sed 's|i686|x86|' | sed 's|x86_64|x64|'` 68 | NODE_PKG=node-v$NODE_VER-linux-$ARCH.tar.gz 69 | SRC_PATH=/tmp/$NODE_PKG 70 | 71 | # First remove any prior packages downloaded in case of failure 72 | cd /tmp 73 | rm -f node*.tar.gz 74 | wget --quiet https://nodejs.org/dist/v$NODE_VER/$NODE_PKG 75 | cd /usr/local && tar --strip-components 1 -xzf $SRC_PATH 76 | 77 | # # ---------------------------------------------------------------- 78 | # # Install protocol buffer support 79 | # # 80 | # # See https://github.com/google/protobuf 81 | # # ---------------------------------------------------------------- 82 | # PROTOBUF_VER=3.1.0 83 | # PROTOBUF_PKG=v$PROTOBUF_VER.tar.gz 84 | # 85 | # cd /tmp 86 | # wget --quiet https://github.com/google/protobuf/archive/$PROTOBUF_PKG 87 | # tar xpzf $PROTOBUF_PKG 88 | # cd protobuf-$PROTOBUF_VER 89 | # ./autogen.sh 90 | # # NOTE: By default, the package will be installed to /usr/local. However, on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH. 91 | # # You can add it, but it may be easier to just install to /usr instead. 92 | # # 93 | # # To do this, invoke configure as follows: 94 | # # 95 | # # ./configure --prefix=/usr 96 | # # 97 | # #./configure 98 | # ./configure --prefix=/usr 99 | # 100 | # make 101 | # make check 102 | # make install 103 | # export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH 104 | cd ~/ 105 | 106 | # Make our versioning persistent 107 | echo $BASEIMAGE_RELEASE > /etc/hyperledger-baseimage-release 108 | -------------------------------------------------------------------------------- /docs/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | We welcome contributions to the Hyperledger Fabric SDK Rest Project in 3 | many forms, and there's always plenty to do! This document describes 4 | the basic golden path to contributing to the project. We assume that 5 | you have a working knowledge of SSH keys, and general git 6 | workflows. If you need help, you can ask on [RocketChat][rc]. 7 | 8 | We use [Gerrit][] for code review; this is mirrored to GitHub as a 9 | [read-only project][gh]. The project has two git branches: `master`, 10 | and `dev`. Development work should be done against `dev`. Occasionally 11 | `master` will merge the changes in `dev`, to keep it stable. A CI 12 | server runs jobs to test the server against all `dev` branch commits. 13 | 14 | You'll need a [Linux Foundation ID][LFID] (LFID) to contribute to the 15 | project. 16 | 17 | 18 | ## Cloning the Repository 19 | Replace `[LFID]` with your own Linux Foundation ID, and run the 20 | following commands to clone the repository and pull the git commit 21 | message hook: 22 | 23 | ```bash 24 | git clone ssh://[LFID]@gerrit.hyperledger.org:29418/fabric-sdk-rest && scp -p -P 29418 [LFID]@gerrit.hyperledger.org:hooks/commit-msg fabric-sdk-rest/.git/hooks/ 25 | ``` 26 | 27 | 28 | ## Creating a Code Change and Committing It 29 | After changing to the `fabric-sdk-rest` directory, switch to the `dev` 30 | branch and issue a `git pull`: 31 | 32 | ```bash 33 | git checkout dev 34 | git pull 35 | ``` 36 | 37 | This should have git track your local `dev` branch against 38 | `origin/dev` on the (Gerrit) remote. While you can develop against 39 | your local `dev` branch directly, we'd recommend that you create a 40 | feature development branch from the latest `dev` commit, for the 41 | feature or enhancement you're providing, with a useful (to you) name: 42 | 43 | ```bash 44 | git checkout -b improve-contributor-docs 45 | ``` 46 | 47 | Make your changes, and when you're ready, commit them. Note that you 48 | need to sign off on your commits for this project, with the `-s` flag: 49 | 50 | ```bash 51 | git commit -s -m 'Improved the wording of the documentation' 52 | ``` 53 | 54 | If you run `git log`, you'll see that your last commit has `Change-Id` 55 | and `Signed-off-by` fields, e.g., 56 | 57 | ```bash 58 | Change-Id: I8dd1bfdeafa57f1111ab481864bdc87939713ac8 59 | Signed-off-by: Chris Poole 60 | ``` 61 | 62 | After one or more commits, you can merge them (which should be a 63 | simple fast-forward) with your local `dev` branch. For example: 64 | 65 | ```bash 66 | git checkout dev 67 | git merge improve-contributor-docs 68 | ``` 69 | 70 | Your local `dev` branch now has your changes in them, and you can push 71 | them to Gerrit for code review. 72 | 73 | Before you do so though, please test your changes (as described in 74 | [the readme document](README.md)) to ensure that nothing has 75 | broken. If you've introduced changes not covered by an existing test, 76 | please also develop a new test, and commit that too. 77 | 78 | 79 | ## Pushing Commits 80 | Gerrit has a system where each git branch has a `for` branch 81 | associated with it. You push commits to the `for` branch, which sends 82 | them for code review. Once one or more project maintainers have agreed 83 | to the code changes, a maintainer can submit the commits. This merges 84 | them into the actual `dev` branch for anyone to `pull`. Occasionally, 85 | a maintainer will merge `master` with `dev` to pull in the latest 86 | development work, but all changes should be made against `dev`, and 87 | pushed to `for/dev`. 88 | 89 | To push your commits to Gerrit for review, issue: 90 | 91 | ```bash 92 | git push origin HEAD:refs/for/dev 93 | ``` 94 | 95 | or to push the commits and automatically notify one or more of the 96 | project maintainers of the code review, 97 | 98 | ```bash 99 | git push origin HEAD:refs/for/dev%r=chrispoole@uk.ibm.com,r=cocksmar@uk.ibm.com 100 | ``` 101 | 102 | If this has worked, you'll see a message from Gerrit like 103 | 104 | ```bash 105 | remote: New Changes: 106 | remote: https://gerrit.hyperledger.org/r/12345 improve-contributor-docs 107 | ``` 108 | 109 | You'll be notified by email (to the email address on the commit) once 110 | a code review has occurred. 111 | 112 | ## Legal Stuff 113 | **Note:** All contributions to this project must follow the [Hyperledger Fabric legal requirements](https://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html#legal-stuff) 114 | 115 | 116 | ## More Information 117 | For more general information, including what makes a good change 118 | request, see the [Hyperledger Fabric contributors guide][hfc]. 119 | 120 | 121 | ******** 122 | 123 | 124 | Creative
126 | Commons License
This work is licensed under a Creative Commons 130 | Attribution 4.0 International License. 131 | 132 | 133 | 134 | 135 | [Gerrit]: https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-rest 136 | [gh]: https://github.com/hyperledger/fabric-sdk-rest 137 | [LFID]: https://identity.linuxfoundation.org 138 | [rc]: https://chat.hyperledger.org 139 | [hfc]: https://hyperledger-fabric.readthedocs.io/en/latest/CONTRIBUTING.html#what-makes-a-good-change-request 140 | -------------------------------------------------------------------------------- /docs/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Securing the REST Server 2 | By default, the REST server responds to requests via HTTP, with no 3 | authentication. 4 | 5 | HTTPS (TLS), and a number of authentication mechanisms can be 6 | configured. A template file is pre-configured for an LDAPjs server to 7 | aid authentication testing. 8 | 9 | ## Enabling HTTPS 10 | By default, the server operates over HTTP. With the supplied option 11 | `-t` or `--tls`, however, HTTPS can be enabled. To do this, you must 12 | first generate or provide SSL keys. The server will look for these keys in the 13 | directory `packages/fabric-rest/server/private`. The following files 14 | are required: 15 | 16 | - `certificate.pem` 17 | - `privatekey.pem` 18 | 19 | To generate these files for testing, the following command can be 20 | issued in the `private` directory: 21 | 22 | ```bash 23 | openssl req -x509 -newkey rsa:4096 -keyout privatekey.pem -out certificate.pem \ 24 | -days 365 -subj "/C=US/ST=Oregon/L=Portland/O=Company Name/OU=Org/CN=www.example.com" -nodes 25 | ``` 26 | 27 | Alternatively, certificate and private key file names can be specified 28 | on the command line with the `-e` and `-k` options, 29 | respectively. These file names should be absolute. 30 | 31 | Now, start the server with `node . --tls` or `node . -t`. Note that if 32 | you connect to the server with a web browser, to view the `/explorer` 33 | interface for example, the browser may warn about using a self-signed 34 | certificate. This is expected behaviour. 35 | 36 | The `setup.sh` helper script has support for TLS too. Use `setup.sh 37 | -t` option to use HTTPS when running the server, as well as running 38 | the above commands to generate keys, if they don't already 39 | exist. Attempting to start the server requesting HTTPS secure 40 | transport while not having the correct certificates and private key 41 | will cause the server to fail. 42 | 43 | 44 | ## Authentication Mechanisms 45 | The REST server makes use of [Passport][] authentication strategies. LDAP 46 | is the default; other strategies can be added. 47 | 48 | 49 | ### LDAP 50 | `server/providers.json` contains the information defining the 51 | strategies to be used by the server. The default LDAP configuration 52 | applies to the packaged LDAP server (an [ldapjs][] 53 | server). Alternatively, the `-s` option on the command line can be 54 | used to specify the absolute file name of a `providers.json` file to 55 | use. E.g., 56 | 57 | ```bash 58 | fabric-rest-server -s /my-providers-file.json 59 | ``` 60 | 61 | To use the packaged LDAP server for authentication, run 62 | 63 | ```bash 64 | node ./authentication.js 65 | ``` 66 | 67 | in the `test/authentication` directory. This will start the server on 68 | port `1389` by default, with a user `alice` whose password is 69 | `secret`. 70 | 71 | To configure the LDAP strategy for your own LDAP server, edit the file 72 | `server/providers.json` in the `fabric-rest` package. 73 | 74 | If the server runs with no authentication---that is, the default 75 | `providers.json` is not found and none is specified on the command 76 | line with the `-s` option---a warning will be issued on server 77 | start. If a providers file is named with the `-s` option but this file 78 | isn't found, an error will be given and the server process will end. 79 | 80 | 81 | ### Using Other Strategies 82 | Many other strategies are available; to use another strategy, install 83 | the required strategy and add this to the `providers.json` file. 84 | 85 | 86 | 87 | 88 | [Passport]: http://passportjs.org/ 89 | [ldapjs]: http://ldapjs.org/ 90 | -------------------------------------------------------------------------------- /docs/TESTING.md: -------------------------------------------------------------------------------- 1 | # Testing the REST API 2 | The `tests` directory contains a python wrapper for the REST API, and 3 | modules to run tests against the REST API server for specific Fabric 4 | sample networks. 5 | 6 | These tests authenticate using LDAP, configured with the defaults for 7 | the LDAP server provided in the `authentication` directory. 8 | 9 | The tests make use of the _Fabcar_ sample network. You can run tests 10 | individually against an already-started Fabcar network, or make use of 11 | a supplied sample network. 12 | 13 | 14 | ## Run All Tests Against a Supplied Sample Network 15 | A version of the _Fabcar_ sample network is packaged with this project 16 | to ease testing. To run all the tests in turn, run the `fullRun.sh` 17 | test script. This will: 18 | 19 | 1. Configure OpenSSL keys for TLS, if not already present in the 20 | server's `private` directory 21 | 2. Start up a supplied Hyperledger Fabric network 22 | 3. Start the supplied LDAP server 23 | 4. Start the SDK REST server 24 | 5. Run all tests in order, connecting over HTTP 25 | 6. Run tests with TLS enabled 26 | 27 | From the `fabric-sdk-rest` directory, run 28 | 29 | ```bash 30 | npm test 31 | ``` 32 | 33 | A successful test will show output such as: 34 | 35 | ```bash 36 | Test suite 1: PASSED 37 | Test suite 2: PASSED 38 | Test suite 3: PASSED 39 | Test suite 4: PASSED 40 | ``` 41 | 42 | The port for the REST server to listen on, and the tests to connect 43 | to, can be specified with the `-p` parameter. In addition, 44 | `fullRun.sh` supports the following options: 45 | 46 | - `-f`: Force removal of 'hyperledger' Docker containers 47 | - `-k`: Don't kill the LDAP server or Fabric REST server 48 | 49 | The `-f` option can be used if you suspect other Hyperledger-related 50 | Docker containers and causing issues with the sample network. 51 | 52 | If you wish to run through all the tests to confirm a healthy system, 53 | but wish to keep using the started LDAP and SDK REST servers, the `-k` 54 | option will tell you their process IDs, but not issue the `kill` 55 | commands. 56 | 57 | Full help can be shown with `fullRun.sh -h`. 58 | 59 | ## Run Individual Tests 60 | If you start a network another way, for example by starting the 61 | _fabcar_ sample network yourself, run the tests individually, e.g., 62 | 63 | ```bash 64 | python test_fabcar.py 65 | ``` 66 | 67 | This python test takes a `--help` parameter; specify `--hostname` or 68 | `--port` if the defaults of `localhost` and `3000` do not 69 | suffice. Option `--tls` enables TLS requests to the REST server, if 70 | the REST server has been configured to accept requests over HTTPS 71 | only. 72 | 73 | 74 | ## Test Channel Creation 75 | To test creating a new channel, joining a peer, and installing and 76 | instantiating the fabcar chaincode, the automated test 77 | `test_channel_setup.py` requires some set up: 78 | 79 | - Set an environment variable for the location of the fabric-samples 80 | directory: 81 | 82 | ```bash 83 | export FABRIC_SAMPLES_DIR=xxxx 84 | ``` 85 | 86 | - Comment out the `docker exec` commands in the file 87 | `fabric-samples/basic-network/start.sh` 88 | - Run that `start.sh` script to start the sample `basic-network` 89 | without a channel defined 90 | 91 | Now the test can be run using the command 92 | 93 | ```bash 94 | python test_channel_setup.py 95 | ``` 96 | 97 | To rerun this test, first `start.sh` must be run to redefine the 98 | basic-network without any artifacts. 99 | 100 | 101 | ## Example Input for Testing 102 | Before running these tests ensure that the fabcar sample network is 103 | running, for example using `docker ps`. If it is not use the 104 | `startFabric.sh` script in the fabcar directory to start it. 105 | 106 | 107 | ### Fabcar 108 | Browse to the [Loopback Explorer][explorer] interface. 109 | 110 | 111 | #### Query ledger using chaincode for all cars 112 | Issue a `POST` request to `/fabric/1_0/channels/{channelName}/ledger` with the following 113 | values by default: 114 | 115 | `channel` 116 | : `mychannel` 117 | 118 | `chaincodeId` 119 | : `fabcar` 120 | 121 | Request body: 122 | ```json 123 | { 124 | "fcn": "queryAllCars", 125 | "args": [] 126 | } 127 | ``` 128 | 129 | 130 | #### Query ledger using chaincode for one car 131 | Issue a `POST` request to `/fabric/1_0/channels/{channelName}/ledger` with the following 132 | values by default: 133 | 134 | `channel` 135 | : `mychannel` 136 | 137 | `chaincodeId` 138 | : `fabcar` 139 | 140 | Request body: 141 | ```json 142 | { 143 | "fcn": "queryCar", 144 | "args": ["CAR4"] 145 | } 146 | ``` 147 | 148 | Expected Response (truncated), code `200`: 149 | ```json 150 | { 151 | "queryResult": [ 152 | { 153 | "Key": "CAR0", 154 | "Record": { 155 | "colour": "blue", 156 | "make": "Toyota", 157 | "model": "Prius", 158 | "owner": "Tomoko" 159 | } 160 | }, 161 | { 162 | "Key": "CAR1", 163 | "Record": { 164 | 165 | } 166 | } 167 | ] 168 | } 169 | ``` 170 | 171 | 181 | 182 | 183 | #### End to End transaction 184 | `channel` 185 | : `mychannel` 186 | 187 | Request body: 188 | ```json 189 | { 190 | "proposalResponses":[], 191 | "proposal": { 192 | "chaincodeId": "fabcar", 193 | "fcn":"createCar", 194 | "args": ["CAR10", "Chevy", "Volt", "Red", "Nick"] 195 | } 196 | } 197 | ``` 198 | 199 | 200 | #### Unexpected responses 201 | There could be several different causes for an unexpected response body. 202 | 203 | If a response is returned that contains a body similar to this: 204 | 205 | ```json 206 | { 207 | "status": 14, 208 | "metadata":{ } 209 | } 210 | ``` 211 | 212 | then an error has occurred in the grpc communication layer. The status 213 | codes returned are available in the [grpc source code][grpc] 214 | (Apache-2.0 licensed at time of writing). 215 | 216 | 217 | For example a `"status": 14` means UNAVAILABLE and is caused by a 218 | problem with the REST server communicating with the peer or 219 | orderer. In this case check that the network is running (if the 220 | network is local `docker ps` will list the containers) and check that 221 | the addresses and ports used are also correct. 222 | 223 | 224 | 225 | 226 | [explorer]: http://0.0.0.0:3000/explorer/ 227 | [grpc]: https://github.com/grpc/grpc-node/blob/master/packages/grpc-native-core/src/constants.js 228 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fabric-sdk-rest", 3 | "version": "1.0.2-snapshot", 4 | "description": "Gerrit repository of the REST SDK for Hyperledger Fabric v1.0", 5 | "engines": { 6 | "node": ">=6.9.0" 7 | }, 8 | "keywords": [ 9 | "fabric-sdk-rest" 10 | ], 11 | "scripts": { 12 | "test": "./tests/fullRun.sh" 13 | }, 14 | "main": "packages/fabric-rest/server/server.js", 15 | "devDependencies": { 16 | "ldapjs": "^1.0.1" 17 | }, 18 | "repository": { 19 | "type": "gerrit", 20 | "url": "https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-rest" 21 | }, 22 | "license": "Apache-2.0" 23 | } 24 | -------------------------------------------------------------------------------- /packages/fabric-rest/README.md: -------------------------------------------------------------------------------- 1 | # fabric-rest 2 | 3 | ## Description 4 | This is a loopback application that provides a REST API on top of 5 | fabric-sdk-node using a loopback connector for hyperledger fabric. 6 | 7 | ## License 8 | See http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | ## Configuration 11 | Update `datasources.json` to change the properties of fabricDataSource 12 | to reference the hyperledger fabric peers and orderers that the 13 | connector will use. 14 | -------------------------------------------------------------------------------- /packages/fabric-rest/client/README.md: -------------------------------------------------------------------------------- 1 | ## Client 2 | 3 | This is the place for your application front-end files. 4 | -------------------------------------------------------------------------------- /packages/fabric-rest/common/models/access-token.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "accessToken", 3 | "plural": "accessTokens", 4 | "base": "AccessToken", 5 | "properties": {}, 6 | "validations": [], 7 | "relations": { 8 | "user": { 9 | "type": "belongsTo", 10 | "model": "user", 11 | "foreignKey": "userId" 12 | } 13 | }, 14 | "acls": [], 15 | "methods": [] 16 | } -------------------------------------------------------------------------------- /packages/fabric-rest/common/models/user-credential.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "userCredential", 3 | "plural": "userCredentials", 4 | "base": "UserCredential", 5 | "properties": {}, 6 | "validations": [], 7 | "relations": { 8 | "user": { 9 | "type": "belongsTo", 10 | "model": "user", 11 | "foreignKey": "userId" 12 | } 13 | }, 14 | "acls": [], 15 | "methods": [] 16 | } -------------------------------------------------------------------------------- /packages/fabric-rest/common/models/user-identity.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "userIdentity", 3 | "plural": "userIdentities", 4 | "base": "UserIdentity", 5 | "properties": {}, 6 | "validations": [], 7 | "relations": { 8 | "user": { 9 | "type": "belongsTo", 10 | "model": "user", 11 | "foreignKey": "userId" 12 | } 13 | }, 14 | "acls": [], 15 | "methods": [] 16 | } -------------------------------------------------------------------------------- /packages/fabric-rest/common/models/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "user", 3 | "plural": "users", 4 | "base": "User", 5 | "idInjection": true, 6 | "relations": { 7 | "accessTokens": { 8 | "type": "hasMany", 9 | "model": "accessToken", 10 | "foreignKey": "userId" 11 | }, 12 | "identities": { 13 | "type": "hasMany", 14 | "model": "userIdentity", 15 | "foreignKey": "userId" 16 | }, 17 | "credentials": { 18 | "type": "hasMany", 19 | "model": "userCredential", 20 | "foreignKey": "userId" 21 | } 22 | }, 23 | "validations": [], 24 | "acls": [], 25 | "methods": [] 26 | } 27 | -------------------------------------------------------------------------------- /packages/fabric-rest/fabric-rest-server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright IBM Corp. All Rights Reserved. 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | # Start the Hyperledger Fabric SDK REST server 9 | 10 | logging='{"debug":"console"}' 11 | 12 | _show_help() { 13 | printf -- "Usage: fabric-rest-server [OPTIONS]\n\n" 14 | printf -- "Options:\n" 15 | printf -- "-d Enable default logging for debugging\n" 16 | printf -- "-l Set logging options for debugging\n" 17 | printf -- "-p The port to serve the REST API on\n" 18 | printf -- "-c File containing the connection profile document\n" 19 | printf -- "-s File containing the Passport authentication strategy configurations\n" 20 | printf -- "-t Enable TLS security for the REST API\n" 21 | printf -- "-e File containing the TLS certificate\n" 22 | printf -- "-k File containing the TLS private key\n" 23 | exit 12 24 | } 25 | 26 | while getopts :tp:dl:c:s:e:k:h opt; do 27 | case "$opt" in 28 | t) cliOptions="${cliOptions} --tls" 29 | ;; 30 | p) cliOptions="${cliOptions} --port ${OPTARG}" 31 | ;; 32 | d) debug=true 33 | ;; 34 | l) debug=true; logging="$OPTARG" 35 | ;; 36 | c) cliOptions="${cliOptions} -c ${OPTARG}" 37 | ;; 38 | s) cliOptions="${cliOptions} -s ${OPTARG}" 39 | ;; 40 | e) cliOptions="${cliOptions} -e ${OPTARG}" 41 | ;; 42 | k) cliOptions="${cliOptions} -k ${OPTARG}" 43 | ;; 44 | h) _show_help 45 | ;; 46 | '?') printf -- "Invalid option $OPTARG. Try '-h' for help.\n" && exit 12 47 | ;; 48 | esac 49 | done 50 | 51 | shift $((OPTIND-1)) 52 | 53 | # Enable logging if -d or -l are passed 54 | if [[ -n $debug ]]; then 55 | cliOptions="${cliOptions} --hfc-logging ${logging}" 56 | fi 57 | 58 | # Start the server 59 | node . ${cliOptions} & 60 | printf "$!" >| /tmp/.fabric-rest-server.pid 61 | -------------------------------------------------------------------------------- /packages/fabric-rest/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fabric-rest", 3 | "version": "1.0.2-snapshot", 4 | "keywords": [ 5 | "LoopBack", 6 | "Hyperledger", 7 | "Fabric", 8 | "REST", 9 | "fabric-sdk-rest" 10 | ], 11 | "main": "server/server.js", 12 | "scripts": { 13 | "start": "./fabric-rest-server" 14 | }, 15 | "bin": { 16 | "fabric-rest-server": "fabric-rest-server" 17 | }, 18 | "dependencies": { 19 | "compression": "^1.0.3", 20 | "connect-ensure-login": "^0.1.1", 21 | "cookie-parser": "^1.4.3", 22 | "cors": "^2.5.2", 23 | "express-session": "^1.15.6", 24 | "helmet": "^1.3.0", 25 | "loopback": "^3.0.0", 26 | "loopback-boot": "^2.6.5", 27 | "loopback-component-explorer": "^4.0.0", 28 | "loopback-connector-fabric": "^1.0.2-snapshot", 29 | "loopback-component-passport": "^3.4.1", 30 | "passport": "^0.2.2", 31 | "passport-http": "^0.3.0", 32 | "passport-ldapauth": "^2.0.0", 33 | "serve-favicon": "^2.0.1", 34 | "strong-error-handler": "^1.0.1", 35 | "yargs": "^9.0.1" 36 | }, 37 | "repository": { 38 | "type": "gerrit", 39 | "url": "https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-rest" 40 | }, 41 | "license": "Apache-2.0", 42 | "description": "SDK REST API for Hyperledger Fabric" 43 | } 44 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/component-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "loopback-component-explorer": { 3 | "mountPath": "/explorer" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/component-config.production.json: -------------------------------------------------------------------------------- 1 | { 2 | "loopback-component-explorer": null 3 | } 4 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "restApiRoot": "/api", 3 | "host": "0.0.0.0", 4 | "port": 3000, 5 | "cookieSecret": "5dcbbeb2-cd63-4a3e-a0a3-70127bf74a66", 6 | "remoting": { 7 | "context": false, 8 | "rest": { 9 | "handleErrors": false, 10 | "normalizeHttpPath": false, 11 | "xml": false 12 | }, 13 | "json": { 14 | "strict": false, 15 | "limit": "100kb" 16 | }, 17 | "urlencoded": { 18 | "extended": true, 19 | "limit": "100kb" 20 | }, 21 | "cors": false 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/datasources-tls.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "db": { 3 | "name": "db", 4 | "connector": "memory" 5 | }, 6 | "fabricDataSource": { 7 | "name": "fabricDataSource", 8 | "connector": "fabric", 9 | "keyStoreFile": "/tmp/fabricSDKStore", 10 | "AUSER": { 11 | "username": "User1@org1.example.com", 12 | "mspid": "Org1MSP", 13 | "cryptoContent": { 14 | "privateKey":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/XXXXXXXX", 15 | "signedCert":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem" 16 | } 17 | }, 18 | "ADMINUSER": { 19 | "username": "Admin@org1.example.com", 20 | "mspid": "Org1MSP", 21 | "cryptoContent": { 22 | "privateKey":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/ADMIN1STORE", 23 | "signedCert":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem" 24 | } 25 | }, 26 | "COMMENT_orgs":"Referenced by peers to avoid having to configure the same file location multiple times. Change CACertFile locations for your fabric", 27 | "orgs": [ 28 | { "name":"org1", "CACertFile":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem"} 29 | ], 30 | "COMMENT_peers" : "Configured array is for use with the tlsNetworkFullRun.sh tests when running it in a local docker set up. eventURL and publicCertFile not currently used.", 31 | "peers": [ 32 | { "requestURL":"grpcs://0.0.0.0:7051", 33 | "eventURL":"grpcs://0.0.0.0:7053", 34 | "orgIndex":"0", 35 | "tls_cacerts": "FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", 36 | "publicCertFile":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem", 37 | "hostname":"peer0.org1.example.com" }, 38 | { "requestURL":"grpcs://0.0.0.0:8051", 39 | "eventURL":"grpcs://0.0.0.0:8053", 40 | "orgIndex":"0", 41 | "tls_cacerts": "FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt", 42 | "publicCertFile":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem", 43 | "hostname":"peer1.org1.example.com" } 44 | ], 45 | "orderers": [ 46 | { "url":"grpcs://0.0.0.0:7050", 47 | "tls_cacerts": "FABSAMPLE/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt", 48 | "CACertFile":"FABSAMPLE/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem", 49 | "publicCertFile": "FABSAMPLE/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem", 50 | "hostname":"orderer.example.com"} 51 | ], 52 | "COMMENT_channels":"fabric-sdk-node Client class requires channel information to be configured during bootstrap.", 53 | "channels": [ 54 | { "name":"mychannel", "peersIndex":[0,1], "orderersIndex":[0] } 55 | ] 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/datasources.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "db": { 3 | "name": "db", 4 | "connector": "memory" 5 | }, 6 | "fabricDataSource": { 7 | "name": "fabricDataSource", 8 | "connector": "fabric", 9 | "keyStoreFile": "/tmp/fabricSDKStore", 10 | "AUSER": { 11 | "username": "User1@org1.example.com", 12 | "mspid": "Org1MSP", 13 | "cryptoContent": { 14 | "privateKey":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/XXXXXXXX", 15 | "signedCert":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem" 16 | } 17 | }, 18 | "ADMINUSER": { 19 | "username": "Admin@org1.example.com", 20 | "mspid": "Org1MSP", 21 | "cryptoContent": { 22 | "privateKey":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/ADMIN1STORE", 23 | "signedCert":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem" 24 | } 25 | }, 26 | "COMMENT_orgs":"Referenced by peers to avoid having to configure the same file location multiple times. Change CACertFile locations for your fabric", 27 | "orgs": [ 28 | { "name":"org1", "CACertFile":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem"}, 29 | { "name":"org2", "CACertFile":"FABSAMPLE/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem"} 30 | ], 31 | "COMMENT_peers_and_orderers" : "Configured array is for use with the fabric-sample when running it in a local docker set up. If peers and orderers are configured to use TLS change grpc to grpcs in urls. eventURL and publicCertFile not currently used.", 32 | "peers": [ 33 | { "requestURL":"grpc://0.0.0.0:7051", "eventURL":"grpc://0.0.0.0:7053", "orgIndex":"0", "publicCertFile":"FABSAMPLE/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem", "hostname":"peer0" } 34 | ], 35 | "orderers": [ 36 | { "url":"grpc://0.0.0.0:7050", "CACertFile":"FABSAMPLE/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem", "publicCertFile": "FABSAMPLE/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem", "hostname":"orderer"} 37 | ], 38 | "COMMENT_channels":"fabric-sdk-node Client class requires channel information to be configured during bootstrap.", 39 | "channels": [ 40 | { "name":"mychannel", "peersIndex":[0], "orderersIndex":[0] } 41 | ], 42 | "channels-first-network": [ 43 | { "name":"mychannel", "peersIndex":[0,1,2,3], "orderersIndex":[0] } 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/middleware.development.json: -------------------------------------------------------------------------------- 1 | { 2 | "final:after": { 3 | "strong-error-handler": { 4 | "params": { 5 | "debug": true, 6 | "log": true 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/middleware.json: -------------------------------------------------------------------------------- 1 | { 2 | "initial:before": { 3 | "loopback#favicon": {} 4 | }, 5 | "initial": { 6 | "compression": {}, 7 | "cors": { 8 | "params": { 9 | "origin": true, 10 | "credentials": true, 11 | "maxAge": 86400 12 | } 13 | }, 14 | "helmet#xssFilter": {}, 15 | "helmet#frameguard": { 16 | "params": [ 17 | "deny" 18 | ] 19 | }, 20 | "helmet#hsts": { 21 | "params": { 22 | "maxAge": 0, 23 | "includeSubdomains": true 24 | } 25 | }, 26 | "helmet#hidePoweredBy": {}, 27 | "helmet#ieNoOpen": {}, 28 | "helmet#noSniff": {}, 29 | "helmet#noCache": { 30 | "enabled": false 31 | } 32 | }, 33 | "session": {}, 34 | "auth": {}, 35 | "parse": {}, 36 | "routes": { 37 | "loopback#rest": { 38 | "paths": [ 39 | "${restApiRoot}" 40 | ] 41 | } 42 | }, 43 | "files": {}, 44 | "final": { 45 | "loopback#urlNotFound": {} 46 | }, 47 | "final:after": { 48 | "strong-error-handler": {} 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/model-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "_meta": { 3 | "sources": [ 4 | "loopback/common/models", 5 | "loopback/server/models", 6 | "../common/models", 7 | "./models" 8 | ], 9 | "mixins": [ 10 | "loopback/common/mixins", 11 | "loopback/server/mixins", 12 | "../common/mixins", 13 | "./mixins" 14 | ] 15 | }, 16 | "user": { 17 | "dataSource": "db", 18 | "public": true 19 | }, 20 | "accessToken": { 21 | "dataSource": "db", 22 | "public": false 23 | }, 24 | "userCredential": { 25 | "dataSource": "db", 26 | "public": false 27 | }, 28 | "userIdentity": { 29 | "dataSource": "db", 30 | "public": false 31 | }, 32 | "ACL": { 33 | "dataSource": "db", 34 | "public": false 35 | }, 36 | "RoleMapping": { 37 | "dataSource": "db", 38 | "public": false 39 | }, 40 | "Role": { 41 | "dataSource": "db", 42 | "public": false 43 | }, 44 | "fabric_1_0": { 45 | "dataSource": "fabricDataSource", 46 | "public": true 47 | }, 48 | "args": { 49 | "dataSource": null, 50 | "public": false 51 | }, 52 | "block": { 53 | "dataSource": null, 54 | "public": false 55 | }, 56 | "channel": { 57 | "dataSource": null, 58 | "public": false 59 | }, 60 | "channelResponse": { 61 | "dataSource": null, 62 | "public": false 63 | }, 64 | "ChannelQueryResponse": { 65 | "dataSource": null, 66 | "public": false 67 | }, 68 | "channelID": { 69 | "dataSource": null, 70 | "public": false 71 | }, 72 | "transactionProposal": { 73 | "dataSource": null, 74 | "public": false 75 | }, 76 | "ordererResponse": { 77 | "dataSource": null, 78 | "public": false 79 | }, 80 | "installResult": { 81 | "dataSource": null, 82 | "public": false 83 | }, 84 | "ProcessedTransaction": { 85 | "dataSource": null, 86 | "public": false 87 | }, 88 | "peer": { 89 | "dataSource": null, 90 | "public": false 91 | }, 92 | "PeerOpts": { 93 | "dataSource": null, 94 | "public": false 95 | }, 96 | "transaction": { 97 | "dataSource": null, 98 | "public": false 99 | }, 100 | "channelInfo": { 101 | "dataSource": null, 102 | "public": false 103 | }, 104 | "ChaincodeInfo": { 105 | "dataSource": null, 106 | "public": false 107 | }, 108 | "ChaincodeInstallRequest": { 109 | "dataSource": null, 110 | "public": false 111 | }, 112 | "chaincodeInstantiate": { 113 | "dataSource": null, 114 | "public": false 115 | }, 116 | "ChaincodeQueryResponse": { 117 | "dataSource": null, 118 | "public": false 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/args.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Args) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/args.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "args", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "args": { 10 | "type": [ 11 | "string" 12 | ], 13 | "required": true, 14 | "description": "An array of arguements" 15 | }, 16 | "fcn": { 17 | "type": "string", 18 | "required": true, 19 | "description": "A function name relevant to the chaincode" 20 | } 21 | }, 22 | "validations": [], 23 | "relations": {}, 24 | "acls": [], 25 | "methods": {}, 26 | "hidden": ["id"] 27 | } 28 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/block.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Block) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/block.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "block", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "header": { 10 | "type": "object", 11 | "description": "The block header" 12 | }, 13 | "data": { 14 | "type": "object", 15 | "description": "The data contained in the block" 16 | }, 17 | "metadata": { 18 | "type": "object", 19 | "description": "The metadata for the block" 20 | } 21 | }, 22 | "validations": [], 23 | "relations": {}, 24 | "acls": [], 25 | "methods": {}, 26 | "hidden": ["id"] 27 | } 28 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/chaincode-info.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Chaincodeinfo) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/chaincode-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ChaincodeInfo", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "name": { 10 | "type": "string" 11 | }, 12 | "version": { 13 | "type": "string" 14 | }, 15 | "path": { 16 | "type": "string" 17 | }, 18 | "input": { 19 | "type": "string" 20 | }, 21 | "escc": { 22 | "type": "string" 23 | }, 24 | "vscc": { 25 | "type": "string" 26 | } 27 | }, 28 | "validations": [], 29 | "relations": {}, 30 | "acls": [], 31 | "methods": {}, 32 | "hidden": ["id"] 33 | } 34 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/chaincode-install-request.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Chaincodeinstallrequest) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/chaincode-install-request.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ChaincodeInstallRequest", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "chaincodePath": { 10 | "type": "string", 11 | "required": true 12 | }, 13 | "chaincodeId": { 14 | "type": "string", 15 | "required": true 16 | }, 17 | "chaincodeVersion": { 18 | "type": "string", 19 | "required": true 20 | }, 21 | "chaincodePackage": { 22 | "type": "string", 23 | "required": false, 24 | "description":"Optional. Byte array of the archive content for the chaincode source." 25 | }, 26 | "chaincodeType": { 27 | "type": "string", 28 | "required": false 29 | } 30 | }, 31 | "validations": [], 32 | "relations": {}, 33 | "acls": [], 34 | "methods": {}, 35 | "hidden": ["id"] 36 | } 37 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/chaincode-instantiate.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Chaincodeinstantiate) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/chaincode-instantiate.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chaincodeInstantiate", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "chaincodeId": { 10 | "type": "string", 11 | "required": true 12 | }, 13 | "chaincodeVersion": { 14 | "type": "string", 15 | "required": true 16 | }, 17 | "chaincodeType": { 18 | "type": "string", 19 | "required": false 20 | }, 21 | "fcn": { 22 | "type": "string", 23 | "required": false 24 | }, 25 | "args": { 26 | "type": [ 27 | "string" 28 | ], 29 | "required": false, 30 | "description": "Optional, array of arguements" 31 | } 32 | }, 33 | "validations": [], 34 | "relations": {}, 35 | "acls": [], 36 | "methods": {}, 37 | "hidden": ["id"] 38 | } 39 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/chaincode-query-response.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Chaincodequeryresponse) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/chaincode-query-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ChaincodeQueryResponse", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "chaincodes": { 10 | "type": [ 11 | "ChaincodeInfo" 12 | ], 13 | "required": true, 14 | "description": "An array of ChaincodeInfo" 15 | } 16 | }, 17 | "validations": [], 18 | "relations": {}, 19 | "acls": [], 20 | "methods": {}, 21 | "hidden": ["id"] 22 | } 23 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel-id.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(channelID) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel-id.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "channelID", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "channel_id": { 10 | "type": "string", 11 | "required": true, 12 | "description": "The name of the channel" 13 | } 14 | }, 15 | "validations": [], 16 | "relations": {}, 17 | "acls": [], 18 | "methods": {}, 19 | "hidden": ["id"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel-info.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Channelinfo) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel-info.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "channelInfo", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "inputData": { 10 | "type": "boolean", 11 | "required": true, 12 | "description": "This is TODO" 13 | } 14 | }, 15 | "validations": [], 16 | "relations": {}, 17 | "acls": [], 18 | "methods": {}, 19 | "hidden": ["id"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel-query-response.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(ChannelQueryResponse) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel-query-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ChannelQueryResponse", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "channels": { 10 | "type": [ 11 | "channelID" 12 | ], 13 | "required": true, 14 | "description": "An array of ChannelInfo" 15 | } 16 | }, 17 | "validations": [], 18 | "relations": {}, 19 | "acls": [], 20 | "methods": {}, 21 | "hidden": ["id"] 22 | } 23 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel-response.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(channelResponse) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "channelResponse", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "status": { 10 | "type": "string", 11 | "required": true, 12 | "description": "Has the orderer accepted this request for processing?" 13 | }, 14 | "transactionID": { 15 | "type": "string", 16 | "required": true, 17 | "description": "The transaction ID of the request" 18 | } 19 | }, 20 | "validations": [], 21 | "relations": {}, 22 | "acls": [], 23 | "methods": {}, 24 | "hidden": ["id"] 25 | } 26 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Channel) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/channel.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "channel", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "envelope": { 10 | "type": "string", 11 | "required": true, 12 | "description": "The contents of a generated channel configuration file encoded in base64" 13 | } 14 | }, 15 | "validations": [], 16 | "relations": {}, 17 | "acls": [], 18 | "methods": {}, 19 | "hidden": ["id"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/fabric-1-0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fabric_1_0", 3 | "base": "Model", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "http": { 9 | "path": "fabric/1_0" 10 | }, 11 | "properties": {}, 12 | "validations": [], 13 | "relations": {}, 14 | "acls": [ 15 | { 16 | "accessType": "*", 17 | "permission": "DENY", 18 | "principalId": "$unauthenticated", 19 | "principalType": "ROLE" 20 | }, 21 | { 22 | "accessType": "*", 23 | "permission": "ALLOW", 24 | "principalId": "$authenticated", 25 | "principalType": "ROLE" 26 | } 27 | ], 28 | "methods": {}, 29 | "hidden": ["id"] 30 | } 31 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/install-result.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(installResult) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/install-result.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "installResult", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "peerResponses": { 10 | "type": [ 11 | "object" 12 | ], 13 | "required": true, 14 | "description": "An array of ProposalResponse objects, ref https://fabric-sdk-node.github.io/global.html#ProposalResponse" 15 | } 16 | }, 17 | "validations": [], 18 | "relations": {}, 19 | "acls": [], 20 | "methods": {}, 21 | "hidden": ["id"] 22 | } 23 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/orderer-response.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(ordererResponse) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/orderer-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ordererResponse", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "status": { 10 | "type": "string", 11 | "required": false, 12 | "description": "The response from the orderer" 13 | }, 14 | "peerResponses":{ 15 | "type": [ 16 | "object" 17 | ], 18 | "required": false, 19 | "description": "An array of ProposalResponse objects if request failed the endorsement step" 20 | }, 21 | "transactionID": { 22 | "type": "string", 23 | "required": true, 24 | "description": "The transaction ID of the request" 25 | } 26 | }, 27 | "validations": [], 28 | "relations": {}, 29 | "acls": [], 30 | "methods": {}, 31 | "hidden": ["id"] 32 | } 33 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/peer-opts.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(PeerOpts) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/peer-opts.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PeerOpts", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "pem": { 10 | "type": "string", 11 | "required": true, 12 | "description": "The pem to use with the peer" 13 | }, 14 | "ssl-target-name-override": { 15 | "type": "string", 16 | "required": false, 17 | "description": "Optional override for use in test environments" 18 | } 19 | }, 20 | "validations": [], 21 | "relations": {}, 22 | "acls": [], 23 | "methods": {}, 24 | "hidden": ["id"] 25 | } 26 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/peer.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Peer) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/peer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "peer", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "url": { 10 | "type": "string", 11 | "required": true, 12 | "description": "The url of the peer" 13 | }, 14 | "opts": { 15 | "type": "PeerOpts", 16 | "description": "Options for the peer" 17 | } 18 | }, 19 | "validations": [], 20 | "relations": {}, 21 | "acls": [], 22 | "methods": {}, 23 | "hidden": ["id"] 24 | } 25 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/processed-transaction.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(ProcessedTransaction) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/processed-transaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ProcessedTransaction", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "validationCode": { 10 | "type": "string", 11 | "required": true, 12 | "description": "The validation code" 13 | }, 14 | "transactionEnvelope": { 15 | "type": "object", 16 | "description": "Encapsulates the transaction and the signature over it." 17 | } 18 | }, 19 | "validations": [], 20 | "relations": {}, 21 | "acls": [], 22 | "methods": {}, 23 | "hidden": ["id"] 24 | } 25 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/transaction-proposal.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(TransactionProposal) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/transaction-proposal.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "transactionProposal", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "chaincodeId": { 10 | "type": "string", 11 | "required": true 12 | }, 13 | "fcn": { 14 | "type": "string", 15 | "required": true 16 | }, 17 | "args": { 18 | "type": [ 19 | "string" 20 | ], 21 | "required": true, 22 | "description": "An array of arguements" 23 | } 24 | }, 25 | "validations": [], 26 | "relations": {}, 27 | "acls": [], 28 | "methods": {}, 29 | "hidden": ["id"] 30 | } 31 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/transaction.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function(Transaction) { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/models/transaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "transaction", 3 | "base": "PersistedModel", 4 | "idInjection": false, 5 | "options": { 6 | "validateUpsert": true 7 | }, 8 | "properties": { 9 | "proposal":{ 10 | "type": "transactionProposal", 11 | "required": true, 12 | "description": "A proposal" 13 | } 14 | }, 15 | "validations": [], 16 | "relations": {}, 17 | "acls": [], 18 | "methods": {}, 19 | "hidden": ["id"] 20 | } 21 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/providers.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "ldap": { 3 | "provider": "ldap", 4 | "authScheme":"ldap", 5 | "module": "passport-ldapauth", 6 | "authPath": "/auth/ldap", 7 | "successRedirect": "/explorer", 8 | "failureRedirect": "/failure", 9 | "session": true, 10 | "failureFlash": true, 11 | "profileAttributesFromLDAP": { 12 | "login": "uid", 13 | "username": "uid", 14 | "displayName": "displayName", 15 | "email": "mail", 16 | "externalId": "uid" 17 | }, 18 | "server":{ 19 | "url": "ldap://0.0.0.0:1389", 20 | "searchBase": "dc=example,dc=org", 21 | "searchFilter": "(uid={{username}})" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/server.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright IBM Corp. All Rights Reserved. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 'use strict'; 7 | 8 | var loopback = require('loopback'); 9 | var boot = require('loopback-boot'); 10 | 11 | var fs = require("fs"); 12 | var path = require("path"); 13 | 14 | var http = require('http'); 15 | var https = require('https'); 16 | const argv = require('yargs') 17 | .usage('Usage: [options]') 18 | .config({extends:'./server/config.json'}) 19 | // Allow all variables to be set via ENV variables prefixed REST_ 20 | .env('REST') 21 | .option('p', { 22 | alias: 'port', 23 | describe: 'The port to serve the REST API on', 24 | type: 'number' 25 | }) 26 | .option('c', { 27 | alias: 'connectionProfile', 28 | describe: 'File containing the connection profile document', 29 | default: path.join(__dirname, './datasources.json'), 30 | type: 'string' 31 | }) 32 | .option('s', { 33 | alias: 'authenticationStrategy', 34 | describe: 'File containing the Passport authentication strategy configurations', 35 | type: 'string' 36 | }) 37 | .option('t', { 38 | alias: 'tls', 39 | default: false, 40 | describe: 'Enable TLS security for the REST API', 41 | type: 'boolean' 42 | }) 43 | .option('e', { 44 | alias: 'tlscert', 45 | describe: 'File containing the TLS certificate', 46 | default: path.join(__dirname, './private/certificate.pem'), 47 | type: 'string' 48 | }) 49 | .option('k', { 50 | alias: 'tlskey', 51 | describe: 'File containing the TLS private key', 52 | default: path.join(__dirname, './private/privatekey.pem'), 53 | type: 'string' 54 | }) 55 | .option('hfc-logging', { 56 | describe: 'Set logging options, e.g. {"debug":"console"}', 57 | type: 'string' 58 | }) 59 | .help('h') 60 | .version() 61 | .alias('h', 'help') 62 | .argv; 63 | 64 | var session = require('express-session'); 65 | var loopbackPassport = require('loopback-component-passport'); 66 | var PassportConfigurator = loopbackPassport.PassportConfigurator; 67 | var cookieParser = require('cookie-parser'); 68 | var bodyParser = require('body-parser'); 69 | var passport = require('passport'); 70 | var Strategy = require('passport-http').BasicStrategy; 71 | 72 | var app = module.exports = loopback(); 73 | var passportConfigurator = new PassportConfigurator(app); 74 | 75 | app.start = function() { 76 | var User = app.models.user; 77 | 78 | // Parse JSON-encoded bodies, or URL-encoded bodies 79 | app.middleware('parse', bodyParser.json()); 80 | app.middleware('parse', bodyParser.urlencoded({ 81 | extended: true 82 | })); 83 | 84 | app.middleware('auth', loopback.token({ 85 | model: app.models.accessToken 86 | })); 87 | 88 | app.middleware('session:before', cookieParser(app.get('cookieSecret'))); 89 | app.middleware('session', session({ 90 | secret: 'kitty', 91 | saveUninitialized: true, 92 | resave: true 93 | })); 94 | passportConfigurator.init(); 95 | 96 | passportConfigurator.setupModels({ 97 | userModel: app.models.user, 98 | userIdentityModel: app.models.userIdentity, 99 | userCredentialModel: app.models.userCredential 100 | }); 101 | 102 | // Read providers.json file if it exists, or revert to no security 103 | var passportConfig = {}; 104 | 105 | try { 106 | passportConfig = require(argv.authenticationStrategy ? argv.authenticationStrategy : path.join(__dirname, './providers.json')); 107 | app.enableAuth(); 108 | } catch (err) { 109 | if (argv.authenticationStrategy) { 110 | console.error("\nPassport authentication strategy configurations file '" + argv.authenticationStrategy + "' cannot be found. Exiting."); 111 | process.exit(1); 112 | } 113 | console.log("\nWarning: no authentication enabled"); 114 | } 115 | 116 | for (var s in passportConfig) { 117 | var c = passportConfig[s]; 118 | c.session = c.session !== false; 119 | passportConfigurator.configureProvider(s, c); 120 | } 121 | var ensureLoggedIn = require('connect-ensure-login').ensureLoggedIn; 122 | 123 | app.get('/', function(req, res, next) { 124 | res.redirect('/explorer'); 125 | }); 126 | 127 | app.get('/auth/logout', function (req, res, next) { 128 | return Promise.resolve() 129 | .then(() => { 130 | if (req.accessToken) { 131 | return app.models.user.logout(req.accessToken.id); 132 | } 133 | }) 134 | .then(() => { 135 | req.logout(); 136 | res.clearCookie('access_token'); 137 | res.clearCookie('userId'); 138 | res.redirect('/explorer'); 139 | }); 140 | }); 141 | 142 | var port =( argv.port === undefined ? app.get('port') : argv.port); 143 | if ( isNaN(port) || port < 0 || port > 65535 ) { 144 | console.log("ERROR: 'port' must be in the range 0 to 65535"); 145 | return; 146 | } 147 | 148 | var server = null; 149 | if (argv.tls) { 150 | var options = { }; 151 | 152 | // Get key for server to run TLS 153 | try{ 154 | options.key = fs.readFileSync(argv.tlskey).toString(); 155 | } catch (err) { 156 | if(err.code == 'ENOENT'){ 157 | console.log("ERROR: 'tlskey' not found \"" + argv.tlskey + "\""); 158 | return; 159 | } else { 160 | throw err; 161 | } 162 | } 163 | 164 | // Get certificate for server to run TLS 165 | try{ 166 | options.cert = fs.readFileSync(argv.tlscert).toString(); 167 | } catch (err) { 168 | if(err.code == 'ENOENT'){ 169 | console.log("ERROR: 'tlscert' not found \"" + argv.tlscert + "\""); 170 | return; 171 | } else { 172 | throw err; 173 | } 174 | } 175 | 176 | server = https.createServer(options, app); 177 | } else { 178 | server = http.createServer(app); 179 | } 180 | 181 | return server.listen(port, function() { 182 | var baseUrl = (argv.tls ? 'https://' : 'http://') + app.get('host') + ':' + port; 183 | app.emit('started', baseUrl); 184 | console.log('Hyperledger Fabric SDK REST server listening at %s%s', baseUrl, '/'); 185 | if (app.get('loopback-component-explorer')) { 186 | var explorerPath = app.get('loopback-component-explorer').mountPath; 187 | console.log('Browse your REST API at %s%s', baseUrl, explorerPath); 188 | } 189 | }); 190 | }; 191 | 192 | // Allow environment variable overrides for the datasources.json file 193 | let dataSources = require(argv.connectionProfile); 194 | let models = require('./model-config.json'); 195 | const bootOptions = { 196 | models: models, 197 | dataSources: dataSources 198 | }; 199 | 200 | // Bootstrap the application, configure models, datasources and middleware. 201 | boot(app, __dirname, function(err) { 202 | if (err) throw err; 203 | 204 | // start the server if `$ node server.js` 205 | if (require.main === module) { 206 | app.start(); 207 | } 208 | }); 209 | -------------------------------------------------------------------------------- /packages/fabric-rest/server/wallet.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright IBM Corp. All Rights Reserved. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 'use strict'; 7 | var walletContents = require('./private/wallet'); 8 | 9 | var findByUsername = function(username, cb) { 10 | process.nextTick(function() { 11 | for (var i = 0, len = walletContents.records.length; i < len; i++) { 12 | var record = walletContents.records[i]; 13 | if (record.username === username) { 14 | return cb(null, record); 15 | } 16 | } 17 | return cb(null, null); 18 | }); 19 | }; 20 | 21 | exports.validateUser = function(app, username, password, cb) { 22 | findByUsername(username, function(err, user) { 23 | var User = app.models.user; 24 | 25 | if (err) { return cb(err); } 26 | if (!user) { return cb(null, false); } 27 | if (user.password != password) { return cb(null, false); } 28 | 29 | User.login({ 30 | username: username, password: password 31 | }, 'user', function(err, token) { 32 | if (err) { 33 | console.log("Error logging in user!!"); 34 | }}); 35 | 36 | return cb(null, user); 37 | }); 38 | }; 39 | -------------------------------------------------------------------------------- /packages/loopback-connector-fabric/README.md: -------------------------------------------------------------------------------- 1 | # loopback-connector-hfc-sdk 2 | 3 | ## Description 4 | This is a loopback connector that wrappers the API provided by fabric-sdk-node. 5 | 6 | ## License 7 | See http://www.apache.org/licenses/LICENSE-2.0 8 | -------------------------------------------------------------------------------- /packages/loopback-connector-fabric/index.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright IBM Corp. All Rights Reserved. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 'use strict'; 7 | 8 | module.exports = require('./lib/connectorStub.js'); 9 | -------------------------------------------------------------------------------- /packages/loopback-connector-fabric/lib/connectorStub.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright IBM Corp. All Rights Reserved. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 'use strict'; 7 | 8 | //MUST inherit from loopback's Connector 9 | var Connector = require('loopback-connector').Connector 10 | 11 | const FabricConnector = require('./fabricconnector'); 12 | 13 | /** 14 | * A loopback connector for the fabric-node-sdk for fabric v1 15 | * - Pass information about the User credentials. 16 | * TODO: Extend to allow callers to specify User to use. 17 | */ 18 | 19 | /** 20 | * Initialize the connector for the given data source 21 | * 22 | * @param {DataSource} ds The data source instance 23 | * @param {Function} [cb] The cb function 24 | */ 25 | exports.initialize = function(ds, cb) { 26 | //console.log(">> initialize"); 27 | 28 | ds.connector = new FabricConnector(ds.settings); 29 | ds.connector.dataSource = ds; 30 | 31 | //console.log("<< initialize"); 32 | cb(); 33 | }; 34 | 35 | 36 | exports.connect = function(callback){ 37 | //console.log(">> connect()"); 38 | 39 | //TODO: Validate can connect to Fabric with the configured credentials 40 | //hfcsdk.Chain.connect(???) 41 | callback('OK'); //TODO 42 | 43 | //console.log("<< connect()"); 44 | }; 45 | 46 | exports.disconnect = function(callback){ 47 | //console.log(">> disconnect()"); 48 | 49 | // No op. 50 | callback(null); 51 | 52 | //console.log("<< disconnect()"); 53 | }; 54 | 55 | exports.ping = function(callback){ 56 | //console.log(">> ping()"); 57 | 58 | // No op. 59 | callback(null); 60 | 61 | //console.log("<< ping()"); 62 | }; 63 | -------------------------------------------------------------------------------- /packages/loopback-connector-fabric/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "loopback-connector-fabric", 3 | "version": "1.0.2-snapshot", 4 | "description": "Loopback Connector for Hyperledger Fabric v1.0", 5 | "engines": { 6 | "node": ">=6.9.0" 7 | }, 8 | "keywords": [ 9 | "StrongLoop", 10 | "LoopBack", 11 | "Hyperledger", 12 | "Fabric", 13 | "DataSource", 14 | "Connector", 15 | "fabric-sdk-rest" 16 | ], 17 | "main": "index.js", 18 | "dependencies": { 19 | "loopback-connector": "^3.0.0", 20 | "fabric-client": "^1.0.2" 21 | }, 22 | "repository": { 23 | "type": "gerrit", 24 | "url": "https://gerrit.hyperledger.org/r/#/admin/projects/fabric-sdk-rest" 25 | }, 26 | "license": "Apache-2.0" 27 | } 28 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | # 3 | # Copyright IBM Corp. All Rights Reserved. 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | # Setup the Fabric SDK REST server: 9 | # 10 | # - Update data sources 11 | # - Generate files for TLS support 12 | # - Generate a populated datasources.json file 13 | # 14 | # E.g., 15 | # ./setup.sh -tukaf ~/fabric-samples/first-network 16 | 17 | 18 | _show_help() { 19 | printf -- "Usage: setup.sh OPTIONS\n\n" 20 | printf -- "Options:\n" 21 | printf -- "-t Generate files for TLS support\n" 22 | printf -- "-u Update data sources\n" 23 | printf -- "-k Update keys\n" 24 | printf -- "-f Fabric network dir\n" 25 | printf -- "-a Run as Admin, not User1\n" 26 | exit 12 27 | } 28 | 29 | if [[ -z "$1" ]]; then 30 | _show_help 31 | fi 32 | 33 | while getopts :tukf:ah opt; do 34 | case "$opt" in 35 | t) use_https=true 36 | ;; 37 | u) update_data_sources=true 38 | ;; 39 | k) update_keys=true 40 | ;; 41 | f) fabric_network_dir="${OPTARG%/}" 42 | ;; 43 | a) run_as_admin=true 44 | ;; 45 | h) _show_help 46 | ;; 47 | '?') printf -- "Invalid option $OPTARG. Try '-h' for help.\n" && exit 12 48 | ;; 49 | esac 50 | done 51 | 52 | shift $((OPTIND-1)) 53 | 54 | project_dir="$(cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd)/fabric-sdk-rest" 55 | 56 | 57 | # Determine the private keys for the normal and admin users 58 | if [[ -n $update_keys ]]; then 59 | cd "${fabric_network_dir}/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore" 60 | privatekeyUser="$(ls *_sk)" 61 | cd "${fabric_network_dir}/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore" 62 | privatekeyAdmin="$(ls *_sk)" 63 | 64 | printf -- "Fabric network directory: ${fabric_network_dir}\n" 65 | printf -- "Private user key: $privatekeyUser\n" 66 | printf -- "Private admin key: $privatekeyAdmin\n" 67 | fi 68 | 69 | 70 | # Make the fabric-rest-server script executable 71 | cd "${project_dir}/packages/fabric-rest/" 72 | chmod u+x ./fabric-rest-server 73 | 74 | 75 | # Generate files for TLS support 76 | cd "server" 77 | if [[ -n $use_https ]]; then 78 | mkdir -p private 79 | cd private 80 | if [[ ! -f privatekey.pem ]]; then 81 | openssl req -x509 -newkey rsa:4096 -keyout privatekey.pem -out certificate.pem \ 82 | -days 365 -subj "/C=US/ST=Oregon/L=Portland/O=Company Name/OU=Org/CN=www.example.com" -nodes 83 | fi 84 | cd .. 85 | fi 86 | 87 | 88 | # Generate a populated datasources.json file 89 | if [[ -n $update_data_sources ]]; then 90 | # Use ^ for sed command as / is in file paths 91 | if [[ -n $run_as_admin ]]; then 92 | sed -e "s/ADMINUSER/fabricUser/" -e "s/XXXXXXXX/${privatekeyUser}/" -e "s/ADMIN1STORE/${privatekeyAdmin}/" \ 93 | -e "s^FABSAMPLE^${fabric_network_dir}^" < datasources.json.template > datasources.json 94 | else 95 | sed -e "s/AUSER/fabricUser/" -e "s/XXXXXXXX/${privatekeyUser}/" -e "s/ADMIN1STORE/${privatekeyAdmin}/" \ 96 | -e "s^FABSAMPLE^${fabric_network_dir}^" < datasources.json.template > datasources.json 97 | fi 98 | fi 99 | -------------------------------------------------------------------------------- /tests/authentication/authentication.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright IBM Corp. All Rights Reserved. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | // ldapsearch -x -D "dc=example,dc=org" -W -H ldap://0.0.0.0:1389 -b "dc=example,dc=org" -s sub 'uid=alice' 8 | 9 | 'use strict'; 10 | 11 | const port=1389; 12 | const ldapserver = require('./ldapserver'); 13 | const password='secret'; 14 | 15 | console.log('Starting LDAP server'); 16 | ldapserver.start(port, password); 17 | console.log('LDAP server started, listening on port ' + port); 18 | -------------------------------------------------------------------------------- /tests/authentication/ldapserver.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright IBM Corp. All Rights Reserved. 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | 'use strict'; 8 | 9 | const ldap = require('ldapjs'); 10 | 11 | const authorize = function (req, res, next) { 12 | return next(); 13 | }; 14 | 15 | const SUFFIX = 'dc=example, dc=org'; 16 | let server = null; 17 | 18 | const db = { 19 | alice: { 20 | dn: 'cn=alice, dc=example, dc=org', 21 | attributes: { 22 | uid: 'alice', 23 | name: 'Alice', 24 | mail: 'alice@example.org' 25 | } 26 | } 27 | }; 28 | 29 | exports.start = function (port, password) { 30 | if (server) { 31 | return Promise.resolve(); 32 | } 33 | 34 | server = ldap.createServer(); 35 | 36 | server.bind('cn=root, dc=example, dc=org', function(req, res, next) { 37 | if (req.dn.toString() !== 'cn=root, dc=example, dc=org' || req.credentials !== password) { 38 | return next(new ldap.InvalidCredentialsError()); 39 | } 40 | res.end(); 41 | return next(); 42 | }); 43 | 44 | server.bind(SUFFIX, authorize, function(req, res, next) { 45 | let dn = req.dn.toString(); 46 | if (dn !== 'cn=alice, dc=example, dc=org' || req.credentials !== password) { 47 | return next(new ldap.InvalidCredentialsError()); 48 | } 49 | res.end(); 50 | return next(); 51 | }); 52 | 53 | server.search(SUFFIX, authorize, function(req, res, next) { 54 | if (req.filter.attribute === 'uid' && req.filter.value === 'alice') { 55 | res.send(db.alice); 56 | } 57 | res.end(); 58 | return next(); 59 | }); 60 | 61 | return new Promise((resolve, reject) => { 62 | server.listen(port, (error) => { 63 | if (error) { 64 | return reject(error); 65 | } 66 | resolve(server.address().port); 67 | }); 68 | }); 69 | }; 70 | 71 | exports.close = function () { 72 | if (server) { 73 | server.close(); 74 | server = null; 75 | } 76 | }; 77 | -------------------------------------------------------------------------------- /tests/basic-network/.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=net 2 | -------------------------------------------------------------------------------- /tests/basic-network/config/Org1MSPanchors.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-archives/fabric-sdk-rest/12aa8e5d1416a3eaf3f120b58baf41ccc99f3696/tests/basic-network/config/Org1MSPanchors.tx -------------------------------------------------------------------------------- /tests/basic-network/config/channel.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-archives/fabric-sdk-rest/12aa8e5d1416a3eaf3f120b58baf41ccc99f3696/tests/basic-network/config/channel.tx -------------------------------------------------------------------------------- /tests/basic-network/config/genesis.block: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-archives/fabric-sdk-rest/12aa8e5d1416a3eaf3f120b58baf41ccc99f3696/tests/basic-network/config/genesis.block -------------------------------------------------------------------------------- /tests/basic-network/configtx.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | --- 7 | ################################################################################ 8 | # 9 | # Profile 10 | # 11 | # - Different configuration profiles may be encoded here to be specified 12 | # as parameters to the configtxgen tool 13 | # 14 | ################################################################################ 15 | Profiles: 16 | 17 | OneOrgOrdererGenesis: 18 | Orderer: 19 | <<: *OrdererDefaults 20 | Organizations: 21 | - *OrdererOrg 22 | Consortiums: 23 | SampleConsortium: 24 | Organizations: 25 | - *Org1 26 | OneOrgChannel: 27 | Consortium: SampleConsortium 28 | Application: 29 | <<: *ApplicationDefaults 30 | Organizations: 31 | - *Org1 32 | 33 | ################################################################################ 34 | # 35 | # Section: Organizations 36 | # 37 | # - This section defines the different organizational identities which will 38 | # be referenced later in the configuration. 39 | # 40 | ################################################################################ 41 | Organizations: 42 | 43 | # SampleOrg defines an MSP using the sampleconfig. It should never be used 44 | # in production but may be used as a template for other definitions 45 | - &OrdererOrg 46 | # DefaultOrg defines the organization which is used in the sampleconfig 47 | # of the fabric.git development environment 48 | Name: OrdererOrg 49 | 50 | # ID to load the MSP definition as 51 | ID: OrdererMSP 52 | 53 | # MSPDir is the filesystem path which contains the MSP configuration 54 | MSPDir: crypto-config/ordererOrganizations/example.com/msp 55 | 56 | - &Org1 57 | # DefaultOrg defines the organization which is used in the sampleconfig 58 | # of the fabric.git development environment 59 | Name: Org1MSP 60 | 61 | # ID to load the MSP definition as 62 | ID: Org1MSP 63 | 64 | MSPDir: crypto-config/peerOrganizations/org1.example.com/msp 65 | 66 | AnchorPeers: 67 | # AnchorPeers defines the location of peers which can be used 68 | # for cross org gossip communication. Note, this value is only 69 | # encoded in the genesis block in the Application section context 70 | - Host: peer0.org1.example.com 71 | Port: 7051 72 | 73 | ################################################################################ 74 | # 75 | # SECTION: Orderer 76 | # 77 | # - This section defines the values to encode into a config transaction or 78 | # genesis block for orderer related parameters 79 | # 80 | ################################################################################ 81 | Orderer: &OrdererDefaults 82 | 83 | # Orderer Type: The orderer implementation to start 84 | # Available types are "solo" and "kafka" 85 | OrdererType: solo 86 | 87 | Addresses: 88 | - orderer.example.com:7050 89 | 90 | # Batch Timeout: The amount of time to wait before creating a batch 91 | BatchTimeout: 2s 92 | 93 | # Batch Size: Controls the number of messages batched into a block 94 | BatchSize: 95 | 96 | # Max Message Count: The maximum number of messages to permit in a batch 97 | MaxMessageCount: 10 98 | 99 | # Absolute Max Bytes: The absolute maximum number of bytes allowed for 100 | # the serialized messages in a batch. 101 | AbsoluteMaxBytes: 99 MB 102 | 103 | # Preferred Max Bytes: The preferred maximum number of bytes allowed for 104 | # the serialized messages in a batch. A message larger than the preferred 105 | # max bytes will result in a batch larger than preferred max bytes. 106 | PreferredMaxBytes: 512 KB 107 | 108 | Kafka: 109 | # Brokers: A list of Kafka brokers to which the orderer connects 110 | # NOTE: Use IP:port notation 111 | Brokers: 112 | - 127.0.0.1:9092 113 | 114 | # Organizations is the list of orgs which are defined as participants on 115 | # the orderer side of the network 116 | Organizations: 117 | 118 | ################################################################################ 119 | # 120 | # SECTION: Application 121 | # 122 | # - This section defines the values to encode into a config transaction or 123 | # genesis block for application related parameters 124 | # 125 | ################################################################################ 126 | Application: &ApplicationDefaults 127 | 128 | # Organizations is the list of orgs which are defined as participants on 129 | # the application side of the network 130 | Organizations: 131 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | # --------------------------------------------------------------------------- 7 | # "OrdererOrgs" - Definition of organizations managing orderer nodes 8 | # --------------------------------------------------------------------------- 9 | OrdererOrgs: 10 | # --------------------------------------------------------------------------- 11 | # Orderer 12 | # --------------------------------------------------------------------------- 13 | - Name: Orderer 14 | Domain: example.com 15 | # --------------------------------------------------------------------------- 16 | # "Specs" - See PeerOrgs below for complete description 17 | # --------------------------------------------------------------------------- 18 | Specs: 19 | - Hostname: orderer 20 | # --------------------------------------------------------------------------- 21 | # "PeerOrgs" - Definition of organizations managing peer nodes 22 | # --------------------------------------------------------------------------- 23 | PeerOrgs: 24 | # --------------------------------------------------------------------------- 25 | # Org1 26 | # --------------------------------------------------------------------------- 27 | - Name: Org1 28 | Domain: org1.example.com 29 | # --------------------------------------------------------------------------- 30 | # "Specs" 31 | # --------------------------------------------------------------------------- 32 | # Uncomment this section to enable the explicit definition of hosts in your 33 | # configuration. Most users will want to use Template, below 34 | # 35 | # Specs is an array of Spec entries. Each Spec entry consists of two fields: 36 | # - Hostname: (Required) The desired hostname, sans the domain. 37 | # - CommonName: (Optional) Specifies the template or explicit override for 38 | # the CN. By default, this is the template: 39 | # 40 | # "{{.Hostname}}.{{.Domain}}" 41 | # 42 | # which obtains its values from the Spec.Hostname and 43 | # Org.Domain, respectively. 44 | # --------------------------------------------------------------------------- 45 | # Specs: 46 | # - Hostname: foo # implicitly "foo.org1.example.com" 47 | # CommonName: foo27.org5.example.com # overrides Hostname-based FQDN set above 48 | # - Hostname: bar 49 | # - Hostname: baz 50 | # --------------------------------------------------------------------------- 51 | # "Template" 52 | # --------------------------------------------------------------------------- 53 | # Allows for the definition of 1 or more hosts that are created sequentially 54 | # from a template. By default, this looks like "peer%d" from 0 to Count-1. 55 | # You may override the number of nodes (Count), the starting index (Start) 56 | # or the template used to construct the name (Hostname). 57 | # 58 | # Note: Template and Specs are not mutually exclusive. You may define both 59 | # sections and the aggregate nodes will be created for you. Take care with 60 | # name collisions 61 | # --------------------------------------------------------------------------- 62 | Template: 63 | Count: 3 64 | # Start: 5 65 | # Hostname: {{.Prefix}}{{.Index}} # default 66 | # --------------------------------------------------------------------------- 67 | # "Users" 68 | # --------------------------------------------------------------------------- 69 | # Count: The number of user accounts _in addition_ to Admin 70 | # --------------------------------------------------------------------------- 71 | Users: 72 | Count: 1 73 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/ca/a5565867400a95609aa42041a82a7c9cc1d1bb994f9b393cc3b93bed0f98dc01_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgmDWeBRg4fjp4Kwx9 3 | jM3rKIMztDGvGhNhL9zx0WIn2CihRANCAASuqzUStiV52WdwYY9XoMYnvjGEFDDC 4 | aOPVEhawCDCqYbAelyTIcQYKnQLSKa7PzEbrwA6EU5O4B7XGlMYzVCRv 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAdWgAwIBAgIQYKTqUdPTXE+035unaS8lvjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MTAzMDEyNDMwMFoXDTI3MTAyODEyNDMwMFowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK6rNRK2JXnZZ3Bhj1egxie+MYQU 9 | MMJo49USFrAIMKphsB6XJMhxBgqdAtIprs/MRuvADoRTk7gHtcaUxjNUJG+jXzBd 10 | MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB 11 | Af8wKQYDVR0OBCIEIKVWWGdACpVgmqQgQagqfJzB0buZT5s5PMO5O+0PmNwBMAoG 12 | CCqGSM49BAMCA0cAMEQCICg83KTkI7mgIXXoGNm1osD7YKjxrb/L2k3na3ogMk7t 13 | AiA5WI3zPDVAMA74vxCEHTTU7iT/MEYLAJiaJY1sOus1Ug== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCzCCAbGgAwIBAgIRAMqtyiAPFmj8tQe0DQ4bmQgwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMFYxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqG 8 | SM49AwEHA0IABN71to5TukCAkfDUKeqcwuQn2901Y8ZjuhQzpFvS4Xuk9JZCzUv7 9 | ID/0koVV8EkWXoEY0Jv6B2U4FQCgb3LgJFOjTTBLMA4GA1UdDwEB/wQEAwIHgDAM 10 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKVWWGdACpVgmqQgQagqfJzB0buZT5s5 11 | PMO5O+0PmNwBMAoGCCqGSM49BAMCA0gAMEUCIQDyiyan9djxq5JeyD0JA9kZ9ZRh 12 | P2Gg19K27tnuUqes5wIgeguJsPue8u+C0eyAU34u4X5rDwDypy+hD9QMo3Wv81U= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAdWgAwIBAgIQYKTqUdPTXE+035unaS8lvjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MTAzMDEyNDMwMFoXDTI3MTAyODEyNDMwMFowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK6rNRK2JXnZZ3Bhj1egxie+MYQU 9 | MMJo49USFrAIMKphsB6XJMhxBgqdAtIprs/MRuvADoRTk7gHtcaUxjNUJG+jXzBd 10 | MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB 11 | Af8wKQYDVR0OBCIEIKVWWGdACpVgmqQgQagqfJzB0buZT5s5PMO5O+0PmNwBMAoG 12 | CCqGSM49BAMCA0cAMEQCICg83KTkI7mgIXXoGNm1osD7YKjxrb/L2k3na3ogMk7t 13 | AiA5WI3zPDVAMA74vxCEHTTU7iT/MEYLAJiaJY1sOus1Ug== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNjCCAdygAwIBAgIRAJicbKDZODY9h0RlSBLfqIowCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAThBSuulHrJ0LrD8KAB 9 | BYzVOT8smqI5ixVELRy23ksSLB7umljKmqS1Yetk0BSybR9ZlnQSNUoWRmY4GHEe 10 | ZM6Eo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB 11 | Af8EBTADAQH/MCkGA1UdDgQiBCBlvgWqd4eaemQrwluO8X+8/KuCvTCaszANuTnm 12 | xvgHIzAKBggqhkjOPQQDAgNIADBFAiEApNShOg9t7lY6J65O2t27D7ETlYInlykO 13 | 7h1zIxM5HTECIH26d0Kv382eIFu8WGye9A+pYULphNotHLs8dOVDJgU1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCzCCAbGgAwIBAgIRAMqtyiAPFmj8tQe0DQ4bmQgwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMFYxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqG 8 | SM49AwEHA0IABN71to5TukCAkfDUKeqcwuQn2901Y8ZjuhQzpFvS4Xuk9JZCzUv7 9 | ID/0koVV8EkWXoEY0Jv6B2U4FQCgb3LgJFOjTTBLMA4GA1UdDwEB/wQEAwIHgDAM 10 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKVWWGdACpVgmqQgQagqfJzB0buZT5s5 11 | PMO5O+0PmNwBMAoGCCqGSM49BAMCA0gAMEUCIQDyiyan9djxq5JeyD0JA9kZ9ZRh 12 | P2Gg19K27tnuUqes5wIgeguJsPue8u+C0eyAU34u4X5rDwDypy+hD9QMo3Wv81U= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAdWgAwIBAgIQYKTqUdPTXE+035unaS8lvjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MTAzMDEyNDMwMFoXDTI3MTAyODEyNDMwMFowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK6rNRK2JXnZZ3Bhj1egxie+MYQU 9 | MMJo49USFrAIMKphsB6XJMhxBgqdAtIprs/MRuvADoRTk7gHtcaUxjNUJG+jXzBd 10 | MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB 11 | Af8wKQYDVR0OBCIEIKVWWGdACpVgmqQgQagqfJzB0buZT5s5PMO5O+0PmNwBMAoG 12 | CCqGSM49BAMCA0cAMEQCICg83KTkI7mgIXXoGNm1osD7YKjxrb/L2k3na3ogMk7t 13 | AiA5WI3zPDVAMA74vxCEHTTU7iT/MEYLAJiaJY1sOus1Ug== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/21efa9f2e42bea9e5fcb0ef6bd6af3d37485e2df83c8baaa8551599bf6f84858_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgZoh+Q3py+tPEvrxO 3 | 4xZwh6m9RFcUGWGpyGYPt5gmS5yhRANCAASc+i72qurwV+FSp2QPLo/iLcOIrwpp 4 | cYVDZvbXNGwbbc9X8Fzo1VVNACt55zpMOcHviXXeJjPMvhKas2rJ5C7h 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCzCCAbKgAwIBAgIQJ7mnplmGnjpiYZTxRrNCPjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MTAzMDEyNDMwMFoXDTI3MTAyODEyNDMwMFowWDELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xHDAaBgNVBAMTE29yZGVyZXIuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggq 8 | hkjOPQMBBwNCAASc+i72qurwV+FSp2QPLo/iLcOIrwppcYVDZvbXNGwbbc9X8Fzo 9 | 1VVNACt55zpMOcHviXXeJjPMvhKas2rJ5C7ho00wSzAOBgNVHQ8BAf8EBAMCB4Aw 10 | DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCClVlhnQAqVYJqkIEGoKnycwdG7mU+b 11 | OTzDuTvtD5jcATAKBggqhkjOPQQDAgNHADBEAiB1v3b7ma7TVqL1cQuMROt8i8TA 12 | i41gXjRes41W7HUEvgIgOKf9ZhaDwzlh0Rlp+gF2VpP0Ngo/O78qWNDXXZ42xf8= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNjCCAdygAwIBAgIRAJicbKDZODY9h0RlSBLfqIowCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAThBSuulHrJ0LrD8KAB 9 | BYzVOT8smqI5ixVELRy23ksSLB7umljKmqS1Yetk0BSybR9ZlnQSNUoWRmY4GHEe 10 | ZM6Eo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB 11 | Af8EBTADAQH/MCkGA1UdDgQiBCBlvgWqd4eaemQrwluO8X+8/KuCvTCaszANuTnm 12 | xvgHIzAKBggqhkjOPQQDAgNIADBFAiEApNShOg9t7lY6J65O2t27D7ETlYInlykO 13 | 7h1zIxM5HTECIH26d0Kv382eIFu8WGye9A+pYULphNotHLs8dOVDJgU1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNjCCAdygAwIBAgIRAJicbKDZODY9h0RlSBLfqIowCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAThBSuulHrJ0LrD8KAB 9 | BYzVOT8smqI5ixVELRy23ksSLB7umljKmqS1Yetk0BSybR9ZlnQSNUoWRmY4GHEe 10 | ZM6Eo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB 11 | Af8EBTADAQH/MCkGA1UdDgQiBCBlvgWqd4eaemQrwluO8X+8/KuCvTCaszANuTnm 12 | xvgHIzAKBggqhkjOPQQDAgNIADBFAiEApNShOg9t7lY6J65O2t27D7ETlYInlykO 13 | 7h1zIxM5HTECIH26d0Kv382eIFu8WGye9A+pYULphNotHLs8dOVDJgU1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWTCCAf+gAwIBAgIQBdm3DPl1d9zQBlRbVSSq7TAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MTAzMDEyNDMwMFoXDTI3MTAyODEyNDMwMFowWDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xHDAaBgNVBAMTE29yZGVyZXIuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIB 8 | BggqhkjOPQMBBwNCAAT5N0z973ZKzyShpkpFRJjEInfTbPwNsZBUM7wRq60coyZr 9 | X3cDLiyHce6rF+mZKjFNYhM0xCiO+AMdaljVAwxXo4GWMIGTMA4GA1UdDwEB/wQE 10 | AwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIw 11 | ADArBgNVHSMEJDAigCBlvgWqd4eaemQrwluO8X+8/KuCvTCaszANuTnmxvgHIzAn 12 | BgNVHREEIDAeghNvcmRlcmVyLmV4YW1wbGUuY29tggdvcmRlcmVyMAoGCCqGSM49 13 | BAMCA0gAMEUCIQDiIAwnwujbge1vDoyG50PhUzprcUQWhibJR1GOr49AigIgC6pW 14 | C/pcXLRWMhcig+4eyHfQ6X0tYA5SDZxFSuYOF6s= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgi1sC3xABCYlLWRpA 3 | 3t6VK4D2uCvqvWtZBfceWom09rihRANCAAT5N0z973ZKzyShpkpFRJjEInfTbPwN 4 | sZBUM7wRq60coyZrX3cDLiyHce6rF+mZKjFNYhM0xCiO+AMdaljVAwxX 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/tlsca/65be05aa77879a7a642bc25b8ef17fbcfcab82bd309ab3300db939e6c6f80723_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgwPZ57sxSolVnXak/ 3 | Ch8NKqxucA+t0IunP7eZOTwxh7KhRANCAAThBSuulHrJ0LrD8KABBYzVOT8smqI5 4 | ixVELRy23ksSLB7umljKmqS1Yetk0BSybR9ZlnQSNUoWRmY4GHEeZM6E 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNjCCAdygAwIBAgIRAJicbKDZODY9h0RlSBLfqIowCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAThBSuulHrJ0LrD8KAB 9 | BYzVOT8smqI5ixVELRy23ksSLB7umljKmqS1Yetk0BSybR9ZlnQSNUoWRmY4GHEe 10 | ZM6Eo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB 11 | Af8EBTADAQH/MCkGA1UdDgQiBCBlvgWqd4eaemQrwluO8X+8/KuCvTCaszANuTnm 12 | xvgHIzAKBggqhkjOPQQDAgNIADBFAiEApNShOg9t7lY6J65O2t27D7ETlYInlykO 13 | 7h1zIxM5HTECIH26d0Kv382eIFu8WGye9A+pYULphNotHLs8dOVDJgU1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCzCCAbGgAwIBAgIRAMqtyiAPFmj8tQe0DQ4bmQgwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMFYxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqG 8 | SM49AwEHA0IABN71to5TukCAkfDUKeqcwuQn2901Y8ZjuhQzpFvS4Xuk9JZCzUv7 9 | ID/0koVV8EkWXoEY0Jv6B2U4FQCgb3LgJFOjTTBLMA4GA1UdDwEB/wQEAwIHgDAM 10 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKVWWGdACpVgmqQgQagqfJzB0buZT5s5 11 | PMO5O+0PmNwBMAoGCCqGSM49BAMCA0gAMEUCIQDyiyan9djxq5JeyD0JA9kZ9ZRh 12 | P2Gg19K27tnuUqes5wIgeguJsPue8u+C0eyAU34u4X5rDwDypy+hD9QMo3Wv81U= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAdWgAwIBAgIQYKTqUdPTXE+035unaS8lvjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MTAzMDEyNDMwMFoXDTI3MTAyODEyNDMwMFowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABK6rNRK2JXnZZ3Bhj1egxie+MYQU 9 | MMJo49USFrAIMKphsB6XJMhxBgqdAtIprs/MRuvADoRTk7gHtcaUxjNUJG+jXzBd 10 | MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB 11 | Af8wKQYDVR0OBCIEIKVWWGdACpVgmqQgQagqfJzB0buZT5s5PMO5O+0PmNwBMAoG 12 | CCqGSM49BAMCA0cAMEQCICg83KTkI7mgIXXoGNm1osD7YKjxrb/L2k3na3ogMk7t 13 | AiA5WI3zPDVAMA74vxCEHTTU7iT/MEYLAJiaJY1sOus1Ug== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/64c268ae7e0c4fdf41911c7152b5a373667c41e8842e9906681e9b0810212b71_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgOjurJNHtjwqfW3yi 3 | Ea3dWOLmJQdsjj+evuIVpvQGYIGhRANCAATe9baOU7pAgJHw1CnqnMLkJ9vdNWPG 4 | Y7oUM6Rb0uF7pPSWQs1L+yA/9JKFVfBJFl6BGNCb+gdlOBUAoG9y4CRT 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCzCCAbGgAwIBAgIRAMqtyiAPFmj8tQe0DQ4bmQgwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMFYxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqG 8 | SM49AwEHA0IABN71to5TukCAkfDUKeqcwuQn2901Y8ZjuhQzpFvS4Xuk9JZCzUv7 9 | ID/0koVV8EkWXoEY0Jv6B2U4FQCgb3LgJFOjTTBLMA4GA1UdDwEB/wQEAwIHgDAM 10 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKVWWGdACpVgmqQgQagqfJzB0buZT5s5 11 | PMO5O+0PmNwBMAoGCCqGSM49BAMCA0gAMEUCIQDyiyan9djxq5JeyD0JA9kZ9ZRh 12 | P2Gg19K27tnuUqes5wIgeguJsPue8u+C0eyAU34u4X5rDwDypy+hD9QMo3Wv81U= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNjCCAdygAwIBAgIRAJicbKDZODY9h0RlSBLfqIowCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAThBSuulHrJ0LrD8KAB 9 | BYzVOT8smqI5ixVELRy23ksSLB7umljKmqS1Yetk0BSybR9ZlnQSNUoWRmY4GHEe 10 | ZM6Eo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB 11 | Af8EBTADAQH/MCkGA1UdDgQiBCBlvgWqd4eaemQrwluO8X+8/KuCvTCaszANuTnm 12 | xvgHIzAKBggqhkjOPQQDAgNIADBFAiEApNShOg9t7lY6J65O2t27D7ETlYInlykO 13 | 7h1zIxM5HTECIH26d0Kv382eIFu8WGye9A+pYULphNotHLs8dOVDJgU1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNjCCAdygAwIBAgIRAJicbKDZODY9h0RlSBLfqIowCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMGwxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh 8 | bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAThBSuulHrJ0LrD8KAB 9 | BYzVOT8smqI5ixVELRy23ksSLB7umljKmqS1Yetk0BSybR9ZlnQSNUoWRmY4GHEe 10 | ZM6Eo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB 11 | Af8EBTADAQH/MCkGA1UdDgQiBCBlvgWqd4eaemQrwluO8X+8/KuCvTCaszANuTnm 12 | xvgHIzAKBggqhkjOPQQDAgNIADBFAiEApNShOg9t7lY6J65O2t27D7ETlYInlykO 13 | 7h1zIxM5HTECIH26d0Kv382eIFu8WGye9A+pYULphNotHLs8dOVDJgU1 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLDCCAdOgAwIBAgIRAPPW37f95eKjgKEZ/F3Zqs0wCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBaMFYxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEG 8 | CCqGSM49AwEHA0IABFolAFjugqpP59qchSmQe756+nsCo5pOoi8YcbsQsfeI0hbC 9 | pf0cHJqdCiSXw/vYRocf7oHMKA9MLp8/oiBGKBGjbDBqMA4GA1UdDwEB/wQEAwIF 10 | oDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAr 11 | BgNVHSMEJDAigCBlvgWqd4eaemQrwluO8X+8/KuCvTCaszANuTnmxvgHIzAKBggq 12 | hkjOPQQDAgNHADBEAiAPCSS19sh+HQoczm4lHKyI+RtXh0Znz50fewkdz8ayVAIg 13 | fDQS6jdEnKFSOJZgMpIYW8t7vaUxW4b7jQzd8lsvs5I= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgH3KalRASQBm3cYHF 3 | iPWRuaGu5Vw/m48REuGeErTNnEahRANCAARaJQBY7oKqT+fanIUpkHu+evp7AqOa 4 | TqIvGHG7ELH3iNIWwqX9HByanQokl8P72EaHH+6BzCgPTC6fP6IgRigR 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/ca/34cfa63a451588a2c05950c48577cac2ce20cd5731ad600214192b75deef12f4_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgeim/f5kD1Wp6edot 3 | Ud11SrJrKgYqE0sPsykagnW9QbKhRANCAASGqfxn7V3M03hBS6Y2/nq1vDIA3t7v 4 | MOMZZjrb/wEaaEvaLHC9LowyZER0NExZ5pHHAqa62pMtw4bzODvb3HCO 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAeqgAwIBAgIRAJm1QSXuICLP+Q3FPykU0FwwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BIap/GftXczTeEFLpjb+erW8MgDe3u8w4xlmOtv/ARpoS9oscL0ujDJkRHQ0TFnm 10 | kccCprraky3DhvM4O9vccI6jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIDTPpjpFFYiiwFlQxIV3 12 | ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0cAMEQCIFUouMcApV9c0H6d 13 | 57iQGgU+2siysDn1x8MPbsMFO2N1AiAW8C2O+wf3ynws/iScyKs8nWpi4ZH3eP3G 14 | 3FTmE60eaw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAKEXkP+togKhn5PD8kLopAAwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABGYI/F/Xr+WzIf5Z59U1Mq7ZQZDDAZH/ 9 | 67eOEf5IWxLIzHlPGYAHovxpEBw4xfLS+ac2cV1/+KiyK8JDUuG2hV2jTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIDTPpjpFFYii 11 | wFlQxIV3ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0gAMEUCIQC+sNNI 12 | ScsResj1rQGmaVf9Z3umE6V03SbtQ3uK63ZcOAIgcFxNEjvQWb1Ewtk8OhVyqha+ 13 | bEAIKHH3yoMqvOwbqPo= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAeqgAwIBAgIRAJm1QSXuICLP+Q3FPykU0FwwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BIap/GftXczTeEFLpjb+erW8MgDe3u8w4xlmOtv/ARpoS9oscL0ujDJkRHQ0TFnm 10 | kccCprraky3DhvM4O9vccI6jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIDTPpjpFFYiiwFlQxIV3 12 | ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0cAMEQCIFUouMcApV9c0H6d 13 | 57iQGgU+2siysDn1x8MPbsMFO2N1AiAW8C2O+wf3ynws/iScyKs8nWpi4ZH3eP3G 14 | 3FTmE60eaw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAKEXkP+togKhn5PD8kLopAAwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABGYI/F/Xr+WzIf5Z59U1Mq7ZQZDDAZH/ 9 | 67eOEf5IWxLIzHlPGYAHovxpEBw4xfLS+ac2cV1/+KiyK8JDUuG2hV2jTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIDTPpjpFFYii 11 | wFlQxIV3ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0gAMEUCIQC+sNNI 12 | ScsResj1rQGmaVf9Z3umE6V03SbtQ3uK63ZcOAIgcFxNEjvQWb1Ewtk8OhVyqha+ 13 | bEAIKHH3yoMqvOwbqPo= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAeqgAwIBAgIRAJm1QSXuICLP+Q3FPykU0FwwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BIap/GftXczTeEFLpjb+erW8MgDe3u8w4xlmOtv/ARpoS9oscL0ujDJkRHQ0TFnm 10 | kccCprraky3DhvM4O9vccI6jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIDTPpjpFFYiiwFlQxIV3 12 | ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0cAMEQCIFUouMcApV9c0H6d 13 | 57iQGgU+2siysDn1x8MPbsMFO2N1AiAW8C2O+wf3ynws/iScyKs8nWpi4ZH3eP3G 14 | 3FTmE60eaw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/8a1d3ef861de041fca8e9fbd76e6c7bae5d277aa7820629592eafaf819d13288_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgk45hMBMdQmBAFXPS 3 | fvVVUGyf2yHYxGWR5fJCAN81QtChRANCAAS0ypaDm5gSTZLMsuMmsm0YqjPslipi 4 | 9Rui7GaDPi8moOCunJfH/mZt3DEb/0kE51/707UW4DuiLSgP/BucwsR+ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ4JKNBnShC32UvyShJZvk4wCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABLTKloObmBJNksyy4yaybRiqM+yWKmL1 9 | G6LsZoM+Lyag4K6cl8f+Zm3cMRv/SQTnX/vTtRbgO6ItKA/8G5zCxH6jTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIDTPpjpFFYii 11 | wFlQxIV3ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0gAMEUCIQC7yAJt 12 | a6gnE81zcad+/QM7UHhJEgo5gvmadrtnbJ4jTgIgR1ZAaqAoQLAFPHW8bBzx8x5D 13 | btn8bb/kTLWgFOmwHeM= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICZjCCAg2gAwIBAgIQMVXFJZdsI/soNhjB21CC8TAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEoZIyyUs2hTyW03wGEe7HQnh/0pVH 9 | +LiSt7WaYpjY7afKb17CQu0sJ+S503rqN8L5aob3dmMWPEsiMIWqbk4W0KOBlzCB 10 | lDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC 11 | MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg5CujL4VVN4cp1mUAHS2KVGJ7lRq6 12 | UFyr62nFzmw7eggwKAYDVR0RBCEwH4IWcGVlcjAub3JnMS5leGFtcGxlLmNvbYIF 13 | cGVlcjAwCgYIKoZIzj0EAwIDRwAwRAIge9kRMlzaLPYesf0wxOHnhhzBD9vmDavw 14 | /jfGxXbN6JgCIBewlsr778g7jvyhq3UF5CrKBOfnC9F1Gzny4oCB2Xst 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgUpauKdrk3ss1iYl0 3 | GRLSRu1DLdrL0FP8uGwEZ7SbNgWhRANCAAShkjLJSzaFPJbTfAYR7sdCeH/SlUf4 4 | uJK3tZpimNjtp8pvXsJC7Swn5LnTeuo3wvlqhvd2YxY8SyIwhapuThbQ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAKEXkP+togKhn5PD8kLopAAwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABGYI/F/Xr+WzIf5Z59U1Mq7ZQZDDAZH/ 9 | 67eOEf5IWxLIzHlPGYAHovxpEBw4xfLS+ac2cV1/+KiyK8JDUuG2hV2jTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIDTPpjpFFYii 11 | wFlQxIV3ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0gAMEUCIQC+sNNI 12 | ScsResj1rQGmaVf9Z3umE6V03SbtQ3uK63ZcOAIgcFxNEjvQWb1Ewtk8OhVyqha+ 13 | bEAIKHH3yoMqvOwbqPo= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAeqgAwIBAgIRAJm1QSXuICLP+Q3FPykU0FwwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BIap/GftXczTeEFLpjb+erW8MgDe3u8w4xlmOtv/ARpoS9oscL0ujDJkRHQ0TFnm 10 | kccCprraky3DhvM4O9vccI6jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIDTPpjpFFYiiwFlQxIV3 12 | ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0cAMEQCIFUouMcApV9c0H6d 13 | 57iQGgU+2siysDn1x8MPbsMFO2N1AiAW8C2O+wf3ynws/iScyKs8nWpi4ZH3eP3G 14 | 3FTmE60eaw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/keystore/3868e73578b107d78acf3934d43650806665f8aa86edb3beedc0fbf446f77abc_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg2gPmig1HlKIG4Qio 3 | H5cdwbuS5o+SQOru2JIhdKW/UFmhRANCAASqOKQOpOg/4eGJdxfV+Pq4f81n98o9 4 | ycMXou1JsAKnPDddreHxnjT3CPIQlsuPwHVX2YPOK02SdI10JR7SX3l2 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/signcerts/peer1.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGTCCAcCgAwIBAgIRANLHTGGCCvf3xuWb326/Wo0wCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjEub3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABKo4pA6k6D/h4Yl3F9X4+rh/zWf3yj3J 9 | wxei7UmwAqc8N12t4fGeNPcI8hCWy4/AdVfZg84rTZJ0jXQlHtJfeXajTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIDTPpjpFFYii 11 | wFlQxIV3ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0cAMEQCIFVMBrNl 12 | 3lXSRr8Ku6A9oq4D+Jm5h9TPx4yaX7So+DsCAiAegKtU2ls/NDRbZG5P1ovfcn3S 13 | qqKhVvwQEdba1oXheQ== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICZjCCAg2gAwIBAgIQY7Q6thBks9Gc+azIdqvoLzAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMS5vcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEO2Ij2xKVFzsEgiADCWqUCy0Outa1 9 | TkV0LRcl5cf8CGfpr2zbazfkHe+WUj1lPykT4VmGnxsISOiWOIBUlT1T3KOBlzCB 10 | lDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC 11 | MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg5CujL4VVN4cp1mUAHS2KVGJ7lRq6 12 | UFyr62nFzmw7eggwKAYDVR0RBCEwH4IWcGVlcjEub3JnMS5leGFtcGxlLmNvbYIF 13 | cGVlcjEwCgYIKoZIzj0EAwIDRwAwRAIgBKQj3Fh3C3z5Yo0nKfaX9P3MCoof96Ub 14 | yb35xRQ3bsACIA6ZEgRV4zETW+LLLuibxkSDOaXOhQ3V5j8e+vgM7QK1 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgdrB7k1O2sVZk9z1c 3 | 30dkU+/gnVEICGVCYTIU4wROnyqhRANCAAQ7YiPbEpUXOwSCIAMJapQLLQ661rVO 4 | RXQtFyXlx/wIZ+mvbNtrN+Qd75ZSPWU/KRPhWYafGwhI6JY4gFSVPVPc 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAKEXkP+togKhn5PD8kLopAAwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABGYI/F/Xr+WzIf5Z59U1Mq7ZQZDDAZH/ 9 | 67eOEf5IWxLIzHlPGYAHovxpEBw4xfLS+ac2cV1/+KiyK8JDUuG2hV2jTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIDTPpjpFFYii 11 | wFlQxIV3ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0gAMEUCIQC+sNNI 12 | ScsResj1rQGmaVf9Z3umE6V03SbtQ3uK63ZcOAIgcFxNEjvQWb1Ewtk8OhVyqha+ 13 | bEAIKHH3yoMqvOwbqPo= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAeqgAwIBAgIRAJm1QSXuICLP+Q3FPykU0FwwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BIap/GftXczTeEFLpjb+erW8MgDe3u8w4xlmOtv/ARpoS9oscL0ujDJkRHQ0TFnm 10 | kccCprraky3DhvM4O9vccI6jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIDTPpjpFFYiiwFlQxIV3 12 | ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0cAMEQCIFUouMcApV9c0H6d 13 | 57iQGgU+2siysDn1x8MPbsMFO2N1AiAW8C2O+wf3ynws/iScyKs8nWpi4ZH3eP3G 14 | 3FTmE60eaw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/msp/keystore/2a37e152904426ce7a867fc4e94217f44d7a1124a18ca74df2d15c166d189144_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgt82lQHw12Lgd3tXA 3 | GaWmu03LsI7gMboJl/AZoz844DehRANCAAR6CoDfnRF+AJEKfzncuAKAI6qpftnf 4 | jqIaUxWI1pEmiFRIalEElyTWrY5C3vm77DcKiN8u66vff6Ipdv/gJ2EH 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/msp/signcerts/peer2.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQCIHQ1jIzKKYigmRYL9Y55DAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMi5vcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEegqA350RfgCRCn853LgCgCOqqX7Z346i 9 | GlMViNaRJohUSGpRBJck1q2OQt75u+w3CojfLuur33+iKXb/4CdhB6NNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgNM+mOkUViKLA 11 | WVDEhXfKws4gzVcxrWACFBkrdd7vEvQwCgYIKoZIzj0EAwIDRwAwRAIgGcJV64YP 12 | 80JfGzzvTEssQc9BG/lytIRf+ccvTQY9aE0CIFrz4Y7wymALkvH+iRRr1lSl9o+G 13 | 5ujP7JLGIYiqSbuD 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICZzCCAg6gAwIBAgIRANh4s7IxXckMEev012yJA8MwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0 6 | MzAwWjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjIub3JnMS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABN/NhxBRpqFzaHJ5Us1G9Z6GEp1v 9 | +BK96MpHpsQidKWrgmkU0ZHY36G+L/LuQQQ6HufvAFtm89z6qp3u3L98iyejgZcw 10 | gZQwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcD 11 | AjAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIOQroy+FVTeHKdZlAB0tilRie5Ua 12 | ulBcq+tpxc5sO3oIMCgGA1UdEQQhMB+CFnBlZXIyLm9yZzEuZXhhbXBsZS5jb22C 13 | BXBlZXIyMAoGCCqGSM49BAMCA0cAMEQCIHwqI9LJmEsYUeWobzecMluv+jzbLfaC 14 | sbnYIx0EOCYOAiBftGhmKsbD/HZ1Y0a3HY17jZeQBXoOj80fexS/zpj0PQ== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer2.org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgv8A270DU1CR3dxCn 3 | geqWIG9mxU8ph624wTDUvj3VG1ChRANCAATfzYcQUaahc2hyeVLNRvWehhKdb/gS 4 | vejKR6bEInSlq4JpFNGR2N+hvi/y7kEEOh7n7wBbZvPc+qqd7ty/fIsn 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/tlsca/e42ba32f8555378729d665001d2d8a54627b951aba505cabeb69c5ce6c3b7a08_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgeCA/mk0mue1tBJTR 3 | x0a+1ibLTiqwTKuXEuine+G6632hRANCAAQ0g1dSrw2BJByvIVtt8YDGlCiNYveu 4 | s2GvL/6YGDdjN3tLuQbT4xRLWhd+3YbLf0Id6P7O8spt4yW8YXn5lgca 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAKEXkP+togKhn5PD8kLopAAwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABGYI/F/Xr+WzIf5Z59U1Mq7ZQZDDAZH/ 9 | 67eOEf5IWxLIzHlPGYAHovxpEBw4xfLS+ac2cV1/+KiyK8JDUuG2hV2jTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIDTPpjpFFYii 11 | wFlQxIV3ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0gAMEUCIQC+sNNI 12 | ScsResj1rQGmaVf9Z3umE6V03SbtQ3uK63ZcOAIgcFxNEjvQWb1Ewtk8OhVyqha+ 13 | bEAIKHH3yoMqvOwbqPo= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAeqgAwIBAgIRAJm1QSXuICLP+Q3FPykU0FwwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BIap/GftXczTeEFLpjb+erW8MgDe3u8w4xlmOtv/ARpoS9oscL0ujDJkRHQ0TFnm 10 | kccCprraky3DhvM4O9vccI6jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIDTPpjpFFYiiwFlQxIV3 12 | ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0cAMEQCIFUouMcApV9c0H6d 13 | 57iQGgU+2siysDn1x8MPbsMFO2N1AiAW8C2O+wf3ynws/iScyKs8nWpi4ZH3eP3G 14 | 3FTmE60eaw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/76a418cdbae4e5b4f2face00d19ca477acbe5a159d6eb491a5547ce9c60a301f_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgmdtZaoiInNKGrH0G 3 | R1XobtmqqsNnfqHmACjQZEMi3C2hRANCAARmCPxf16/lsyH+WefVNTKu2UGQwwGR 4 | /+u3jhH+SFsSyMx5TxmAB6L8aRAcOMXy0vmnNnFdf/iosivCQ1LhtoVd 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAKEXkP+togKhn5PD8kLopAAwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABGYI/F/Xr+WzIf5Z59U1Mq7ZQZDDAZH/ 9 | 67eOEf5IWxLIzHlPGYAHovxpEBw4xfLS+ac2cV1/+KiyK8JDUuG2hV2jTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIDTPpjpFFYii 11 | wFlQxIV3ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0gAMEUCIQC+sNNI 12 | ScsResj1rQGmaVf9Z3umE6V03SbtQ3uK63ZcOAIgcFxNEjvQWb1Ewtk8OhVyqha+ 13 | bEAIKHH3yoMqvOwbqPo= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICOzCCAeGgAwIBAgIQGU9X6uWnsF1UYqsRG9t8bTAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEJNVIHSMkJ3EJ5b7BjsyB4fSRM2vm 9 | FcyiTHtegHUkcMGqNpME12GIlyOiovvjKLjvcIs9WHq2jQ+RJAzYyWPK96NsMGow 10 | DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM 11 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIOQroy+FVTeHKdZlAB0tilRie5UaulBc 12 | q+tpxc5sO3oIMAoGCCqGSM49BAMCA0gAMEUCIQCK4l4qY1yQi2OD3PyVqM9gSwVK 13 | yjeFX9zHOMiINMPZlQIgPAOxRMCqN4KehUMMjiZz0IeRCbaTgCXsSIjksuxBulk= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgI7WYf1xIAgqOYyGx 3 | jYa7ZbFIAEkc6nNZT/kklqpB23ShRANCAAQk1UgdIyQncQnlvsGOzIHh9JEza+YV 4 | zKJMe16AdSRwwao2kwTXYYiXI6Ki++MouO9wiz1YeraND5EkDNjJY8r3 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/admincerts/User1@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQUCektc647BrWFvmCiopIszAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE2EFGbxWbkxMuMJC47dK6M25xKcA9TLH4 9 | 1CpdmkAXdHxwiE8pV8j6LsvxHFOYijSaV5t3ORlBIeGCnel8svyvKaNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgNM+mOkUViKLA 11 | WVDEhXfKws4gzVcxrWACFBkrdd7vEvQwCgYIKoZIzj0EAwIDRwAwRAIgTk2NVstr 12 | pLIMu2XzdjKYa8LCl3CqhqOKnvMsI4QYJEECIEd9NLSmp/gcn8maFj4j+3rEsLKw 13 | BSc8l+WpUd6Wzc64 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAeqgAwIBAgIRAJm1QSXuICLP+Q3FPykU0FwwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcxMDMwMTI0MzAwWhcNMjcxMDI4MTI0MzAw 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BIap/GftXczTeEFLpjb+erW8MgDe3u8w4xlmOtv/ARpoS9oscL0ujDJkRHQ0TFnm 10 | kccCprraky3DhvM4O9vccI6jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIDTPpjpFFYiiwFlQxIV3 12 | ysLOIM1XMa1gAhQZK3Xe7xL0MAoGCCqGSM49BAMCA0cAMEQCIFUouMcApV9c0H6d 13 | 57iQGgU+2siysDn1x8MPbsMFO2N1AiAW8C2O+wf3ynws/iScyKs8nWpi4ZH3eP3G 14 | 3FTmE60eaw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/63d29f566b1a9dfd0c88bb71680f7ce5b80dabfd65a8ad214a44812e996252fe_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgn8p5fyU3UcN5Uo7J 3 | 4BYXscshyHvwpyHRnP2yyhOJcDWhRANCAATYQUZvFZuTEy4wkLjt0rozbnEpwD1M 4 | sfjUKl2aQBd0fHCITylXyPouy/EcU5iKNJpXm3c5GUEh4YKd6Xyy/K8p 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQUCektc647BrWFvmCiopIszAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQzMDBa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE2EFGbxWbkxMuMJC47dK6M25xKcA9TLH4 9 | 1CpdmkAXdHxwiE8pV8j6LsvxHFOYijSaV5t3ORlBIeGCnel8svyvKaNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgNM+mOkUViKLA 11 | WVDEhXfKws4gzVcxrWACFBkrdd7vEvQwCgYIKoZIzj0EAwIDRwAwRAIgTk2NVstr 12 | pLIMu2XzdjKYa8LCl3CqhqOKnvMsI4QYJEECIEd9NLSmp/gcn8maFj4j+3rEsLKw 13 | BSc8l+WpUd6Wzc64 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAe+gAwIBAgIQaw1Wv/yPxZU0gXlO1UN4SDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD 8 | VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D 9 | AQcDQgAENINXUq8NgSQcryFbbfGAxpQojWL3rrNhry/+mBg3Yzd7S7kG0+MUS1oX 10 | ft2Gy39CHej+zvLKbeMlvGF5+ZYHGqNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud 11 | JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg5CujL4VVN4cp 12 | 1mUAHS2KVGJ7lRq6UFyr62nFzmw7eggwCgYIKoZIzj0EAwIDSAAwRQIhAKGwIZ5W 13 | mEwXT3b40/L3FzllORGQjbyGyyi905bDKoVcAiB9SLYlyYh31I+4+V/LA3YxvjHq 14 | wSWrls9sEbbJg422lw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICOzCCAeGgAwIBAgIQC2fJUlCji0vHJGiv5LaC4TAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzEwMzAxMjQzMDBaFw0yNzEwMjgxMjQz 6 | MDBaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIUbAcfZC6ju6bmhzbRkHtfyMrci2 9 | Ok+5P/hVCikomH7/XUPAvkiq7BD4dBclVRiA3PwKKnllIrk9n+6Ww4T/uaNsMGow 10 | DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM 11 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIOQroy+FVTeHKdZlAB0tilRie5UaulBc 12 | q+tpxc5sO3oIMAoGCCqGSM49BAMCA0gAMEUCIQDQl0UnDVJWT4QyFRC4PWFcPmTC 13 | Ad0ZbAUAe5WE9uSvEwIgdM8nG225IEPuhTitzlYCR2WPmDwmsg6NElKmnHiDZBg= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /tests/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg1Ccoxo2j3sMfnEPZ 3 | 5GjZPDcU7KxK+gcxp2FJAwRY5K+hRANCAAQhRsBx9kLqO7puaHNtGQe1/IytyLY6 4 | T7k/+FUKKSiYfv9dQ8C+SKrsEPh0FyVVGIDc/AoqeWUiuT2f7pbDhP+5 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/basic-network/docker-compose-tls.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright IBM Corp All Rights Reserved 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | version: '2' 7 | 8 | networks: 9 | basic: 10 | 11 | services: 12 | ca.example.com: 13 | image: hyperledger/fabric-ca:x86_64-1.0.2 14 | environment: 15 | - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server 16 | - FABRIC_CA_SERVER_CA_NAME=ca.example.com 17 | - FABRIC_CA_SERVER_TLS_ENABLED=true 18 | - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem 19 | - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/*_sk 20 | ports: 21 | - "7054:7054" 22 | # command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/a22daf356b2aab5792ea53e35f66fccef1d7f1aa2b3a2b92dbfbf96a448ea26a_sk -b admin:adminpw -d' 23 | command: sh -c "fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/*_sk -b admin:adminpw -d" 24 | volumes: 25 | - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config 26 | container_name: ca.example.com 27 | networks: 28 | - basic 29 | 30 | orderer.example.com: 31 | container_name: orderer.example.com 32 | image: hyperledger/fabric-orderer:x86_64-1.0.2 33 | environment: 34 | - ORDERER_GENERAL_LOGLEVEL=debug 35 | - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 36 | - ORDERER_GENERAL_GENESISMETHOD=file 37 | - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block 38 | - ORDERER_GENERAL_LOCALMSPID=OrdererMSP 39 | - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/orderer/msp 40 | # enabled TLS 41 | - ORDERER_GENERAL_TLS_ENABLED=true 42 | - ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/orderer/tls/server.key 43 | - ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/orderer/tls/server.crt 44 | - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/orderer/tls/ca.crt] 45 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer 46 | command: orderer 47 | ports: 48 | - 7050:7050 49 | volumes: 50 | - ./config/:/etc/hyperledger/configtx 51 | - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/etc/hyperledger/orderer/msp 52 | - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls:/etc/hyperledger/orderer/tls 53 | #- ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/msp/peerOrg1 54 | networks: 55 | - basic 56 | 57 | peer0.org1.example.com: 58 | container_name: peer0.org1.example.com 59 | image: hyperledger/fabric-peer:x86_64-1.0.2 60 | environment: 61 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 62 | - CORE_PEER_ID=peer0.org1.example.com 63 | - CORE_LOGGING_PEER=debug 64 | - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG 65 | - CORE_PEER_LOCALMSPID=Org1MSP 66 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp/ 67 | - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 68 | # # the following setting starts chaincode containers on the same 69 | # # bridge network as the peers 70 | # # https://docs.docker.com/compose/networking/ 71 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic 72 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 73 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984 74 | # Fabric Network TLS settings 75 | - CORE_PEER_TLS_ENABLED=true 76 | - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt 77 | - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key 78 | - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt 79 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 80 | command: peer node start 81 | # command: peer node start --peer-chaincodedev=true 82 | ports: 83 | - 7051:7051 84 | - 7053:7053 85 | volumes: 86 | - /var/run/:/host/var/run/ 87 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp 88 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls 89 | - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users 90 | - ./config:/etc/hyperledger/configtx 91 | depends_on: 92 | - orderer.example.com 93 | - couchdb 94 | networks: 95 | - basic 96 | 97 | peer1.org1.example.com: 98 | container_name: peer1.org1.example.com 99 | image: hyperledger/fabric-peer:x86_64-1.0.2 100 | environment: 101 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 102 | - CORE_PEER_ID=peer1.org1.example.com 103 | - CORE_LOGGING_PEER=debug 104 | - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG 105 | - CORE_PEER_LOCALMSPID=Org1MSP 106 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/msp/ 107 | - CORE_PEER_ADDRESS=peer1.org1.example.com:7051 108 | # # the following setting starts chaincode containers on the same 109 | # # bridge network as the peers 110 | # # https://docs.docker.com/compose/networking/ 111 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic 112 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 113 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbPeer1:5984 114 | # Fabric Network TLS settings 115 | - CORE_PEER_TLS_ENABLED=true 116 | - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt 117 | - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key 118 | - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt 119 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 120 | command: peer node start 121 | # command: peer node start --peer-chaincodedev=true 122 | ports: 123 | - 8051:7051 124 | - 8053:7053 125 | volumes: 126 | - /var/run/:/host/var/run/ 127 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/msp 128 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/tls 129 | - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users 130 | - ./config:/etc/hyperledger/configtx 131 | depends_on: 132 | - orderer.example.com 133 | - couchdbPeer1 134 | networks: 135 | - basic 136 | 137 | couchdb: 138 | container_name: couchdb 139 | image: hyperledger/fabric-couchdb:x86_64-1.0.2 140 | ports: 141 | - 5984:5984 142 | networks: 143 | - basic 144 | 145 | couchdbPeer1: 146 | container_name: couchdbPeer1 147 | image: hyperledger/fabric-couchdb:x86_64-1.0.2 148 | ports: 149 | - 6984:5984 150 | networks: 151 | - basic 152 | 153 | # cli: 154 | # container_name: cli 155 | # image: hyperledger/fabric-tools:x86_64-1.0.2 156 | # tty: true 157 | # environment: 158 | # - GOPATH=/opt/gopath 159 | # - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 160 | # - CORE_LOGGING_LEVEL=DEBUG 161 | # - CORE_PEER_ID=cli 162 | # - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 163 | # - CORE_PEER_LOCALMSPID=Org1MSP 164 | # - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp 165 | # - CORE_CHAINCODE_KEEPALIVE=10 166 | # working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 167 | # command: /bin/bash 168 | # volumes: 169 | # - /var/run/:/host/var/run/ 170 | # - ${FABRIC_SAMPLES_DIR}/chaincode/:/opt/gopath/src/github.com/ 171 | # - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ 172 | # networks: 173 | # - basic 174 | #depends_on: 175 | # - orderer.example.com 176 | # - peer0.org1.example.com 177 | # - couchdb 178 | -------------------------------------------------------------------------------- /tests/basic-network/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright IBM Corp All Rights Reserved 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | version: '2' 7 | 8 | networks: 9 | basic: 10 | 11 | services: 12 | ca.example.com: 13 | image: hyperledger/fabric-ca:x86_64-1.0.2 14 | environment: 15 | - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server 16 | - FABRIC_CA_SERVER_CA_NAME=ca.example.com 17 | ports: 18 | - "7054:7054" 19 | # command: sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/a22daf356b2aab5792ea53e35f66fccef1d7f1aa2b3a2b92dbfbf96a448ea26a_sk -b admin:adminpw -d' 20 | command: sh -c "fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem --ca.keyfile /etc/hyperledger/fabric-ca-server-config/*_sk -b admin:adminpw -d" 21 | volumes: 22 | - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config 23 | container_name: ca.example.com 24 | networks: 25 | - basic 26 | 27 | orderer.example.com: 28 | container_name: orderer.example.com 29 | image: hyperledger/fabric-orderer:x86_64-1.0.2 30 | environment: 31 | - ORDERER_GENERAL_LOGLEVEL=debug 32 | - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 33 | - ORDERER_GENERAL_GENESISMETHOD=file 34 | - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block 35 | - ORDERER_GENERAL_LOCALMSPID=OrdererMSP 36 | - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp 37 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer 38 | command: orderer 39 | ports: 40 | - 7050:7050 41 | volumes: 42 | - ./config/:/etc/hyperledger/configtx 43 | - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer 44 | networks: 45 | - basic 46 | 47 | peer0.org1.example.com: 48 | container_name: peer0.org1.example.com 49 | image: hyperledger/fabric-peer:x86_64-1.0.2 50 | environment: 51 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 52 | - CORE_PEER_ID=peer0.org1.example.com 53 | - CORE_LOGGING_PEER=debug 54 | - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG 55 | - CORE_PEER_LOCALMSPID=Org1MSP 56 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ 57 | - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 58 | # # the following setting starts chaincode containers on the same 59 | # # bridge network as the peers 60 | # # https://docs.docker.com/compose/networking/ 61 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic 62 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 63 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984 64 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 65 | command: peer node start 66 | # command: peer node start --peer-chaincodedev=true 67 | ports: 68 | - 7051:7051 69 | - 7053:7053 70 | volumes: 71 | - /var/run/:/host/var/run/ 72 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/msp/peer 73 | - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users 74 | - ./config:/etc/hyperledger/configtx 75 | depends_on: 76 | - orderer.example.com 77 | - couchdb 78 | networks: 79 | - basic 80 | 81 | peer1.org1.example.com: 82 | container_name: peer1.org1.example.com 83 | image: hyperledger/fabric-peer:x86_64-1.0.2 84 | environment: 85 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 86 | - CORE_PEER_ID=peer1.org1.example.com 87 | - CORE_LOGGING_PEER=debug 88 | - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG 89 | - CORE_PEER_LOCALMSPID=Org1MSP 90 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ 91 | - CORE_PEER_ADDRESS=peer1.org1.example.com:7051 92 | # # the following setting starts chaincode containers on the same 93 | # # bridge network as the peers 94 | # # https://docs.docker.com/compose/networking/ 95 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic 96 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 97 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdbPeer1:5984 98 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 99 | command: peer node start 100 | # command: peer node start --peer-chaincodedev=true 101 | ports: 102 | - 8051:7051 103 | - 8053:7053 104 | volumes: 105 | - /var/run/:/host/var/run/ 106 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/msp/peer 107 | - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users 108 | - ./config:/etc/hyperledger/configtx 109 | depends_on: 110 | - orderer.example.com 111 | - couchdbPeer1 112 | networks: 113 | - basic 114 | 115 | couchdb: 116 | container_name: couchdb 117 | image: hyperledger/fabric-couchdb:x86_64-1.0.2 118 | ports: 119 | - 5984:5984 120 | networks: 121 | - basic 122 | 123 | couchdbPeer1: 124 | container_name: couchdbPeer1 125 | image: hyperledger/fabric-couchdb:x86_64-1.0.2 126 | ports: 127 | - 6984:5984 128 | networks: 129 | - basic 130 | 131 | # cli: 132 | # container_name: cli 133 | # image: hyperledger/fabric-tools:x86_64-1.0.2 134 | # tty: true 135 | # environment: 136 | # - GOPATH=/opt/gopath 137 | # - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 138 | # - CORE_LOGGING_LEVEL=DEBUG 139 | # - CORE_PEER_ID=cli 140 | # - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 141 | # - CORE_PEER_LOCALMSPID=Org1MSP 142 | # - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp 143 | # - CORE_CHAINCODE_KEEPALIVE=10 144 | # working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 145 | # command: /bin/bash 146 | # volumes: 147 | # - /var/run/:/host/var/run/ 148 | # - ${FABRIC_SAMPLES_DIR}/chaincode/:/opt/gopath/src/github.com/ 149 | # - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ 150 | # networks: 151 | # - basic 152 | #depends_on: 153 | # - orderer.example.com 154 | # - peer0.org1.example.com 155 | # - couchdb 156 | -------------------------------------------------------------------------------- /tests/basic-network/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | # This assumes that fabric-samples are cloned to the same root folder as this project 9 | export FABRIC_SAMPLES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../../" && pwd)/fabric-samples" 10 | export PATH=$GOPATH/src/github.com/hyperledger/fabric/build/bin:${FABRIC_SAMPLES_DIR}/bin:$PATH 11 | export FABRIC_CFG_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" 12 | #export FABRIC_CFG_PATH=. 13 | CHANNEL_NAME=mychannel 14 | 15 | basicNetworkDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" 16 | 17 | echo "FABRIC_SAMPLES_DIR: ${FABRIC_SAMPLES_DIR}" 18 | 19 | # remove previous crypto material and config transactions 20 | rm -fr ${basicNetworkDir}/config/* 21 | rm -fr ${basicNetworkDir}/crypto-config/* 22 | 23 | # generate crypto material 24 | cryptogen generate --config=${basicNetworkDir}/crypto-config.yaml --output="${basicNetworkDir}/crypto-config" 25 | if [ "$?" -ne 0 ]; then 26 | echo "Failed to generate crypto material..." 27 | exit 1 28 | fi 29 | 30 | # generate genesis block for orderer 31 | configtxgen -profile OneOrgOrdererGenesis -outputBlock ${basicNetworkDir}/config/genesis.block 32 | if [ "$?" -ne 0 ]; then 33 | echo "Failed to generate orderer genesis block..." 34 | exit 1 35 | fi 36 | 37 | # generate channel configuration transaction 38 | configtxgen -profile OneOrgChannel -outputCreateChannelTx ${basicNetworkDir}/config/channel.tx -channelID $CHANNEL_NAME 39 | if [ "$?" -ne 0 ]; then 40 | echo "Failed to generate channel configuration transaction..." 41 | exit 1 42 | fi 43 | 44 | # generate anchor peer transaction 45 | configtxgen -profile OneOrgChannel -outputAnchorPeersUpdate ${basicNetworkDir}/config/Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP 46 | if [ "$?" -ne 0 ]; then 47 | echo "Failed to generate anchor peer update for Org1MSP..." 48 | exit 1 49 | fi 50 | -------------------------------------------------------------------------------- /tests/basic-network/start-tls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Exit on first error, print all commands. 8 | set -ev 9 | 10 | # Based on fabric-samples/basic-network 11 | #echo "FABRIC_SAMPLES_DIR: ${FABRIC_SAMPLES_DIR}" 12 | 13 | # don't rewrite paths for Windows Git Bash users 14 | export MSYS_NO_PATHCONV=1 15 | 16 | docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose-tls.yml down 17 | 18 | docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose-tls.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb peer1.org1.example.com couchdbPeer1 19 | -------------------------------------------------------------------------------- /tests/basic-network/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Exit on first error, print all commands. 8 | set -ev 9 | 10 | # Based on fabric-samples/basic-network 11 | #echo "FABRIC_SAMPLES_DIR: ${FABRIC_SAMPLES_DIR}" 12 | 13 | # don't rewrite paths for Windows Git Bash users 14 | export MSYS_NO_PATHCONV=1 15 | 16 | docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose.yml down 17 | 18 | docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com couchdb peer1.org1.example.com couchdbPeer1 19 | 20 | # # wait for Hyperledger Fabric to start 21 | # # incase of errors when running later commands, issue export FABRIC_START_TIMEOUT= 22 | # export FABRIC_START_TIMEOUT=10 23 | # #echo ${FABRIC_START_TIMEOUT} 24 | # sleep ${FABRIC_START_TIMEOUT} 25 | -------------------------------------------------------------------------------- /tests/basic-network/stop-tls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Exit on first error, print all commands. 8 | set -ev 9 | 10 | # Shut down the Docker containers that might be currently running. 11 | docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose-tls.yml stop 12 | -------------------------------------------------------------------------------- /tests/basic-network/stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Exit on first error, print all commands. 8 | set -ev 9 | 10 | # Shut down the Docker containers that might be currently running. 11 | docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose.yml stop 12 | -------------------------------------------------------------------------------- /tests/basic-network/teardown-tls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Exit on first error, print all commands. 8 | set -e 9 | 10 | # Shut down the Docker containers for the system tests. 11 | docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose-tls.yml kill && docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose-tls.yml down 12 | 13 | # remove the local state 14 | rm -f ~/.hfc-key-store/* 15 | 16 | # remove chaincode docker images 17 | docker rmi $(docker images dev-* -q) 18 | 19 | # Your system is now clean 20 | -------------------------------------------------------------------------------- /tests/basic-network/teardown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Exit on first error, print all commands. 8 | set -e 9 | 10 | # Shut down the Docker containers for the system tests. 11 | docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose.yml kill && docker-compose -f $( dirname "${BASH_SOURCE[0]}" )/docker-compose.yml down 12 | 13 | # remove the local state 14 | rm -f ~/.hfc-key-store/* 15 | 16 | # remove chaincode docker images 17 | docker rmi $(docker images dev-* -q) 18 | 19 | # Your system is now clean 20 | -------------------------------------------------------------------------------- /tests/fabric_rest.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright IBM Corp. All Rights Reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | # Fabric Rest 8 | # 9 | # Thin wrapper around the Fabric REST API. 10 | 11 | import json 12 | import subprocess 13 | 14 | 15 | class FabricRest: 16 | """A thin wrapper around the Fabric REST API.""" 17 | COOKIES_FILE="cookies.txt" 18 | 19 | def __init__(self, hostname="localhost", port="3000", tls=False, authenticate=False): 20 | self.hostname = hostname 21 | self.port = port 22 | self.tls = tls 23 | if authenticate: 24 | self._call_endpoint("POST", "/auth/ldap", authenticate=True) 25 | 26 | def _call_endpoint(self, verb, endpoint, data=None, authenticate=False): 27 | """Call a REST endpoint, returning a dict representation of the returned JSON.""" 28 | url = "http" 29 | if self.tls: 30 | url += "s" 31 | url += "://" + self.hostname + ":" + self.port + endpoint 32 | process_list = ["curl", "-k", "-s", "-X", verb.upper(), "--header"] 33 | if authenticate: 34 | process_list.append("Content-Type: application/x-www-form-urlencoded") 35 | process_list.extend(["-d", "username=alice&password=secret"]) 36 | process_list.extend(["-c", FabricRest.COOKIES_FILE]) 37 | else: 38 | process_list.append("Content-Type: application/json") 39 | process_list.extend(["-b", FabricRest.COOKIES_FILE]) 40 | if data: 41 | process_list.extend(["-d", data]) 42 | process_list.append(url) 43 | process_output = subprocess.check_output(process_list) 44 | try: 45 | return json.loads(process_output) 46 | except ValueError: 47 | return process_output 48 | 49 | # GET /fabric/1_0/channels 50 | def get_channels(self): 51 | """Get the names of known channels from the primary peer""" 52 | return self._call_endpoint("GET", "/api/fabric/1_0/channels") 53 | 54 | # POST /fabric/1_0/chaincodes 55 | def install_chaincode(self, chaincode_id, chaincode_path, archive_bytes, chaincode_version, peers): 56 | """Install chaincode onto the named peers""" 57 | url = "/api/fabric/1_0/chaincodes?" 58 | if peers: 59 | url += "peers=" + peers 60 | data='{"chaincodeId":"'+chaincode_id+'","chaincodePath":"'+ chaincode_path+'","chaincodePackage":"'+ archive_bytes+'","chaincodeVersion":"'+ chaincode_version+'"}' 61 | return self._call_endpoint("POST", url, data) 62 | 63 | # POST /fabric/1_0/chaincodes 64 | def install_chaincode_file(self, chaincode_id, chaincode_path, chaincode_version, peers): 65 | """Install chaincode onto the named peers""" 66 | url = "/api/fabric/1_0/chaincodes?" 67 | if peers: 68 | url += "peers=" + peers 69 | data='{"chaincodeId":"'+chaincode_id+'","chaincodePath":"'+ chaincode_path+'","chaincodeVersion":"'+ chaincode_version+'"}' 70 | return self._call_endpoint("POST", url, data) 71 | 72 | # GET /fabric/1_0/chaincodes/{id} 73 | def query_chaincode(self, chaincode_id, peers): 74 | """Query chaincode installed on a peer by ID""" 75 | url = "/api/fabric/1_0/chaincodes/" + chaincode_id + "?" 76 | if peers: 77 | url += "peers=" + peers 78 | return self._call_endpoint("GET", url) 79 | 80 | # GET /fabric/1_0/channels/{channelName} 81 | def get_channel_info(self): 82 | """Get information about the named channel""" 83 | pass 84 | 85 | # PUT /fabric/1_0/channels/{channelName} 86 | def update_channel(self, channel_name, channel_config_base64): 87 | """Update the named channel""" 88 | url = "/api/fabric/1_0/channels/" +channel_name 89 | data='{"config":"'+channel_config_base64+'"}' #No signatures passed in as one org test 90 | return self._call_endpoint("PUT", url, data) 91 | 92 | # POST /fabric/1_0/channels/{channelName} 93 | def create_channel(self, channel_name, channel_config_base64): 94 | """Create a channel""" 95 | url = "/api/fabric/1_0/channels/" +channel_name 96 | data='{"envelope":"'+channel_config_base64+'"}' #No signatures passed in as one org test 97 | return self._call_endpoint("POST", url, data) 98 | 99 | # GET /fabric/1_0/channels/{channelName}/blocks 100 | def query_block(self): 101 | """Query a block on a channel by ID or Hash""" 102 | pass 103 | 104 | # GET /fabric/1_0/channels/{channelName}/chaincodes 105 | def query_all_chaincode(self): 106 | """Query all chaincode instantiated on the channel""" 107 | pass 108 | 109 | # PUT /fabric/1_0/channels/{channelName}/chaincodes 110 | def init_updated_chaincode(self): 111 | """Instantiate updated chaincode in the channel for the named peers""" 112 | pass 113 | 114 | # POST /fabric/1_0/channels/{channelName}/chaincodes 115 | def instantiate_chaincode(self,channel_name,chaincode_id,chaincode_version): 116 | """Instantiate new chaincode in the channel for the named peers""" 117 | url = "/api/fabric/1_0/channels/" +channel_name+ "/chaincodes?peers=%5B0%5D" 118 | data='{"chaincodeId":"'+chaincode_id+'","chaincodeVersion":"'+chaincode_version+'"}' 119 | return self._call_endpoint("POST", url, data) 120 | 121 | # GET /fabric/1_0/channels/{channelName}/chaincodes/{id} 122 | def query_channel_chaincode(self): 123 | """Query chaincode instantiated on a channel by ID""" 124 | pass 125 | 126 | # POST /fabric/1_0/channels/{channelName}/endorse 127 | def send_proposal(self): 128 | """Send a proposal to the channel's peers. This could be for either chaincode or a transaction.""" 129 | pass 130 | 131 | # POST /fabric/1_0/channels/{channelName}/ledger 132 | def query_ledger(self, channel, data=None, chaincode_id=None, block_id=None, block_hash=None, txn_id=None): 133 | """Query the channel's ledger. 134 | 135 | Query the /ledger endpoint for a given channel, passing data for the query, and any 136 | optional identifiers. 137 | """ 138 | url = "/api/fabric/1_0/channels/" + channel + "/ledger?" 139 | if chaincode_id: 140 | url += "chaincodeId=" + chaincode_id 141 | if block_id: 142 | url += "blockId=" + block_id 143 | if block_hash: 144 | url += "blockHash=" + block_hash 145 | if txn_id: 146 | url += "txnId=" + txn_id 147 | return self._call_endpoint("POST", url, data) 148 | 149 | # POST /fabric/1_0/channels/{channelName}/peers 150 | def join_channel(self, channel_name, peer_data): 151 | """Join a channel""" 152 | url = "/api/fabric/1_0/channels/" +channel_name +"/peers" 153 | return self._call_endpoint("POST", url, peer_data) 154 | 155 | # POST /fabric/1_0/channels/{channelName}/transactions 156 | def commit_transaction(self,channel,data): 157 | """Commit a transaction, if no proposal responses propose and commit.""" 158 | url = "/api/fabric/1_0/channels/" + channel + "/transactions" 159 | return self._call_endpoint("POST", url, data) 160 | 161 | # GET /fabric/1_0/channels/{channelName}/transactions/{transactionID} 162 | def query_transaction(self): 163 | """Query a transaction on a channel by ID""" 164 | pass 165 | -------------------------------------------------------------------------------- /tests/fullRun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | # 3 | # Copyright IBM Corp. All Rights Reserved. 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | 9 | # Run all the Fabric SDK REST server tests 10 | # 11 | # 1. Start the Fabric network 12 | # 2. Setup the server 13 | # 3. Start the LDAP server for authentication testing 14 | # 4. Start the Fabric SDK REST server 15 | # 5. Run all tests 16 | # 6. Stop the Fabric SDK REST server, and LDAP server 17 | # 7. Clean up 18 | 19 | 20 | project_dir="$(cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd)/fabric-sdk-rest" 21 | server_dir="${project_dir}/packages/fabric-rest" 22 | tests_dir="${project_dir}/tests" 23 | providers_file="${server_dir}/server/providers.json" 24 | cookies_file="cookies.txt" 25 | port=3000 26 | 27 | _show_help() { 28 | printf -- "Usage: fullRun.sh [OPTIONS]\n\n" 29 | printf -- "Options:\n" 30 | printf -- "-f force removal of 'hyperledger' Docker containers\n" 31 | printf -- "-k don't kill the LDAP server or Fabric REST server\n" 32 | printf -- "-p specify a port for the Fabric SDK REST server to listen on (default: 3000)\n" 33 | exit 12 34 | } 35 | 36 | while getopts :fkp:h opt; do 37 | case "$opt" in 38 | f) force_remove_docker=true 39 | ;; 40 | k) no_kill=true 41 | ;; 42 | p) port="$OPTARG" 43 | ;; 44 | h) _show_help 45 | ;; 46 | '?') printf -- "Invalid option $OPTARG. Try '-h' for help.\n" && exit 12 47 | ;; 48 | esac 49 | done 50 | 51 | shift $((OPTIND-1)) 52 | 53 | # Start Fabric SDK REST server 54 | # 55 | # First argument allows for TLS to be used: 56 | # _start_fabric_rest_server -t 57 | _start_fabric_rest_server() { 58 | cd "${server_dir}" 59 | ./fabric-rest-server -p "$port" -l "{\"info\":\"${tests_dir}/logs/fullRun_$(date +%s).log\",\"debug\":\"${tests_dir}/logs/fullRun_$(date +%s).log\"}" $1 60 | # Save server's process id 61 | rest_server_pid=$(>> DEBUG:\n"+pem_for_peer 56 | peerData = "{\"url\": \"grpcs://0.0.0.0:7051\",\"opts\":{\"pem\":\""+ pem_for_peer +"\",\"ssl-target-name-override\": \"peer0.org1.example.com\"}}" 57 | pem_file.close() 58 | join_result = restserver.join_channel("mychannel",peerData)["peerResponses"]["response"]["status"] 59 | self.assertEqual(join_result,200) 60 | 61 | def test_ab_join_channel_peer1(self): 62 | """Test joining peer0 to the new channel""" 63 | # Get fabric sample directory, default assumes fabric-samples checked 64 | # out into same root folder as this project 65 | fs_dir = os.getenv('TEST_NETWORK_DIR','./basic-network/') 66 | pem_file_loc = fs_dir + 'crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt' 67 | pem_file = open(pem_file_loc, 'rb') 68 | #READ in PEM 69 | pem_for_peer = pem_file.read() 70 | pem_for_peer = pem_for_peer.replace('\n','\\n') #Escape newline chars from PEM. 71 | #print ">>> DEBUG:\n"+pem_for_peer 72 | peerData = "{\"url\": \"grpcs://0.0.0.0:8051\",\"opts\":{\"pem\":\""+ pem_for_peer +"\",\"ssl-target-name-override\": \"peer1.org1.example.com\"}}" 73 | pem_file.close() 74 | join_result = restserver.join_channel("mychannel",peerData)["peerResponses"]["response"]["status"] 75 | self.assertEqual(join_result,200) 76 | 77 | def test_ac_chaincode_install_marbles02(self): 78 | """Test to confirm that installing chaincode on a peer works.""" 79 | # install chaincode: id, path(in archive), archive as base64 string, version, peers 80 | archiveFile = open('input/installTest.tar.gz', 'rb') 81 | archiveInb64 = base64.b64encode(archiveFile.read()) 82 | archiveFile.close() 83 | install_result = restserver.install_chaincode("marbles","marbles02",archiveInb64,"1.0","%5B0%5D")["peerResponses"] 84 | #TODO check response 85 | 86 | def test_ad_chaincode_install_fabcar(self): 87 | """Test to confirm that installing fabcar chaincode on a peer works.""" 88 | # install chaincode: id, path(in archive), archive as base64 string, version, peers 89 | # Created using "tar -cvzf installFabcar.tar.gz src/fabcar/fabcar.go" 90 | archiveFile = open('input/installFabcar.tar.gz', 'rb') 91 | archiveInb64 = base64.b64encode(archiveFile.read()) 92 | archiveFile.close() 93 | install_result = restserver.install_chaincode("fabcar","fabcar",archiveInb64,"1.0","%5B0,1%5D")["peerResponses"] 94 | time.sleep(5) # Allow chaincode install to complete 95 | #TODO check response 96 | 97 | def test_ae_chaincode_instantiate_fabcar(self): 98 | """Test to confirm that instantiating fabcar chaincode on a channel works.""" 99 | instantiate_result = restserver.instantiate_chaincode("mychannel","fabcar","1.0")["status"] 100 | self.assertEqual(instantiate_result,"SUCCESS") 101 | time.sleep(5) # Allow chaincode instantiate to complete before using it 102 | 103 | def test_af_initialize_fabcar(self): 104 | """Test to initialize the ledger with fabcar data.""" 105 | init_result = restserver.commit_transaction("mychannel", 106 | data=r'{"proposal":{"chaincodeId":"fabcar","fcn":"initLedger","args":[""]}}') 107 | #TODO check response 108 | 109 | # TODO Failing with "Rejecting CONFIG_UPDATE because: Error authorizing update: Update not for correct channel:" 110 | # def test_ag_update_channel(self): 111 | # """Test updating the channel mychannel, just tests orderer has accepted the request""" 112 | # # Get fabric sample directory, default assumes fabric-samples checked 113 | # # out into same root folder as this project 114 | # fs_dir = os.getenv('TEST_NETWORK_DIR','.') 115 | # config_file_loc = fs_dir + '/basic-network/config/Org1MSPanchors.tx' 116 | # config_file = open(config_file_loc, 'rb') 117 | # configInb64 = base64.b64encode(config_file.read()) 118 | # config_file.close() 119 | # create_result = restserver.update_channel("mychannel",configInb64)["status"] 120 | # self.assertEqual(create_result,"SUCCESS") 121 | # time.sleep(3) #Allow orderer to finish this task before next tests run 122 | 123 | # def test_first_channel_name(self): 124 | # """Test to confirm that the first channel on the network has the default name of 125 | # mychannel. 126 | # """ 127 | # first_channel = restserver.get_channels()["channels"][0]["channel_id"] 128 | # self.assertEqual(first_channel, "mychannel") 129 | 130 | if __name__ == "__main__": 131 | if len(argv) > 1: 132 | hostname = argv[1] 133 | port = argv[2] 134 | else: 135 | hostname = "localhost" 136 | port = "3000" 137 | 138 | restserver = FabricRest(hostname, port) 139 | 140 | print "Using TEST_NETWORK_DIR: " + os.getenv('TEST_NETWORK_DIR','./basic-network') 141 | 142 | unittest.main() 143 | -------------------------------------------------------------------------------- /tests/test_fabcar.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright IBM Corp. All Rights Reserved. 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | # Test Fabcar Sample 8 | # 9 | # Basic tests to confirm that REST calls into the Fabcar sample network work. 10 | 11 | 12 | from sys import argv 13 | from fabric_rest import FabricRest 14 | import argparse 15 | import unittest 16 | 17 | 18 | class TestFabCar(unittest.TestCase): 19 | def test_first_channel_name(self): 20 | """Test to confirm that the first channel on the network has the default name of 21 | mychannel. 22 | """ 23 | first_channel = restserver.get_channels()["channels"][0]["channel_id"] 24 | self.assertEqual(first_channel, "mychannel") 25 | 26 | def test_query_blockid(self): 27 | """Test to confirm that a block is returned by the query.""" 28 | block_header = restserver.query_ledger("mychannel", block_id="1")["header"] 29 | #Test will fail if header not part of response. 30 | 31 | def test_query_blockid_404(self): 32 | """Test to confirm that a block is returned by the query.""" 33 | status_code = restserver.query_ledger("mychannel", block_id="99999")["error"]["statusCode"] 34 | self.assertEqual(status_code, 404) 35 | 36 | def test_car_color(self): 37 | """Test to confirm that the first car returned from a ledger query is the color blue.""" 38 | car_color = restserver.query_ledger("mychannel", chaincode_id="fabcar", 39 | data=r'{"fcn":"queryAllCars","args":[]}')["queryResult"][0]["Record"]["colour"] 40 | self.assertEqual(car_color, "blue") 41 | 42 | def test_peer_chaincode_query(self): 43 | """Test to confirm that querying a peer for fabcar chaincode returns a result and querying for fab does not.""" 44 | chaincode_name = restserver.query_chaincode("fabcar","%5B0%5D")["queryResult"][0]["name"] 45 | self.assertEqual(chaincode_name, "fabcar") 46 | empty_result = restserver.query_chaincode("fab","%5B0%5D")["queryResult"][0] 47 | self.assertEqual(empty_result, {}) 48 | 49 | 50 | if __name__ == "__main__": 51 | parser = argparse.ArgumentParser() 52 | parser.add_argument('--tls', '-t', help='Enable TLS', action='store_true', default=False) 53 | parser.add_argument('--hostname', '-n', help='Hostname of SDK REST server to connect to', default='localhost') 54 | parser.add_argument('--port', '-p', help='Port of SDK REST server to connect on', default='3000') 55 | args = parser.parse_args() 56 | 57 | restserver = FabricRest(args.hostname, args.port, args.tls) 58 | runner = unittest.TextTestRunner(verbosity=1) 59 | result = runner.run(unittest.makeSuite(TestFabCar)) 60 | 61 | # Exit with non-zero exit code if any tests failed. 62 | if not result.wasSuccessful(): 63 | system.exit(1) 64 | -------------------------------------------------------------------------------- /tests/tlsNetworkfullRun.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash - 2 | # 3 | # Copyright IBM Corp. All Rights Reserved. 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | 9 | # 10 | # Setup 11 | # 12 | 13 | 14 | project_dir="$(cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd)/fabric-sdk-rest" 15 | server_dir="${project_dir}/packages/fabric-rest" 16 | tests_dir="${project_dir}/tests" 17 | providers_file="${server_dir}/server/providers.json" 18 | cookies_file="cookies.txt" 19 | 20 | # If a providers.json file is already there, save it for later: could have been created by the user 21 | if [[ -f "$providers_file" ]]; then 22 | printf "Saving existing providers.json file to restore later\n" 23 | mv "$providers_file" "${providers_file}.saved" 24 | fi 25 | 26 | cd "${server_dir}/server" 27 | mkdir -p private 28 | cd private 29 | if [[ ! -f privatekey.pem ]]; then 30 | openssl req -x509 -newkey rsa:4096 -keyout privatekey.pem -out certificate.pem \ 31 | -days 365 -subj "/C=US/ST=Oregon/L=Portland/O=Company Name/OU=Org/CN=www.example.com" -nodes 32 | fi 33 | 34 | # Stop any currently-running Hyperledger Docker containers 35 | # echo "Stopping any running Hyperledger Docker containers" 36 | #docker ps -a | grep -i hyperledger | cut -d' ' -f1 | xargs docker rm -f 37 | 38 | # Need to be in basic-network folder for docker-compose to pick up .env file 39 | cd "${tests_dir}/basic-network" 40 | # Start fabric sample basic-network in "extra basic" Model 41 | ./start-tls.sh 42 | 43 | # Get user keys from crypto-config used with tests 44 | cd "${tests_dir}/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore" 45 | privatekeyUser="$(ls *_sk)" 46 | cd "${tests_dir}/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore" 47 | privatekeyAdmin="$(ls *_sk)" 48 | 49 | # Update datasources.json to use crypto-config from tests directory and run as Fabric ADMIN 50 | # TODO consider adding tests to run as a Fabric user. 51 | cd "${server_dir}/server" 52 | printf "TEST - privatekeyUser : ${privatekeyUser}\n" 53 | printf "TEST - privatekeyAdmin : ${privatekeyAdmin}\n" 54 | sed -e "s/ADMINUSER/fabricUser/" -e "s^XXXXXXXX^${privatekeyUser}^" -e "s^ADMIN1STORE^${privatekeyAdmin}^" \ 55 | -e "s^FABSAMPLE^${tests_dir}/basic-network^" < datasources-tls.json.template > datasources.json 56 | 57 | # Start the LDAP server 58 | cd "${tests_dir}" 59 | node ./authentication/authentication.js & 60 | ldapjs_pid=$! 61 | printf "Starting LDAP server, PID: ${ldapjs_pid}\n" 62 | sleep 3 63 | 64 | # Start the REST server in its own process with debug on 65 | cd "${server_dir}" 66 | node . --hfc-logging "{\"info\":\"${tests_dir}/logs/fullRun_$(date +%s).log\",\"debug\":\"${tests_dir}/logs/fullRun_$(date +%s).log\"}" & 67 | # Save server's process id 68 | rest_server_pid=$! 69 | printf "Starting REST server, PID: ${rest_server_pid}\n" 70 | 71 | # Give the server a chance to start 72 | printf "Sleeping for 10s to allow the REST server and Fabric network to start up\n" 73 | sleep 10 74 | 75 | 76 | # 77 | # Test suite 1 78 | # 79 | 80 | 81 | # Now run the channel setup and fabcar tests 82 | cd "${tests_dir}" 83 | python ./test_channel_setup_tls.py 84 | if [[ $? -eq 0 ]]; then # Error response was found 85 | result_test1="PASSED" 86 | else 87 | result_test1="FAILED" 88 | fi 89 | 90 | 91 | # 92 | # Test suite 2 93 | # 94 | 95 | 96 | # Allow time for fabcar to be initialized before running tests 97 | printf "Wait 5 seconds to allow fabcar to finish initializing\n" 98 | sleep 5 99 | python ./test_fabcar.py 100 | if [[ $? -eq 0 ]]; then # Error response was found 101 | result_test2="PASSED" 102 | else 103 | result_test2="FAILED" 104 | fi 105 | 106 | 107 | # 108 | # Test suite 3 109 | # 110 | 111 | 112 | # 113 | # Switch the REST SDK server from no auth to LDAP authentication 114 | # 115 | 116 | 117 | # Stop the REST server 118 | printf "Switching REST SDK server to use LDAP authentication\n" 119 | printf "Stopping REST SDK server, PID: ${rest_server_pid}\n" 120 | kill -2 ${rest_server_pid} 121 | printf "Wait 3 seconds to allow REST server to stop\n" 122 | sleep 3 123 | 124 | cd "${server_dir}" 125 | 126 | # Ensure the providers file exists, and not just the template 127 | if [[ ! -f "$providers_file" && -f "${providers_file}.template" ]]; then 128 | printf "Creating providers file from template for LDAP auth\n" 129 | cp "${providers_file}.template" "$providers_file" 130 | else 131 | printf "Exiting: no providers.json file (or its original template) found in fabric-rest/server directory\n" 132 | exit 1 133 | fi 134 | 135 | # Start the REST server in it's own process with debug on 136 | node . --hfc-logging "{\"info\":\"${tests_dir}/logs/fullRun_$(date +%s).log\",\"debug\":\"${tests_dir}/logs/fullRun_$(date +%s).log\"}" & 137 | # Save server's process id 138 | rest_server_pid=$! 139 | printf "Starting REST server with LDAP authentication configured, PID: ${rest_server_pid}\n" 140 | printf "Wait 15 seconds to allow REST server to start up\n" 141 | sleep 15 142 | 143 | cd "${tests_dir}" 144 | 145 | # Set up NODE_PATH to be able to start ldap server and run auth tests 146 | export NODE_PATH=../packages/fabric-rest/node_modules 147 | ./test_authentication.sh 148 | if [[ $? -eq 0 ]]; then # Error response was found 149 | result_test3="PASSED" 150 | else 151 | result_test3="FAILED" 152 | fi 153 | 154 | 155 | # Remove the providers file if it exists 156 | if [[ -f "$providers_file" ]]; then 157 | printf "Removing providers file\n" 158 | rm "$providers_file" 159 | fi 160 | 161 | 162 | # 163 | # Switch the REST SDK server from HTTP to HTTPS configuration 164 | # 165 | 166 | 167 | # Stop the REST server 168 | printf "Switching REST SDK server to use TLS\n" 169 | printf "Stopping REST SDK server, PID: ${rest_server_pid}\n" 170 | kill -2 ${rest_server_pid} 171 | printf "Wait 3 seconds to allow REST server to stop\n" 172 | sleep 3 173 | 174 | cd "${server_dir}" 175 | # Start the REST server in it's own process with tls and debug on 176 | node . --tls --hfc-logging "{\"info\":\"${tests_dir}/logs/fullRun_$(date +%s).log\",\"debug\":\"${tests_dir}/logs/fullRun_$(date +%s).log\"}" & 177 | # Save server's process id 178 | rest_server_pid=$! 179 | printf "Starting REST server with TLS on, PID: ${rest_server_pid}\n" 180 | printf "Wait 5 seconds to allow REST server to start up\n" 181 | sleep 5 182 | 183 | 184 | # 185 | # Test suite 4 186 | # 187 | 188 | 189 | # Now run the fabcar tests again with TLS option specified 190 | cd "${tests_dir}" 191 | python ./test_fabcar.py -t 192 | if [[ $? -eq 0 ]]; then # Error response was found 193 | result_test4="PASSED" 194 | else 195 | result_test4="FAILED" 196 | fi 197 | 198 | # Stop the REST and LDAP servers 199 | printf "Stopping REST SDK server, PID: ${rest_server_pid}\n" 200 | kill -2 "$rest_server_pid" 201 | printf "Stopping LDAP server, PID: ${ldapjs_pid}\n" 202 | kill -2 "$ldapjs_pid" 203 | 204 | 205 | # 206 | # Clean up 207 | # 208 | 209 | 210 | cd "${tests_dir}" 211 | if [[ -f "$cookies_file" ]]; then 212 | rm "$cookies_file" 213 | fi 214 | 215 | if [[ -f "${providers_file}.saved" ]]; then 216 | printf "Restoring saved providers.json file\n" 217 | mv "${providers_file}.saved" "$providers_file" 218 | fi 219 | 220 | sleep 1 221 | printf "\nFabric network container summary\n\n" 222 | # Show containers running in network, so easier to spot network's version 223 | docker ps --format "table {{.Names}}\t{{.Image}}" 224 | 225 | # cd ${tests_dir}/basic-network 226 | # # Stop the network 227 | # ./stop-tls.sh 228 | 229 | printf "\nTest suite result summary\n\n" 230 | printf "Test suite 1: ${result_test1}\n" 231 | printf "Test suite 2: ${result_test2}\n" 232 | printf "Test suite 3: ${result_test3}\n" 233 | printf "Test suite 4: ${result_test4}\n" 234 | --------------------------------------------------------------------------------