From 27e1535d75978bb7558c17bf27db7d1a1131fe40 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 22 Sep 2021 17:56:33 +0200 Subject: update third-party libs to latest versions --- .../checks/spotbugs-exclude.xml | 17 ++++++++- eidas_modules/authmodule-eIDAS-v2/pom.xml | 43 ++++++++++------------ 2 files changed, 34 insertions(+), 26 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2') diff --git a/eidas_modules/authmodule-eIDAS-v2/checks/spotbugs-exclude.xml b/eidas_modules/authmodule-eIDAS-v2/checks/spotbugs-exclude.xml index 375f73f4..d961b4d6 100644 --- a/eidas_modules/authmodule-eIDAS-v2/checks/spotbugs-exclude.xml +++ b/eidas_modules/authmodule-eIDAS-v2/checks/spotbugs-exclude.xml @@ -2,7 +2,9 @@ - + + + @@ -27,5 +29,16 @@ - + + + + + + + + + + + + diff --git a/eidas_modules/authmodule-eIDAS-v2/pom.xml b/eidas_modules/authmodule-eIDAS-v2/pom.xml index 188bbd26..603395ab 100644 --- a/eidas_modules/authmodule-eIDAS-v2/pom.xml +++ b/eidas_modules/authmodule-eIDAS-v2/pom.xml @@ -119,6 +119,11 @@ jackson-datatype-jsr310 + + org.bitbucket.b_c + jose4j + + javax.servlet javax.servlet-api @@ -136,23 +141,6 @@ spring-test test - - com.github.skjolber - mockito-soap-cxf - test - - - org.powermock - powermock-module-junit4 - 2.0.7 - test - - - org.powermock - powermock-api-mockito2 - 2.0.7 - test - at.asitplus.eidas.ms_specific @@ -173,17 +161,24 @@ test test-jar + - com.fasterxml.jackson.core - jackson-databind - 2.11.2 - compile + com.github.skjolber + mockito-soap-cxf + test + - org.bitbucket.b_c - jose4j - 0.7.2 + org.powermock + powermock-module-junit4 + test + + + org.powermock + powermock-api-mockito2 + test + -- cgit v1.2.3 From 0f0b59abce4242bdd69de1b48f2d197bc84255ba Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 21 Oct 2021 09:27:11 +0200 Subject: switch to next release version --- build_reporting/pom.xml | 2 +- connector/pom.xml | 2 +- connector_lib/pom.xml | 2 +- eidas_modules/authmodule-eIDAS-v2/pom.xml | 2 +- eidas_modules/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2') diff --git a/build_reporting/pom.xml b/build_reporting/pom.xml index 871c76ad..c6bd080e 100644 --- a/build_reporting/pom.xml +++ b/build_reporting/pom.xml @@ -6,7 +6,7 @@ at.asitplus.eidas ms_specific - 1.2.3-SNAPSHOT + 1.2.3 build_reporting pom diff --git a/connector/pom.xml b/connector/pom.xml index 3145f051..48e449c3 100644 --- a/connector/pom.xml +++ b/connector/pom.xml @@ -6,7 +6,7 @@ at.asitplus.eidas ms_specific - 1.2.3-SNAPSHOT + 1.2.3 at.asitplus.eidas.ms_specific diff --git a/connector_lib/pom.xml b/connector_lib/pom.xml index d30af204..5fad0ad1 100644 --- a/connector_lib/pom.xml +++ b/connector_lib/pom.xml @@ -7,7 +7,7 @@ at.asitplus.eidas ms_specific - 1.2.3-SNAPSHOT + 1.2.3 at.asitplus.eidas.ms_specific connector_lib diff --git a/eidas_modules/authmodule-eIDAS-v2/pom.xml b/eidas_modules/authmodule-eIDAS-v2/pom.xml index 603395ab..a2db974b 100644 --- a/eidas_modules/authmodule-eIDAS-v2/pom.xml +++ b/eidas_modules/authmodule-eIDAS-v2/pom.xml @@ -6,7 +6,7 @@ at.asitplus.eidas.ms_specific modules - 1.2.3-SNAPSHOT + 1.2.3 at.asitplus.eidas.ms_specific.modules authmodule-eIDAS-v2 diff --git a/eidas_modules/pom.xml b/eidas_modules/pom.xml index 0c6183dc..0693d793 100644 --- a/eidas_modules/pom.xml +++ b/eidas_modules/pom.xml @@ -4,7 +4,7 @@ at.asitplus.eidas ms_specific - 1.2.3-SNAPSHOT + 1.2.3 at.asitplus.eidas.ms_specific modules diff --git a/pom.xml b/pom.xml index e2445c37..a0aa2a90 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 at.asitplus.eidas ms_specific - 1.2.3-SNAPSHOT + 1.2.3 pom MS specific eIDAS components -- cgit v1.2.3 From aada1bdcfdc4e0666923acd452ebf7ac9b8fe5da Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 21 Oct 2021 10:29:58 +0200 Subject: switch to next snapshot version --- build_reporting/pom.xml | 2 +- connector/pom.xml | 2 +- connector_lib/pom.xml | 2 +- eidas_modules/authmodule-eIDAS-v2/pom.xml | 2 +- eidas_modules/pom.xml | 2 +- pom.xml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'eidas_modules/authmodule-eIDAS-v2') diff --git a/build_reporting/pom.xml b/build_reporting/pom.xml index c6bd080e..ef3f735f 100644 --- a/build_reporting/pom.xml +++ b/build_reporting/pom.xml @@ -6,7 +6,7 @@ at.asitplus.eidas ms_specific - 1.2.3 + 1.2.4-SNAPSHOT build_reporting pom diff --git a/connector/pom.xml b/connector/pom.xml index 48e449c3..e7e09177 100644 --- a/connector/pom.xml +++ b/connector/pom.xml @@ -6,7 +6,7 @@ at.asitplus.eidas ms_specific - 1.2.3 + 1.2.4-SNAPSHOT at.asitplus.eidas.ms_specific diff --git a/connector_lib/pom.xml b/connector_lib/pom.xml index 5fad0ad1..0c9a1ab6 100644 --- a/connector_lib/pom.xml +++ b/connector_lib/pom.xml @@ -7,7 +7,7 @@ at.asitplus.eidas ms_specific - 1.2.3 + 1.2.4-SNAPSHOT at.asitplus.eidas.ms_specific connector_lib diff --git a/eidas_modules/authmodule-eIDAS-v2/pom.xml b/eidas_modules/authmodule-eIDAS-v2/pom.xml index a2db974b..017e82c1 100644 --- a/eidas_modules/authmodule-eIDAS-v2/pom.xml +++ b/eidas_modules/authmodule-eIDAS-v2/pom.xml @@ -6,7 +6,7 @@ at.asitplus.eidas.ms_specific modules - 1.2.3 + 1.2.4-SNAPSHOT at.asitplus.eidas.ms_specific.modules authmodule-eIDAS-v2 diff --git a/eidas_modules/pom.xml b/eidas_modules/pom.xml index 0693d793..758180e0 100644 --- a/eidas_modules/pom.xml +++ b/eidas_modules/pom.xml @@ -4,7 +4,7 @@ at.asitplus.eidas ms_specific - 1.2.3 + 1.2.4-SNAPSHOT at.asitplus.eidas.ms_specific modules diff --git a/pom.xml b/pom.xml index a0aa2a90..33b3e796 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 at.asitplus.eidas ms_specific - 1.2.3 + 1.2.4-SNAPSHOT pom MS specific eIDAS components -- cgit v1.2.3 From 92cbdb1315174bed0cdb7e565fec181301012a85 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Sun, 9 Jan 2022 14:50:27 +0100 Subject: refactor(core): update GUI generation to new API from EAAF-Components 1.2.x --- .../resources/specific_eIDAS_connector.beans.xml | 2 +- .../spring/SpringTest_connector.beans.xml | 2 +- .../gui/DefaultVelocityGuiBuilderImpl.java | 11 ++ .../connector/gui/SpringMvcGuiFormBuilderImpl.java | 123 --------------------- .../gui/StaticGuiBuilderConfiguration.java | 8 +- .../resources/SpringTest-context_tasks_test.xml | 2 +- 6 files changed, 18 insertions(+), 130 deletions(-) delete mode 100644 connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/SpringMvcGuiFormBuilderImpl.java (limited to 'eidas_modules/authmodule-eIDAS-v2') diff --git a/connector/src/main/resources/specific_eIDAS_connector.beans.xml b/connector/src/main/resources/specific_eIDAS_connector.beans.xml index df2a9aa4..8ff4e565 100644 --- a/connector/src/main/resources/specific_eIDAS_connector.beans.xml +++ b/connector/src/main/resources/specific_eIDAS_connector.beans.xml @@ -104,7 +104,7 @@ class="at.asitplus.eidas.specific.connector.gui.DefaultVelocityGuiBuilderImpl" /> + class="at.gv.egiz.eaaf.core.impl.gui.builder.SpringMvcGuiFormBuilderImpl" /> diff --git a/connector/src/test/resources/spring/SpringTest_connector.beans.xml b/connector/src/test/resources/spring/SpringTest_connector.beans.xml index 4d770570..8f3d25ad 100644 --- a/connector/src/test/resources/spring/SpringTest_connector.beans.xml +++ b/connector/src/test/resources/spring/SpringTest_connector.beans.xml @@ -96,7 +96,7 @@ class="at.asitplus.eidas.specific.connector.gui.DefaultVelocityGuiBuilderImpl" /> + class="at.gv.egiz.eaaf.core.impl.gui.builder.SpringMvcGuiFormBuilderImpl" /> diff --git a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/DefaultVelocityGuiBuilderImpl.java b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/DefaultVelocityGuiBuilderImpl.java index e7ebc92f..2283081e 100644 --- a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/DefaultVelocityGuiBuilderImpl.java +++ b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/DefaultVelocityGuiBuilderImpl.java @@ -25,10 +25,14 @@ package at.asitplus.eidas.specific.connector.gui; import java.io.InputStream; +import javax.servlet.http.HttpServletRequest; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.http.MediaType; import org.springframework.stereotype.Service; +import at.gv.egiz.eaaf.core.api.gui.IGuiBuilderConfiguration; import at.gv.egiz.eaaf.core.api.gui.IVelocityGuiBuilderConfiguration; import at.gv.egiz.eaaf.core.exceptions.GuiBuildException; import at.gv.egiz.eaaf.core.impl.gui.AbstractVelocityGuiFormBuilderImpl; @@ -63,4 +67,11 @@ public class DefaultVelocityGuiBuilderImpl extends AbstractVelocityGuiFormBuilde } } + @Override + public String evaluateResponseContentType(HttpServletRequest httpReq, IGuiBuilderConfiguration config, + String loggerName) throws GuiBuildException { + return MediaType.TEXT_HTML_VALUE; + + } + } diff --git a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/SpringMvcGuiFormBuilderImpl.java b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/SpringMvcGuiFormBuilderImpl.java deleted file mode 100644 index 70ab73ad..00000000 --- a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/SpringMvcGuiFormBuilderImpl.java +++ /dev/null @@ -1,123 +0,0 @@ -package at.asitplus.eidas.specific.connector.gui; - -import java.util.Locale; -import java.util.Map; - -import javax.annotation.Nullable; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.web.servlet.LocaleResolver; -import org.springframework.web.servlet.ModelAndView; -import org.springframework.web.servlet.View; -import org.springframework.web.servlet.ViewResolver; - -import at.gv.egiz.eaaf.core.api.gui.IGuiBuilderConfiguration; -import at.gv.egiz.eaaf.core.api.gui.ISpringMvcGuiFormBuilder; -import at.gv.egiz.eaaf.core.exceptions.GuiBuildException; - -public class SpringMvcGuiFormBuilderImpl implements ISpringMvcGuiFormBuilder { - private static final Logger log = LoggerFactory.getLogger(SpringMvcGuiFormBuilderImpl.class); - - private @Autowired(required = false) ViewResolver[] viewResolvers; - private @Autowired(required = false) LocaleResolver localeResolver; - - @Override - public void build(HttpServletRequest httpReq, HttpServletResponse httpResp, IGuiBuilderConfiguration config, - String loggerName) throws GuiBuildException { - build(httpReq, httpResp, config, null, loggerName); - - } - - @Override - public void build(HttpServletRequest httpReq, HttpServletResponse httpResp, IGuiBuilderConfiguration config, - String contentType, String loggerName) throws GuiBuildException { - try { - final ModelAndView mav = new ModelAndView(config.getViewName()); - if (config.getViewParameters() != null) { - mav.addAllObjects(config.getViewParameters()); - } - - render(mav, httpReq, httpResp); - - } catch (final Exception e) { - log.info("Can NOT generate GUI for illustration", e); - throw new GuiBuildException(e.getMessage(), e); - - } - - } - - protected void render(ModelAndView mv, HttpServletRequest request, HttpServletResponse response) - throws Exception { - // Determine locale for request and apply it to the response. - final Locale locale = - this.localeResolver != null ? this.localeResolver.resolveLocale(request) : request.getLocale(); - response.setLocale(locale); - - View view; - final String viewName = mv.getViewName(); - if (viewName != null) { - // We need to resolve the view name. - view = resolveViewName(viewName, mv.getModelMap(), locale, request); - if (view == null) { - throw new ServletException("Could not resolve view with name '" + mv.getViewName() + "' "); - } - - } else { - // No need to lookup: the ModelAndView object contains the actual View object. - view = mv.getView(); - if (view == null) { - throw new ServletException("ModelAndView [" + mv + "] neither contains a view name nor a " - + "View object "); - } - - } - - // Delegate to the View object for rendering. - if (log.isTraceEnabled()) { - log.trace("Rendering view [{}] ", view); - - } - - try { - HttpStatus status = mv.getStatus(); - if (status != null) { - response.setStatus(status.value()); - - } - - view.render(mv.getModelMap(), request, response); - - } catch (final Exception ex) { - if (log.isDebugEnabled()) { - log.debug("Error rendering view [" + view + "]", ex); - } - - throw ex; - - } - - } - - protected View resolveViewName(String viewName, @Nullable Map model, - Locale locale, HttpServletRequest request) throws Exception { - if (viewResolvers != null) { - for (final ViewResolver viewResolver : this.viewResolvers) { - final View view = viewResolver.resolveViewName(viewName, locale); - if (view != null) { - return view; - } - - } - } - - return null; - } - -} diff --git a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/StaticGuiBuilderConfiguration.java b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/StaticGuiBuilderConfiguration.java index 25f5beda..9701ddda 100644 --- a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/StaticGuiBuilderConfiguration.java +++ b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/StaticGuiBuilderConfiguration.java @@ -26,7 +26,7 @@ package at.asitplus.eidas.specific.connector.gui; import java.io.IOException; import java.io.InputStream; -import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.text.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.Resource; @@ -123,16 +123,16 @@ public class StaticGuiBuilderConfiguration extends AbstractGuiFormBuilderConfigu @Override public void putCustomParameter(GroupDefinition group, String key, String value) { - setViewParameter(getFromGroup(), key, StringEscapeUtils.escapeHtml(value)); + setViewParameter(getFromGroup(), key, StringEscapeUtils.escapeHtml4(value)); } @Override protected void putSpecificViewParameters() { if (pendingReq != null) { - setViewParameter(getFromGroup(), PARAM_PENDINGREQUESTID, StringEscapeUtils.escapeHtml(pendingReq + setViewParameter(getFromGroup(), PARAM_PENDINGREQUESTID, StringEscapeUtils.escapeHtml4(pendingReq .getPendingRequestId())); - setViewParameter(getFromGroup(), PARAM_PENDINGREQUESTID_DEPRECATED, StringEscapeUtils.escapeHtml( + setViewParameter(getFromGroup(), PARAM_PENDINGREQUESTID_DEPRECATED, StringEscapeUtils.escapeHtml4( pendingReq.getPendingRequestId())); } diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml index 60ecfa8c..6d6bb51e 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/SpringTest-context_tasks_test.xml @@ -20,7 +20,7 @@ + class="at.gv.egiz.eaaf.core.impl.gui.builder.SpringMvcGuiFormBuilderImpl" /> -- cgit v1.2.3