diff --git a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/AttachmentRestClientTest.java b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/AttachmentRestClientTest.java index 161ba8e8..18210f38 100644 --- a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/AttachmentRestClientTest.java +++ b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/AttachmentRestClientTest.java @@ -27,6 +27,7 @@ import com.wultra.security.userdatastore.client.model.response.AttachmentCreateResponse; import com.wultra.security.userdatastore.client.model.response.AttachmentResponse; import com.wultra.security.userdatastore.client.model.response.DocumentCreateResponse; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; @@ -34,6 +35,7 @@ import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ActiveProfiles; +import java.security.Security; import java.util.Collections; import static org.junit.jupiter.api.Assertions.*; @@ -56,7 +58,8 @@ class AttachmentRestClientTest { private UserDataStoreRestClient restClient; @BeforeAll - void initRestClient() throws Exception { + void initTests() throws Exception { + Security.addProvider(new BouncyCastleProvider()); RestClientConfiguration config = new RestClientConfiguration(); config.setHttpBasicAuthEnabled(true); config.setHttpBasicAuthUsername("admin"); diff --git a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/ClaimsRestClientTest.java b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/ClaimsRestClientTest.java index 04c734d5..afe0950c 100644 --- a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/ClaimsRestClientTest.java +++ b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/ClaimsRestClientTest.java @@ -20,6 +20,7 @@ import com.wultra.core.rest.client.base.RestClientConfiguration; import com.wultra.security.userdatastore.UserDataStoreRestClient; import com.wultra.security.userdatastore.client.model.error.UserDataStoreClientException; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; @@ -27,6 +28,7 @@ import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ActiveProfiles; +import java.security.Security; import java.util.LinkedHashMap; import java.util.Map; @@ -51,7 +53,8 @@ class ClaimsRestClientTest { private UserDataStoreRestClient restClient; @BeforeAll - void initRestClient() throws Exception { + void initTests() throws Exception { + Security.addProvider(new BouncyCastleProvider()); RestClientConfiguration config = new RestClientConfiguration(); config.setHttpBasicAuthEnabled(true); config.setHttpBasicAuthUsername("admin"); diff --git a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/DocumentRestClientTest.java b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/DocumentRestClientTest.java index 5d9156a6..5b41c34c 100644 --- a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/DocumentRestClientTest.java +++ b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/DocumentRestClientTest.java @@ -24,6 +24,7 @@ import com.wultra.security.userdatastore.client.model.request.*; import com.wultra.security.userdatastore.client.model.response.DocumentCreateResponse; import com.wultra.security.userdatastore.client.model.response.DocumentResponse; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; @@ -31,6 +32,7 @@ import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ActiveProfiles; +import java.security.Security; import java.util.*; import static org.junit.jupiter.api.Assertions.*; @@ -53,7 +55,8 @@ class DocumentRestClientTest { private UserDataStoreRestClient restClient; @BeforeAll - void initRestClient() throws Exception { + void initTests() throws Exception { + Security.addProvider(new BouncyCastleProvider()); RestClientConfiguration config = new RestClientConfiguration(); config.setHttpBasicAuthEnabled(true); config.setHttpBasicAuthUsername("admin"); diff --git a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/PhotoRestClientTest.java b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/PhotoRestClientTest.java index 337cfccc..279f3448 100644 --- a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/PhotoRestClientTest.java +++ b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/PhotoRestClientTest.java @@ -28,6 +28,7 @@ import com.wultra.security.userdatastore.client.model.response.DocumentCreateResponse; import com.wultra.security.userdatastore.client.model.response.PhotoCreateResponse; import com.wultra.security.userdatastore.client.model.response.PhotoResponse; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; @@ -35,6 +36,7 @@ import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ActiveProfiles; +import java.security.Security; import java.util.Collections; import java.util.List; @@ -59,7 +61,8 @@ class PhotoRestClientTest { private UserDataStoreRestClient restClient; @BeforeAll - void initRestClient() throws Exception { + void initTests() throws Exception { + Security.addProvider(new BouncyCastleProvider()); RestClientConfiguration config = new RestClientConfiguration(); config.setHttpBasicAuthEnabled(true); config.setHttpBasicAuthUsername("admin"); diff --git a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/UserClaimsRestClientTest.java b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/UserClaimsRestClientTest.java index 3b36a428..c48b6764 100644 --- a/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/UserClaimsRestClientTest.java +++ b/user-data-store-server/src/test/java/com/wultra/security/userdatastore/restclient/UserClaimsRestClientTest.java @@ -20,6 +20,7 @@ import com.wultra.core.rest.client.base.RestClientConfiguration; import com.wultra.security.userdatastore.UserDataStoreRestClient; import com.wultra.security.userdatastore.client.model.error.UserDataStoreClientException; +import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; @@ -27,6 +28,7 @@ import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ActiveProfiles; +import java.security.Security; import java.util.LinkedHashMap; import java.util.Map; @@ -50,7 +52,8 @@ class UserClaimsRestClientTest { private UserDataStoreRestClient restClient; @BeforeAll - void initRestClient() throws Exception { + void initTests() throws Exception { + Security.addProvider(new BouncyCastleProvider()); RestClientConfiguration config = new RestClientConfiguration(); config.setHttpBasicAuthEnabled(true); config.setHttpBasicAuthUsername("admin"); diff --git a/user-data-store-server/src/test/resources/application-test.properties b/user-data-store-server/src/test/resources/application-test.properties index 28b97a10..4e8cd936 100644 --- a/user-data-store-server/src/test/resources/application-test.properties +++ b/user-data-store-server/src/test/resources/application-test.properties @@ -24,4 +24,6 @@ spring.datasource.password= # Hibernate Configuration spring.jpa.hibernate.ddl-auto=create-drop -spring.liquibase.enabled=false \ No newline at end of file +spring.liquibase.enabled=false + +user-data-store.db.master.encryption.key=L5PaAACAoW2+t0DLkVN9diTCJDAxBxFOLZcILp6JfKM=