aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--readme.md75
1 files changed, 28 insertions, 47 deletions
diff --git a/readme.md b/readme.md
index a33fcb3..40cba5a 100644
--- a/readme.md
+++ b/readme.md
@@ -12,24 +12,23 @@ Compilation and Runtime Requirements:
### Run Unit Tests
Command:
-```
-mvn test
-```
+
+ mvn test
### Run Integration Tests
Integration tests start with the prefix `IT`.
Run them with the following command:
-```
-mvn test -P integration-tests
-```
+
+ mvn test -P integration-tests
+
### Run All Tests
Command:
-```
-mvn test -P all-tests
-```
+
+ mvn test -P all-tests
+
Note that some integration tests (prefix `ITSSL`) rely on a TLS connection and Client Authentication.
The following guide explains how to set up TLS and Client Authentication with Apache 2.
@@ -44,38 +43,32 @@ Here's a quick guide how to set up an Apache 2 service on localhost as a SSL ter
1. Ensure that mod-proxy is installed and enabled.
1. In `default-ssl.conf` add the following lines to proxy requests from `https://localhost/zusemsg` to `http://localhost:8081`:
- ```
- ProxyRequests off
- ProxyPass /zusemsg/ http://localhost:8081/
- ProxyPassReverse /zusemsg/ http://localhost:8081/
- <Proxy *>
- Order allow,deny
- allow from all
- </Proxy>
- ```
+ ProxyRequests off
+ ProxyPass /zusemsg/ http://localhost:8081/
+ ProxyPassReverse /zusemsg/ http://localhost:8081/
+ <Proxy *>
+ Order allow,deny
+ allow from all
+ </Proxy>
1. Use certificate and key provided in this repository for the TLS connection and add the following directives to `default-ssl.conf`:
- ```
- SSLCertificateFile <path/to/repo/ssl/server>/server.localhost.cert.pem
- SSLCertificateKeyFile <path/to/repo/ssl/server>/server.localhost.key.pem
- SSLCertificateChainFile <path/to/repo/ssl/server>/ca-chain.cert.pem
- ```
+ SSLCertificateFile <path/to/repo/ssl/server>/server.localhost.cert.pem
+ SSLCertificateKeyFile <path/to/repo/ssl/server>/server.localhost.key.pem
+ SSLCertificateChainFile <path/to/repo/ssl/server>/ca-chain.cert.pem
1. Trust the client certificate with the following directive in `default-ssl-conf`:
- ```
- SSLCACertificateFile <path/to/repo/ssl>/trusted-cas-bundle.pem
- ```
+ SSLCACertificateFile <path/to/repo/ssl>/trusted-cas-bundle.pem
### Package to .war
The application can be packaged to a web application archive by running the following command:
-```
-mvn package
-```
+
+ mvn package
+
Find the war file in the `target/` folder.
@@ -94,30 +87,22 @@ See [specification.md](docs/spec.md) and [application.yaml](src/test/resources/c
1. Create a new directory that serves as the application's working directory.
- ```
- mkdir standalone
- ```
+ mkdir standalone
1. Copy the `war` file into the applications working directory.
- ```
- cp target/moa-zs.war standalone/
- ```
+ cp target/moa-zs.war standalone/
1. Copy the directory `test/main/resources/config/` into the applications working directory.
- ```
- cp src/test/resources/config standalone/ -r
- ```
+ cp src/test/resources/config standalone/ -r
If you rename this folder, the application might not find the configuration file `application.yaml`.
Consult [Spring Doc: External Configuration](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-application-property-files) for further details and alternative ways to configure the application.
1. Start application.
- ```
- (cd standalone && java -jar moa-zs.war)
- ```
+ (cd standalone && java -jar moa-zs.war)
1. The app2mzs service is reachable under <http://localhost:$SERVER_PORT/services/mzs>.
The zuse2app service is reachable under <http://localhost:$SERVER_PORT/services/msg>.
@@ -126,15 +111,11 @@ See [specification.md](docs/spec.md) and [application.yaml](src/test/resources/c
1. Copy the application package `moa-zs.war` to Tomcat's `webapps` directory.
- ```
- cp target/moa-zs.war $CATALINA_BASE/webapps/
- ```
+ cp target/moa-zs.war $CATALINA_BASE/webapps/
1. Create a copy of the directory `test/main/resources/config/` (`$MZS_CONFIG` being the path to the configuration folder)
- ```
- cp test/main/resources/config/ $MZS_CONFIG
- ```
+ cp test/main/resources/config/ $MZS_CONFIG
1. Ensure that the spring-boot application finds `$MZS_CONFIG/application.yaml`.
Option a) Add the folder `$MZS_CONFIG` to the class path of the web application, e.g. by specifying the `common.loader` property (see [Tomcat's Class Loader How-To](https://tomcat.apache.org/tomcat-9.0-doc/class-loader-howto.html)).