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

Commit b3016d9

Browse files
author
jenkins
committed
[GITFLOW]merging 'release-1.48.0' into 'master'
2 parents f742db4 + 4e29cd2 commit b3016d9

367 files changed

Lines changed: 9068 additions & 2250 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.

.travis.yml

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

DEVELOPMENT_ENVIRONMENT.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
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+
- Alternatively [SERVER_DEV_SETUP.md](SERVER_DEV_SETUP.md) could be used (at this time not recommended)
67

78
## Git
89
- Install [Git for your OS](https://git-scm.com/downloads)
910
- 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
1011
- 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)
1112

1213
## 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/
14+
- 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/
1415
* **Linux**: https://docs.azul.com/zulu/zuludocs/#ZuluUserGuide/PrepareZuluPlatform/AttachAPTRepositoryUbuntuOrDebianSys.htm
1516

1617
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'
18+
sudo apt-add-repository 'deb https://repos.azul.com/zulu/deb/ stable main'
1819
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).
20+
sudo apt-get install zulu11
21+
- **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).
2122

2223
## Eclipse
2324
- 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: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
* add certificates of other SORMAS instances to the local truststore
6+
7+
### Prerequisites
8+
9+
Java is needed, because the keytool is used for certificate import. <br/>
10+
See [Installing Java](SERVER_SETUP.md#java-11)
11+
12+
### Using the certificate generation script
13+
14+
1. Run ``bash ./generate-cert.sh``
15+
2. If the ``sormas2sormas`` directory is not found, you will be prompted to provide its path.
16+
3. If the ``SORMAS_PROPERTIES`` environment variable is not available, the script will search for the ``sormas.properties``
17+
file in ``/opt/domains/sormas/sormas.properties`` by default. If it is not found there, you will be prompted to provide
18+
the path to the ``sormas.properties`` file.
19+
4. For the generation of the certificate, the following data is needed: a password, a *Common Name* (CN)
20+
and an *Organization* (O). These may be set in environment variables (recommended), or provided
21+
manually as the script executes.
22+
* The password environment variable should be named ``SORMAS_S2S_CERT_PASS``. Please note that the password has to be
23+
at least 6 characters, or you will be prompted for a new one.
24+
* the *Common Name* environment variable should be named ``SORMAS_S2S_CERT_CN``.<br/>
25+
**Important**: for Germany, this value should be the SurvNet Code Site. <br/>
26+
E.g. *2.03.1.01.*
27+
* the *Organization* (O) environment variable should be named ``SORMAS_S2S_CERT_ORG``.<br/>
28+
**Important**: for Germany, this value should be the name of the Health Department (Gesundheitsamt)
29+
to which the SORMAS instance will be assigned. <br/>
30+
E.g. *GA Braunschweig*
31+
5. After providing the requested data, the certificate files will be generated. <br/>
32+
The generated certificate has a validity of 3 years.
33+
The certificate files will be available in the root SORMAS directory, in the folder ``/sormas2sormas``.
34+
6. The generated ``.p12`` file should not be shared with third parties. <br/>
35+
The generated ``.crt`` file will be verified and shared with other SORMAS instances, from which this instance
36+
will be able to request data. Conversely, in order to enable other SORMAS instances to request data from this
37+
instance, their certificate files should be obtained and added to the local truststore. More details can be found
38+
in the next section.
39+
7. The relevant properties will be automatically set by the script in the ``sormas.properties`` file.
40+
41+
### Adding a new certificate to the Truststore
42+
43+
To enable other SORMAS instances to request data from this instance, their certificate must be added to the
44+
truststore of this instance. After obtaining their certificate file, which should be a ``.crt`` file, please
45+
follow the next steps:
46+
1. Run ``bash ./import-to-truststore.sh``
47+
2. If the ``sormas2sormas`` directory is not found, you will be prompted to provide its path.
48+
3. If the ``SORMAS_PROPERTIES`` environment variable is not available, the script will search for the ``sormas.properties``
49+
file in ``/opt/domains/sormas/sormas.properties`` by default. If it is not found there, you will be prompted to provide
50+
the path to the ``sormas.properties`` file.
51+
4. If ``sormas2sormas.truststore.p12`` is not found in the folder ``/sormas2sormas``, it will be created.
52+
The truststore password may be provided in an environment variable ``SORMAS_S2S_TRUSTSTORE_PASS``.
53+
* If the aforementioned environment variable is not available, the truststore password will be searched in the
54+
``sormas.properties`` file.
55+
* If it is not found there, you will be prompted to provide the truststore password.
56+
* The relevant properties will be automatically set by the script in the ``sormas.properties`` file.
57+
5. You will be prompted to provide the file name of the certificate to be imported. This certificate should be located
58+
in the ``/sormas2sormas`` folder. Please provide the name including the extension. E.g ``mycert.crt``
59+
6. After providing the requested data, the certificate will be imported to the truststore.
60+
7. You may now delete the ``.crt`` file.

README.md

Lines changed: 2 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,7 +17,7 @@
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!

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.1</version>
5+
<version>1.48.0</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: 7 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();
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2020 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api;
17+
18+
public final class CountryHelper {
19+
20+
public static final String COUNTRY_CODE_GERMANY = "de";
21+
public static final String COUNTRY_CODE_SWITZERLAND = "ch";
22+
23+
}

0 commit comments

Comments
 (0)