From 648f26b1226afb3b3843003ed4e5bc625b5eae4d Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Tue, 12 Dec 2023 15:02:10 +0100 Subject: [PATCH 01/17] Fix #561: Set develop version to 1.7.0-SNAPSHOT --- pom.xml | 2 +- powerauth-java-crypto/pom.xml | 2 +- powerauth-java-http/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index fc05972c..ec678980 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ io.getlime.security powerauth-crypto-parent - 1.6.0 + 1.7.0-SNAPSHOT pom 2016 diff --git a/powerauth-java-crypto/pom.xml b/powerauth-java-crypto/pom.xml index 2c4be739..aa2030ed 100644 --- a/powerauth-java-crypto/pom.xml +++ b/powerauth-java-crypto/pom.xml @@ -26,7 +26,7 @@ io.getlime.security powerauth-crypto-parent - 1.6.0 + 1.7.0-SNAPSHOT diff --git a/powerauth-java-http/pom.xml b/powerauth-java-http/pom.xml index abd76bea..ea5cf1a6 100644 --- a/powerauth-java-http/pom.xml +++ b/powerauth-java-http/pom.xml @@ -28,7 +28,7 @@ io.getlime.security powerauth-crypto-parent - 1.6.0 + 1.7.0-SNAPSHOT From f06800df9c03ca232d4ef150d202259ea81ae66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Ra=C4=8Dansk=C3=BD?= Date: Thu, 14 Dec 2023 07:03:18 +0100 Subject: [PATCH 02/17] Fix #566: Specify maven.compiler.release property (#567) * Fix #566: Specify maven.compiler.release property --- pom.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ec678980..f6bfe16a 100644 --- a/pom.xml +++ b/pom.xml @@ -71,9 +71,11 @@ UTF-8 - 17 - 17 + 17 + ${java.version} + 3.3.0 + 3.11.0 3.1.1 3.6.3 3.3.0 @@ -120,6 +122,16 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + + org.apache.maven.plugins From cb7107ea0a03d89e9d55ceef319d77902422e19e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 05:07:38 +0000 Subject: [PATCH 03/17] Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.2 to 3.2.3 Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.2 to 3.2.3. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.2...surefire-3.2.3) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f6bfe16a..e772542e 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ 3.1.1 3.6.3 3.3.0 - 3.2.2 + 3.2.3 32.1.3-jre 2.0.9 5.10.1 From 4a0078e25f583ccebf5367945362dfa0cb38eb82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 05:03:27 +0000 Subject: [PATCH 04/17] Bump org.apache.maven.plugins:maven-compiler-plugin Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.11.0 to 3.12.1. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.11.0...maven-compiler-plugin-3.12.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e772542e..a6b7e238 100644 --- a/pom.xml +++ b/pom.xml @@ -75,7 +75,7 @@ ${java.version} 3.3.0 - 3.11.0 + 3.12.1 3.1.1 3.6.3 3.3.0 From d5843ac03edbc53d718d9221584b443e9e65756e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 05:03:34 +0000 Subject: [PATCH 05/17] Bump com.fasterxml.jackson.core:jackson-databind from 2.16.0 to 2.16.1 Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.16.0 to 2.16.1. - [Commits](https://github.com/FasterXML/jackson/commits) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- powerauth-java-crypto/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerauth-java-crypto/pom.xml b/powerauth-java-crypto/pom.xml index aa2030ed..0a7b8013 100644 --- a/powerauth-java-crypto/pom.xml +++ b/powerauth-java-crypto/pom.xml @@ -51,7 +51,7 @@ com.fasterxml.jackson.core jackson-databind - 2.16.0 + 2.16.1 test From 5d4a0f8a53afa2de4dd7259ab71f0203d3efacc2 Mon Sep 17 00:00:00 2001 From: Roman Strobl Date: Wed, 27 Dec 2023 11:41:59 +0800 Subject: [PATCH 06/17] Fix #564: Create PowerAuth-2023.12.md --- docs/PowerAuth-2023.12.md | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 docs/PowerAuth-2023.12.md diff --git a/docs/PowerAuth-2023.12.md b/docs/PowerAuth-2023.12.md new file mode 100644 index 00000000..0a6818ba --- /dev/null +++ b/docs/PowerAuth-2023.12.md @@ -0,0 +1,70 @@ +# PowerAuth 2023.12 + +## Migration guides + +For updating to 2023.12, please follow these migration guides: + +- [PowerAuth Server - Migration from version 1.5.0 to version 1.6.0](https://github.com/wultra/powerauth-server/blob/develop/docs/PowerAuth-Server-1.6.0.md) +- [PowerAuth Push Server - Migration from version 1.5.0 to version 1.6.0](https://github.com/wultra/powerauth-push-server/blob/develop/docs/PowerAuth-Push-Server-1.6.0.md) +- [PowerAuth Web Flow - Migration from version 1.5.0 to version 1.6.0](https://github.com/wultra/powerauth-webflow/blob/develop/docs/Web-Flow-1.6.0.md) + +## Components for version 2023.12 + +### Back-End Applications + +| Component | Application Name | Version | Description | +|---|---|---|---| +| PowerAuth Server | `powerauth-java-server.war` | 1.6.0 | Core back-end component for PowerAuth stack. | +| PowerAuth Admin | `powerauth-admin.war` | 1.6.0 | Administration console for PowerAuth Server. | +| PowerAuth Push Server | `powerauth-push-server.war` | 1.6.0 | Simple to deploy push server for APNS and FCM. | +| Enrollment Server | `enrollment-server.war` | 1.6.0 | Enrollment server for PowerAuth. | +| PowerAuth Web Flow | `powerauth-webflow.war` | 1.6.0 | Central web authentication page. | +| PowerAuth Next Step | `powerauth-next-step.war` | 1.6.0 | Authorization server used for PowerAuth Web Flow component. | +| PowerAuth Data Adapter | `powerauth-data-adapter.war` | 1.6.0 | Customization component for PowerAuth Web Flow. | +| PowerAuth Tpp Engine | `powerauth-tpp-engine.war` | 1.6.0 | Third party provider registry and consent engine. | + +### Utilities + +| Component | Application Name | Version | Description | +|---|---|---|---| +| PowerAuth Command Line Tool | `powerauth-java-cmd.jar` | 1.6.0 | Command line tool for integration testing. | + +### Mobile Libraries + +| Platform | Package Name | Version | Description | +|---|---|---|---| +| iOS | `PowerAuth2` | 1.8.0 | A client library for iOS. | +| watchOS | `PowerAuth2ForWatch` | 1.8.0 | A limited library for watchOS. | +| iOS App Extensions | `PowerAuth2ForExtensions` | 1.8.0 | A limited library for iOS App Extensions. | +| Android | `com.wultra.android.powerauth:powerauth-sdk` | 1.8.0 | A client library for Android. | +| React Native | `react-native-powerauth-mobile-sdk` | 2.4.1 | React Native wrapper library for PowerAuth. | + +### Back-End Integration Libraries + +| Component | Library Name | Version | Description | +|---|---|---|---| +| PowerAuth RESTful Model | `powerauth-restful-model.jar` | 1.6.0 | Model classes for request and response objects used in PowerAuth Standard RESTful API. | +| PowerAuth RESTful API Security for Spring | `powerauth-restful-security-spring.jar` | 1.6.0 | High-level integration libraries for RESTful API security, build for Spring MVC. | +| PowerAuth REST Client for Spring | `powerauth-rest-client-spring.jar` | 1.6.0 | REST service client for PowerAuth Server service. | +| PowerAuth Push Server RESTful Model | `powerauth-push-model.jar` | 1.6.0 | Model classes for request and response objects used in PowerAuth Push Server. | +| PowerAuth Push Server RESTful Client | `powerauth-push-client.jar` | 1.6.0 | Client implementation that simplifies integration with PowerAuth Push Server service. | +| PowerAuth Data Adapter RESTful Model | `powerauth-data-adapter-model.jar` | 1.6.0 | Model classes for request and response objects used in PowerAuth Data Adapter component. | +| PowerAuth Data Adapter Client | `powerauth-data-adapter-client.jar` | 1.6.0 | Client implementation that simplifies integration with PowerAuth Data Adapter custom component. | +| PowerAuth Next Step RESTful Model | `powerauth-nextstep-model.jar` | 1.6.0 | Model classes for request and response objects used in PowerAuth Next Step service. | +| PowerAuth Next Step Client | `powerauth-nextstep-client.jar` | 1.6.0 | Client implementation that simplifies integration with PowerAuth Next Step service. | +| PowerAuth Mobile Token Model | `mtoken-model.jar` | 1.6.0 | Model classes for request and response objects used in PowerAuth Mobile Token. | + +### Technical Dependencies + +| Component | Library Name | Version | Description | +|---|---|---|---| +| PowerAuth Cryptography | `powerauth-java-crypto.jar` | 1.6.0 | Core cryptography implementation of the PowerAuth protocol. | +| PowerAuth HTTP Utilities | `powerauth-java-http.jar` | 1.6.0 | Utilities used for binding PowerAuth cryptography to HTTP technology. | +| PowerAuth Command-Line Tool Library | `powerauth-java-cmd-lib.jar` | 1.6.0 | Library used for implementation of the PowerAuth Command-Line Tool app, useful for unit testing. | +| Wultra Java Networking Objects | `rest-model-base.jar` | 1.8.0 | Base classes for RESTful API networking, shared across all Wultra back-end projects. | +| Wultra REST Client | `rest-client-base.jar` | 1.8.0 | Base RESTful client implementation, shared across all Wultra back-end projects. | +| Wultra Auditing Library | `audit-base.jar` | 1.8.0 | Base auditing library, shared across all Wultra back-end projects. | + +## Known Issues When Updating From Older Versions + +_No known issues so far._ From e8ee792f52e3c5ae4a0cd57e0b54086fce8dea1b Mon Sep 17 00:00:00 2001 From: Roman Strobl Date: Fri, 29 Dec 2023 12:26:00 +0700 Subject: [PATCH 07/17] Add mToken SDKs --- docs/PowerAuth-2023.12.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/PowerAuth-2023.12.md b/docs/PowerAuth-2023.12.md index 0a6818ba..3a25dd6f 100644 --- a/docs/PowerAuth-2023.12.md +++ b/docs/PowerAuth-2023.12.md @@ -38,6 +38,8 @@ For updating to 2023.12, please follow these migration guides: | iOS App Extensions | `PowerAuth2ForExtensions` | 1.8.0 | A limited library for iOS App Extensions. | | Android | `com.wultra.android.powerauth:powerauth-sdk` | 1.8.0 | A client library for Android. | | React Native | `react-native-powerauth-mobile-sdk` | 2.4.1 | React Native wrapper library for PowerAuth. | +| mToken SDK iOS | `WultraMobileTokenSDK` | 1.8.2 | Mobile Token SDK for the iOS platform. | +| mToken SDK Android | `com.wultra.android.mtokensdk:mtoken-sdk-android` | 1.8.3 | Mobile Token SDK for the Android platform. | ### Back-End Integration Libraries From dc38ae1763bac1b622b4c3886b1ce861e744ae6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 05:13:11 +0000 Subject: [PATCH 08/17] Bump slf4j.version from 2.0.9 to 2.0.10 Bumps `slf4j.version` from 2.0.9 to 2.0.10. Updates `org.slf4j:slf4j-api` from 2.0.9 to 2.0.10 Updates `org.slf4j:slf4j-simple` from 2.0.9 to 2.0.10 --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.slf4j:slf4j-simple dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e772542e..451edef2 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ 3.3.0 3.2.3 32.1.3-jre - 2.0.9 + 2.0.10 5.10.1 From 783f1e617dad3307807a86b0def2763ce68d54bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Ra=C4=8Dansk=C3=BD?= Date: Fri, 12 Jan 2024 06:51:20 +0100 Subject: [PATCH 09/17] Fix #554: Remove Guava dependency (#569) * Fix #554: Remove Guava dependency --- pom.xml | 7 --- powerauth-java-crypto/pom.xml | 4 -- .../lib/generator/IdentifierGenerator.java | 49 ++++++++++++------- .../powerauth/crypto/lib/totp/Totp.java | 3 +- .../crypto/lib/util/SignatureUtils.java | 3 +- ...Test.java => IdentifierGeneratorTest.java} | 20 ++++++-- .../powerauth/crypto/lib/totp/TotpTest.java | 1 - powerauth-java-http/pom.xml | 4 -- 8 files changed, 49 insertions(+), 42 deletions(-) rename powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/activation/{PowerAuthRecoveryCodeTest.java => IdentifierGeneratorTest.java} (87%) diff --git a/pom.xml b/pom.xml index ea3e67f2..7c7183ce 100644 --- a/pom.xml +++ b/pom.xml @@ -80,19 +80,12 @@ 3.6.3 3.3.0 3.2.3 - 32.1.3-jre 2.0.10 5.10.1 - - com.google.guava - guava - ${guava.version} - - org.slf4j slf4j-api diff --git a/powerauth-java-crypto/pom.xml b/powerauth-java-crypto/pom.xml index 0a7b8013..12a34d63 100644 --- a/powerauth-java-crypto/pom.xml +++ b/powerauth-java-crypto/pom.xml @@ -30,10 +30,6 @@ - - com.google.guava - guava - org.slf4j slf4j-api diff --git a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/generator/IdentifierGenerator.java b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/generator/IdentifierGenerator.java index 22235200..b3873060 100644 --- a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/generator/IdentifierGenerator.java +++ b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/generator/IdentifierGenerator.java @@ -16,7 +16,6 @@ */ package io.getlime.security.powerauth.crypto.lib.generator; -import com.google.common.io.BaseEncoding; import io.getlime.security.powerauth.crypto.lib.encryptor.ecies.kdf.KdfX9_63; import io.getlime.security.powerauth.crypto.lib.model.RecoveryInfo; import io.getlime.security.powerauth.crypto.lib.model.RecoverySeed; @@ -24,6 +23,7 @@ import io.getlime.security.powerauth.crypto.lib.model.exception.GenericCryptoException; import io.getlime.security.powerauth.crypto.lib.util.CRC16; import io.getlime.security.powerauth.crypto.lib.util.KeyConvertor; +import org.bouncycastle.util.encoders.Base32; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -79,17 +79,6 @@ public String generateActivationId() { return UUID.randomUUID().toString(); } - /** - * Generate a new string of a default length (5) with characters from Base32 encoding. - * - * @return New string with Base32 characters of a given length. - * @throws CryptoProviderException In case key cryptography provider is incorrectly initialized. - */ - private String generateBase32Token() throws CryptoProviderException { - byte[] randomBytes = keyGenerator.generateRandomBytes(BASE32_KEY_LENGTH); - return BaseEncoding.base32().omitPadding().encode(randomBytes).substring(0, BASE32_KEY_LENGTH); - } - /** * Generate version 3.0 or higher activation code. The format of activation code is "ABCDE-FGHIJ-KLMNO-PQRST". *

@@ -170,8 +159,8 @@ public boolean validateActivationCode(String activationCode) { return false; } - // Decode the Base32 value - byte[] activationCodeBytes = BaseEncoding.base32().decode(activationCode.replace("-", "")); + final String activationCodeBase32 = fetchActivationCodeBase32(activationCode); + final byte[] activationCodeBytes = Base32.decode(activationCodeBase32); // Verify byte array length if (activationCodeBytes.length != ACTIVATION_CODE_BYTES_LENGTH) { @@ -190,6 +179,32 @@ public boolean validateActivationCode(String activationCode) { return expectedChecksum == actualChecksum; } + /** + * Remove hyphens and calculate padding. + *

+ * When {@code ACTIVATION_CODE_BYTES_LENGTH = 12}, the Base32 padding is always {@code ====}, but this method is safe to change the length in the future. + * + * @param activationCode activation code with hyphens + * @return base32 with padding + */ + private static String fetchActivationCodeBase32(final String activationCode) { + final String activationCodeWithoutHyphens = activationCode.replace("-", ""); + // The activation code does not contain the padding, but it must be present in the Base32 value to be valid. + final String activationCodePadding = switch (activationCodeWithoutHyphens.length() % 8) { + case 2: + yield "======"; + case 4: + yield "===="; + case 5: + yield "==="; + case 7: + yield "="; + default: + yield ""; + }; + return activationCodeWithoutHyphens + activationCodePadding; + } + /** * Generate recovery code and PUK. * @return Recovery code and PUK. @@ -367,9 +382,9 @@ private String generatePuk(SecretKey recoveryPukBaseKey, byte[] indexBytes) thro * @param activationCodeBytes Raw activation code bytes. * @return Base32 String representation of activation code. */ - private String encodeActivationCode(byte[] activationCodeBytes) { - // Generate Base32 representation from 12 activation code bytes, without padding characters. - String base32Encoded = BaseEncoding.base32().omitPadding().encode(activationCodeBytes); + private String encodeActivationCode(final byte[] activationCodeBytes) { + // Padding may be ignored; ACTIVATION_CODE_BYTES_LENGTH is set to 12 and the following substring takes only the first 20 characters. + final String base32Encoded = Base32.toBase32String(activationCodeBytes); // Split Base32 string into 4 groups, each one contains 5 characters. Use "-" as separator. return base32Encoded.substring(0, BASE32_KEY_LENGTH) diff --git a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/totp/Totp.java b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/totp/Totp.java index a0599c0c..bcd0991a 100644 --- a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/totp/Totp.java +++ b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/totp/Totp.java @@ -16,7 +16,6 @@ */ package io.getlime.security.powerauth.crypto.lib.totp; -import com.google.common.base.Strings; import io.getlime.security.powerauth.crypto.lib.model.exception.CryptoProviderException; import org.bouncycastle.util.Arrays; import org.slf4j.Logger; @@ -268,7 +267,7 @@ private static long countTimeSteps(final Instant instant, final Duration stepLen } private static String padWithZeros(final String source, final int length) { - return Strings.padStart(source, length, '0'); + return String.format("%1$" + length + "s", source).replace(' ', '0'); } /** diff --git a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/util/SignatureUtils.java b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/util/SignatureUtils.java index 316b2297..f944470d 100644 --- a/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/util/SignatureUtils.java +++ b/powerauth-java-crypto/src/main/java/io/getlime/security/powerauth/crypto/lib/util/SignatureUtils.java @@ -16,7 +16,6 @@ */ package io.getlime.security.powerauth.crypto.lib.util; -import com.google.common.base.Joiner; import io.getlime.security.powerauth.crypto.lib.config.DecimalSignatureConfiguration; import io.getlime.security.powerauth.crypto.lib.config.PowerAuthConfiguration; import io.getlime.security.powerauth.crypto.lib.config.SignatureConfiguration; @@ -164,7 +163,7 @@ private String computePowerAuthDecimalSignature(byte[] data, List sig signatureStringComponents[i] = String.format("%0" + signatureDecimalLength + "d", number); } // Join components with dash. - return Joiner.on("-").join(signatureStringComponents); + return String.join("-", signatureStringComponents); } /** diff --git a/powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/activation/PowerAuthRecoveryCodeTest.java b/powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/activation/IdentifierGeneratorTest.java similarity index 87% rename from powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/activation/PowerAuthRecoveryCodeTest.java rename to powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/activation/IdentifierGeneratorTest.java index 464b5097..360db676 100644 --- a/powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/activation/PowerAuthRecoveryCodeTest.java +++ b/powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/activation/IdentifierGeneratorTest.java @@ -20,23 +20,25 @@ import io.getlime.security.powerauth.crypto.lib.generator.KeyGenerator; import io.getlime.security.powerauth.crypto.lib.model.RecoveryInfo; import io.getlime.security.powerauth.crypto.lib.model.RecoverySeed; -import io.getlime.security.powerauth.crypto.lib.model.exception.CryptoProviderException; -import io.getlime.security.powerauth.crypto.lib.model.exception.GenericCryptoException; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import javax.crypto.SecretKey; -import java.security.*; +import java.security.KeyPair; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.Security; import java.util.HashSet; import static org.junit.jupiter.api.Assertions.*; /** + * Test for {@link IdentifierGenerator}. * * @author Roman Strobl, roman.strobl@wultra.com */ -public class PowerAuthRecoveryCodeTest { +class IdentifierGeneratorTest { private final IdentifierGenerator identifierGenerator = new IdentifierGenerator(); @@ -50,7 +52,7 @@ public static void setUp() { } @Test - public void testRecoveryCodeDerivation() throws CryptoProviderException, InvalidKeyException, GenericCryptoException { + void testRecoveryCodeDerivation() throws Exception { // Number of PUKs to test int pukCount = 100; @@ -89,4 +91,12 @@ public void testRecoveryCodeDerivation() throws CryptoProviderException, Invalid } } + @Test + void testGenerateActivationCode() throws Exception { + final String result = identifierGenerator.generateActivationCode(new byte[10]); + + // Base32 is AAAAAAAAAAAAAAAAAAAA==== + assertEquals("AAAAA-AAAAA-AAAAA-AAAAA", result); + } + } diff --git a/powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/lib/totp/TotpTest.java b/powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/lib/totp/TotpTest.java index 9f2b7f80..24e77f7d 100644 --- a/powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/lib/totp/TotpTest.java +++ b/powerauth-java-crypto/src/test/java/io/getlime/security/powerauth/crypto/lib/totp/TotpTest.java @@ -36,7 +36,6 @@ * Test for {@link Totp}. * * @author Lubos Racansky, lubos.racansky@wultra.com - * */ class TotpTest { diff --git a/powerauth-java-http/pom.xml b/powerauth-java-http/pom.xml index ea5cf1a6..2453a9ea 100644 --- a/powerauth-java-http/pom.xml +++ b/powerauth-java-http/pom.xml @@ -37,10 +37,6 @@ powerauth-java-crypto ${project.version} - - com.google.guava - guava - org.slf4j slf4j-api From 6b3ae1745e3c82f78d8a1f45e33201b87f769046 Mon Sep 17 00:00:00 2001 From: Roman Strobl Date: Sun, 14 Jan 2024 12:44:20 +0800 Subject: [PATCH 10/17] Add utilities into release overview --- docs/PowerAuth-2023.12.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/PowerAuth-2023.12.md b/docs/PowerAuth-2023.12.md index 3a25dd6f..1cdb5d3e 100644 --- a/docs/PowerAuth-2023.12.md +++ b/docs/PowerAuth-2023.12.md @@ -28,6 +28,9 @@ For updating to 2023.12, please follow these migration guides: | Component | Application Name | Version | Description | |---|---|---|---| | PowerAuth Command Line Tool | `powerauth-java-cmd.jar` | 1.6.0 | Command line tool for integration testing. | +| User Data Store | `user-data-store.war` | 1.1.0 | Server component which stores clients personal data securely. | +| Mobile Utility Server | `mobile-utility-server.war` | 1.6.0 | Server component for dynamic SSL pinning, text localization, and other utilities. | +| SSL Pinning Tool | `ssl-pinning-tool.jar` | 1.6.0 | A command line utility used to sign SSL certificates for dynamic SSL pinning. | ### Mobile Libraries From 83caad3f0dd4456d263863b45deec898a076fc3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 05:09:46 +0000 Subject: [PATCH 11/17] Bump org.apache.maven.plugins:maven-surefire-plugin from 3.2.3 to 3.2.5 Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.2.3 to 3.2.5. - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.3...surefire-3.2.5) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7c7183ce..b5eb5a09 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ 3.1.1 3.6.3 3.3.0 - 3.2.3 + 3.2.5 2.0.10 5.10.1 From 0b64df0ac8bf9e9b7c3b043d79514f5597890fa7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 05:49:21 +0000 Subject: [PATCH 12/17] Bump slf4j.version from 2.0.10 to 2.0.11 Bumps `slf4j.version` from 2.0.10 to 2.0.11. Updates `org.slf4j:slf4j-api` from 2.0.10 to 2.0.11 Updates `org.slf4j:slf4j-simple` from 2.0.10 to 2.0.11 --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.slf4j:slf4j-simple dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b5eb5a09..e022a7c7 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ 3.6.3 3.3.0 3.2.5 - 2.0.10 + 2.0.11 5.10.1 From 6a87726525959c9673ddfaa7efe8f090ee78edfc Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Mon, 15 Jan 2024 09:27:16 +0100 Subject: [PATCH 13/17] Fix #578: Add 2023.12 and 2023.08 to releases --- docs/Releases.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Releases.md b/docs/Releases.md index 8b07b1a5..47da40b6 100644 --- a/docs/Releases.md +++ b/docs/Releases.md @@ -12,6 +12,8 @@ In order to consolidate the information about the current versions, we have intr ## List of Releases +- [PowerAuth 2023.12](./PowerAuth-2023.12.md) +- [PowerAuth 2023.08](./PowerAuth-2023.08.md) - [PowerAuth 2022.12](./PowerAuth-2022.12.md) - [PowerAuth 2022.05](./PowerAuth-2022.05.md) - [PowerAuth 2022.04](./PowerAuth-2022.04.md) From 4d12af5fc4165e24b3ad7e45f7a83f4bc56c6adc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 05:50:49 +0000 Subject: [PATCH 14/17] Bump junit.version from 5.10.1 to 5.10.2 Bumps `junit.version` from 5.10.1 to 5.10.2. Updates `org.junit.jupiter:junit-jupiter-engine` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2) Updates `org.junit.jupiter:junit-jupiter-params` from 5.10.1 to 5.10.2 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.1...r5.10.2) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-params dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e022a7c7..ed2ae1d5 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ 3.3.0 3.2.5 2.0.11 - 5.10.1 + 5.10.2 From 5cb4310b95eaa9db9cbf016d0373f6ebb36c2d4b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 05:22:37 +0000 Subject: [PATCH 15/17] Bump slf4j.version from 2.0.11 to 2.0.12 Bumps `slf4j.version` from 2.0.11 to 2.0.12. Updates `org.slf4j:slf4j-api` from 2.0.11 to 2.0.12 Updates `org.slf4j:slf4j-simple` from 2.0.11 to 2.0.12 --- updated-dependencies: - dependency-name: org.slf4j:slf4j-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.slf4j:slf4j-simple dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ed2ae1d5..0eb56aca 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ 3.6.3 3.3.0 3.2.5 - 2.0.11 + 2.0.12 5.10.2 From a6e5c32f97c80789b282ce2b12497173c222e20e Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Wed, 21 Feb 2024 13:11:25 +0100 Subject: [PATCH 16/17] Fix #583: Set release version to 1.7.0 --- pom.xml | 2 +- powerauth-java-crypto/pom.xml | 2 +- powerauth-java-http/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 0eb56aca..426a352f 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ io.getlime.security powerauth-crypto-parent - 1.7.0-SNAPSHOT + 1.7.0 pom 2016 diff --git a/powerauth-java-crypto/pom.xml b/powerauth-java-crypto/pom.xml index 12a34d63..1b5bfcc7 100644 --- a/powerauth-java-crypto/pom.xml +++ b/powerauth-java-crypto/pom.xml @@ -26,7 +26,7 @@ io.getlime.security powerauth-crypto-parent - 1.7.0-SNAPSHOT + 1.7.0 diff --git a/powerauth-java-http/pom.xml b/powerauth-java-http/pom.xml index 2453a9ea..df338208 100644 --- a/powerauth-java-http/pom.xml +++ b/powerauth-java-http/pom.xml @@ -28,7 +28,7 @@ io.getlime.security powerauth-crypto-parent - 1.7.0-SNAPSHOT + 1.7.0 From a3ba0e3bb46ac9499c989115eff2fe691c094013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Ra=C4=8Dansk=C3=BD?= Date: Fri, 23 Feb 2024 08:33:43 +0100 Subject: [PATCH 17/17] Fix #587: Create PowerAuth-2024.03 page (#588) * Fix #587: Create PowerAuth-2024.03 page --- docs/PowerAuth-2024.03.md | 83 +++++++++++++++++++++++++++++++++++++++ docs/Releases.md | 1 + 2 files changed, 84 insertions(+) create mode 100644 docs/PowerAuth-2024.03.md diff --git a/docs/PowerAuth-2024.03.md b/docs/PowerAuth-2024.03.md new file mode 100644 index 00000000..9f802c46 --- /dev/null +++ b/docs/PowerAuth-2024.03.md @@ -0,0 +1,83 @@ +# PowerAuth 2024.03 + + +## Migration guides + +For updating to 2024.03, please follow these migration guides: + +- [PowerAuth Server - Migration from version 1.6.0 to version 1.7.0](https://github.com/wultra/powerauth-server/blob/develop/docs/PowerAuth-Server-1.7.0.md) +- [PowerAuth Push Server - Migration from version 1.6.0 to version 1.7.0](https://github.com/wultra/powerauth-push-server/blob/develop/docs/PowerAuth-Push-Server-1.7.0.md) +- [PowerAuth Web Flow - Migration from version 1.6.0 to version 1.7.0](https://github.com/wultra/powerauth-webflow/blob/develop/docs/Web-Flow-1.7.0.md) + + +## Components for version 2024.03 + + +### Back-End Applications + +| Component | Application Name | Version | Description | +|------------------------|------------------------------|---------|-------------------------------------------------------------| +| PowerAuth Server | `powerauth-java-server.war` | 1.7.0 | Core back-end component for PowerAuth stack. | +| PowerAuth Admin | `powerauth-admin.war` | 1.7.0 | Administration console for PowerAuth Server. | +| PowerAuth Push Server | `powerauth-push-server.war` | 1.7.0 | Simple to deploy push server for APNS and FCM. | +| Enrollment Server | `enrollment-server.war` | 1.7.0 | Enrollment server for PowerAuth. | +| PowerAuth Web Flow | `powerauth-webflow.war` | 1.7.0 | Central web authentication page. | +| PowerAuth Next Step | `powerauth-next-step.war` | 1.7.0 | Authorization server used for PowerAuth Web Flow component. | +| PowerAuth Data Adapter | `powerauth-data-adapter.war` | 1.7.0 | Customization component for PowerAuth Web Flow. | +| PowerAuth Tpp Engine | `powerauth-tpp-engine.war` | 1.7.0 | Third party provider registry and consent engine. | + + +### Utilities + +| Component | Application Name | Version | Description | +|-----------------------------|-----------------------------|---------|-----------------------------------------------------------------------------------| +| PowerAuth Command Line Tool | `powerauth-java-cmd.jar` | 1.7.0 | Command line tool for integration testing. | +| User Data Store | `user-data-store.war` | 1.2.0 | Server component which stores clients personal data securely. | +| Mobile Utility Server | `mobile-utility-server.war` | 1.7.0 | Server component for dynamic SSL pinning, text localization, and other utilities. | +| SSL Pinning Tool | `ssl-pinning-tool.jar` | 1.7.0 | A command line utility used to sign SSL certificates for dynamic SSL pinning. | + + +### Mobile Libraries + +| Platform | Package Name | Version | Description | +|--------------------|---------------------------------------------------|---------|---------------------------------------------| +| iOS | `PowerAuth2` | 1.8.0 | A client library for iOS. | +| watchOS | `PowerAuth2ForWatch` | 1.8.0 | A limited library for watchOS. | +| iOS App Extensions | `PowerAuth2ForExtensions` | 1.8.0 | A limited library for iOS App Extensions. | +| Android | `com.wultra.android.powerauth:powerauth-sdk` | 1.8.0 | A client library for Android. | +| React Native | `react-native-powerauth-mobile-sdk` | 2.5.0 | React Native wrapper library for PowerAuth. | +| mToken SDK iOS | `WultraMobileTokenSDK` | 1.9.0 | Mobile Token SDK for the iOS platform. | +| mToken SDK Android | `com.wultra.android.mtokensdk:mtoken-sdk-android` | 1.9.0 | Mobile Token SDK for the Android platform. | + + +### Back-End Integration Libraries + +| Component | Library Name | Version | Description | +|-------------------------------------------|-----------------------------------------|---------|-------------------------------------------------------------------------------------------------| +| PowerAuth RESTful Model | `powerauth-restful-model.jar` | 1.7.0 | Model classes for request and response objects used in PowerAuth Standard RESTful API. | +| PowerAuth RESTful API Security for Spring | `powerauth-restful-security-spring.jar` | 1.7.0 | High-level integration libraries for RESTful API security, build for Spring MVC. | +| PowerAuth REST Client for Spring | `powerauth-rest-client-spring.jar` | 1.7.0 | REST service client for PowerAuth Server service. | +| PowerAuth Push Server RESTful Model | `powerauth-push-model.jar` | 1.7.0 | Model classes for request and response objects used in PowerAuth Push Server. | +| PowerAuth Push Server RESTful Client | `powerauth-push-client.jar` | 1.7.0 | Client implementation that simplifies integration with PowerAuth Push Server service. | +| PowerAuth Data Adapter RESTful Model | `powerauth-data-adapter-model.jar` | 1.7.0 | Model classes for request and response objects used in PowerAuth Data Adapter component. | +| PowerAuth Data Adapter Client | `powerauth-data-adapter-client.jar` | 1.7.0 | Client implementation that simplifies integration with PowerAuth Data Adapter custom component. | +| PowerAuth Next Step RESTful Model | `powerauth-nextstep-model.jar` | 1.7.0 | Model classes for request and response objects used in PowerAuth Next Step service. | +| PowerAuth Next Step Client | `powerauth-nextstep-client.jar` | 1.7.0 | Client implementation that simplifies integration with PowerAuth Next Step service. | +| PowerAuth Mobile Token Model | `mtoken-model.jar` | 1.7.0 | Model classes for request and response objects used in PowerAuth Mobile Token. | + + +### Technical Dependencies + +| Component | Library Name | Version | Description | +|-------------------------------------|------------------------------|---------|--------------------------------------------------------------------------------------------------| +| PowerAuth Cryptography | `powerauth-java-crypto.jar` | 1.7.0 | Core cryptography implementation of the PowerAuth protocol. | +| PowerAuth HTTP Utilities | `powerauth-java-http.jar` | 1.7.0 | Utilities used for binding PowerAuth cryptography to HTTP technology. | +| PowerAuth Command-Line Tool Library | `powerauth-java-cmd-lib.jar` | 1.7.0 | Library used for implementation of the PowerAuth Command-Line Tool app, useful for unit testing. | +| Wultra Java Networking Objects | `rest-model-base.jar` | 1.9.0 | Base classes for RESTful API networking, shared across all Wultra back-end projects. | +| Wultra REST Client | `rest-client-base.jar` | 1.9.0 | Base RESTful client implementation, shared across all Wultra back-end projects. | +| Wultra Auditing Library | `audit-base.jar` | 1.9.0 | Base auditing library, shared across all Wultra back-end projects. | + + +## Known Issues When Updating From Older Versions + +_No known issues so far._ diff --git a/docs/Releases.md b/docs/Releases.md index 47da40b6..7a5662a2 100644 --- a/docs/Releases.md +++ b/docs/Releases.md @@ -12,6 +12,7 @@ In order to consolidate the information about the current versions, we have intr ## List of Releases +- [PowerAuth 2024.03](./PowerAuth-2024.03.md) - [PowerAuth 2023.12](./PowerAuth-2023.12.md) - [PowerAuth 2023.08](./PowerAuth-2023.08.md) - [PowerAuth 2022.12](./PowerAuth-2022.12.md)