Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop to master #1016

Merged
merged 60 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ecec44d
Fix #986: Update Wultra dependencies to SNAPSHOT
banterCZ Jan 8, 2024
1b2509a
Fix #985: Set develop version to 1.7.0-SNAPSHOT
banterCZ Jan 9, 2024
b11277d
Merge pull request #991 from wultra/issues/985-version-1.7.0-SNAPSHOT
banterCZ Jan 9, 2024
9217019
Merge pull request #988 from wultra/issues/986-wultra-snapshots
banterCZ Jan 9, 2024
f2b4504
Bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Jan 2, 2024
81e60f2
Revert "Fix #947: Update logback"
banterCZ Jan 2, 2024
71b15bb
Revert "Update commons-lang3 to 3.13.0"
banterCZ Jan 2, 2024
f1c86b9
Merge pull request #977 from wultra/dependabot/maven/org.springframew…
dependabot[bot] Jan 9, 2024
8bb870a
Fix #978: Remove Guava dependency (#980)
banterCZ Jan 12, 2024
1ac1bcd
Fix #993: Warning: Using generated security password
banterCZ Jan 15, 2024
7b3bbff
Merge pull request #994 from wultra/issues/993-warn-generated-password
banterCZ Jan 15, 2024
b783099
Fix #922: EvaluateClientRequest should contain extracted data (#979)
jnpsk Jan 16, 2024
b0e27b2
Fix #964: Modify verification providers documentation (#996)
jnpsk Jan 17, 2024
322c47c
Bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Jan 22, 2024
a65a2a8
Merge pull request #997 from wultra/dependabot/maven/org.springframew…
dependabot[bot] Jan 22, 2024
a6d593e
Fix #1001: Refactor CreateDeviceRequest#platform into enum (#1002)
banterCZ Jan 29, 2024
bcab0ef
Bump org.javamoney.moneta:moneta-core from 1.4.2 to 1.4.4
dependabot[bot] Jan 29, 2024
4dad9e3
Merge pull request #1000 from wultra/dependabot/maven/org.javamoney.m…
dependabot[bot] Jan 29, 2024
439fba4
Fix #995: Filter out errors from document verification in onboarding …
jnpsk Feb 2, 2024
bbda37e
Fix #1004: Add TraceID/SpanID to Monitoring for Enhanced Observabilit…
jandusil Feb 6, 2024
3a31f33
Fix #1006: Remove spring.datasource.driverClassName from app props (#…
jandusil Feb 6, 2024
999d94c
Fix #1008: Update docker to ibm-semeru-runtimes:open-21.0.1_12-jre
banterCZ Feb 7, 2024
b7198ef
Merge pull request #1009 from wultra/issues/1008-docker-jre-21
banterCZ Feb 7, 2024
edec669
Fix #998: Add support for HMS (#999)
banterCZ Feb 9, 2024
ed679a7
Bump org.openapitools:openapi-generator-maven-plugin from 7.2.0 to 7.3.0
dependabot[bot] Feb 12, 2024
bf1830b
Merge pull request #1010 from wultra/dependabot/maven/org.openapitool…
dependabot[bot] Feb 12, 2024
38decb2
Bump net.javacrumbs.shedlock:shedlock-bom from 5.10.2 to 5.11.0
dependabot[bot] Feb 19, 2024
e1ae116
Merge pull request #1011 from wultra/dependabot/maven/net.javacrumbs.…
dependabot[bot] Feb 19, 2024
7af9241
Fix #913: Improve error handling in MobileTokenController (#992)
jnpsk Feb 20, 2024
f079fa4
Fix #1012: Set release version to 1.7.0
banterCZ Feb 21, 2024
0d6c26f
Bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Feb 23, 2024
e0a3f11
Merge pull request #1020 from wultra/dependabot/maven/org.springframe…
dependabot[bot] Feb 23, 2024
d929faf
Fix #1021: Update Docker dependencies
banterCZ Feb 23, 2024
a152158
Merge pull request #1022 from wultra/issues/1021-update-docker
banterCZ Feb 26, 2024
a604417
Bump net.javacrumbs.shedlock:shedlock-bom from 5.11.0 to 5.12.0
dependabot[bot] Mar 4, 2024
352be34
Merge pull request #1027 from wultra/dependabot/maven/net.javacrumbs.…
dependabot[bot] Mar 4, 2024
8284374
Fix #1028: Duplicate maven-war-plugin declaration
banterCZ Mar 4, 2024
e7f0948
Merge pull request #1029 from wultra/issues/1028-war-pluging
banterCZ Mar 4, 2024
b272548
Fix #1025: Java 21 Build Fails (#1030)
banterCZ Mar 6, 2024
4d18520
Bump org.openapitools:openapi-generator-maven-plugin from 7.3.0 to 7.4.0
dependabot[bot] Mar 18, 2024
b955363
Bump org.springdoc:springdoc-openapi-starter-webmvc-ui
dependabot[bot] Mar 18, 2024
09967eb
Merge pull request #1036 from wultra/dependabot/maven/org.springdoc-s…
dependabot[bot] Mar 18, 2024
d8260ab
Merge pull request #1035 from wultra/dependabot/maven/org.openapitool…
dependabot[bot] Mar 18, 2024
214397e
Fix #1033: Template detail endpoint (#1034)
banterCZ Mar 19, 2024
dbffd9f
Make admin API to return template attributes in structured format (#1…
banterCZ Mar 21, 2024
c167153
Bump io.swagger.core.v3:swagger-annotations-jakarta
dependabot[bot] Mar 25, 2024
dae3baf
Bump org.springframework.boot:spring-boot-starter-parent
dependabot[bot] Mar 25, 2024
845b62a
Merge pull request #1038 from wultra/dependabot/maven/io.swagger.core…
dependabot[bot] Mar 25, 2024
d1184ad
Merge pull request #1039 from wultra/dependabot/maven/org.springframe…
dependabot[bot] Mar 25, 2024
8aad7d6
Downgrade JDK for Coverity GHA to 17
banterCZ Mar 28, 2024
ba1f337
Fix #1041: 404 error is propagated as 500
banterCZ Mar 28, 2024
d60599f
Merge pull request #1040 from wultra/issues/gha-coverity-jdk-17
banterCZ Mar 28, 2024
7c1e3a3
Merge pull request #1042 from wultra/issues/1041-not-found
banterCZ Mar 28, 2024
93c665c
Bump org.springdoc:springdoc-openapi-starter-webmvc-ui
dependabot[bot] Apr 3, 2024
25ba14c
Merge pull request #1043 from wultra/dependabot/maven/org.springdoc-s…
dependabot[bot] Apr 3, 2024
16a98e6
Bump net.javacrumbs.shedlock:shedlock-bom from 5.12.0 to 5.13.0
dependabot[bot] Apr 8, 2024
bc9185c
Merge pull request #1045 from wultra/dependabot/maven/net.javacrumbs.…
dependabot[bot] Apr 8, 2024
aad9b29
Fix #1014: Update Wultra dependencies
banterCZ Feb 21, 2024
c118741
Merge pull request #1018 from wultra/issues/1014-wultra-dependencies
banterCZ Apr 9, 2024
82be9e7
Merge pull request #1017 from wultra/issues/1012-version-1.7.0
banterCZ Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ibm-semeru-runtimes:open-17.0.9_9-jre
FROM ibm-semeru-runtimes:open-21.0.1_12-jre
LABEL maintainer="petr@wultra.com"

# Prepare environment variables
Expand Down
5 changes: 3 additions & 2 deletions docs/Configuration-Properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ The Enrollment Server uses the following public configuration properties:
| `spring.datasource.url` | `_empty_` | Database JDBC URL |
| `spring.datasource.username` | `_empty_` | Database JDBC username |
| `spring.datasource.password` | `_empty_` | Database JDBC password |
| `spring.datasource.driver-class-name` | `_empty_` | Datasource JDBC class name |
| `spring.jpa.hibernate.ddl-auto` | `none` | Configuration of automatic database schema creation |
| `spring.jpa.properties.hibernate.connection.characterEncoding` | `_empty_` | Character encoding |
| `spring.jpa.properties.hibernate.connection.useUnicode` | `_empty_` | Character encoding - Unicode support |
Expand Down Expand Up @@ -63,6 +62,8 @@ logging.pattern.console=%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS


## Monitoring and Observability

| Property | Default | Note |
|-------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `management.tracing.sampling.probability` | `1.0` | Specifies the proportion of requests that are sampled for tracing. A value of 1.0 means that 100% of requests are sampled, while a value of 0 effectively disables tracing. |
The WAR file includes the `micrometer-registry-prometheus` dependency.
Discuss its configuration with the [Spring Boot documentation](https://docs.spring.io/spring-boot/docs/3.1.x/reference/html/actuator.html#actuator.metrics).
1 change: 1 addition & 0 deletions docs/Migration-Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This page contains PowerAuth Enrollment Server migration instructions.

- [PowerAuth Enrollment Server 1.7.0](./PowerAuth-Enrollment-Server-1.7.0.md)
- [PowerAuth Enrollment Server 1.6.0](./PowerAuth-Enrollment-Server-1.6.0.md)
- [PowerAuth Enrollment Server 1.5.0](./PowerAuth-Enrollment-Server-1.5.0.md)
- [PowerAuth Enrollment Server 1.4.0](./PowerAuth-Enrollment-Server-1.4.0.md)
12 changes: 12 additions & 0 deletions docs/PowerAuth-Enrollment-Server-1.7.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Migration from 1.6.x to 1.7.x

This guide contains instructions for migration from PowerAuth Enrollment Server version `1.6.x` to version `1.7.0`.


## REST API


### Register for Push Messages (Token)

The endpoint `POST /api/push/device/register/token` now strictly validates `platform` against values `ios`, `android` or `huawei`.
If you use the PowerAuth SDK, you should not be affected.
7 changes: 4 additions & 3 deletions docs/onboarding/Configuration-Properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ The Onboarding Server uses the following public configuration properties:
| `spring.datasource.url` | `jdbc:postgresql://localhost:5432/powerauth` | Database JDBC URL |
| `spring.datasource.username` | `powerauth` | Database JDBC username |
| `spring.datasource.password` | `_empty_` | Database JDBC password |
| `spring.datasource.driver-class-name` | `org.postgresql.Driver` | Datasource JDBC class name |
| `spring.jpa.hibernate.ddl-auto` | `none` | Configuration of automatic database schema creation |
| `spring.jpa.properties.hibernate.connection.characterEncoding` | `utf8` | Character encoding |
| `spring.jpa.properties.hibernate.connection.useUnicode` | `true` | Character encoding - Unicode support |
Expand Down Expand Up @@ -46,7 +45,6 @@ The Onboarding Server uses the following public configuration properties:
| `enrollment-server-onboarding.identity-verification.otp.enabled` | `true` | Whether OTP verification is enabled during identity verification. |
| `enrollment-server-onboarding.identity-verification.max-failed-attempts` | `5` | Maximum failed attempts for identity verification. |
| `enrollment-server-onboarding.identity-verification.max-failed-attempts-document-upload` | `5` | Maximum failed attempts for document upload. |
| `enrollment-server-onboarding.client-evaluation.max-failed-attempts` | `5` | Maximum failed attempts for client evaluation. |

## Digital Onboarding Adapter Configuration

Expand All @@ -69,6 +67,7 @@ The Onboarding Server uses the following public configuration properties:
| Property | Default | Note |
|---|---|---|
| `enrollment-server-onboarding.client-evaluation.max-failed-attempts` | 5 | Number of maximum failed attempts for client evaluation. |
| `enrollment-server-onboarding.client-evaluation.include-extracted-data` | `false` | Include extracted data to the evaluate client request. The format of extracted data is defined by the provider of document verification. |

## Document Verification Provider Configuration

Expand Down Expand Up @@ -170,6 +169,8 @@ logging.pattern.console=%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS


## Monitoring and Observability

| Property | Default | Note |
|-------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `management.tracing.sampling.probability` | `1.0` | Specifies the proportion of requests that are sampled for tracing. A value of 1.0 means that 100% of requests are sampled, while a value of 0 effectively disables tracing. |
The WAR file includes the `micrometer-registry-prometheus` dependency.
Discuss its configuration with the [Spring Boot documentation](https://docs.spring.io/spring-boot/docs/3.1.x/reference/html/actuator.html#actuator.metrics).
41 changes: 38 additions & 3 deletions docs/onboarding/Configuration-Verification-Providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The document verification process is currently supported for following providers

### ZenID

#### Configuration - API key
#### API key

The authorization of all API calls is secured by an API key value. It has to be sent as the `Authorization: api_key VALUE` header value.
Check the bottom of the `Manual/Configuration` page for more details.
Expand All @@ -21,7 +21,7 @@ The API key value can be configured/get from the `Access` page configuration:
- Condition: `ApiKeyEqualsValue`
- Value: the value here is the value of the API key

#### Configuration - Validators
#### Validators

It is recommended to create a custom validation profile. The sensitivity of selected validators can be tuned-up or disabled completely at the `Sensitivity` page.
The profile can be then set as the default or specified in the configuration properties.
Expand All @@ -32,14 +32,49 @@ When calling `document-verification/init-sdk` following implementation fields ar
- Init token - send a token value `sdk-init-token` in the request body `attributes` map field
- SDK response - receive the value under `zenid-sdk-init-response` from the response `attributes` map field

### Innovatrics

Innovatrics documentation for developers can be found at [this link](https://developers.innovatrics.com/digital-onboarding/technical/remote/dot-dis/latest/documentation/).

#### OCR Threshold

During a document validation Innovatrics provides a list of fields extracted from the document, that have OCR
confidence lower than configurable threshold. If the list is not empty, there is a high probability that some
information is read incorrectly. For that reason, this document will be rejected. The OCR confidence threshold is `0.92`
by default, and can be tuned using `innovatrics.dot.dis.customer.document.inspection.ocr-text-field-threshold`.

#### Text Consistency

For each document Innovatrics tries to read visual zone, machine-readable zone and barcode. These isolated parts are
cross-checked during a document validation by Innovatrics. If there are inconsistency between visual zone and
machine-readable zone, or between visual-zone and barcode, the document will be rejected. However, some editions of
identification documents are inconsistent by design. To prevent false rejection of those document modify the
configuration.
Following example excludes `issuingAuthority` field of Czech identity card 2005 edition from text consistency check:

```yml
innovatrics:
dot:
dis:
customer:
document:
inspection:
text-consistency-check:
CZE_identity-card_2005-01-01:
exclusions:
- issuingAuthority
```

The format of the document name is `{country}_{type}_{edition}` according to the response of `/metadata` request.

## Presence Check

The document verification process is currently supported for following providers:
- [iProov](https://www.iproov.com/) - use value `iproov` in configuration
- [Innovatrics](https://www.innovatrics.com/) - use value `innovatrics` in configuration
- Mock - useful for simple testing and local runs - use value `mock` in configuration

#### Configuration
### iProov

There are a few needed configuration changes to bring a successful integration. All the following configuration tuning
has to be requested from the iProov's [support team](https://iproov.freshdesk.com/support/login) on a per-service basis:
Expand Down
7 changes: 6 additions & 1 deletion enrollment-server-api-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<parent>
<groupId>com.wultra.security</groupId>
<artifactId>enrollment-server-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<dependencies>
Expand All @@ -43,6 +43,11 @@
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations-jakarta</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,44 @@

package com.wultra.app.enrollmentserver.api.model.enrollment.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.ToString;

/**
* Class representing a device registration request. The supported platform
* values are 'ios' and 'android'. The push token is the value received from
* APNS or FCM services without any modification.
* Class representing a device registration request.
*
* @author Petr Dvorak, petr@wultra.com
*/
@Data
public class PushRegisterRequest {

private String platform;
/**
* The platform.
*/
@NotNull
private Platform platform;

/**
* The push token is the value received from APNS, FCM, or HMS services without any modification.
*/
@NotBlank
@ToString.Exclude
@Schema(description = "The push token is the value received from APNS, FCM, or HMS services without any modification.")
private String token;

public enum Platform {
@JsonProperty("ios")
IOS,

@JsonProperty("android")
ANDROID,

@JsonProperty("huawei")
HUAWEI
}

}
2 changes: 1 addition & 1 deletion enrollment-server-onboarding-adapter-mock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>com.wultra.security</groupId>
<artifactId>enrollment-server-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<artifactId>enrollment-server-onboarding-adapter-mock</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion enrollment-server-onboarding-api-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.wultra.security</groupId>
<artifactId>enrollment-server-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<artifactId>enrollment-server-onboarding-api-model</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion enrollment-server-onboarding-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>com.wultra.security</groupId>
<artifactId>enrollment-server-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<groupId>com.wultra.security</groupId>
Expand Down
2 changes: 1 addition & 1 deletion enrollment-server-onboarding-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>com.wultra.security</groupId>
<artifactId>enrollment-server-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<artifactId>enrollment-server-onboarding-common</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username=sa
spring.datasource.password=password
spring.datasource.driver-class-name=org.h2.Driver
spring.jpa.hibernate.ddl-auto=create
15 changes: 14 additions & 1 deletion enrollment-server-onboarding-domain-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,27 @@
<parent>
<groupId>com.wultra.security</groupId>
<artifactId>enrollment-server-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>io.getlime.security</groupId>
<artifactId>powerauth-java-crypto</artifactId>
</dependency>

<!-- Bouncy Castle -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
</dependency>

<!-- Test Dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
*/
package com.wultra.app.enrollmentserver.model.integration;

import com.google.common.io.BaseEncoding;
import io.getlime.security.powerauth.crypto.lib.util.Hash;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Setter;
import lombok.ToString;
import org.bouncycastle.util.encoders.Base32;

import java.nio.charset.StandardCharsets;
import java.util.Date;

/**
Expand Down Expand Up @@ -73,9 +74,8 @@ public String getUserIdSecured() {
throw new IllegalStateException("Missing userId value");
}
if (userIdSecured == null) {
userIdSecured = BaseEncoding.base32()
.omitPadding()
.encode(Hash.sha256(userId));
userIdSecured = new String(Base32.encode(Hash.sha256(userId)), StandardCharsets.UTF_8)
.replace("=", "");
if (userIdSecured.length() > USER_ID_MAX_LENGTH) {
userIdSecured = userIdSecured.substring(0, USER_ID_MAX_LENGTH);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* PowerAuth Enrollment Server
* Copyright (C) 2024 Wultra s.r.o.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.wultra.app.enrollmentserver.model.integration;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* Test for {@link OwnerId}.
*
* @author Lubos Racansky, lubos.racansky@wultra.com
*/
class OwnerIdTest {

@Test
void testUserIdSecured() {
final OwnerId tested = new OwnerId();
tested.setUserId("Joe");

final String result = tested.getUserIdSecured();

assertEquals("NXMLPV6TYXCGRGZT4UNZ6EF4NKN6RH7I7IVBE7EMNQB42BOWRLHA", result);
}
}
2 changes: 1 addition & 1 deletion enrollment-server-onboarding-provider-innovatrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>com.wultra.security</groupId>
<artifactId>enrollment-server-parent</artifactId>
<version>1.6.0</version>
<version>1.7.0-SNAPSHOT</version>
</parent>

<groupId>com.wultra.security</groupId>
Expand Down
Loading
Loading