Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 566a8a3

Browse files
authored
Merge branch 'development' into feature/mvn-wrapper
2 parents 2cbcb7a + 9d47c76 commit 566a8a3

424 files changed

Lines changed: 13065 additions & 3213 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ bin
2626

2727
# Exclude maven wrapper
2828
!/.mvn/wrapper/maven-wrapper.jar
29+
30+
/sormas-cargoserver/.env
31+
/sormas-cargoserver/custom.env
32+
/sormas-cargoserver/custom.properties

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
language: java
22
jdk:
3-
- openjdk8
4-
before_install: cd sormas-base
5-
install: mvn test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
3+
- openjdk8 # FIXME remove after transition period (#2617)
4+
- openjdk11
5+
before_install:
6+
- cd sormas-base
7+
install: skip
8+
script:
9+
- mvn install -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

DEVELOPMENT_ENVIRONMENT.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@
22
# SORMAS Development Environment
33

44
## Server
5-
- Install [your local server](SERVER_SETUP.md) or [a more dev specific one](SERVER_DEV_SETUP.md) (Docker is needed to run Postgresql image)
5+
- Install [your local server](SERVER_SETUP.md)
6+
- Or install your local development server using [maven cargo](sormas-cargoserver/README.md)
7+
- Alternatively [SERVER_DEV_SETUP.md](SERVER_DEV_SETUP.md) could be used (at this time not recommended)
68

79
## Git
810
- Install [Git for your OS](https://git-scm.com/downloads)
911
- Recommended: Install a Git client such as [TortoiseGit](https://tortoisegit.org/) if you don't want to handle version control from the command line or separately for the Eclipse and Android Studio projects
1012
- Open the Git Bash and execute the command <code>git config --global branch.development.rebase true</code> (which ensures that rebase is used when pulling rather than merge)
1113

1214
## Java
13-
- Download and install the Java 8 **JDK** (not JRE) for your operating system. We suggest to use Zulu OpenJDK: https://www.azul.com/downloads/zulu/
15+
- Download and install the Java 11 **JDK** (not JRE) for your operating system. We suggest to use Zulu OpenJDK: https://www.azul.com/downloads/zulu/
1416
* **Linux**: https://docs.azul.com/zulu/zuludocs/#ZuluUserGuide/PrepareZuluPlatform/AttachAPTRepositoryUbuntuOrDebianSys.htm
1517

1618
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
17-
sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
19+
sudo apt-add-repository 'deb https://repos.azul.com/zulu/deb/ stable main'
1820
sudo apt-get update
19-
sudo apt-get install zulu-8
20-
- **Windows**: For testing and development environments we suggest to download and run the installer of the Java 8 **JDK** for 32 or 64 bit client systems (depending on your system).
21+
sudo apt-get install zulu11
22+
- **Windows**: For testing and development environments we suggest to download and run the installer of the Java 11 **JDK** for 32 or 64 bit client systems (depending on your system).
2123

2224
## Eclipse
2325
- Install the latest Eclipse version

GUIDE_CREATE_CERTIFICATE.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

GUIDE_SORMAS2SORMAS_CERTIFICATE.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# How to create and add certificates?
2+
3+
This guide explains how to:
4+
* create a new self-signed certificate, used for SORMAS to SORMAS communication
5+
* set up the server address list file
6+
* add certificates of other SORMAS instances to the local truststore
7+
* add other servers to the local server list
8+
9+
### Prerequisites
10+
11+
Java is needed, because the keytool is used for certificate import. <br/>
12+
See [Installing Java](SERVER_SETUP.md#java-11)
13+
14+
### Using the certificate generation script
15+
16+
1. Run ``bash ./generate-cert.sh``
17+
2. If the ``sormas2sormas`` directory is not found, you will be prompted to provide its path.
18+
3. If the ``SORMAS_PROPERTIES`` environment variable is not available, the script will search for the ``sormas.properties``
19+
file in ``/opt/domains/sormas/sormas.properties`` by default. If it is not found there, you will be prompted to provide
20+
the path to the ``sormas.properties`` file.
21+
4. For the generation of the certificate, the following data is needed: a password, a *Common Name* (CN)
22+
and an *Organization* (O). These may be set in environment variables (recommended), or provided
23+
manually as the script executes.
24+
* The password environment variable should be named ``SORMAS_S2S_CERT_PASS``. Please note that the password has to be
25+
at least 6 characters, or you will be prompted for a new one.
26+
* the *Common Name* environment variable should be named ``SORMAS_S2S_CERT_CN``.<br/>
27+
**Important**: for Germany, this value should be the SurvNet Code Site. <br/>
28+
E.g. *2.03.1.01.*
29+
* the *Organization* (O) environment variable should be named ``SORMAS_S2S_CERT_ORG``.<br/>
30+
**Important**: for Germany, this value should be the name of the Health Department (Gesundheitsamt)
31+
to which the SORMAS instance will be assigned. <br/>
32+
E.g. *GA Braunschweig*
33+
5. After providing the requested data, the certificate files will be generated. <br/>
34+
The generated certificate has a validity of 3 years.
35+
The certificate files will be available in the root SORMAS directory, in the folder ``/sormas2sormas``.
36+
6. A CSV file containing the access data for this instance will also be generated in the folder ``/sormas2sormas``.
37+
It will be named ``server-access-data.csv``.
38+
The file will contain on the first two columns of the first row the Common Name and the Organization, as provided
39+
when creating the certificate. <br/>
40+
**Please fill in on the third column the full URL of the server.** <br/>
41+
You will also have to set up a user for communicating with other SORMAS instances.
42+
7. The generated ``.p12`` file should not be shared with third parties. <br/>
43+
The generated ``.crt`` file will be verified and shared with other SORMAS instances, from which this instance
44+
will be able to request data. Conversely, in order to enable other SORMAS instances to request data from this
45+
instance, their certificate files should be obtained and added to the local truststore. The ``server-access-data.csv``
46+
file will also have to be shared so that the access data of this instance is known to other instances.
47+
More details can be found in the next section.
48+
8. The relevant properties will be automatically set by the script in the ``sormas.properties`` file.
49+
50+
### Adding a new certificate to the Truststore
51+
52+
To enable other SORMAS instances to send and receive data from this instance, their certificate must be added to the
53+
truststore of this instance. Furthermore, the access data of other instances must be added to the local server
54+
list. To complete this setup, please follow the next steps:
55+
1. Run ``bash ./import-to-truststore.sh``
56+
2. If the ``sormas2sormas`` directory is not found, you will be prompted to provide its path.
57+
3. If the ``SORMAS_PROPERTIES`` environment variable is not available, the script will search for the ``sormas.properties``
58+
file in ``/opt/domains/sormas/sormas.properties`` by default. If it is not found there, you will be prompted to provide
59+
the path to the ``sormas.properties`` file.
60+
4. If ``sormas2sormas.truststore.p12`` is not found in the folder ``/sormas2sormas``, it will be created.
61+
The truststore password may be provided in an environment variable ``SORMAS_S2S_TRUSTSTORE_PASS``.
62+
* If the aforementioned environment variable is not available, the truststore password will be searched in the
63+
``sormas.properties`` file.
64+
* If it is not found there, you will be prompted to provide the truststore password.
65+
* The relevant properties will be automatically set by the script in the ``sormas.properties`` file.
66+
5. If the server address list file ``server-list.csv`` is not found in the folder ``/sormas2sormas``, it will also be created.
67+
6. You will be prompted to provide the file name of the certificate to be imported. This certificate should be located
68+
in the ``/sormas2sormas`` folder. Please provide the name including the extension. E.g ``mycert.crt``
69+
7. After providing the requested data, the certificate will be imported to the truststore.
70+
8. You should have also received a CSV file with the server access data. From this file, copy the line corresponding to the
71+
instance you would like to communicate with and add it to the local server address list file. This file is named
72+
``server-list.csv`` and is located in the ``/sormas2sormas`` folder. <br/>
73+
*Note*: You may check that the Common Name and the Organization of the certificate match the ones corresponding to
74+
the server in the CSV file.
75+
9. You may now delete the ``.crt`` file.

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/>
88
</a>
99
<br/>
10-
<a href="https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/LICENSE"><img alt="License" src="https://img.shields.io/badge/license-GPL%20v3-blue"/></a> <a href="https://github.com/hzi-braunschweig/SORMAS-Project/releases/latest"><img alt="Latest Release" src="https://img.shields.io/github/v/release/hzi-braunschweig/SORMAS-Project"/></a> <img alt="Development Build Status" src="https://travis-ci.com/hzi-braunschweig/SORMAS-Project.svg?branch=development"/>
10+
<a href="https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/LICENSE"><img alt="License" src="https://img.shields.io/badge/license-GPL%20v3-blue"/></a> <a href="https://github.com/hzi-braunschweig/SORMAS-Project/releases/latest"><img alt="Latest Release" src="https://img.shields.io/github/v/release/hzi-braunschweig/SORMAS-Project"/></a> <img alt="Development Build Status" src="https://travis-ci.com/hzi-braunschweig/SORMAS-Project.svg?branch=development"/> <a href="https://gitter.im/SORMAS-Project"><img alt="Gitter" src="https://badges.gitter.im/SORMAS-Project/dev-support.svg"/></a>
1111
</p>
1212
<br/>
1313

@@ -17,14 +17,17 @@
1717
You can give SORMAS a try on our play server at https://sormas.helmholtz-hzi.de!
1818

1919
#### How Can I Get Involved?
20-
Have a look at our [*Contributing Readme*](CONTRIBUTING.md) and contact us at [email protected] to learn how you can help to drive the development of SORMAS forward. SORMAS is a community-driven project, and we'd love to have you on board!
20+
Have a look at our [*Contributing Readme*](CONTRIBUTING.md) and contact us at [email protected] or join our [developer chat on Gitter](https://gitter.im/SORMAS-Project) to learn how you can help to drive the development of SORMAS forward and to get development support from our core developers. SORMAS is a community-driven project, and we'd love to have you on board!
2121

2222
#### How Can I Report a Bug or Request a Feature?
2323
Please [create a new issue](https://github.com/hzi-braunschweig/SORMAS-Project/issues/new/choose) and read the [*Submitting an Issue*](CONTRIBUTING.md#submitting-an-issue) guide for more detailed instructions. We appreciate your help!
2424

2525
#### Which Browsers and Android Versions Are Supported?
2626
SORMAS officially supports and is tested on **Chromium-based browsers** (like Google Chrome) and **Mozilla Firefox**, and all Android versions starting from **Android 7.0** (Nougat). In principle, SORMAS should be usable with all web browsers that are supported by Vaadin 8 (Chrome, Firefox, Safari, Edge, Internet Explorer 11; see https://vaadin.com/faq).
2727

28+
#### Is there a ReST API documentation?
29+
Yes! Please download the [latest release](https://github.com/hzi-braunschweig/SORMAS-Project/releases/latest) and copy the content of /deploy/openapi/sormas-rest.yaml to an editor that generates a visual API documentation (e.g. https://editor.swagger.io/).
30+
2831
<p align="center"><img src="https://user-images.githubusercontent.com/23701005/74659600-ebb8fc00-5194-11ea-836b-a7ca9d682301.png"/></p>
2932

3033
## Project Structure
@@ -37,6 +40,8 @@ The project consists of the following modules:
3740
- **sormas-ear:** The ear needed to build the application
3841
- **sormas-rest:** The REST interface; see [`sormas-rest/README.md`](sormas-rest/README.md)
3942
- **sormas-ui:** The web application
43+
- **sormas-base/dependencies:** dependencies to be deployed with the payara server
44+
- **sormas-cargoserver:** setup for a local dev server using maven-cargo
4045

4146
## Server Management
4247

SERVER_DEV_SETUP.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
## Content
77
* [Prerequisites](#prerequisites)
8-
* [Java 8](#java-8)
8+
* [Java 11](#java-11)
99
* [ant](#ant)
1010
* [Postgres Database](#postgres-database)
1111
* [SORMAS Server](#sormas-server)
@@ -15,9 +15,11 @@
1515

1616
## Prerequisites
1717

18-
### Java 8
18+
### Java 11
19+
See [Installing Java](SERVER_SETUP.md#java-11)
1920

20-
See [Installing Java](SERVER_SETUP.md#java-8)
21+
SORMAS just recently moved to Java 11. We still need to support Java 8 for a transition period. Therefore, please just
22+
use Java 8 language features for now.
2123

2224
### Ant
2325

SERVER_SETUP.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
* **Linux**: https://docs.azul.com/zulu/zuludocs/#ZuluUserGuide/PrepareZuluPlatform/AttachAPTRepositoryUbuntuOrDebianSys.htm
2828

2929
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
30-
sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
30+
sudo apt-add-repository 'deb https://repos.azul.com/zulu/deb/ stable main'
3131
sudo apt-get update
32-
sudo apt-get install zulu-11
32+
sudo apt-get install zulu11
3333
* **Windows**: For testing and development environments we suggest to download and run the installer of the Java 11 **JDK** for 32 or 64 bit client systems (depending on your system).
3434
* You can check your Java version from the shell/command line using: ``java -version``
3535

@@ -239,7 +239,7 @@ This can be conveniently accomplished by executing the R setup script from the S
239239
## SORMAS to SORMAS Certificate Setup
240240

241241
To be able to communicate with other SORMAS instances, there are some additional steps which need to be taken, in order to set
242-
up the certificate and the truststore. Please see the [related guide](GUIDE_CREATE_CERTIFICATE.md) for detailed instructions regarding
242+
up the certificate and the truststore. Please see the [related guide](GUIDE_SORMAS2SORMAS_CERTIFICATE.md) for detailed instructions regarding
243243
SORMAS to SORMAS setup.
244244
<br/>
245245

sormas-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>de.symeda.sormas</groupId>
44
<artifactId>sormas-base</artifactId>
5-
<version>1.47.0-SNAPSHOT</version>
5+
<version>1.49.0-SNAPSHOT</version>
66
<relativePath>../sormas-base</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

sormas-api/src/main/java/de/symeda/sormas/api/ConfigFacade.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,18 @@
1717
*******************************************************************************/
1818
package de.symeda.sormas.api;
1919

20-
import javax.ejb.Remote;
21-
2220
import de.symeda.sormas.api.region.GeoLatLon;
2321

22+
import javax.ejb.Remote;
23+
2424
@Remote
2525
public interface ConfigFacade {
2626

2727
String getCountryName();
2828

2929
String getCountryLocale();
3030

31-
boolean isGermanServer();
32-
33-
boolean isSwissServer();
31+
boolean isConfiguredCountry(String countryCode);
3432

3533
String getEpidPrefix();
3634

@@ -70,6 +68,10 @@ public interface ConfigFacade {
7068

7169
String getCustomBrandingLogoPath();
7270

71+
boolean isUseLoginSidebar();
72+
73+
String getLoginBackgroundPath();
74+
7375
String getSormasInstanceName();
7476

7577
double getNameSimilarityThreshold();
@@ -95,4 +97,6 @@ public interface ConfigFacade {
9597
String getSymptomJournalSecret();
9698

9799
void validateExternalUrls();
100+
101+
Sormas2SormasConfig getSormas2SormasConfig();
98102
}

0 commit comments

Comments
 (0)