Skip to content

Commit

Permalink
Update Dependencies (#204)
Browse files Browse the repository at this point in the history
Update Checkstyle to current version
Reformat all files
  • Loading branch information
f11h authored Sep 5, 2022
1 parent 8a94ee8 commit a98f9f2
Show file tree
Hide file tree
Showing 58 changed files with 2,777 additions and 2,060 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
- cron: '48 02 * * 0' # Each Sunday at 02:48 UTC
pull_request:
types:
- opened
- synchronize
- reopened
- opened
- synchronize
- reopened
workflow_dispatch:

jobs:
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,32 @@ jobs:
language: [ 'java' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Setup Java 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: adopt
- name: Build
run: >-
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Setup Java 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: adopt

- name: Build
run: >-
mvn clean package
--batch-mode
--file ./pom.xml
--settings ./settings.xml
--define app.packages.username="${APP_PACKAGES_USERNAME}"
--define app.packages.password="${APP_PACKAGES_PASSWORD}"
-DskipTests=true;
env:
APP_PACKAGES_USERNAME: ${{ github.actor }}
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
env:
APP_PACKAGES_USERNAME: ${{ github.actor }}
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
56 changes: 28 additions & 28 deletions .grenrc.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
module.exports = {
"dataSource": "prs",
"prefix": "",
"onlyMilestones": false,
"groupBy": {
"Enhancements": [
"enhancement",
"internal"
],
"Bug Fixes": [
"bug"
],
"Documentation": [
"documentation"
],
"Others": [
"other"
]
},
"changelogFilename": "CHANGELOG.md",
"template": {
commit: ({ message, url, author, name }) => `- [${message}](${url}) - ${author ? `@${author}` : name}`,
issue: "- {{name}} [{{text}}]({{url}})",
noLabel: "other",
group: "\n#### {{heading}}\n",
changelogTitle: "# Changelog\n\n",
release: "## {{release}} ({{date}})\n{{body}}",
releaseSeparator: "\n---\n\n"
}
"dataSource": "prs",
"prefix": "",
"onlyMilestones": false,
"groupBy": {
"Enhancements": [
"enhancement",
"internal"
],
"Bug Fixes": [
"bug"
],
"Documentation": [
"documentation"
],
"Others": [
"other"
]
},
"changelogFilename": "CHANGELOG.md",
"template": {
commit: ({message, url, author, name}) => `- [${message}](${url}) - ${author ? `@${author}` : name}`,
issue: "- {{name}} [{{text}}]({{url}})",
noLabel: "other",
group: "\n#### {{heading}}\n",
changelogTitle: "# Changelog\n\n",
release: "## {{release}} ({{date}})\n{{body}}",
releaseSeparator: "\n---\n\n"
}
}
7 changes: 3 additions & 4 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributor Covenant Code of Conduct

## Our Pledge
Expand Down Expand Up @@ -59,8 +58,8 @@ representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[[email protected]](mailto:[email protected]).
All complaints will be reviewed and investigated promptly and fairly.

Expand Down Expand Up @@ -107,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
53 changes: 37 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,37 @@

All members of the project community must abide by the [Contributor Covenant, version 2.0](CODE_OF_CONDUCT.md).
Only by respecting each other can we develop a productive, collaborative community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting [[email protected]](mailto:[email protected]) and/or a project maintainer.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
contacting [[email protected]](mailto:[email protected]) and/or a project maintainer.

We appreciate your courtesy of avoiding political questions here. Issues which are not related to the project itself will be closed by our community managers.
We appreciate your courtesy of avoiding political questions here. Issues which are not related to the project itself
will be closed by our community managers.

## Engaging in our project

We use GitHub to manage reviews of pull requests.

* If you are a new contributor, see: [Steps to Contribute](#steps-to-contribute)

* If you have a trivial fix or improvement, go ahead and create a pull request, addressing (with `@...`) a suitable maintainer of this repository (see [CODEOWNERS](CODEOWNERS) of the repository you want to contribute to) in the description of the pull request.
* If you have a trivial fix or improvement, go ahead and create a pull request, addressing (with `@...`) a suitable
maintainer of this repository (see [CODEOWNERS](CODEOWNERS) of the repository you want to contribute to) in the
description of the pull request.

* If you plan to do something more involved, please reach out to us and send an [email](mailto:[email protected]). This will avoid unnecessary work and surely give you and us a good deal of inspiration.
* If you plan to do something more involved, please reach out to us and send an [email](mailto:[email protected]).
This will avoid unnecessary work and surely give you and us a good deal of inspiration.

* Relevant coding style guidelines are available in the respective sub-repositories as they are programming language-dependent.
* Relevant coding style guidelines are available in the respective sub-repositories as they are programming
language-dependent.

## Steps to Contribute

Should you wish to work on an issue, please claim it first by commenting on the GitHub issue that you want to work on. This is to prevent duplicated efforts from other contributors on the same issue.
Should you wish to work on an issue, please claim it first by commenting on the GitHub issue that you want to work on.
This is to prevent duplicated efforts from other contributors on the same issue.

If you have questions about one of the issues, please comment on them, and one of the maintainers will clarify.

We kindly ask you to follow the [Pull Request Checklist](#Pull-Request-Checklist) to ensure reviews can happen accordingly.
We kindly ask you to follow the [Pull Request Checklist](#Pull-Request-Checklist) to ensure reviews can happen
accordingly.

## Contributing Code

Expand All @@ -36,7 +44,8 @@ The following rule governs code contributions:

* Contributions must be licensed under the [Apache 2.0 License](./LICENSE)
* Newly created files must be opened by an instantiated version of the file 'templates/file-header.txt'
* At least if you add a new file to the repository, add your name into the contributor section of the file NOTICE (please respect the preset entry structure)
* At least if you add a new file to the repository, add your name into the contributor section of the file NOTICE (
please respect the preset entry structure)

## Contributing Documentation

Expand All @@ -48,15 +57,22 @@ The following rule governs documentation contributions:

## Pull Request Checklist

* Branch from the main branch and, if needed, rebase to the current main branch before submitting your pull request. If it doesn't merge cleanly with main you may be asked to rebase your changes.
* Branch from the main branch and, if needed, rebase to the current main branch before submitting your pull request. If
it doesn't merge cleanly with main you may be asked to rebase your changes.

* Commits should be as small as possible while ensuring that each commit is correct independently (i.e., each commit should compile and pass tests).
* Commits should be as small as possible while ensuring that each commit is correct independently (i.e., each commit
should compile and pass tests).

* Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests. If tested manually, provide information about the test scope in the PR description (e.g. “Test passed: Upgrade version from 0.42 to 0.42.23.”).
* Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration
tests. If tested manually, provide information about the test scope in the PR description (e.g. “Test passed: Upgrade
version from 0.42 to 0.42.23.”).

* Create _Work In Progress [WIP]_ pull requests only if you need clarification or an explicit review before you can continue your work item.
* Create _Work In Progress [WIP]_ pull requests only if you need clarification or an explicit review before you can
continue your work item.

* If your patch is not getting reviewed or you need a specific person to review it, you can @-reply a reviewer asking for a review in the pull request or a comment, or you can ask for a review by contacting us via [email](mailto:[email protected]).
* If your patch is not getting reviewed or you need a specific person to review it, you can @-reply a reviewer asking
for a review in the pull request or a comment, or you can ask for a review by contacting us
via [email](mailto:[email protected]).

* Post review:
* If a review requires you to change your commit(s), please test the changes again.
Expand All @@ -68,8 +84,13 @@ The following rule governs documentation contributions:

* We use GitHub issues to track bugs and enhancement requests.

* Please provide as much context as possible when you open an issue. The information you provide must be comprehensive enough to reproduce that issue for the assignee. Therefore, contributors may use but aren't restricted to the issue template provided by the project maintainers.
* Please provide as much context as possible when you open an issue. The information you provide must be comprehensive
enough to reproduce that issue for the assignee. Therefore, contributors may use but aren't restricted to the issue
template provided by the project maintainers.

* When creating an issue, try using one of our issue templates which already contain some guidelines on which content is expected to process the issue most efficiently. If no template applies, you can of course also create an issue from scratch.
* When creating an issue, try using one of our issue templates which already contain some guidelines on which content is
expected to process the issue most efficiently. If no template applies, you can of course also create an issue from
scratch.

* Please apply one or more applicable [labels](/../../labels) to your issue so that all community members are able to cluster the issues better.
* Please apply one or more applicable [labels](/../../labels) to your issue so that all community members are able to
cluster the issues better.
62 changes: 40 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<a href="#licensing">Licensing</a>
</p>


## About

This repository contains the source code of the EU Digital COVID Certificate Gateway (DGCG).
Expand All @@ -43,17 +42,23 @@ backend-to-backend integration is facilitated, and countries can onboard increme
retain flexibility and can control data processing of their users.

## Development
Please be aware that the provided configuration files contain passwords that do not conform to any reasonable password policies, hence under no circumstances should be applied to productive or even broader test environments.
Passwords used in productive scenarios should be provided only at runtime and stored in safe place, with restricted and logged access.

Please be aware that the provided configuration files contain passwords that do not conform to any reasonable password
policies, hence under no circumstances should be applied to productive or even broader test environments.
Passwords used in productive scenarios should be provided only at runtime and stored in safe place, with restricted and
logged access.

### Prerequisites

- OpenJDK 11 (with installed ```keytool``` CLI)
- Maven
- Authenticate to [Github Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)
- Authenticate
to [Github Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)

#### Authenticating to GitHub Packages

As some of the required libraries (and/or versions are pinned/available only from GitHub Packages) You need to authenticate
As some of the required libraries (and/or versions are pinned/available only from GitHub Packages) You need to
authenticate
to [GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry)
The following steps need to be followed

Expand Down Expand Up @@ -127,8 +132,10 @@ afterwards the PublicKey has to be exported in a Java KeyStore.
keytool -importcert -alias dgcg_trust_anchor -file cert_ta.pem -keystore ta.jks -storepass dgcg-p4ssw0rd
```

Put the created ta.jks file in the "certs" directory of dgc-gateway. If you are using the Docker image then this folder must
be in the root directory of your local workspace (on the same level as this readme file). Create directory it does not already exist.
Put the created ta.jks file in the "certs" directory of dgc-gateway. If you are using the Docker image then this folder
must
be in the root directory of your local workspace (on the same level as this readme file). Create directory it does not
already exist.

#### Create Database

Expand All @@ -148,8 +155,9 @@ docker-compose up --build

`ERROR: for dgc-gateway_dgc-gateway_1 Cannot create container for service dgc-gateway`

This error occurs in Docker-for-Windows if Docker does not have access to the gateway folder. In Docker-for-Windows,
go to `Settings > Resources > File Sharing` and add the root directory of the repository, then restart Docker-for-Windows.
This error occurs in Docker-for-Windows if Docker does not have access to the gateway folder. In Docker-for-Windows,
go to `Settings > Resources > File Sharing` and add the root directory of the repository, then restart
Docker-for-Windows.

#### Insert Trusted Parties

Expand All @@ -172,11 +180,13 @@ dgc ta sign -c cert_ta.pem -k key_ta.pem -i cert_csca.pem
dgc ta sign -c cert_ta.pem -k key_ta.pem -i cert_upload.pem
```

Afterwards you can create a new entry in the `trusted_parties` table and fill all of the fields with the data produced by the above commands.
Afterwards you can create a new entry in the `trusted_parties` table and fill all of the fields with the data produced
by the above commands.

##### Inserting Trusted Parties into the Database

Log on to the mysql container (using the docker commands or opening a shell with the docker UI) and open mysql cli like this:
Log on to the mysql container (using the docker commands or opening a shell with the docker UI) and open mysql cli like
this:

```
mysql --user=root --password=admin dgc
Expand Down Expand Up @@ -250,7 +260,7 @@ curl -X GET http://localhost:8080/trustList -H "accept: application/json" -H "X-
```

* Replace the example SHA with that of your own test certificate in the `X-SSL-Client-SHA256` header
* Replace the example country with your own country in the `X-SSL-Client-DN` header (i.e. US, CN, ZA)
* Replace the example country with your own country in the `X-SSL-Client-DN` header (i.e. US, CN, ZA)

That command will return something looking like this (but with large base64 strings)

Expand Down Expand Up @@ -305,7 +315,8 @@ Property, e.g. C=EU)

#### Coverting the certificate/private key into PKCS12

Windows users may wish to convert their certificate/private keys into a PKCS12 package so that it can be imported into the
Windows users may wish to convert their certificate/private keys into a PKCS12 package so that it can be imported into
the
machine's certificate store. Thankfully that is pretty simple using openssl.

For example to convert the test authentication certificate created earlier:
Expand Down Expand Up @@ -338,18 +349,23 @@ The following channels are available for discussions, feedback, and support requ

| Type | Channel |
| ------------------------ | ------------------------------------------------------ |
| **Gateway issues** | <a href="/../../issues" title="Open Issues"><img src="https://img.shields.io/github/issues/eu-digital-green-certificates/dgc-gateway?style=flat"></a> |
| **Other requests** | <a href="mailto:[email protected]" title="Email DGC Team"><img src="https://img.shields.io/badge/email-DGC%20team-green?logo=mail.ru&style=flat-square&logoColor=white"></a> |
| **Gateway
issues** | <a href="/../../issues" title="Open Issues"><img src="https://img.shields.io/github/issues/eu-digital-green-certificates/dgc-gateway?style=flat"></a> |
| **Other
requests** | <a href="mailto:[email protected]" title="Email DGC Team"><img src="https://img.shields.io/badge/email-DGC%20team-green?logo=mail.ru&style=flat-square&logoColor=white"></a> |

## How to contribute
## How to contribute

Contribution and feedback is encouraged and always welcome. For more information about how to contribute, the project structure,
as well as additional contribution information, see our [Contribution Guidelines](./CONTRIBUTING.md). By participating in this
Contribution and feedback is encouraged and always welcome. For more information about how to contribute, the project
structure,
as well as additional contribution information, see our [Contribution Guidelines](./CONTRIBUTING.md). By participating
in this
project, you agree to abide by its [Code of Conduct](./CODE_OF_CONDUCT.md) at all times.

## Contributors
## Contributors

Our commitment to open source means that we are enabling -in fact encouraging- all interested parties to contribute and become part of its developer community.
Our commitment to open source means that we are enabling -in fact encouraging- all interested parties to contribute and
become part of its developer community.

## Licensing

Expand All @@ -360,6 +376,8 @@ the License.

You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the [LICENSE](./LICENSE) for the specific
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "
AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the [LICENSE](./LICENSE) for the
specific
language governing permissions and limitations under the License.
Loading

0 comments on commit a98f9f2

Please sign in to comment.