From eed64f78c6e0dd37145b373d7218c07c0f4a8a33 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 30 Jul 2021 11:16:49 +0200 Subject: do not forward SOAP exception into MOA-ID exception handling because child objects of SOAP exceptions are not serializable --- .../ehvd/service/EhvdCommunicationService.java | 2 +- .../InjectEhvdIdentityInformationQsSystemTest.java | 30 ++++++++++++++++++++++ .../resources/config/config_qs_service.properties | 1 + 3 files changed, 32 insertions(+), 1 deletion(-) (limited to 'id') diff --git a/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java b/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java index 2ef79a141..51bae6dfd 100644 --- a/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java +++ b/id/server/modules/moa-id-module-ehvd_integration/src/main/java/at/gv/egovernment/moa/id/auth/modules/ehvd/service/EhvdCommunicationService.java @@ -103,7 +103,7 @@ public class EhvdCommunicationService implements IEhvdCommunication { ? StringUtils.isNotEmpty(e.getFault().getFaultString()) ? e.getFault().getFaultString() : e.getMessage() : e.getMessage(); Logger.warn("EHVD communication failed with SOAP response: " + errorMsg, e); - throw new EhvdException(ERROR_EHVD_02, new Object[] {errorMsg}, e); + throw new EhvdException(ERROR_EHVD_02, new Object[] {errorMsg}); } catch (final Exception e) { Logger.error("EHVD communication failed with generic error: " + e.getMessage(), e); diff --git a/id/server/modules/moa-id-module-ehvd_integration/src/test/java/at/gv/egovernment/moa/id/auth/modules/ehvd/test/tasks/InjectEhvdIdentityInformationQsSystemTest.java b/id/server/modules/moa-id-module-ehvd_integration/src/test/java/at/gv/egovernment/moa/id/auth/modules/ehvd/test/tasks/InjectEhvdIdentityInformationQsSystemTest.java index e77e2db58..8bccefc8d 100644 --- a/id/server/modules/moa-id-module-ehvd_integration/src/test/java/at/gv/egovernment/moa/id/auth/modules/ehvd/test/tasks/InjectEhvdIdentityInformationQsSystemTest.java +++ b/id/server/modules/moa-id-module-ehvd_integration/src/test/java/at/gv/egovernment/moa/id/auth/modules/ehvd/test/tasks/InjectEhvdIdentityInformationQsSystemTest.java @@ -25,6 +25,7 @@ import javax.xml.ws.soap.SOAPFaultException; import org.apache.commons.lang3.RandomStringUtils; import org.junit.Before; +import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -92,6 +93,35 @@ public class InjectEhvdIdentityInformationQsSystemTest { private TestRequestImpl pendingReq; private Map spConfigMap; + @BeforeClass + public static void classInitializer() { + System.setProperty( + "https.cipherSuites", + //high secure RSA bases ciphers + "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" + + ",TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" + + ",TLS_DHE_RSA_WITH_AES_256_CBC_SHA256" + + ",TLS_DHE_RSA_WITH_AES_128_CBC_SHA256" + + + //high secure ECC bases ciphers + ",TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + + ",TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + + ",TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + + ",TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + + ",TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + + ",TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + + ",TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + + ",TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + + + //secure backup chipers + ",TLS_DHE_RSA_WITH_AES_256_CBC_SHA" + + ",TLS_DHE_RSA_WITH_AES_128_CBC_SHA" + + ",TLS_RSA_WITH_AES_128_CBC_SHA" + + ",TLS_RSA_WITH_AES_256_CBC_SHA" + ); + + } + @Before public void initialize() throws EAAFParserException { httpReq = new MockHttpServletRequest("POST", "https://localhost/authhandler"); diff --git a/id/server/modules/moa-id-module-ehvd_integration/src/test/resources/config/config_qs_service.properties b/id/server/modules/moa-id-module-ehvd_integration/src/test/resources/config/config_qs_service.properties index 13ecdab2b..2f6c45365 100644 --- a/id/server/modules/moa-id-module-ehvd_integration/src/test/resources/config/config_qs_service.properties +++ b/id/server/modules/moa-id-module-ehvd_integration/src/test/resources/config/config_qs_service.properties @@ -5,4 +5,5 @@ modules.ehvd.sp.3= modules.ehvd.sp.4=435344534egewgegf modules.ehvd.service.url=https://ehvdwsqs.gesundheit.gv.at +#modules.ehvd.service.bpk.target= modules.ehvd.proxy.socks.port=12345 -- cgit v1.2.3