Skip to content

Commit fe6bdcb

Browse files
committed
Implement CCAAS TLS issue preparation and metadata updates
Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> fix-update test suites for code changes Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> fix-update test suites for code changes Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> fix-update test suites for code changes Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> Fix-review comments and file changes Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> Fix-updated test suites for new code changes Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> fix-validate json schema Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> fix-re-enable explorer test and update changelog Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> fix-add .DS_STORE to gitignore Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> fix-increase validation warning count Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> generate certs using openssl for cc container Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> feat-generate-tls-certs-for-ccaass-container Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com> feat-prepare-main-for-ccaas-tls-issue Signed-off-by: Pereowei Daniel <iwenyadaniel12@gmail.com>
1 parent cbc0199 commit fe6bdcb

23 files changed

+1223
-128
lines changed

.DS_Store

-6 KB
Binary file not shown.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ node_modules
77
.idea
88
.vscode
99
samples/invalid-fablo-config.json
10-
.DS_Store
10+
**/.DS_Store

e2e-network/TEST_CASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
| Java chaincode | no | yes | no | no | no | no |
2020
| Go chaincode | no | no | no | no | no | no |
2121
| Tools | channel scripts | Fablo REST | - | Fablo REST, Explorer, CCAAS | - | - |
22-
| Other Fablo commands | init, reset | stop, start | - | snapshot, prune, restore | - | - |
22+
| Other Fablo commands | init, reset | stop, start | - | snapshot, prune, restore | - | - |

e2e/__snapshots__/extendConfig.test.ts.snap

Lines changed: 224 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,23 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j
17251725
},
17261726
],
17271727
"peersCount": 1,
1728-
"tools": {},
1728+
"tools": {
1729+
"fabloRest": {
1730+
"address": "fablo-rest.org1.example.com",
1731+
"discoverySslTargetNameOverrides": "",
1732+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
1733+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
1734+
"fabricCaName": "ca.org1.example.com",
1735+
"fabricCaUrl": "https://ca.org1.example.com:7054",
1736+
"logging": {
1737+
"error": "console",
1738+
"info": "console",
1739+
"warn": "console",
1740+
},
1741+
"mspId": "Org1MSP",
1742+
"port": 8801,
1743+
},
1744+
},
17291745
},
17301746
"name": "my-channel1",
17311747
"ordererGroup": {
@@ -1851,14 +1867,30 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j
18511867
},
18521868
],
18531869
"peersCount": 1,
1854-
"tools": {},
1870+
"tools": {
1871+
"fabloRest": {
1872+
"address": "fablo-rest.org1.example.com",
1873+
"discoverySslTargetNameOverrides": "",
1874+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
1875+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
1876+
"fabricCaName": "ca.org1.example.com",
1877+
"fabricCaUrl": "https://ca.org1.example.com:7054",
1878+
"logging": {
1879+
"error": "console",
1880+
"info": "console",
1881+
"warn": "console",
1882+
},
1883+
"mspId": "Org1MSP",
1884+
"port": 8801,
1885+
},
1886+
},
18551887
},
18561888
],
18571889
"profileName": "MyChannel1",
18581890
},
1859-
"directory": undefined,
1891+
"directory": "./chaincodes/chaincode-kv-node",
18601892
"endorsement": undefined,
1861-
"image": "ghcr.io/fablo-io/fablo-sample-kv-node-chaincode:2.2.0",
1893+
"image": undefined,
18621894
"initRequired": false,
18631895
"instantiatingOrg": {
18641896
"anchorPeers": [
@@ -1924,17 +1956,27 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j
19241956
},
19251957
],
19261958
"peersCount": 1,
1927-
"tools": {},
1959+
"tools": {
1960+
"fabloRest": {
1961+
"address": "fablo-rest.org1.example.com",
1962+
"discoverySslTargetNameOverrides": "",
1963+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
1964+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
1965+
"fabricCaName": "ca.org1.example.com",
1966+
"fabricCaUrl": "https://ca.org1.example.com:7054",
1967+
"logging": {
1968+
"error": "console",
1969+
"info": "console",
1970+
"warn": "console",
1971+
},
1972+
"mspId": "Org1MSP",
1973+
"port": 8801,
1974+
},
1975+
},
19281976
},
1929-
"lang": "ccaas",
1977+
"lang": "node",
19301978
"name": "chaincode1",
1931-
"peerChaincodeInstances": [
1932-
{
1933-
"containerName": "peer0.org1.example.com_chaincode1",
1934-
"peerAddress": "peer0.org1.example.com",
1935-
"port": 7052,
1936-
},
1937-
],
1979+
"peerChaincodeInstances": [],
19381980
"privateData": [],
19391981
"privateDataConfigFile": undefined,
19401982
"version": "0.0.1",
@@ -2006,7 +2048,23 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j
20062048
},
20072049
],
20082050
"peersCount": 1,
2009-
"tools": {},
2051+
"tools": {
2052+
"fabloRest": {
2053+
"address": "fablo-rest.org1.example.com",
2054+
"discoverySslTargetNameOverrides": "",
2055+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
2056+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
2057+
"fabricCaName": "ca.org1.example.com",
2058+
"fabricCaUrl": "https://ca.org1.example.com:7054",
2059+
"logging": {
2060+
"error": "console",
2061+
"info": "console",
2062+
"warn": "console",
2063+
},
2064+
"mspId": "Org1MSP",
2065+
"port": 8801,
2066+
},
2067+
},
20102068
},
20112069
"name": "my-channel1",
20122070
"ordererGroup": {
@@ -2132,7 +2190,23 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j
21322190
},
21332191
],
21342192
"peersCount": 1,
2135-
"tools": {},
2193+
"tools": {
2194+
"fabloRest": {
2195+
"address": "fablo-rest.org1.example.com",
2196+
"discoverySslTargetNameOverrides": "",
2197+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
2198+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
2199+
"fabricCaName": "ca.org1.example.com",
2200+
"fabricCaUrl": "https://ca.org1.example.com:7054",
2201+
"logging": {
2202+
"error": "console",
2203+
"info": "console",
2204+
"warn": "console",
2205+
},
2206+
"mspId": "Org1MSP",
2207+
"port": 8801,
2208+
},
2209+
},
21362210
},
21372211
],
21382212
"profileName": "MyChannel1",
@@ -2163,7 +2237,12 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j
21632237
"fabloConfig": "<absolute path>",
21642238
},
21652239
"tls": true,
2166-
"tools": {},
2240+
"tools": {
2241+
"explorer": {
2242+
"address": "explorer.example.com",
2243+
"port": 7010,
2244+
},
2245+
},
21672246
},
21682247
"hooks": {
21692248
"postGenerate": "perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' "./fablo-target/fabric-config/configtx.yaml"",
@@ -2358,7 +2437,23 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j
23582437
},
23592438
],
23602439
"peersCount": 1,
2361-
"tools": {},
2440+
"tools": {
2441+
"fabloRest": {
2442+
"address": "fablo-rest.org1.example.com",
2443+
"discoverySslTargetNameOverrides": "",
2444+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
2445+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
2446+
"fabricCaName": "ca.org1.example.com",
2447+
"fabricCaUrl": "https://ca.org1.example.com:7054",
2448+
"logging": {
2449+
"error": "console",
2450+
"info": "console",
2451+
"warn": "console",
2452+
},
2453+
"mspId": "Org1MSP",
2454+
"port": 8801,
2455+
},
2456+
},
23622457
},
23632458
],
23642459
}
@@ -11062,7 +11157,23 @@ exports[`extend config samples/invalid-fablo-config.json 1`] = `
1106211157
},
1106311158
],
1106411159
"peersCount": 1,
11065-
"tools": {},
11160+
"tools": {
11161+
"fabloRest": {
11162+
"address": "fablo-rest.org1.example.com",
11163+
"discoverySslTargetNameOverrides": "",
11164+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
11165+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
11166+
"fabricCaName": "ca.org1.example.com",
11167+
"fabricCaUrl": "https://ca.org1.example.com:7054",
11168+
"logging": {
11169+
"error": "console",
11170+
"info": "console",
11171+
"warn": "console",
11172+
},
11173+
"mspId": "Org1MSP",
11174+
"port": 8801,
11175+
},
11176+
},
1106611177
},
1106711178
"name": "my-channel1",
1106811179
"ordererGroup": {
@@ -11188,14 +11299,30 @@ exports[`extend config samples/invalid-fablo-config.json 1`] = `
1118811299
},
1118911300
],
1119011301
"peersCount": 1,
11191-
"tools": {},
11302+
"tools": {
11303+
"fabloRest": {
11304+
"address": "fablo-rest.org1.example.com",
11305+
"discoverySslTargetNameOverrides": "",
11306+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
11307+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
11308+
"fabricCaName": "ca.org1.example.com",
11309+
"fabricCaUrl": "https://ca.org1.example.com:7054",
11310+
"logging": {
11311+
"error": "console",
11312+
"info": "console",
11313+
"warn": "console",
11314+
},
11315+
"mspId": "Org1MSP",
11316+
"port": 8801,
11317+
},
11318+
},
1119211319
},
1119311320
],
1119411321
"profileName": "MyChannel1",
1119511322
},
11196-
"directory": undefined,
11323+
"directory": "./chaincodes/chaincode-kv-node",
1119711324
"endorsement": undefined,
11198-
"image": "ghcr.io/fablo-io/fablo-sample-kv-node-chaincode:2.2.0",
11325+
"image": undefined,
1119911326
"initRequired": false,
1120011327
"instantiatingOrg": {
1120111328
"anchorPeers": [
@@ -11261,17 +11388,27 @@ exports[`extend config samples/invalid-fablo-config.json 1`] = `
1126111388
},
1126211389
],
1126311390
"peersCount": 1,
11264-
"tools": {},
11391+
"tools": {
11392+
"fabloRest": {
11393+
"address": "fablo-rest.org1.example.com",
11394+
"discoverySslTargetNameOverrides": "",
11395+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
11396+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
11397+
"fabricCaName": "ca.org1.example.com",
11398+
"fabricCaUrl": "https://ca.org1.example.com:7054",
11399+
"logging": {
11400+
"error": "console",
11401+
"info": "console",
11402+
"warn": "console",
11403+
},
11404+
"mspId": "Org1MSP",
11405+
"port": 8801,
11406+
},
11407+
},
1126511408
},
11266-
"lang": "ccaas",
11409+
"lang": "node",
1126711410
"name": "chaincode1",
11268-
"peerChaincodeInstances": [
11269-
{
11270-
"containerName": "peer0.org1.example.com_chaincode1",
11271-
"peerAddress": "peer0.org1.example.com",
11272-
"port": 7052,
11273-
},
11274-
],
11411+
"peerChaincodeInstances": [],
1127511412
"privateData": [],
1127611413
"privateDataConfigFile": undefined,
1127711414
"version": "0.0.1",
@@ -11343,7 +11480,23 @@ exports[`extend config samples/invalid-fablo-config.json 1`] = `
1134311480
},
1134411481
],
1134511482
"peersCount": 1,
11346-
"tools": {},
11483+
"tools": {
11484+
"fabloRest": {
11485+
"address": "fablo-rest.org1.example.com",
11486+
"discoverySslTargetNameOverrides": "",
11487+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
11488+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
11489+
"fabricCaName": "ca.org1.example.com",
11490+
"fabricCaUrl": "https://ca.org1.example.com:7054",
11491+
"logging": {
11492+
"error": "console",
11493+
"info": "console",
11494+
"warn": "console",
11495+
},
11496+
"mspId": "Org1MSP",
11497+
"port": 8801,
11498+
},
11499+
},
1134711500
},
1134811501
"name": "my-channel1",
1134911502
"ordererGroup": {
@@ -11469,7 +11622,23 @@ exports[`extend config samples/invalid-fablo-config.json 1`] = `
1146911622
},
1147011623
],
1147111624
"peersCount": 1,
11472-
"tools": {},
11625+
"tools": {
11626+
"fabloRest": {
11627+
"address": "fablo-rest.org1.example.com",
11628+
"discoverySslTargetNameOverrides": "",
11629+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
11630+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
11631+
"fabricCaName": "ca.org1.example.com",
11632+
"fabricCaUrl": "https://ca.org1.example.com:7054",
11633+
"logging": {
11634+
"error": "console",
11635+
"info": "console",
11636+
"warn": "console",
11637+
},
11638+
"mspId": "Org1MSP",
11639+
"port": 8801,
11640+
},
11641+
},
1147311642
},
1147411643
],
1147511644
"profileName": "MyChannel1",
@@ -11500,7 +11669,12 @@ exports[`extend config samples/invalid-fablo-config.json 1`] = `
1150011669
"fabloConfig": "<absolute path>",
1150111670
},
1150211671
"tls": true,
11503-
"tools": {},
11672+
"tools": {
11673+
"explorer": {
11674+
"address": "explorer.example.com",
11675+
"port": 7010,
11676+
},
11677+
},
1150411678
},
1150511679
"hooks": {
1150611680
"postGenerate": "perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' "./fablo-target/fabric-config/configtx.yaml"",
@@ -11695,7 +11869,23 @@ exports[`extend config samples/invalid-fablo-config.json 1`] = `
1169511869
},
1169611870
],
1169711871
"peersCount": 1,
11698-
"tools": {},
11872+
"tools": {
11873+
"fabloRest": {
11874+
"address": "fablo-rest.org1.example.com",
11875+
"discoverySslTargetNameOverrides": "",
11876+
"discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
11877+
"discoveryUrls": "grpcs://peer0.org1.example.com:7041",
11878+
"fabricCaName": "ca.org1.example.com",
11879+
"fabricCaUrl": "https://ca.org1.example.com:7054",
11880+
"logging": {
11881+
"error": "console",
11882+
"info": "console",
11883+
"warn": "console",
11884+
},
11885+
"mspId": "Org1MSP",
11886+
"port": 8801,
11887+
},
11888+
},
1169911889
},
1170011890
],
1170111891
}

0 commit comments

Comments
 (0)