Highly Dependable Systems Project - HDS Notary
You must have the following tools:
- GNU/Linux
- Java Development Kit 8 (JDK 8) 164+
- Maven 3.x.x
- Middleware PT-CC [Optional]
- Smart Card reader [Optional]
Also check if JAVA_HOME and M2_HOME are set properly.
The library of the Portuguese Citizen Card is not in the maven repository, to install it in your local maven repository, run the following command in /hds-notary
mvn install:install-file -Dfile=server/src/main/resources/jar/pteidlibj.jar -DgroupId=pt.ulisboa.tecnico.sec -DartifactId=pteidlibj -Dversion=1.0 -Dpackaging=jar
To enable the library of the Portuguese Citizen Card, you need to set the path library, to do so, run the following command:
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
To compile just run the command in the directory /hds-notary/:
mvn clean install
Note: Is essential the presence of the flag -DskipTests, otherwise the tests will certainly fail as the class loaders don't yet exist at this point.
Tu run the server run the following command under /hds-notary/client:
mvn exec:java -Dexec.args="<arguments>"
The <arguments> can be filled with the following arguments:
usage: HDS-Server [-help] [-noCC] -sid <id>
-help Prints this message
-noCC,--noCitizenCard Disables signature using the
Portuguese Citizen Card
-np,--notary-password <password> The Notary's private key password in
case Citizen Card is disabled. It is
required in that case.
-p,--server-password <password> The server's private key password.
-sid,--server-id <id> The server's identifier.
Tu run the client run the following command under /hds-notary/client:
mvn exec:java@<type> -Dexec.args="<arguments>"
The <arguments> can be filled with the following arguments:
usage: HDS-Client [-help] [-p <password>] [-u <username>]
-help Prints this message
-p,--password <password> The password of the user to login.
-u,--username <username> The name of the user to login.
The <type> can be filled with the following:
good Correct user
evil Byzantine user
To run tests, you need first to compile as explained in the previous section, and setup 4 servers and 3 clients (Alice, Bob, Charlie).
Start the server in folder /server/:
mvn exec:java -Dexec.args="-noCC -np admin -p admin -sid 0"
Start the server in folder /server/:
mvn exec:java -Dexec.args="-noCC -np admin -p admin -sid 1"
Start the server in folder /server/:
mvn exec:java -Dexec.args="-noCC -np admin -p admin -sid 2"
Start the server in folder /server/:
mvn exec:java -Dexec.args="-noCC -np admin -p admin -sid 3"
Start the client Alice:
mvn exec:java@good -Dexec.args="-u alice -p Uvv1j7a60q2q0a4"
Start the client Bob:
mvn exec:java@good -Dexec.args="-u bob -p JNTpC0SE9Hzb3SG"
Start the client Bob:
mvn exec:java@evil -Dexec.args="-u charlie -p 9QrKUNt9HAXPKG9"
Use the Alice and Bob clients to execute actions and trade goods between them.
Terminate one of the servers silently. Use the Alice and Bob clients to execute actions.
Start the server terminated. Use Charlie to execute actions.
Terminate one of the servers silently. Use Charlie to execute actions.
User | Password |
---|---|
alice | Uvv1j7a60q2q0a4 |
bob | JNTpC0SE9Hzb3SG |
charlie | 9QrKUNt9HAXPKG9 |
server | admin |