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

Commit 58fc184

Browse files
author
FredrikSchäferVitagroup
committed
Merge branch 'development' into feature-3488-LabMessage_UI
# Conflicts: # sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java # sormas-backend/src/main/resources/META-INF/persistence.xml # sormas-backend/src/main/resources/sql/sormas_schema.sql # sormas-backend/src/test/resources/META-INF/persistence.xml # sormas-ui/src/main/java/de/symeda/sormas/ui/campaign/campaigns/CampaignGrid.java # sormas-ui/src/test/resources/META-INF/persistence.xml
2 parents 80f273e + 3956544 commit 58fc184

355 files changed

Lines changed: 3728 additions & 1568 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ You can give SORMAS a try on our play server at https://sormas.helmholtz-hzi.de!
2020
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.
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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ The following properties are currently configurable:
3636
* `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;
3737
* `geocodingLongitudeJsonPath` and `geocodingLatitudeJsonPath` are used to obtain the longitude and latitude of the address in the result of the geocoding service request
3838
* **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.
45+
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.
4148

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/src/main/java/de/symeda/sormas/api/ConfigFacade.java

Lines changed: 2 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();

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
import de.symeda.sormas.api.sormastosormas.SormasToSormasFacade;
6868
import de.symeda.sormas.api.survnet.SurvnetGatewayFacade;
6969
import de.symeda.sormas.api.symptoms.SymptomsFacade;
70+
import de.symeda.sormas.api.systemevents.SystemEventFacade;
7071
import de.symeda.sormas.api.task.TaskFacade;
7172
import de.symeda.sormas.api.therapy.PrescriptionFacade;
7273
import de.symeda.sormas.api.therapy.TherapyFacade;
@@ -324,6 +325,11 @@ public static DocumentFacade getDocumentFacade() {
324325
return get().lookupEjbRemote(DocumentFacade.class);
325326
}
326327

328+
public static SystemEventFacade getSystemEventFacade() {
329+
330+
return get().lookupEjbRemote(SystemEventFacade.class);
331+
}
332+
327333
public static LabMessageFacade getLabMessageFacade() {
328334
return get().lookupEjbRemote(LabMessageFacade.class);
329335
}

sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public class CaseDataDto extends PseudonymizableDto {
127127
public static final String POINT_OF_ENTRY_DETAILS = "pointOfEntryDetails";
128128
public static final String ADDITIONAL_DETAILS = "additionalDetails";
129129
public static final String EXTERNAL_ID = "externalID";
130+
public static final String EXTERNAL_TOKEN = "externalToken";
130131
public static final String SHARED_TO_COUNTRY = "sharedToCountry";
131132
public static final String NOSOCOMIAL_OUTBREAK = "nosocomialOutbreak";
132133
public static final String INFECTION_SETTING = "infectionSetting";
@@ -375,6 +376,10 @@ public class CaseDataDto extends PseudonymizableDto {
375376
COUNTRY_CODE_GERMANY,
376377
COUNTRY_CODE_SWITZERLAND })
377378
private String externalID;
379+
@HideForCountriesExcept(countries = {
380+
COUNTRY_CODE_GERMANY,
381+
COUNTRY_CODE_SWITZERLAND })
382+
private String externalToken;
378383
private boolean sharedToCountry;
379384
@HideForCountriesExcept
380385
private boolean nosocomialOutbreak;
@@ -1030,6 +1035,12 @@ public void setExternalID(String externalID) {
10301035
this.externalID = externalID;
10311036
}
10321037

1038+
public String getExternalToken() { return externalToken; }
1039+
1040+
public void setExternalToken(String externalToken) {
1041+
this.externalToken = externalToken;
1042+
}
1043+
10331044
public boolean isSharedToCountry() {
10341045
return sharedToCountry;
10351046
}

0 commit comments

Comments
 (0)