-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where init flow errors when not using mutual TLS (#1183)
fixes the issue where on the init flow you get TypeError: this.connectorConfiguration.getConnectionProfileDefinitionForOrganization(...).isTLSEnabled is not a function closes #1160 Signed-off-by: D <[email protected]> Co-authored-by: D <[email protected]>
- Loading branch information
Showing
9 changed files
with
232 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,4 +68,4 @@ | |
} | ||
}, | ||
"license": "Apache-2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
packages/caliper-fabric/test/sample-configs/BasicConfigNotMutual.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
--- | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
# The name of the benchmark | ||
name: BasicConfig | ||
# The caliper semantic version | ||
version: "2.0.0" | ||
|
||
# Global properties that define the SUT, and options that are specific to the target SUT | ||
caliper: | ||
blockchain: fabric | ||
sutOptions : | ||
mutualTls: false | ||
|
||
# Array of fabric channels for creation or use | ||
channels: | ||
- channelName: mychannel | ||
# [Optional] create the channel | ||
create: | ||
buildTransaction: | ||
capabilities: [] | ||
consortium: 'SampleConsortium2' | ||
msps: ['Org1MSP', 'Org2MSP'] | ||
version: 0 | ||
# Array of contracts to be installed/instantiated on the named channel and available for use by the workload module | ||
contracts: | ||
- id: marbles | ||
contractID: myMarbles | ||
# define the install requirements to install chaincode if chaincode is to be installed | ||
install: | ||
version: v0 | ||
language: golang | ||
path: marbles/go | ||
metadataPath: src/marbles/go/metadata | ||
# define the instantiate requirements to instantiate chaincode all of this section is optional depending on chaincode requirements | ||
instantiate: | ||
initFunction: init | ||
initArguments: [] | ||
initTransientMap: | ||
key1: value1 | ||
key2: value2 | ||
endorsementPolicy: '' | ||
collectionsConfig: '' | ||
|
||
- channelName: somechannel | ||
create: | ||
prebuiltTransaction: 'channel.tx' | ||
contracts: | ||
- id: marbles | ||
contractID: foundMyMarbles | ||
version: v0 | ||
|
||
- channelName: yourchannel | ||
contracts: | ||
- id: marbles | ||
contractID: lostMyMarbles | ||
version: v0 | ||
|
||
# [Minimum 1] Array of organizations that are to be used within the benchmarking, containing one of more identities to be used by the connector | ||
organizations: | ||
- mspid: Org1MSP | ||
# One or more identity specification types that may provide a unique identity for the use by the connector. | ||
identities: | ||
# [NOT CURRENTLY SUPPORTED] [Optional] only for use by non gateway fabric connector (could also be defined in connection profile) | ||
credentialStore: | ||
path: /tmp/hfc-kvs/org1 | ||
cryptoStore: | ||
path: /tmp/hfc-cvs/org1 | ||
# [Optional] File path to a FileWallet, within which all entries are all for the same org. Only for use by gateway | ||
wallet: | ||
path: './test/sample-configs' | ||
adminNames: | ||
- admin | ||
# [Optional] certificates for the client | ||
certificates: | ||
- name: 'User1' | ||
clientPrivateKey: | ||
# pem or path can be specified here can be specified here | ||
pem: |- | ||
-----BEGIN PRIVATE KEY----- | ||
-----END PRIVATE KEY----- | ||
clientSignedCert: | ||
pem: |- | ||
-----BEGIN CERTIFICATE----- | ||
-----END CERTIFICATE----- | ||
# Connection profile to be used by the connector for the organization | ||
# - could validate this connection profile matches declared mspid | ||
connectionProfile: | ||
path: './test/sample-configs/Org1ConnectionProfile.yaml' | ||
discover: true | ||
- mspid: Org2MSP | ||
identities: | ||
certificates: | ||
- name: 'User1' | ||
clientPrivateKey: | ||
# pem or path can be specified here can be specified here | ||
pem: |- | ||
-----BEGIN PRIVATE KEY----- | ||
-----END PRIVATE KEY----- | ||
clientSignedCert: | ||
pem: |- | ||
-----BEGIN CERTIFICATE----- | ||
-----END CERTIFICATE----- | ||
connectionProfile: | ||
path: './test/sample-configs/StaticOrg2ConnectionProfile.json' | ||
discover: false |
89 changes: 89 additions & 0 deletions
89
packages/caliper-fabric/test/sample-configs/BasicConfigNotMutualWithStaticCCP.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
name: BasicConfigWithStaticCCP | ||
version: "2.0.0" | ||
|
||
caliper: | ||
blockchain: fabric, | ||
sutOptions : | ||
mutualTls: false | ||
|
||
channels: | ||
- channelName: mychannel | ||
create: | ||
buildTransaction: | ||
capabilities: [] | ||
consortium: 'SampleConsortium2' | ||
msps: ['Org1MSP', 'Org2MSP'] | ||
version: 0 | ||
contracts: | ||
- id: marbles | ||
contractID: myMarbles | ||
install: | ||
version: v0 | ||
language: golang | ||
path: marbles/go | ||
metadataPath: src/marbles/go/metadata | ||
instantiate: | ||
initFunction: init | ||
initArguments: [] | ||
initTransientMap: | ||
key1: value1 | ||
key2: value2 | ||
endorsementPolicy: '' | ||
collectionsConfig: '' | ||
|
||
- channelName: yourchannel | ||
contracts: | ||
- id: marbles | ||
contractID: lostMyMarbles | ||
version: v0 | ||
|
||
organizations: | ||
- mspid: Org1MSP | ||
identities: | ||
wallet: | ||
path: './test/sample-configs' | ||
adminNames: | ||
- admin | ||
certificates: | ||
- name: 'User1' | ||
clientPrivateKey: | ||
pem: |- | ||
-----BEGIN PRIVATE KEY----- | ||
-----END PRIVATE KEY----- | ||
clientSignedCert: | ||
pem: |- | ||
-----BEGIN CERTIFICATE----- | ||
-----END CERTIFICATE----- | ||
connectionProfile: | ||
path: './test/sample-configs/StaticOrg1ConnectionProfile.json' | ||
discover: false | ||
- mspid: Org2MSP | ||
identities: | ||
certificates: | ||
- name: 'User1' | ||
clientPrivateKey: | ||
pem: |- | ||
-----BEGIN PRIVATE KEY----- | ||
-----END PRIVATE KEY----- | ||
clientSignedCert: | ||
pem: |- | ||
-----BEGIN CERTIFICATE----- | ||
-----END CERTIFICATE----- | ||
connectionProfile: | ||
path: './test/sample-configs/StaticOrg2ConnectionProfile.json' | ||
discover: false |