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

Commit 77346cb

Browse files
author
jenkins
committed
[GITFLOW]merging 'release-1.54.0' into 'master'
2 parents de69fa5 + 0e29048 commit 77346cb

715 files changed

Lines changed: 18287 additions & 5382 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.

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
Please read adhere to the following guidelines when submitting new issues. This allows us to process your request as quickly as possible. Make sure to always use the templates that are automatically provided when creating an issue.
1212

13+
If you want to report a **security issue**, please follow our guideline for [*Responsible Disclosure*](SECURITY.md).
14+
1315
**Important:** Whenever creating a new issue, **please search the repository for similar issues first** to avoid duplicates. You can do this manually or by using the search functionality in the header and limiting your results to the SORMAS repository.
1416

1517
* [Bug Report](#bug-report)

README.md

Lines changed: 4 additions & 3 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://github.com/hzi-braunschweig/SORMAS-Project/workflows/Java%20CI%20with%20Maven/badge.svg?branch=development"/> <a href="https://gitter.im/SORMAS-Project"><img alt="Gitter" src="https://badges.gitter.im/SORMAS-Project/dev-support.svg"/></a>
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://github.com/hzi-braunschweig/SORMAS-Project/workflows/Java%20CI%20with%20Maven/badge.svg?branch=development"/> <a href="https://gitter.im/SORMAS-Project"><img alt="Gitter" src="https://badges.gitter.im/SORMAS-Project/dev-support.svg"/></a> <a href="https://twitter.com/SORMASDev"><img alt="Twitter" src="https://img.shields.io/twitter/follow/SORMASDev?label=%40SORMASDev&style=social"/></a>
1111
</p>
1212
<br/>
1313

@@ -17,10 +17,11 @@
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-
Read through 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! If you want to contribute to the code, please strictly adhere to the [*Development Environment*](DEVELOPMENT_ENVIRONMENT.md) guide to ensure that everything is set up correctly. Please also make sure that you've read the [*Development Contributing Guidelines*](CONTRIBUTING.md#development-contributing-guidelines) before you start to develop.
20+
Read through 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! If you want to contribute to the code, please strictly adhere to the [*Development Environment*](DEVELOPMENT_ENVIRONMENT.md) guide to ensure that everything is set up correctly. Please also make sure that you've read the [*Development Contributing Guidelines*](CONTRIBUTING.md#development-contributing-guidelines) before you start to develop, and either follow or regularly check our Twitter account <a href="https://twitter.com/SORMASDev" target="_blank">@SORMASDev</a> to stay up to date with our schedule, new releases, guideline changes and other announcements.
2121

2222
#### How Can I Report a Bug or Request a Feature?
23-
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!
23+
If you want to report a **security issue**, please follow our guideline for [*Responsible Disclosure*](SECURITY.md).
24+
For bugs without security implications, change and feature requests, 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!
2425

2526
#### Which Browsers and Android Versions Are Supported?
2627
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).

SECURITY.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Security Policies and Procedures
2+
3+
This document outlines security procedures and general policies for the SORMAS
4+
project.
5+
6+
* [Reporting a Security Bug](#reporting-a-security-bug)
7+
* [Disclosure Policy](#disclosure-policy)
8+
* [Comments on this Policy](#comments-on-this-policy)
9+
10+
If you want to report a bug which is not security sensible, please [submit an issue](https://github.com/hzi-braunschweig/SORMAS-Project/blob/development/CONTRIBUTING.md#submitting-an-issue).
11+
12+
## Reporting a Security Bug
13+
14+
Our team and community take all security bugs in SORMAS seriously.
15+
Thank you for improving the security of SORMAS. We appreciate your efforts and
16+
responsible disclosure and will make every effort to acknowledge your
17+
contributions.
18+
Unfortunately, SORMAS does not offer a paid bug bounty programme or other forms of compensation.
19+
20+
Report security bugs by emailing at **[email protected]**.
21+
22+
We will acknowledge your email and follow up with a response within 10 business days, or explain why a reply may take longer. The response will indicate the next steps in handling your report.
23+
After the initial reply to your report, the security team will endeavor to keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
24+
25+
Report security bugs in third-party modules to the person or team maintaining
26+
the module.
27+
28+
29+
## Disclosure Policy
30+
31+
When the security team receives a security bug report, they will assign it to a
32+
primary handler. This person will coordinate the fix and release process,
33+
involving the following steps:
34+
35+
* Confirm the problem and determine the affected versions.
36+
* Audit code to find any potential similar problems.
37+
* Prepare fixes for all releases still under maintenance. These fixes will be
38+
released as fast as possible.
39+
40+
## Comments on this Policy
41+
42+
If you have suggestions on how this process could be improved please submit a
43+
pull request.
44+

SERVER_CUSTOMIZATION.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,18 @@ The following properties are currently configurable:
3030
* **Archiving thresholds** `daysAfterCaseGetsArchived` and `daysAfterEventGetsArchived`: The number of days without any changes after which cases/events are automatically archived (i.e. they will no longer be displayed in the normal directories, but still count towards statistics or counts on the dashboard and can still be viewed by users with the respective user right). If set to 0, automatic archiving is disabled.
3131
* **Rscript executable** `rscript.executable`: The location of the Rscript executable. If you've installed Rscript on your server and specify the path here (the default should work for Linux systems as long as you've used the default install path), network diagrams for transmission chains will be shown in the web app.
3232
* **Symptom journal interface**: Properties used to connect to an external symptom journal service. `interface.symptomjournal.url` is the URL to the website that SORMAS should connect to; `interface.symptomjournal.authurl` is the URL used to authenticate SORMAS at the external service; `interface.symptomjournal.clientid` and `interface.symptomjournal.secret` are the credentials used for the authentication process. A default user can be created automatically at startup by using `interface.symptomjournal.defaultuser.username` and `interface.symptomjournal.defaultuser.password`. This user can be used by the Symptom Journal system to connect to SORMAS.
33-
* **Patient diary interface** Properties used to connect to an external patient diary service. `interface.patientdiary.url` is the URL to the website that SORMAS should connect to; `interface.patientdiary.externaldataurl` is the URL to the website that SORMAS can send notifications; `interface.patientdiary.authurl` is the URL trough which SORMAS can obtain an authorization to the external patient diary; `interface.patientdiary.email` and `interface.patientdiary.password` are the credentials used by SORMAS to authenticate in the external patient diary; A default user can be created automatically at startup by using `interface.patientdiary.defaultuser.username` and `interface.patientdiary.defaultuser.password`. This user can be used by the Patient Diary system to connect to SORMAS.
33+
* **Patient diary interface** Properties used to connect to an external patient diary service. `interface.patientdiary.url` is the URL to the website that SORMAS should connect to; `interface.patientdiary.probandsurl` is the URL to the website that SORMAS can send notifications; `interface.patientdiary.authurl` is the URL trough which SORMAS can obtain an authorization to the external patient diary; `interface.patientdiary.email` and `interface.patientdiary.password` are the credentials used by SORMAS to authenticate in the external patient diary; A default user can be created automatically at startup by using `interface.patientdiary.defaultuser.username` and `interface.patientdiary.defaultuser.password`. This user can be used by the Patient Diary system to connect to SORMAS.
3434
* **Custom branding**: Properties used to apply a custom branding to SORMAS that overrides its name and default logo. Using these properties also alters the sidebar and adds another customizable area to it. If you want to use this feature, set `custombranding` to true. `custombranding.name` is the name that you want to use, `custombranding.logo.path` is the path to the logo that should be used.
3535
* **Geocoding** Properties used to integrate an external geocoding service for obtaining the geo coordinates of addresses.
36-
*geocodingServiceUrlTemplate* is the url for searching for address details, *${street}*, *${houseNumber}*, *${postalCode}*, and *${city}* placeholders will be replaced with the actual address fields when searching;
37-
*geocodingLongitudeJsonPath* and *geocodingLatitudeJsonPath* are used to obtain the longitude and latitude of the address in the result of the geocoding service request
36+
* `geocodingServiceUrlTemplate` is the url for searching for address details, `${street}`, `${houseNumber}`, `${postalCode}`, and `${city}` placeholders will be replaced with the actual address fields when searching;
37+
* `geocodingLongitudeJsonPath` and `geocodingLatitudeJsonPath` are used to obtain the longitude and latitude of the address in the result of the geocoding service request
38+
* **Authentication Provider**: Allows the user to choose the way of authentication for SORMAS and all it's third party clients. Supported values `SORMAS` (default) and `KEYCLOAK`
39+
40+
### Custom login page
41+
When setting up the server a custom file directory is created (most likely `/opt/sormas/custom`). You can adjust the `login*.html` files in that directory to customize the login page.
42+
43+
### Custom download files in about section
44+
You can create a sub-folder `aboutfiles` in the custom directory mentioned above (e.g. `/opt/sormas/custom/aboutfiles`). Any file in that directory will be made available in the about section of the frontend.
3845

3946
## Importing Infrastructure Data
4047
When you start a SORMAS server for the first time, some default infrastructure data is generated to ensure that the server is usable and the default users can be created. It is recommended (and, unless you're working on a demo server, necessary) to archive this default data and import the official infrastructure data of the country or part of the country that you intend to use SORMAS in instead.

SERVER_SETUP.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575

7676
## Keycloak Server
7777

78-
By default Keycloak is run as a Docker container, which can be set up in two ways:
79-
* As a Docker container
80-
* As a Standalone installation
78+
Keycloak can be set up in two ways:
79+
* as a Docker container (for just using Keycloak approach)
80+
* as a Standalone installation (for doing development in Keycloak like themes, SPIs)
8181

8282
### Keycloak as a Docker container
8383
*To be done only in the situation when SORMAS is already installed on the machine as a standalone installation.*
@@ -88,7 +88,7 @@ By default Keycloak is run as a Docker container, which can be set up in two way
8888
* SORMAS Server is installed
8989
* PostgreSQL is installed
9090
* Docker is installed
91-
* Open and edit [keycloak-setup.sh](sormas-base/setup/keycloak/keycloak-setup.sh) with your system's actual values
91+
* Open and edit [keycloak-setup.sh](sormas-base/setup/keycloak/keycloak-setup.sh) with your system's actual values *(on Windows use Git Bash)*.
9292

9393
**Setup**
9494
* Run [keycloak-setup.sh](sormas-base/setup/keycloak/keycloak-setup.sh)
@@ -105,8 +105,10 @@ By default Keycloak is run as a Docker container, which can be set up in two way
105105

106106
Setting Keycloak up as a standalone installation [Server Installation and Configuration Guide](https://www.keycloak.org/docs/11.0/server_installation/#installation)
107107
* Make sure to configure Keycloak with PostgreSQL Database [Relational Database Setup](https://www.keycloak.org/docs/11.0/server_installation/#_database)
108-
* Setup an Admin User
108+
* Set up an Admin User
109109
* Copy the `themes` folder content to `${KEYCLOAK_HOME}/themes` [Deploying Themes](https://www.keycloak.org/docs/11.0/server_development/#deploying-themes)
110+
* Deploy the `sormas-keycloak-service-provider` [Using Keycloak Deployer](https://www.keycloak.org/docs/11.0/server_development/#using-the-keycloak-deployer)
111+
* Update the [SORMAS.json](sormas-base/setup/keycloak/SORMAS.json) file by replacing the following placeholders: `${SORMAS_SERVER_URL}`, `${KEYCLOAK_SORMAS_UI_SECRET}`, `${KEYCLOAK_SORMAS_BACKEND_SECRET}`, `${KEYCLOAK_SORMAS_REST_SECRET}`
110112
* Create the SORMAS Realm by importing [SORMAS.json](sormas-base/setup/keycloak/SORMAS.json) see [Create a New Realm](https://www.keycloak.org/docs/11.0/server_admin/#_create-realm)
111113
* Update the `sormas-*` clients by generating new secrets for them
112114
* Update the realm's email settings to allow sending emails to users
@@ -124,11 +126,24 @@ where:
124126
* `${ASADMIN}` - represents the location to `${PAYARA_HOME}\bin\asadmin`
125127
* `${KEYCLOAK_PORT}` - the port on which keycloak will run
126128
* `${KEYCLOAK_SORMAS_UI_SECRET}` - is the secret generated in Keycloak for the `sormas-ui` client
127-
* `${KEYCLOAK_SORMAS_REST_SECRET}` - is the secret generated in Keycloack for the `sormas-rest` client
128-
* `${KEYCLOAK_SORMAS_BACKEND_SECRET}` - is the secret generated in Keycloack for the `sormas-backend` client
129+
* `${KEYCLOAK_SORMAS_REST_SECRET}` - is the secret generated in Keycloak for the `sormas-rest` client
130+
* `${KEYCLOAK_SORMAS_BACKEND_SECRET}` - is the secret generated in Keycloak for the `sormas-backend` client
129131

130132
Then update `sormas.properties` file in the SORMAS domain with the property `authentication.provider=KEYCLOAK`
131133

134+
### Connect Keycloak to an already running instance of SORMAS
135+
136+
*after setting up Keycloak as one of the described options above*
137+
138+
In case Keycloak is set up alongside an already running instance of SORMAS, these are the steps to follow to make sure already existing users can access the system:
139+
1. Manually create an admin user in Keycloak for the SORMAS realm [Creating a user](https://www.keycloak.org/docs/11.0/getting_started/index.html#creating-a-user) *(username has to be the same as admin's username in SORMAS)*
140+
2. Login to SORMAS and trigger the **Sync Users** button from the **Users** page
141+
3. This will sync users to Keycloak keeping their original password - see [SORMAS Keycloak Service Provider](sormas-keycloak-service-provider/README.md) for more information about this
142+
143+
### Keycloak configuration
144+
145+
More about the default configuration and how to customize can be found here [Keycloak](sormas-base/doc/keycloak.md)
146+
132147
## Web Server Setup
133148

134149
### Apache Web Server

SERVER_UPDATE.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,29 @@ These are the default users for most user roles, intended to be used on developm
4848
### Mobile app users
4949
**Surveillance Officer:** SurvOff
5050
**Hospital Informant:** HospInf
51-
**Point of Entry Informant:** PoeInf
51+
**Point of Entry Informant:** PoeInf
52+
53+
# Updating Keycloak
54+
55+
## Standalone installation
56+
57+
Upgrading from Keycloak 11 to 12 following the steps from here https://www.keycloak.org/docs/latest/upgrading/#_upgrading
58+
59+
1. Stop the old server and make sure to remove any open connections to the DB
60+
2. Backup the DB *(once the upgrade is done the old version cannot be used with the new DB version)*
61+
3. Backup the old installation
62+
4. Remove `${OLD_KEYCLOAK_HOME}/standalone/data/tx-object-store/`
63+
5. Download the new Keycloak installation from https://www.keycloak.org/downloads
64+
6. Copy the `${NEW_KEYCLOAK_HOME}/standalone/` directory from the previous installation over the directory in the new installation
65+
7. Copy the postgres module from `${OLD_KEYCLOAK_HOME}/modules/system/layers/keycloak/org/` over to the new installation directory
66+
8. Copy the SORMAS themes from `{OLD_KEYCLOAK_HOME}/themes/` over to the new installation directory
67+
9. While the new installation is stopped, run `${NEW_KEYCLOAK_HOME}/bin/jboss-cli.sh ----file=${NEW_KEYCLOAK_HOME}/bin/migrate-standalone.cli` *(`.bat` for Windows)*
68+
10. Start the new Keycloak installation from `${NEW_KEYCLOAK_HOME}/bin/standalone.sh` *(`.bat` for Windows)*
69+
70+
## Docker installation
71+
72+
The docker installation is automatically upgraded to the latest version specified in the Dockerfile.
73+
74+
**Prerequisites:** Make sure the DB is backed up, because once the upgrade is done the new DB won't be usable with the old version of Keycloak.
75+
76+
For more info see the [Keycloak Docker Documentation](https://github.com/hzi-braunschweig/SORMAS-Docker/blob/development/keycloak/README.md).

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.53.0</version>
5+
<version>1.54.0</version>
66
<relativePath>../sormas-base</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,13 @@ public class AuthProvider {
4141

4242
private final boolean isDefaultProvider;
4343

44+
private final boolean isUserSyncSupported;
45+
4446
private AuthProvider() {
4547
String configuredProvider = FacadeProvider.getConfigFacade().getAuthenticationProvider();
4648
isUsernameCaseSensitive = SORMAS.equalsIgnoreCase(configuredProvider);
4749
isDefaultProvider = SORMAS.equalsIgnoreCase(configuredProvider);
50+
isUserSyncSupported = KEYCLOAK.equalsIgnoreCase(configuredProvider);
4851
}
4952

5053
public static AuthProvider getProvider() {
@@ -71,4 +74,12 @@ public boolean isUsernameCaseSensitive() {
7174
public boolean isDefaultProvider() {
7275
return isDefaultProvider;
7376
}
77+
78+
/**
79+
* Authentication Provider enables users to be synced from the default provider.
80+
*/
81+
public boolean isUserSyncSupported() {
82+
return isUserSyncSupported;
83+
}
84+
7485
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public interface ConfigFacade {
8585

8686
int getDaysAfterEventGetsArchived();
8787

88+
int getDaysAfterSystemEventGetsDeleted();
89+
8890
GeoLatLon getCountryCenter();
8991

9092
int getMapZoom();
@@ -115,4 +117,5 @@ public interface ConfigFacade {
115117

116118
boolean isSmsServiceSetUp();
117119

120+
String getDemisJndiName();
118121
}

0 commit comments

Comments
 (0)