-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.uconn.edu/map17018/SDP--PKI-Cyb…
- Loading branch information
Showing
16 changed files
with
99 additions
and
13 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#/bin/bash | ||
|
||
go run . gossiper \ | ||
testData/gossiperConfigs/gossiper_pub_config.json \ | ||
testData/gossiperConfigs/$1/gossiper_priv_config.json \ | ||
testData/gossiperConfigs/$1/gossiperCrypto.json | ||
testData/gossiperNetworkTest/gossiper_pub_config.json \ | ||
testData/gossiperNetworkTest/$1/gossiper_priv_config.json \ | ||
testData/gossiperNetworkTest/$1/gossiperCrypto.json |
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,6 @@ | ||
#/bin/bash | ||
|
||
go run . monitor \ | ||
testData/monitorNetworkTest/gossiper_pub_config.json \ | ||
testData/monitorNetworkTest/$1/gossiper_priv_config.json \ | ||
testData/gossiperNetworkTest/$1/gossiperCrypto.json |
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 @@ | ||
package fakeCA |
4 changes: 2 additions & 2 deletions
4
CTng/testData/gossiperNetworkTest/1/gossiper_priv_config.json
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"Crypto_config_path": "testData/gossiperConfigs/1/gossiperCrypto.json", | ||
"Crypto_config_path": "testData/gossiperNetworkTest/1/gossiperCrypto.json", | ||
"Connected_Gossipers": ["localhost:8081", "localhost:8082"], | ||
"Owner_URL": "localhost:8079", | ||
"Owner_URL": "localhost:8180", | ||
"Port": "8080" | ||
} |
4 changes: 2 additions & 2 deletions
4
CTng/testData/gossiperNetworkTest/2/gossiper_priv_config.json
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"Crypto_config_path": "testData/gossiperConfigs/2/gossiperCrypto.json", | ||
"Crypto_config_path": "testData/gossiperNetworkTest/2/gossiperCrypto.json", | ||
"Connected_Gossipers": ["localhost:8082", "localhost:8083"], | ||
"Owner_URL": "localhost:8079", | ||
"Owner_URL": "localhost:8181", | ||
"Port": "8081" | ||
} |
4 changes: 2 additions & 2 deletions
4
CTng/testData/gossiperNetworkTest/3/gossiper_priv_config.json
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"Crypto_config_path": "testData/gossiperConfigs/3/gossiperCrypto.json", | ||
"Crypto_config_path": "testData/gossiperNetworkTest/3/gossiperCrypto.json", | ||
"Connected_Gossipers": ["localhost:8083", "localhost:8080"], | ||
"Owner_URL": "localhost:8079", | ||
"Owner_URL": "localhost:8182", | ||
"Port": "8082" | ||
} |
4 changes: 2 additions & 2 deletions
4
CTng/testData/gossiperNetworkTest/4/gossiper_priv_config.json
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"Crypto_config_path": "testData/gossiperConfigs/4/gossiperCrypto.json", | ||
"Crypto_config_path": "testData/gossiperNetworkTest/4/gossiperCrypto.json", | ||
"Connected_Gossipers": ["localhost:8080", "localhost:8081"], | ||
"Owner_URL": "localhost:8079", | ||
"Owner_URL": "localhost:8183", | ||
"Port": "8083" | ||
} |
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,24 @@ | ||
# Gossiper Network Test | ||
|
||
These folders specify a test network of four gossipers. | ||
|
||
|
||
### Connections | ||
Gossiper Connections are as follows: | ||
* 1 - 2,3 | ||
* 2 - 3,4 | ||
* 3 - 4,1 | ||
* 4 - 1,2 | ||
|
||
Each Gossiper connects to the corresponding monitor number in | ||
monitorNetworkTest: | ||
* 1-1 | ||
* 2-2 | ||
* 3-3 | ||
* 4-4 | ||
|
||
These servers are intended to provide a local test of all running components. The gossiper network can also be tested without monitors, although data must be sent manually + appropriately utilizing `client_test.go` to push data into gossiper 3. | ||
|
||
|
||
### Running a gossiper | ||
To run a gossiper, go to the root of this project and run `sh ./gossiperTest N` where N is the number of the gossiper you want to run. This runs ctng.go with the parameters from these test files. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"Crypto_config_path": "testData/monitorNetworkTest/1/monitorCrypto.json", | ||
"CA_URLs": ["192.168.1.1", "1.1.1.1", "255.255.255.255"], | ||
"Logger_URLs": ["192.168.1.1", "1.1.1.1", "255.255.255.255"], | ||
"Gossiper_URL": "localhost:8080", | ||
"Port": "8180" | ||
} |
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,7 @@ | ||
{ | ||
"Crypto_config_path": "testData/monitorNetworkTest/2/monitorCrypto.json", | ||
"CA_URLs": ["localhost:9101", "localhost:9102"], | ||
"Logger_URLs": ["localhost:9001", "localhost:9002"], | ||
"Gossiper_URL": "localhost:8081", | ||
"Port": "8181" | ||
} |
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,7 @@ | ||
{ | ||
"Crypto_config_path": "testData/monitorNetworkTest/3/monitorCrypto.json", | ||
"CA_URLs": ["localhost:9102", "localhost:9103"], | ||
"Logger_URLs": ["localhost:9002", "localhost:9003"], | ||
"Gossiper_URL": "localhost:8082", | ||
"Port": "8182" | ||
} |
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,7 @@ | ||
{ | ||
"Crypto_config_path": "testData/monitorNetworkTest/4/monitorCrypto.json", | ||
"CA_URLs": ["localhost:9100", "localhost:9101"], | ||
"Logger_URLs": ["localhost:9001"], | ||
"Gossiper_URL": "localhost:8083", | ||
"Port": "8183" | ||
} |
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,15 @@ | ||
# Monitor Network Configuration | ||
|
||
Each monitor number is connected to its corresponding gossiper number | ||
|
||
Monitors are responsible for the "FakeCAs" and "FakeLoggers" (see those folders for info) as follows: | ||
|
||
* 1 - logger1,logger2,CA1 | ||
* 2 - logger2, logger3, CA2 | ||
* 3 - logger1, logger3, CA1, CA3 | ||
* 4 - logger2, CA2, CA3 | ||
|
||
### Running a monitor | ||
Go to the root of this project and run `sh ./monitorTest.sh N` where N is the number of the monitor you want to run. This runs ctng.go with the parameters from these test files. | ||
|
||
Then, in a seperate window, run `sh ./monitorTest.sh N` with the same N to launch the corresponding Monitor. |
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,8 @@ | ||
{ | ||
"All_CA_URLs": ["localhost:9100", "localhost:9101", "localhost:9102"], | ||
"All_Logger_URLs": ["localhost:9000", "localhost:9001", "localhost:9002"], | ||
"Gossip_wait_time": 3, | ||
"MMD": 15, | ||
"MRD": 15, | ||
"Http_vers": ["2","1","3"] | ||
} |