diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ae5e8ae7..f1c659fc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -4,9 +4,6 @@ on: workflow_dispatch: push: branches: [ 'develop', 'main', 'releases/**' ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ 'develop', 'main', 'releases/**' ] schedule: - cron: '0 2 * * 4' diff --git a/docs/Configuration-Properties.md b/docs/Configuration-Properties.md index 47b9b455..af3040ed 100644 --- a/docs/Configuration-Properties.md +++ b/docs/Configuration-Properties.md @@ -68,8 +68,10 @@ 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). diff --git a/docs/Deploying-Wildfly.md b/docs/Deploying-Wildfly.md index 8ae428d3..6f1e8098 100644 --- a/docs/Deploying-Wildfly.md +++ b/docs/Deploying-Wildfly.md @@ -6,18 +6,13 @@ Enrollment Server contains the following configuration in `jboss-deployment-stru ``` - + - - - - - @@ -85,6 +80,9 @@ Use the `logback.xml` file to configure logging, for example: The `application-ext.properties` file is used to override default configuration properties, for example: ``` +# Database Configuration +spring.datasource.jndi-name=java:/jdbc/powerauth + # PowerAuth Client configuration powerauth.service.url=https://[host]:[port]/powerauth-java-server/rest @@ -92,8 +90,8 @@ powerauth.service.url=https://[host]:[port]/powerauth-java-server/rest powerauth.push.service.url=https://[host]:[port]/powerauth-push-server ``` -Enrollment Server Spring application uses the `ext` Spring profile which activates overriding of default properties by `application-ext.properties`. +Mind that you should specify `spring.datasource.jndi-name` to use the application server datasource (its declaration is out of the scope of this guideline). +When configure `spring.datasource.url`, the hikari connection pool is used. +Spring Boot running on WildFly or JBoos initializes [JtaTransactionManager](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/jta/JtaTransactionManager.html). -### Bouncy Castle Installation - -Since Enrollment Server in version `1.1.x`, installing the Bouncy Castle into Wildfy Server is no longer required. The latest version is bundled with the app and cryptographic primitives should work out of the box. +Enrollment Server Spring application uses the `ext` Spring profile which activates overriding of default properties by `application-ext.properties`. diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md index 4a723510..dd0ae146 100644 --- a/docs/_Sidebar.md +++ b/docs/_Sidebar.md @@ -17,5 +17,5 @@ **Implementation Tutorials** -- [Authentication in Mobile Banking Apps (SCA)](https://developers.wultra.com/products/mobile-security-suite/develop/tutorials/Authentication-in-Mobile-Apps) -- [Verifying PowerAuth Signatures On The Server](https://developers.wultra.com/products/mobile-security-suite/develop/tutorials/Manual-Signature-Verification) +- [Authentication in Mobile Banking Apps (SCA)](https://developers.wultra.com/tutorials/posts/Mobile-First-Authentication/) +- [Verifying PowerAuth Signatures On The Server](https://developers.wultra.com/tutorials/posts/Manual-Signature-Verification/) diff --git a/docs/onboarding/Configuration-Properties.md b/docs/onboarding/Configuration-Properties.md index 3f1881e6..d236dd43 100644 --- a/docs/onboarding/Configuration-Properties.md +++ b/docs/onboarding/Configuration-Properties.md @@ -169,8 +169,10 @@ 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). diff --git a/docs/onboarding/Deploying-Wildfly.md b/docs/onboarding/Deploying-Wildfly.md index b2653251..0fbd94e3 100644 --- a/docs/onboarding/Deploying-Wildfly.md +++ b/docs/onboarding/Deploying-Wildfly.md @@ -6,18 +6,13 @@ Enrollment Server contains the following configuration in `jboss-deployment-stru ``` - + - - - - - @@ -85,6 +80,9 @@ Use the `logback.xml` file to configure logging, for example: The `application-ext.properties` file is used to override default configuration properties, for example: ``` +# Database Configuration +spring.datasource.jndi-name=java:/jdbc/powerauth + # PowerAuth Client configuration powerauth.service.url=https://[host]:[port]/powerauth-java-server/rest @@ -92,8 +90,8 @@ powerauth.service.url=https://[host]:[port]/powerauth-java-server/rest powerauth.push.service.url=https://[host]:[port]/powerauth-push-server ``` -Onboarding Server Spring application uses the `ext` Spring profile which activates overriding of default properties by `application-ext.properties`. +Mind that you should specify `spring.datasource.jndi-name` to use the application server datasource (its declaration is out of the scope of this guideline). +When configure `spring.datasource.url`, the hikari connection pool is used. +Spring Boot running on WildFly or JBoos initializes [JtaTransactionManager](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/jta/JtaTransactionManager.html). -### Bouncy Castle Installation - -Installing the Bouncy Castle into Wildfy Server is not required. The latest version is bundled with the app and cryptographic primitives should work out of the box. +Onboarding Server Spring application uses the `ext` Spring profile which activates overriding of default properties by `application-ext.properties`. diff --git a/enrollment-server-api-model/pom.xml b/enrollment-server-api-model/pom.xml index ec7badbe..4b024f8c 100644 --- a/enrollment-server-api-model/pom.xml +++ b/enrollment-server-api-model/pom.xml @@ -30,7 +30,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT diff --git a/enrollment-server-onboarding-adapter-mock/pom.xml b/enrollment-server-onboarding-adapter-mock/pom.xml index b80b2924..9c7580e5 100644 --- a/enrollment-server-onboarding-adapter-mock/pom.xml +++ b/enrollment-server-onboarding-adapter-mock/pom.xml @@ -24,7 +24,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT enrollment-server-onboarding-adapter-mock diff --git a/enrollment-server-onboarding-api-model/pom.xml b/enrollment-server-onboarding-api-model/pom.xml index fcc57e0b..e6f51a2b 100644 --- a/enrollment-server-onboarding-api-model/pom.xml +++ b/enrollment-server-onboarding-api-model/pom.xml @@ -7,7 +7,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT enrollment-server-onboarding-api-model diff --git a/enrollment-server-onboarding-api/pom.xml b/enrollment-server-onboarding-api/pom.xml index 40396bfc..a5d57ccf 100644 --- a/enrollment-server-onboarding-api/pom.xml +++ b/enrollment-server-onboarding-api/pom.xml @@ -25,7 +25,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT com.wultra.security diff --git a/enrollment-server-onboarding-common/pom.xml b/enrollment-server-onboarding-common/pom.xml index 2cc80fe4..483ccc9c 100644 --- a/enrollment-server-onboarding-common/pom.xml +++ b/enrollment-server-onboarding-common/pom.xml @@ -24,7 +24,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT enrollment-server-onboarding-common diff --git a/enrollment-server-onboarding-domain-model/pom.xml b/enrollment-server-onboarding-domain-model/pom.xml index 2f5edb9e..18d0612e 100644 --- a/enrollment-server-onboarding-domain-model/pom.xml +++ b/enrollment-server-onboarding-domain-model/pom.xml @@ -30,7 +30,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT @@ -39,12 +39,6 @@ powerauth-java-crypto - - - org.bouncycastle - bcprov-jdk18on - - org.springframework.boot diff --git a/enrollment-server-onboarding-provider-innovatrics/pom.xml b/enrollment-server-onboarding-provider-innovatrics/pom.xml index 629a295f..b42cca33 100644 --- a/enrollment-server-onboarding-provider-innovatrics/pom.xml +++ b/enrollment-server-onboarding-provider-innovatrics/pom.xml @@ -25,7 +25,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT com.wultra.security diff --git a/enrollment-server-onboarding-provider-iproov/pom.xml b/enrollment-server-onboarding-provider-iproov/pom.xml index b7cbfe87..50c7f388 100644 --- a/enrollment-server-onboarding-provider-iproov/pom.xml +++ b/enrollment-server-onboarding-provider-iproov/pom.xml @@ -25,7 +25,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT com.wultra.security diff --git a/enrollment-server-onboarding-provider-zenid/pom.xml b/enrollment-server-onboarding-provider-zenid/pom.xml index 80f1bb3d..e77100fc 100644 --- a/enrollment-server-onboarding-provider-zenid/pom.xml +++ b/enrollment-server-onboarding-provider-zenid/pom.xml @@ -25,7 +25,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT com.wultra.security diff --git a/enrollment-server-onboarding/pom.xml b/enrollment-server-onboarding/pom.xml index efc4b2db..41133110 100644 --- a/enrollment-server-onboarding/pom.xml +++ b/enrollment-server-onboarding/pom.xml @@ -29,7 +29,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT @@ -76,12 +76,6 @@ http-common - - - org.bouncycastle - bcprov-jdk18on - - org.springframework.boot @@ -224,19 +218,6 @@ - - org.apache.maven.plugins - maven-war-plugin - - - - src/main/webapp/WEB-INF - WEB-INF - true - - - - diff --git a/enrollment-server-onboarding/src/main/resources/application.properties b/enrollment-server-onboarding/src/main/resources/application.properties index fe3aa094..d22b96db 100644 --- a/enrollment-server-onboarding/src/main/resources/application.properties +++ b/enrollment-server-onboarding/src/main/resources/application.properties @@ -29,6 +29,7 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/powerauth spring.datasource.username=powerauth spring.datasource.password= spring.datasource.hikari.auto-commit=false +spring.datasource.hikari.pool-name=HikariPool-Enrollment-Server-Onboarding spring.jpa.properties.hibernate.connection.characterEncoding=utf8 spring.jpa.properties.hibernate.connection.useUnicode=true @@ -226,3 +227,6 @@ management.tracing.sampling.probability=1.0 #management.endpoints.web.exposure.include=health, prometheus #management.endpoint.prometheus.enabled=true #management.prometheus.metrics.export.enabled=true + +spring.autoconfigure.exclude=\ + org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration diff --git a/enrollment-server-onboarding/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/enrollment-server-onboarding/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index ed6a86c0..2fa01230 100644 --- a/enrollment-server-onboarding/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/enrollment-server-onboarding/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -1,16 +1,11 @@ - + - - - - - diff --git a/enrollment-server/pom.xml b/enrollment-server/pom.xml index 5c5fb232..d1494d57 100644 --- a/enrollment-server/pom.xml +++ b/enrollment-server/pom.xml @@ -30,7 +30,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT @@ -75,12 +75,6 @@ http-common - - - org.bouncycastle - bcprov-jdk18on - - org.springframework.boot @@ -207,19 +201,6 @@ - - org.apache.maven.plugins - maven-war-plugin - - - - src/main/webapp/WEB-INF - WEB-INF - true - - - - diff --git a/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/impl/service/converter/MobileTokenConverter.java b/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/impl/service/converter/MobileTokenConverter.java index 2bd4b8cf..98b574cb 100644 --- a/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/impl/service/converter/MobileTokenConverter.java +++ b/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/impl/service/converter/MobileTokenConverter.java @@ -103,6 +103,7 @@ public Operation convert(OperationDetailResponse operationDetail, OperationTempl operation.setOperationCreated(operationDetail.getTimestampCreated()); operation.setOperationExpires(operationDetail.getTimestampExpires()); operation.setStatus(operationDetail.getStatus().name()); + operation.setStatusReason(operationDetail.getStatusReason()); operation.setUi(uiExtensions); operation.setFormData(formData); diff --git a/enrollment-server/src/main/resources/application.properties b/enrollment-server/src/main/resources/application.properties index 3bb0ce30..2126f472 100644 --- a/enrollment-server/src/main/resources/application.properties +++ b/enrollment-server/src/main/resources/application.properties @@ -29,6 +29,7 @@ spring.datasource.url=jdbc:postgresql://localhost:5432/powerauth spring.datasource.username=powerauth spring.datasource.password= spring.datasource.hikari.auto-commit=false +spring.datasource.hikari.pool-name=HikariPool-Enrollment-Server spring.jpa.properties.hibernate.connection.characterEncoding=utf8 spring.jpa.properties.hibernate.connection.useUnicode=true @@ -104,4 +105,6 @@ management.tracing.sampling.probability=1.0 #management.endpoint.prometheus.enabled=true #management.prometheus.metrics.export.enabled=true -spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration +spring.autoconfigure.exclude=\ + org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration,\ + org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration diff --git a/enrollment-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/enrollment-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml index fe707a2a..2a4d8818 100644 --- a/enrollment-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml +++ b/enrollment-server/src/main/webapp/WEB-INF/jboss-deployment-structure.xml @@ -1,16 +1,11 @@ - + - - - - - diff --git a/mtoken-model/pom.xml b/mtoken-model/pom.xml index 369b2419..8bd5bd94 100644 --- a/mtoken-model/pom.xml +++ b/mtoken-model/pom.xml @@ -26,7 +26,7 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT diff --git a/mtoken-model/src/main/java/com/wultra/security/powerauth/lib/mtoken/model/entity/Operation.java b/mtoken-model/src/main/java/com/wultra/security/powerauth/lib/mtoken/model/entity/Operation.java index f7205f23..294efec2 100644 --- a/mtoken-model/src/main/java/com/wultra/security/powerauth/lib/mtoken/model/entity/Operation.java +++ b/mtoken-model/src/main/java/com/wultra/security/powerauth/lib/mtoken/model/entity/Operation.java @@ -17,7 +17,9 @@ */ package com.wultra.security.powerauth.lib.mtoken.model.entity; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; import lombok.Data; import java.util.Date; @@ -37,6 +39,20 @@ public class Operation { @NotNull private String data; private String status; + + /** + * Optional details why the status has changed by backend services. + * The value should be sent in the form of a computer-readable code, not a free-form text. + * Mind that it differs from {@code reason} at the cancel request filled by the user. + */ + @Schema(description = """ + Optional details why the status has changed by backend services. + The value should be sent in the form of a computer-readable code, not a free-form text. + Mind that it differs from `reason` at the cancel request filled by the user. + """) + @Size(max = 32) + private String statusReason; + private Date operationCreated; private Date operationExpires; private UiExtensions ui; diff --git a/pom.xml b/pom.xml index e85db731..96d1a041 100644 --- a/pom.xml +++ b/pom.xml @@ -26,13 +26,13 @@ com.wultra.security enrollment-server-parent - 1.7.0-SNAPSHOT + 1.8.0-SNAPSHOT pom org.springframework.boot spring-boot-starter-parent - 3.2.4 + 3.3.0 @@ -88,20 +88,19 @@ - 7.4.0 + 7.6.0 - 5.12.0 + 5.13.0 4.0.0 - 2.2.21 - 2.4.0 + 2.2.22 + 2.5.0 1.4.4 - 1.9.0-SNAPSHOT - 1.7.0-SNAPSHOT - 1.7.0-SNAPSHOT - 1.7.0-SNAPSHOT + 1.10.0-SNAPSHOT + 1.8.0-SNAPSHOT + 1.8.0-SNAPSHOT + 1.8.0-SNAPSHOT - 1.77 7.4 @@ -227,13 +226,6 @@ ${swagger-annotations-jakarta.version} - - - org.bouncycastle - bcprov-jdk18on - ${bcprov-jdk18on.version} - - net.logstash.logback