diff options
51 files changed, 2811 insertions, 456 deletions
@@ -9,4 +9,5 @@ target .classpath .directory .checkstyle +.metadata notCommit diff --git a/basicConfig/default_config.properties b/basicConfig/default_config.properties index df18c646..df2f899b 100644 --- a/basicConfig/default_config.properties +++ b/basicConfig/default_config.properties @@ -15,6 +15,13 @@ eidas.ms.revisionlog.logIPAddressOfUser=true ##Directory for static Web content eidas.ms.webcontent.static.directory=webcontent/ +eidas.ms.webcontent.templates=templates/ +eidas.ms.webcontent.properties=properties/messages + +## extended validation of pending-request Id's +eidas.ms.core.pendingrequestid.maxlifetime=300 +eidas.ms.core.pendingrequestid.digist.algorithm=HmacSHA256 +eidas.ms.core.pendingrequestid.digist.secret=pendingReqIdSecret ## eIDAS Ref. Implementation connector ### eidas.ms.auth.eIDAS.node_v2.entityId=ownSpecificConnector @@ -29,8 +36,8 @@ eidas.ms.auth.eIDAS.node_v2.workarounds.useRequestIdAsTransactionIdentifier=true eidas.ms.auth.eIDAS.node_v2.loa.requested.minimum=http://eidas.europa.eu/LoA/high eidas.ms.auth.eIDAS.szrclient.useTestService=true -eidas.ms.auth.eIDAS.szrclient.endpoint.prod=http://prodszr.test -eidas.ms.auth.eIDAS.szrclient.endpoint.test=http://testszr.test +eidas.ms.auth.eIDAS.szrclient.endpoint.prod= +eidas.ms.auth.eIDAS.szrclient.endpoint.test=http://localhost:1234/demoszr eidas.ms.auth.eIDAS.szrclient.ssl.keyStore.path=keys/..... eidas.ms.auth.eIDAS.szrclient.ssl.keyStore.password= eidas.ms.auth.eIDAS.szrclient.ssl.trustStore.path= diff --git a/basicConfig/eIDAS/igniteSpecificCommunication.xml b/basicConfig/eIDAS/igniteSpecificCommunication.xml new file mode 100644 index 00000000..f817f5a4 --- /dev/null +++ b/basicConfig/eIDAS/igniteSpecificCommunication.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + ~ Copyright (c) 2018 by European Commission + ~ + ~ Licensed under the EUPL, Version 1.2 or - as soon they will be + ~ approved by the European Commission - subsequent versions of the + ~ EUPL (the "Licence"); + ~ You may not use this work except in compliance with the Licence. + ~ You may obtain a copy of the Licence at: + ~ https://joinup.ec.europa.eu/page/eupl-text-11-12 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the Licence is distributed on an "AS IS" basis, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + ~ implied. + ~ See the Licence for the specific language governing permissions and + ~ limitations under the Licence. + --> + +<!-- + Ignite Spring configuration file to startup Ignite cache. + + This file demonstrates how to configure cache using Spring. Provided cache + will be created on node startup. + + Use this configuration file when running HTTP REST examples (see 'examples/rest' folder). + + When starting a standalone node, you need to execute the following command: + {IGNITE_HOME}/bin/ignite.{bat|sh} examples/config/ignite-cache.xml + + When starting Ignite from Java IDE, pass path to this file to Ignition: + Ignition.start("examples/config/ignite-cache.xml"); +--> + + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd"> + + <bean id="igniteSpecificCommunication.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + + <property name="igniteInstanceName" value="igniteSpecificCommunication"/> + + <property name="cacheConfiguration"> + <list> + + <!--Specific Communication Caches--> + <!-- Partitioned cache example configuration (Atomic mode). --> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="specificNodeConnectorRequestCache"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="backups" value="1"/> + </bean> + <!-- Partitioned cache example configuration (Atomic mode). --> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="nodeSpecificProxyserviceRequestCache"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="backups" value="1"/> + </bean> + <!-- Partitioned cache example configuration (Atomic mode). --> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="specificNodeProxyserviceResponseCache"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="backups" value="1"/> + </bean> + <!-- Partitioned cache example configuration (Atomic mode). --> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="nodeSpecificConnectorResponseCache"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="backups" value="1"/> + </bean> + <!-- Partitioned cache example configuration (Atomic mode). --> + <bean class="org.apache.ignite.configuration.CacheConfiguration"> + <property name="name" value="msConnectorCache"/> + <property name="atomicityMode" value="ATOMIC"/> + <property name="backups" value="1"/> + </bean> + + </list> + </property> + + <!--Multicast discover of other nodes in the grid configuration--> + <property name="discoverySpi"> + <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> + <property name="ipFinder"> + <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder"> + <property name="multicastGroup" value="228.10.10.157"/> + </bean> + </property> + </bean> + </property> + + <!-- how frequently Ignite will output basic node metrics into the log--> + <property name="metricsLogFrequency" value="#{60 * 10 * 1000}"/> + + </bean> + + <!-- + Initialize property configurer so we can reference environment variables. + --> + <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_FALLBACK"/> + <property name="searchSystemEnvironment" value="true"/> + </bean> + +</beans> diff --git a/basicConfig/properties/messages_de.properties b/basicConfig/properties/messages_de.properties new file mode 100644 index 00000000..945e66fd --- /dev/null +++ b/basicConfig/properties/messages_de.properties @@ -0,0 +1,89 @@ +####### GUI elements #### +gui.general.language.selection.title=Sprachauswahl +gui.general.language.selection.de=Deutsch +gui.general.language.selection.en=English + +##Errorpage template +gui.errorpage.msg.title=Es ist ein Fehler aufgetreten +gui.errorpage.msg.information=Der Anmeldevorgang wurde aufgrund eines Fehlers beendet: +gui.errorpage.msg.errorcode=Fehlercode : +gui.errorpage.msg.errormsg=Fehlermeldung: +gui.errorpage.msg.stacktrace=Stacktrace: + +##Country-Selection page +gui.countryselection.title=eIDAS-Login Länderauswahl +gui.countryselection.logo.bmi.alt=Logo BMI +gui.countryselection.link.bmi=Startseite BMI +gui.countryselection.header1=Bundesministerium für Inneres +gui.countryselection.header2=Zentraler eIDAS Knoten der Republik Österreich +gui.countryselection.header3=Betrieben durch das Bundesministerium für Inneres +gui.countryselection.header.selection=Wählen Sie Ihr Land +gui.countryselection.cancle=Abbrechen +gui.countryselection.notsupportedinfo=Wenn Sie Ihr Land in dieser Aufzählung nicht entdecken, dann wird Ihre elektronische Identität (eID) leider noch nicht unterstützt. + +gui.countryselection.country.be=Belgien +gui.countryselection.country.be.logo.alt=Belgische-eID +gui.countryselection.country.hr=Kroatien +gui.countryselection.country.hr.logo.alt=Kroatische-eID +gui.countryselection.country.cy=Zypern +gui.countryselection.country.cy.logo.alt=Zypriotische-eID +gui.countryselection.country.cz=Tschechische Republik +gui.countryselection.country.cz.logo.alt=Tschechische Republik-eID +gui.countryselection.country.ee=Estland +gui.countryselection.country.ee.logo.alt=Estländische-eID +gui.countryselection.country.de=Deutschland +gui.countryselection.country.de.logo.alt=Deutsche-eID +gui.countryselection.country.is=Island +gui.countryselection.country.is.logo.alt=Isländische-eID +gui.countryselection.country.it=Italien +gui.countryselection.country.it.logo.alt=Italienische-eID +gui.countryselection.country.lt=Litauen +gui.countryselection.country.lt.logo.alt=Litauische-eID +gui.countryselection.country.lv=Lettland +gui.countryselection.country.lv.logo.alt=Lettländische-eID +gui.countryselection.country.nl=Niederlande +gui.countryselection.country.nl.logo.alt=Niederländische-eID +gui.countryselection.country.pl=Polen +gui.countryselection.country.pl.logo.alt=Polnische-eID +gui.countryselection.country.pt=Portugal +gui.countryselection.country.pt.logo.alt=Portugisische-eID +gui.countryselection.country.si=Slovenien +gui.countryselection.country.si.logo.alt=Slovenische-eID +gui.countryselection.country.es=Spanien +gui.countryselection.country.es.logo.alt=Spanische-eID + +gui.countryselection.country.bg=Bulgarien +gui.countryselection.country.bg.logo.alt=Bulgarische-eID +gui.countryselection.country.dk=Dänemark +gui.countryselection.country.dk.logo.alt=Dänische-eID +gui.countryselection.country.fi=Finnland +gui.countryselection.country.fi.logo.alt=Finische-eID +gui.countryselection.country.fr=Frankreich +gui.countryselection.country.fr.logo.alt=Französiche-eID +gui.countryselection.country.gr=Grichenland +gui.countryselection.country.gr.logo.alt=Grichische-eID +gui.countryselection.country.hu=Ungarn +gui.countryselection.country.hu.logo.alt=Ungarische-eID +gui.countryselection.country.ir=Irland +gui.countryselection.country.ir.logo.alt=Irische-eID +gui.countryselection.country.lu=Luxenburg +gui.countryselection.country.lu.logo.alt=Luxenburgische-eID +gui.countryselection.country.mt=Malta +gui.countryselection.country.mt.logo.alt=Malta-eID +gui.countryselection.country.ro=Romänien +gui.countryselection.country.ro.logo.alt=Romänische-eID +gui.countryselection.country.sk=Slovakei +gui.countryselection.country.sk.logo.alt=Slovakische-eID +gui.countryselection.country.sw=Schweden +gui.countryselection.country.sw.logo.alt=Schwedische-eID +gui.countryselection.country.uk=Großbritanien +gui.countryselection.country.uk.logo.alt=Britische-eID + +gui.countryselection.country.testcountry=Testland +gui.countryselection.country.testcountry.logo.alt=Testland-eID + +gui.countryselection.mode.prod=Produktion +gui.countryselection.mode.qs=Qualitätsicherung +gui.countryselection.mode.test=Test +gui.countryselection.mode.dev=Development + diff --git a/basicConfig/properties/messages_en.properties b/basicConfig/properties/messages_en.properties new file mode 100644 index 00000000..0d312c75 --- /dev/null +++ b/basicConfig/properties/messages_en.properties @@ -0,0 +1,88 @@ +####### GUI elements #### +gui.general.language.selection.title=Language selection +gui.general.language.selection.de=Deutsch +gui.general.language.selection.en=English + +##Errorpage template +gui.errorpage.msg.title=Authentication error arise +gui.errorpage.msg.information=The authentication stops on account of a process error: +gui.errorpage.msg.errorcode=Error Code: +gui.errorpage.msg.errormsg=Error Message: +gui.errorpage.msg.stacktrace=Stacktrace: + +##Country-Selection page +gui.countryselection.title=eIDAS-Login Countryselection +gui.countryselection.logo.bmi.alt=Logo BMI +gui.countryselection.link.bmi=Mainpage BMI +gui.countryselection.header1=Federal Ministry of Internal Affairs +gui.countryselection.header2=Austrian Central eIDAS Node +gui.countryselection.header3=Operated by Federal Ministry of Internal Affairs +gui.countryselection.header.selection=Select your country +gui.countryselection.cancle=Cancel +gui.countryselection.notsupportedinfo=If you cannot find your country in this list then your electronic identity (eID) is not yet supported. + +gui.countryselection.country.be=Belgium +gui.countryselection.country.be.logo.alt=Belgium-eID +gui.countryselection.country.hr=Croatia +gui.countryselection.country.hr.logo.alt=Croatia-eID +gui.countryselection.country.cy=Cyprus +gui.countryselection.country.cy.logo.alt=Cyprus-eID +gui.countryselection.country.cz=Czech Republic +gui.countryselection.country.cz.logo.alt=Czech Republic-eID +gui.countryselection.country.ee=Estonia +gui.countryselection.country.ee.logo.alt=Estonia-eID +gui.countryselection.country.de=Germany +gui.countryselection.country.de.logo.alt=German-eID +gui.countryselection.country.is=Iceland +gui.countryselection.country.is.logo.alt=Iceland-eID +gui.countryselection.country.it=Italy +gui.countryselection.country.it.logo.alt=Italy-eID +gui.countryselection.country.lt=Lithuania +gui.countryselection.country.lt.logo.alt=Lithuania-eID +gui.countryselection.country.lv=Latvia +gui.countryselection.country.lv.logo.alt=Latvia-eID +gui.countryselection.country.nl=Netherlands +gui.countryselection.country.nl.logo.alt=Netherlands-eID +gui.countryselection.country.pl=Poland +gui.countryselection.country.pl.logo.alt=Poland-eID +gui.countryselection.country.pt=Portugal +gui.countryselection.country.pt.logo.alt=Portugal-eID +gui.countryselection.country.si=Slovenia +gui.countryselection.country.si.logo.alt=Slovenia-eID +gui.countryselection.country.es=SSpain +gui.countryselection.country.es.logo.alt=Spain-eID + +gui.countryselection.country.bg=Bulgaria +gui.countryselection.country.bg.logo.alt=Bulgaria-eID +gui.countryselection.country.dk=Denmark +gui.countryselection.country.dk.logo.alt=Denmark-eID +gui.countryselection.country.fi=Finland +gui.countryselection.country.fi.logo.alt=Finland-eID +gui.countryselection.country.fr=France +gui.countryselection.country.fr.logo.alt=France-eID +gui.countryselection.country.gr=Greece +gui.countryselection.country.gr.logo.alt=Greece-eID +gui.countryselection.country.hu=Hungary +gui.countryselection.country.hu.logo.alt=Hungary-eID +gui.countryselection.country.ir=Ireland +gui.countryselection.country.ir.logo.alt=Ireland-eID +gui.countryselection.country.lu=Luxembourg +gui.countryselection.country.lu.logo.alt=Luxembourg-eID +gui.countryselection.country.mt=Malta +gui.countryselection.country.mt.logo.alt=Malta-eID +gui.countryselection.country.ro=Romania +gui.countryselection.country.ro.logo.alt=Romania-eID +gui.countryselection.country.sk=Slovakia +gui.countryselection.country.sk.logo.alt=Slovakia-eID +gui.countryselection.country.sw=Sweden +gui.countryselection.country.sw.logo.alt=Sweden-eID +gui.countryselection.country.uk=United Kingdom +gui.countryselection.country.uk.logo.alt=United Kingdom-eID + +gui.countryselection.country.testcountry=TestCountry +gui.countryselection.country.testcountry.logo.alt=Testcountry-eID + +gui.countryselection.mode.prod=Production +gui.countryselection.mode.qs=QS +gui.countryselection.mode.test=Test +gui.countryselection.mode.dev=Development
\ No newline at end of file diff --git a/basicConfig/templates/countrySelection_example.html b/basicConfig/templates/countrySelection_example.html index d28c1fb6..3b7c2d50 100644 --- a/basicConfig/templates/countrySelection_example.html +++ b/basicConfig/templates/countrySelection_example.html @@ -1,175 +1,208 @@ <!DOCTYPE html> -<html> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorator="fragments/base" + th:with="lang=${#locale.language}" th:lang="${lang}"> + <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="$contextPath/static/css/css_country.css"/> - <script type="text/javascript" src="$contextPath/static/js/js_country.js"></script> - <title>eIDAS-Login Länderauswahl</title> - -<title>eIDAS-Login</title> + <link rel="stylesheet" href="$contextPath/static/css/css_country.css" th:href="@{/static/css/css_country.css}"/> + <script type="text/javascript" src="$contextPath/static/js/js_country.js" th:attr="src=@{/static/js/js_country.js}"></script> + <title th:text="#{gui.countryselection.title}">eIDAS-Login Länderauswahl</title> </head> + <body> <div id="page"> - <h2> Select your country </h2> + <div class="languageselection" th:include="language_selection :: selectlanguage"> + LanguageSelectionBlock + </div> + + <h2 th:text="#{gui.countryselection.header.selection}"> Select your country </h2> <div id="country"> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/germany-eu_.png" alt="Germany-eID"/></a> - <input type="submit" value="Germany" role="button" id="button"> - <input type="hidden" name="selectedCountry" value="DE"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/germany-eu_.png" alt="Germany-eID" + th:attr="src=@{/img/countries/germany-eu_.png},alt=#{gui.countryselection.country.de.logo.alt}"/></a> + <input type="submit" role="button" value="Deutschland / Germany" th:attr="value=#{gui.countryselection.country.de}" /> + <input type="hidden" name="selectedCountry" value="DE"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> <select id="testEnvironment" name="selectedEnvironment"> - <option value="prod">Production</option> - <option value="qs">QS</option> - <option value="test">Testing</option> - <option value="dev">Development</option> + <option value="prod" th:text="#{gui.countryselection.mode.prod}">Production</option> + <option value="qs" th:text="#{gui.countryselection.mode.qs}">QS</option> + <option value="test" th:text="#{gui.countryselection.mode.test}">Testing</option> + <option value="dev" th:text="#{gui.countryselection.mode.dev}">Development</option> </select> </form> - - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/Belgium-EU_gray.png" alt="Belgium-eID"/></a></a> - <input type="submit" value="Belgium"> + + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/Belgium-EU_gray.png" alt="Belgium-eID" + th:attr="src=@{img/countries/Belgium-EU_gray.png},alt=#{gui.countryselection.country.be.logo.alt}"/></a> + <input type="submit" value="Belgium" th:attr="value=#{gui.countryselection.country.be}"> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Bulgaria-EU_gray.png"="Bulgaria-eID"/></a> - <input type="submit" value="Bulgaria" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Bulgaria-EU_gray.png" alt="Bulgaria-eID" + th:attr="src=@{/img/countries/Bulgaria-EU_gray.png},alt=#{gui.countryselection.country.bg.logo.alt}"/></a> + <input type="submit" value="Bulgaria" th:attr="value=#{gui.countryselection.country.bg}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/Croatia-EU_gray.png"="Croatia-eID"/></a> - <input type="submit" value="Croatia"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/Croatia-EU_gray.png" alt="Croatia-eID" + th:attr="src=@{/img/countries/Croatia-EU_gray.png},alt=#{gui.countryselection.country.hr.logo.alt}"/></a> + <input type="submit" value="Croatia" th:attr="value=#{gui.countryselection.country.hr}"> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Cyprus-EU_gray.png"="Cyprus-eID"/></a> - <input type="submit" value="Cyprus" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Cyprus-EU_gray.png" alt="Cyprus-eID" + th:attr="src=@{/img/countries/Cyprus-EU_gray.png},alt=#{gui.countryselection.country.cy.logo.alt}"/></a> + <input type="submit" value="Cyprus" th:attr="value=#{gui.countryselection.country.cy}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/CzechRepublic-EU_gray.png"="CzechRepublic-eID"/></a> - <input type="submit" value="CzechRepublic"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/CzechRepublic-EU_gray.png" alt="CzechRepublic-eID" + th:attr="src=@{/img/countries/CzechRepublic-EU_gray.png},alt=#{gui.countryselection.country.cz.logo.alt}"/></a> + <input type="submit" value="CzechRepublic" th:attr="value=#{gui.countryselection.country.cz}"> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Denmark-EU_gray.png"="Denmark-eID"/></a> - <input type="submit" value="Denmark" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Denmark-EU_gray.png" alt="Denmark-eID" + th:attr="src=@{/img/countries/Denmark-EU_gray.png},alt=#{gui.countryselection.country.dk.logo.alt}"/></a> + <input type="submit" value="Denmark" th:attr="value=#{gui.countryselection.country.dk}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/Estonia-EU_gray.png"="Estonia-eID"/></a> - <input type="submit" value="Estonia"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/Estonia-EU_gray.png" alt="Estonia-eID" + th:attr="src=@{/img/countries/Estonia-EU_gray.png},alt=#{gui.countryselection.country.ee.logo.alt}"/></a> + <input type="submit" value="Estonia" th:attr="value=#{gui.countryselection.country.ee}"> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Finland-EU_gray.png"="Finland-eID"/></a> - <input type="submit" value="Finland" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Finland-EU_gray.png" alt="Finland-eID" + th:attr="src=@{/img/countries/Finland-EU_gray.png},alt=#{gui.countryselection.country.fi.logo.alt}"/></a> + <input type="submit" value="Finland" th:attr="value=#{gui.countryselection.country.fi}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/France-EU_gray.png"="France-eID"/></a> - <input type="submit" value="France" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/France-EU_gray.png" alt="France-eID" + th:attr="src=@{/img/countries/France-EU_gray.png},alt=#{gui.countryselection.country.fr.logo.alt}"/></a> + <input type="submit" value="France" th:attr="value=#{gui.countryselection.country.fr}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Greece-EU_gray.png"="Greece-eID"/></a> - <input type="submit" value="Greece" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Greece-EU_gray.png" alt="Greece-eID" + th:attr="src=@{/img/countries/Greece-EU_gray.png},alt=#{gui.countryselection.country.gr.logo.alt}"/></a> + <input type="submit" value="Greece" th:attr="value=#{gui.countryselection.country.gr}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Hungary-EU_gray.png"="Hungary-eID"/></a> - <input type="submit" value="Hungary" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Hungary-EU_gray.png" alt="Hungary-eID" + th:attr="src=@{/img/countries/Hungary-EU_gray.png},alt=#{gui.countryselection.country.hu.logo.alt}"/></a> + <input type="submit" value="Hungary" th:attr="value=#{gui.countryselection.country.hu}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Ireland-EU_gray.png"="Ireland-eID"/></a> - <input type="submit" value="Ireland" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Ireland-EU_gray.png" alt="Ireland-eID" + th:attr="src=@{/img/countries/Ireland-EU_gray.png},alt=#{gui.countryselection.country.ir.logo.alt}"/></a> + <input type="submit" value="Ireland" th:attr="value=#{gui.countryselection.country.ir}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/Italy-EU_gray.png"="Italy-eID"/></a> - <input type="submit" value="Italy"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/Italy-EU_gray.png" alt="Italy-eID" + th:attr="src=@{/img/countries/Italy-EU_gray.png},alt=#{gui.countryselection.country.it.logo.alt}"/></a> + <input type="submit" value="Italy" th:attr="value=#{gui.countryselection.country.it}"> <select id="testEnvironment" name="selectedEnvironment"> - <option value="prod">Production</option> - <option value="qs">QS</option> - <option value="test">Testing</option> - <option value="dev">Development</option> + <option value="prod" th:text="#{gui.countryselection.mode.prod}">Production</option> + <option value="qs" th:text="#{gui.countryselection.mode.qs}">QS</option> + <option value="test" th:text="#{gui.countryselection.mode.test}">Testing</option> + <option value="dev" th:text="#{gui.countryselection.mode.dev}">Development</option> </select> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Latvia-EU_gray.png"="Latvia-eID"/></a> - <input type="submit" value="Latvia" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Latvia-EU_gray.png" alt="Latvia-eID" + th:attr="src=@{/img/countries/Latvia-EU_gray.png},alt=#{gui.countryselection.country.lv.logo.alt}"/></a> + <input type="submit" value="Latvia" th:attr="value=#{gui.countryselection.country.lv}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Luxembourg-EU_gray.png"="Luxembourg-eID"/></a> - <input type="submit" value="Luxembourg" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Luxembourg-EU_gray.png" alt="Luxembourg-eID" + th:attr="src=@{/img/countries/Luxembourg-EU_gray.png},alt=#{gui.countryselection.country.lu.logo.alt}"/></a> + <input type="submit" value="Luxembourg" th:attr="value=#{gui.countryselection.country.lu}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Malta-EU_gray.png"="Malta-eID"/></a> - <input type="submit" value="Malta" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Malta-EU_gray.png" alt="Malta-eID" + th:attr="src=@{/img/countries/Malta-EU_gray.png},alt=#{gui.countryselection.country.mt.logo.alt}"/></a> + <input type="submit" value="Malta" th:attr="value=#{gui.countryselection.country.mt}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/Poland-EU_gray.png"="Poland-eID"/></a> - <input type="submit" value="Poland"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/Poland-EU_gray.png" alt="Poland-eID" + th:attr="src=@{/img/countries/Poland-EU_gray.png},alt=#{gui.countryselection.country.pl.logo.alt}"/></a> + <input type="submit" value="Poland" th:attr="value=#{gui.countryselection.country.pl}"> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/Portugal-EU_gray.png"="Portugal-eID"/></a> - <input type="submit" value="Portugal"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/Portugal-EU_gray.png" alt="Portugal-eID" + th:attr="src=@{/img/countries/Portugal-EU_gray.png},alt=#{gui.countryselection.country.pt.logo.alt}"/></a> + <input type="submit" value="Portugal" th:attr="value=#{gui.countryselection.country.pt}"> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Romania-EU_gray.png"="Romania-eID"/></a> - <input type="submit" value="Romania" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Romania-EU_gray.png" alt="Romania-eID" + th:attr="src=@{/img/countries/Romania-EU_gray.png},alt=#{gui.countryselection.country.ro.logo.alt}"/></a> + <input type="submit" value="Romania" th:attr="value=#{gui.countryselection.country.ro}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Slovakia-EU_gray.png"="Slovakia-eID"/></a> - <input type="submit" value="Slovakia" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Slovakia-EU_gray.png" alt="Slovakia-eID" + th:attr="src=@{/img/countries/Slovakia-EU_gray.png},alt=#{gui.countryselection.country.sk.logo.alt}"/></a> + <input type="submit" value="Slovakia" th:attr="value=#{gui.countryselection.country.sk}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/Slovenia-EU_gray.png"="Slovenia-eID"/></a> - <input type="submit" value="Slovenia"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/Slovenia-EU_gray.png" alt="Slovenia-eID" + th:attr="src=@{/img/countries/Slovenia-EU_gray.png},alt=#{gui.countryselection.country.si.logo.alt}"/></a> + <input type="submit" value="Slovenia" th:attr="value=#{gui.countryselection.country.si}"> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/Spain-EU_gray.png"="Spain-eID"/></a> - <input type="submit" value="Spain"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/Spain-EU_gray.png" alt="Spain-eID" + th:attr="src=@{/img/countries/Spain-EU_gray.png},alt=#{gui.countryselection.country.es.logo.alt}"/></a> + <input type="submit" value="Spain" th:attr="value=#{gui.countryselection.country.es}"> <select id="testEnvironment" name="selectedEnvironment"> - <option value="prod">Production</option> - <option value="qs">QS</option> - <option value="test">Testing</option> - <option value="dev">Development</option> + <option value="prod" th:text="#{gui.countryselection.mode.prod}">Production</option> + <option value="qs" th:text="#{gui.countryselection.mode.qs}">QS</option> + <option value="test" th:text="#{gui.countryselection.mode.test}">Testing</option> + <option value="dev" th:text="#{gui.countryselection.mode.dev}">Development</option> </select> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/Sweden-EU_gray.png"="Sweden-eID"/></a> - <input type="submit" value="Sweden" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/Sweden-EU_gray.png" alt="Sweden-eID" + th:attr="src=@{/img/countries/Sweden-EU_gray.png},alt=#{gui.countryselection.country.se.logo.alt}"/></a> + <input type="submit" value="Sweden" th:attr="value=#{gui.countryselection.country.se}" disabled> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img class="countryimage" src="$contextPath/img/countries/TheNetherlands-EU_gray.jpg"="TheNetherlands-eID"/></a> - <input type="submit" value="Netherlands"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img class="countryimage" src="$contextPath/img/countries/TheNetherlands-EU_gray.jpg" alt="TheNetherlands-eID" + th:attr="src=@{/img/countries/TheNetherlands-EU_gray.jpg},alt=#{gui.countryselection.country.nl.logo.alt}"/></a> + <input type="submit" value="Netherlands" th:attr="value=#{gui.countryselection.country.nl}"> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <a><img disabled class="countryimage" src="$contextPath/img/countries/UnitedKingdom-EU_gray.png"="UnitedKingdom-eID"/></a> - <input type="submit" value="United Kingdom" disabled> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <a><img disabled class="countryimage" src="$contextPath/img/countries/UnitedKingdom-EU_gray.png" alt="UnitedKingdom-eID" + th:attr="src=@{/img/countries/UnitedKingdom-EU_gray.png},alt=#{gui.countryselection.country.uk.logo.alt}"/></a> + <input type="submit" value="United Kingdom" th:attr="value=#{gui.countryselection.country.uk}" disabled> </form> </div> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <input type="submit" value="Abbrechen/Cancel"> - <input type="hidden" name="stopAuthProcess" value="true"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <input type="submit" class="btn btn-outline-primary btn-block" value="Abbrechen/Cancel" th:attr="value=#{gui.countryselection.cancle}"> + <input type="hidden" name="stopAuthProcess" value="true" > + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"> </form> </div> diff --git a/basicConfig/templates/eidas_node_forward.html b/basicConfig/templates/eidas_node_forward.html new file mode 100644 index 00000000..186937d7 --- /dev/null +++ b/basicConfig/templates/eidas_node_forward.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorator="fragments/base" + th:with="lang=${#locale.language}" th:lang="${lang}"> +<head> + <script src="$contextPath/autocommit.js" + th:attr="src=@{/autocommit.js}"></script> +</head> +<body> + <noscript> + <p> + <strong>Note:</strong> Since your browser does not support + JavaScript, you must press the Continue button once to proceed. + </p> + </noscript> + + <div id="alert">Your login is being processed. Thank you for + waiting.</div> + + <form action="${endPoint}" method="post" target="_parent" + th:attr="action=@{${endPoint}}"> + <div> + <input type="hidden" name="${tokenName}" value="${tokenValue}" + th:attr="value=${tokenValue},name=${tokenName}" /> + </div> + <noscript> + <div> + <p>Your browser does not support JavaScript. Click the button to continuing the process .</p> + <input type="submit" value="Continue" /> + </div> + </noscript> + </form> + +</body> +</html>
\ No newline at end of file diff --git a/basicConfig/templates/error_message.html b/basicConfig/templates/error_message.html index fc9b75a1..86f9d29d 100644 --- a/basicConfig/templates/error_message.html +++ b/basicConfig/templates/error_message.html @@ -1,36 +1,36 @@ -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> +<!DOCTYPE HTML> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorator="fragments/base" + th:with="lang=${#locale.language}" th:lang="${lang}"> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> - <link rel="stylesheet" href="$contextPath/css/css_error.css" /> + <link rel="stylesheet" href="$contextPath/css/css_error.css" th:href="@{/css/css_error.css}" /> - <title>An error arise ... </title> + <title th:text="#{gui.errorpage.msg.title}">An error arise ... </title> </head> <body> <div id="page"> <div id="page1" class="case selected-case" role="main"> <h2 class="OA_header" role="heading">Authentication error arise</h2> - <!--div id="main"--> - <!--div id="leftcontent" class="hell" role="application"--> - - - + <div class="hell" role="application" > - <p>The authentication stops on account of a process error:</p> - <br/> - <p><b>Error Code:</b> $errorCode</p> - <p><b>Error Message:</b >$errorMsg</p> + <h2 class="OA_header" role="heading" th:text="#{gui.errorpage.msg.title}">Error Header</h2> + + <div id="alert_area" class="hell" role="application" > + <p th:text="#{gui.errorpage.msg.information}">Error Information</p> + <br/> + <p><b th:text="#{gui.errorpage.msg.errorcode}">Code :</b> <span th:text="${errorCode}"></span></p> + <p><b th:text="#{gui.errorpage.msg.errormsg}">Msg :</b > <span th:text="${#messages.msgWithParams('__${errorCode}__', '__${errorParams}__')}"></span></p> + </div> + <!-- errorMsg --> </div> + <div th:if="${stacktrace}"> + <p><b th:text="#{gui.errorpage.msg.stacktrace}">fullError</b> <span th:text="${stacktrace}"></span></p> + </div> - #if($stacktrace) - <div> - <p><b>Stacktrace:</b> $stacktrace</p> - </div> - #end - - <!--/div---> - <!--/div--> </div> </div> </body> diff --git a/basicConfig/templates/language_selection.html b/basicConfig/templates/language_selection.html new file mode 100644 index 00000000..a268eb17 --- /dev/null +++ b/basicConfig/templates/language_selection.html @@ -0,0 +1,15 @@ +<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:th="http://www.thymeleaf.org"> + + <body> + + <div th:fragment="selectlanguage"> + <a th:href="@{|${submitEndpoint}?pendingid=${pendingid}|(lang='de')}" th:text="#{gui.general.language.selection.de}">Spache1</a> + <span> </span> + <a th:href="@{|${submitEndpoint}?pendingid=${pendingid}|(lang='en')}" th:text="#{gui.general.language.selection.en}">Spache2</a> + </div> + + </body> + +</html>
\ No newline at end of file diff --git a/connector/pom.xml b/connector/pom.xml index 719678d8..2b1f4ee8 100644 --- a/connector/pom.xml +++ b/connector/pom.xml @@ -4,12 +4,11 @@ <parent> <groupId>at.asitplus.eidas</groupId> <artifactId>ms_specific</artifactId> - <version>1.x</version> + <version>1.0.3-snapshot</version> </parent> <groupId>at.asitplus.eidas.ms_specific</groupId> <artifactId>ms_specific_connector</artifactId> - <version>${egiz.eidas.version}</version> <packaging>war</packaging> <name>Connector Maven Webapp</name> <url>http://maven.apache.org</url> @@ -58,6 +57,10 @@ <artifactId>spring-context</artifactId> </dependency> <dependency> + <groupId>org.thymeleaf</groupId> + <artifactId>thymeleaf-spring5</artifactId> + </dependency> + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/config/StaticResourceConfiguration.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/config/StaticResourceConfiguration.java index 9367c69f..34b9d2fa 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/config/StaticResourceConfiguration.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/config/StaticResourceConfiguration.java @@ -1,25 +1,25 @@ -/* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. +/******************************************************************************* + * Copyright 2019 A-SIT Plus GmbH + * AT-specific eIDAS Connector has been developed in a cooperation between EGIZ, + * A-SIT Plus GmbH, A-SIT, and Graz University of Technology. * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "License"); + * You may not use this work except in compliance with the License. + * You may obtain a copy of the License at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 * * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, + * distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. + * See the License for the specific language governing permissions and + * limitations under the License. * * This product combines work with different licenses. See the "NOTICE" text * file for details on the various modules and licenses. * The "NOTICE" text file is part of the distribution. Any derivative works * that you distribute must include a readable copy of the "NOTICE" text file. - */ + *******************************************************************************/ package at.asitplus.eidas.specific.connector.config; import java.net.MalformedURLException; @@ -28,10 +28,14 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.i18n.CookieLocaleResolver; +import org.thymeleaf.templateresolver.FileTemplateResolver; import at.asitplus.eidas.specific.connector.MSeIDASNodeConstants; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; @@ -49,6 +53,8 @@ public class StaticResourceConfiguration extends WebMvcConfigurerAdapter { "/" }; + private static final String DEFAULT_MESSAGE_SOURCE = "classpath:properties/status_messages"; + @Autowired private IConfiguration basicConfig; @@ -73,7 +79,83 @@ public class StaticResourceConfiguration extends WebMvcConfigurerAdapter { } registry.addResourceHandler("/**").addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS); + + } + + @Bean + public ReloadableResourceBundleMessageSource internalMessageSource(){ + final ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); + + //add default message source + messageSource.setBasename(DEFAULT_MESSAGE_SOURCE); + messageSource.setDefaultEncoding("UTF-8"); + return messageSource; + + } + + @Bean + public ReloadableResourceBundleMessageSource messageSource(){ + final ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); + messageSource.setDefaultEncoding("UTF-8"); + messageSource.setParentMessageSource(internalMessageSource()); + + final String staticResources = basicConfig.getBasicConfiguration(MSeIDASNodeConstants.PROP_CONFIG_WEBCONTENT_PROPERTIES_PATH); + try { + if (StringUtils.isNotEmpty(staticResources)) { + final String absPath = FileUtils.makeAbsoluteURL(staticResources , basicConfig.getConfigurationRootDirectory()); + messageSource.setBasename(absPath); + + } else + log.debug("No Ressourcefolder for dynamic Web content templates"); + + } catch (final MalformedURLException e) { + log.warn("Can NOT initialize ressourcefolder for dynamic Web content templates", e); + + } + + return messageSource; + + } + + @Bean + public CookieLocaleResolver localeResolver(){ + final CookieLocaleResolver localeResolver = new CookieLocaleResolver(); + localeResolver.setCookieName("currentLanguage"); + localeResolver.setCookieMaxAge(3600); + return localeResolver; + } - + @Bean(name="templateResolver") + public FileTemplateResolver templateResolver() { + final String staticResources = basicConfig.getBasicConfiguration(MSeIDASNodeConstants.PROP_CONFIG_WEBCONTENT_TEMPLATES_PATH); + try { + if (StringUtils.isNotEmpty(staticResources)) { + String absPath = FileUtils.makeAbsoluteURL(staticResources , basicConfig.getConfigurationRootDirectory()); + if (!absPath.endsWith("/")) + absPath += "/"; + + if (absPath.startsWith("file:")) + absPath = absPath.substring("file:".length()); + + final FileTemplateResolver viewResolver = new FileTemplateResolver(); + viewResolver.setPrefix(absPath); + viewResolver.setSuffix(".html"); + viewResolver.setTemplateMode("HTML5"); + viewResolver.setCacheable(false); + + log.info("Add Ressourcefolder: " + absPath + " for dynamic Web content templates"); + return viewResolver ; + + } else + log.debug("No Ressourcefolder for dynamic Web content templates"); + + } catch (final MalformedURLException e) { + log.warn("Can NOT initialize ressourcefolder for dynamic Web content templates", e); + + } + + //TODO: implement some backup solution + return null; + } } diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/EvaluateCountrySelectionTask.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/EvaluateCountrySelectionTask.java index 8e32f00e..91cf6515 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/EvaluateCountrySelectionTask.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/EvaluateCountrySelectionTask.java @@ -33,51 +33,42 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; -import at.asitplus.eidas.specific.connector.MSConnectorEventCodes; import at.asitplus.eidas.specific.connector.MSeIDASNodeConstants; import at.gv.egiz.eaaf.core.api.data.EAAFConstants; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; -import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask; +import at.gv.egiz.eaaf.core.impl.idp.controller.tasks.AbstractLocaleAuthServletTask; /** * @author tlenz * */ @Component("EvaluateCountrySelectionTask") -public class EvaluateCountrySelectionTask extends AbstractAuthServletTask { +public class EvaluateCountrySelectionTask extends AbstractLocaleAuthServletTask { private static final Logger log = LoggerFactory.getLogger(EvaluateCountrySelectionTask.class); @Override - public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) + public void executeWithLocale(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException { try { - - String stopAuthFlag = request.getParameter(MSeIDASNodeConstants.REQ_PARAM_STOP_PROCESS); - if (StringUtils.isNotEmpty(stopAuthFlag) && Boolean.parseBoolean(stopAuthFlag)) { - log.info("Authentication process WAS stopped by entity. Stopping auth. process ... "); - revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.PROCESS_STOPPED_BY_USER); - pendingReq.setAbortedByUser(true); - pendingReq.setAuthenticated(false); - - } else { - // set parameter execution context - Enumeration<String> reqParamNames = request.getParameterNames(); - while(reqParamNames.hasMoreElements()) { - String paramName = reqParamNames.nextElement(); - if (StringUtils.isNotEmpty(paramName) && - !EAAFConstants.PROCESS_ENGINE_PENDINGREQUESTID.equalsIgnoreCase(paramName)) { - for (String el : MSeIDASNodeConstants.COUNTRY_SELECTION_PARAM_WHITELIST) { - if (el.equalsIgnoreCase(paramName)) - executionContext.put(paramName, - StringEscapeUtils.escapeHtml(request.getParameter(paramName))); - } + + // set parameter execution context + Enumeration<String> reqParamNames = request.getParameterNames(); + while(reqParamNames.hasMoreElements()) { + String paramName = reqParamNames.nextElement(); + if (StringUtils.isNotEmpty(paramName) && + !EAAFConstants.PROCESS_ENGINE_PENDINGREQUESTID.equalsIgnoreCase(paramName)) { + for (String el : MSeIDASNodeConstants.COUNTRY_SELECTION_PARAM_WHITELIST) { + if (el.equalsIgnoreCase(paramName)) + executionContext.put(paramName, + StringEscapeUtils.escapeHtml(request.getParameter(paramName))); } - } - log.info("Country selection finished. Starting auth. process for country ... "); - - } + } + } + + log.info("Country selection finished. Starting auth. process for country ... "); + } catch (Exception e) { log.warn("EvaluateBKUSelectionTask has an internal error", e); diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java index a707c827..49dd6b02 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/processes/tasks/GenerateCountrySelectionFrameTask.java @@ -34,7 +34,7 @@ import at.asitplus.eidas.specific.connector.MSConnectorEventCodes; import at.asitplus.eidas.specific.connector.MSeIDASNodeConstants; import at.asitplus.eidas.specific.connector.gui.StaticGuiBuilderConfiguration; import at.gv.egiz.eaaf.core.api.gui.IGUIBuilderConfiguration; -import at.gv.egiz.eaaf.core.api.gui.IGUIFormBuilder; +import at.gv.egiz.eaaf.core.api.gui.ISpringMVCGUIFormBuilder; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; import at.gv.egiz.eaaf.core.exceptions.EAAFException; @@ -50,7 +50,7 @@ import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask; public class GenerateCountrySelectionFrameTask extends AbstractAuthServletTask { private static final Logger log = LoggerFactory.getLogger(GenerateCountrySelectionFrameTask.class); - @Autowired IGUIFormBuilder guiBuilder; + @Autowired ISpringMVCGUIFormBuilder guiBuilder; @Autowired IConfiguration basicConfig; @Override diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/storage/CacheWitheIDASBackend.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/storage/CacheWitheIDASBackend.java index 560ae592..4bcced82 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/storage/CacheWitheIDASBackend.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/storage/CacheWitheIDASBackend.java @@ -22,34 +22,29 @@ *******************************************************************************/ package at.asitplus.eidas.specific.connector.storage; -import java.util.ArrayList; -import java.util.Date; -import java.util.Iterator; -import java.util.List; +import eu.eidas.auth.commons.cache.ConcurrentCacheService; +import eu.eidas.auth.commons.tx.AbstractCache; -import eu.eidas.auth.commons.cache.ConcurrentMapService; -import eu.eidas.auth.commons.tx.AbstractCorrelationMap; +public class CacheWitheIDASBackend extends AbstractCache<String, TransactionStoreElement> { -public class CacheWitheIDASBackend extends AbstractCorrelationMap<TransactionStoreElement> { - - protected CacheWitheIDASBackend(ConcurrentMapService concurrentMapService) { + protected CacheWitheIDASBackend(ConcurrentCacheService concurrentMapService) { super(concurrentMapService); } - public List<String> clean(Date now, long dataTimeOut) { - List<String> result = new ArrayList<String>(); - Iterator<String> iterator = map.keySet().iterator(); - while (iterator.hasNext()) { - String key = iterator.next(); - if (map.containsKey(key)) { - TransactionStoreElement element = map.get(key); - if (now.getTime() - element.getCreated().getTime() > dataTimeOut) - result.add(key); - } - } - - return result; - - } +// public List<String> clean(Date now, long dataTimeOut) { +// List<String> result = new ArrayList<String>(); +// Iterator<String> iterator = map.keySet().iterator(); +// while (iterator.hasNext()) { +// String key = iterator.next(); +// if (map.containsKey(key)) { +// TransactionStoreElement element = map.get(key); +// if (now.getTime() - element.getCreated().getTime() > dataTimeOut) +// result.add(key); +// } +// } +// +// return result; +// +// } } diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/storage/eIDASCacheTransactionStoreDecorator.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/storage/eIDASCacheTransactionStoreDecorator.java index 04a8f6fd..270d0e31 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/storage/eIDASCacheTransactionStoreDecorator.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/storage/eIDASCacheTransactionStoreDecorator.java @@ -22,6 +22,7 @@ *******************************************************************************/ package at.asitplus.eidas.specific.connector.storage; +import java.util.Arrays; import java.util.Date; import java.util.List; @@ -43,6 +44,7 @@ public class eIDASCacheTransactionStoreDecorator implements ITransactionStorage{ if (containsKey(oldKey)) { TransactionStoreElement el = storage.get(oldKey); el.setKey(newKey); + el.setData(value); storage.put(newKey, el); storage.remove(oldKey); @@ -53,19 +55,14 @@ public class eIDASCacheTransactionStoreDecorator implements ITransactionStorage{ @Override public List<String> clean(Date now, long dataTimeOut) { - return storage.clean(now, dataTimeOut); + log.info("Clean is NOT implemented, because its not needed"); + return Arrays.asList(); } @Override - public boolean containsKey(String key) { - if (key != null) { - if (storage.get(key) != null) - return true; - - } - - return false; + public boolean containsKey(String key) { + return storage.containsKey(key); } diff --git a/connector/src/main/resources/applicationContext.xml b/connector/src/main/resources/applicationContext.xml index 709b699f..9105bb56 100644 --- a/connector/src/main/resources/applicationContext.xml +++ b/connector/src/main/resources/applicationContext.xml @@ -22,6 +22,9 @@ <mvc:interceptors> <bean class="at.asitplus.eidas.specific.connector.interceptor.WebFrontEndSecurityInterceptor" /> + <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> + <property name="paramName" value="lang" /> + </bean> </mvc:interceptors> <context:property-placeholder location="${eidas.ms.configuration}"/> diff --git a/connector/src/main/resources/processes/CountrySelection.process.xml b/connector/src/main/resources/processes/CountrySelection.process.xml index e4e23e64..575bbf0d 100644 --- a/connector/src/main/resources/processes/CountrySelection.process.xml +++ b/connector/src/main/resources/processes/CountrySelection.process.xml @@ -8,6 +8,8 @@ <pd:StartEvent id="start" /> <pd:Transition from="start" to="initializeCountrySelection" /> <pd:Transition from="initializeCountrySelection" to="parseCountrySelection" /> + + <pd:Transition from="parseCountrySelection" to="initializeCountrySelection" conditionExpression="ctx['changeLanguage']"/> <pd:Transition from="parseCountrySelection" to="restartAuthProzessManagement" /> <pd:Transition from="restartAuthProzessManagement" to="end" /> <pd:EndEvent id="end" /> diff --git a/connector/src/main/resources/specific_eIDAS_connector.beans.xml b/connector/src/main/resources/specific_eIDAS_connector.beans.xml index a1abca76..32b1685d 100644 --- a/connector/src/main/resources/specific_eIDAS_connector.beans.xml +++ b/connector/src/main/resources/specific_eIDAS_connector.beans.xml @@ -72,11 +72,11 @@ <bean id="eaafProtocolAuthenticationService" class="at.gv.egiz.eaaf.core.impl.idp.auth.services.ProtocolAuthenticationService"> - <property name="guiBuilder" ref="DefaultGUIBuilderImpl"/> + <property name="guiBuilder" ref="mvcGUIBuilderImpl"/> </bean> - <bean id="simplePendingReqIdGenerationStrategy" - class="at.gv.egiz.eaaf.core.impl.utils.SimplePendingRequestIdGenerationStrategy"/> + <bean id="securePendingRequestIdGeneration" + class="at.gv.egiz.eaaf.core.impl.utils.SecurePendingRequestIdGenerationStrategy"/> <bean id="PVPMetadataProvider" class="at.asitplus.eidas.specific.connector.provider.PVPMetadataProvider" /> @@ -89,10 +89,24 @@ <bean id="GUIBuilderConfigurationFactory" class="at.asitplus.eidas.specific.connector.gui.GUIBuilderConfigurationFactory" /> + + <bean id="velocityGUIBuilderImpl" + class="at.asitplus.eidas.specific.connector.gui.DefaultVelocityGUIBuilderImpl"/> - <bean id="DefaultGUIBuilderImpl" - class="at.asitplus.eidas.specific.connector.gui.DefaultGUIBuilderImpl"/> - + <bean id="mvcGUIBuilderImpl" + class="at.asitplus.eidas.specific.connector.gui.SpringMVCGUIFormBuilderImpl"/> + + <bean id="templateEngine" + class="org.thymeleaf.spring5.SpringTemplateEngine"> + <property name="templateResolver" ref="templateResolver" /> + </bean> + + <bean class="org.thymeleaf.spring5.view.ThymeleafViewResolver"> + <property name="order" value="2"/> + <property name="templateEngine" ref="templateEngine" /> + <property name="characterEncoding" value="UTF-8"/> + </bean> + <bean id="StatusMessageProvider" class="at.asitplus.eidas.specific.connector.provider.StatusMessageProvider" /> diff --git a/connector/src/main/resources/specific_eIDAS_connector.storage.beans.xml b/connector/src/main/resources/specific_eIDAS_connector.storage.beans.xml index fa05dc9b..a460dea6 100644 --- a/connector/src/main/resources/specific_eIDAS_connector.storage.beans.xml +++ b/connector/src/main/resources/specific_eIDAS_connector.storage.beans.xml @@ -12,17 +12,7 @@ http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <import resource="classpath:specificCommunicationDefinitionApplicationContext.xml"/> - - <bean id="useDistributedMapsSpecificConnector" class="java.lang.String"> - <constructor-arg value="${eidas.ms.context.use.clustermode}"/> - </bean> - - <!-- suffix for some of the beans having two possible implementations - one for development and one for production --> - <bean id="distributedEnvSuffixSpecificConnector" class="java.lang.String"> - <constructor-arg value="#{useDistributedMapsSpecificConnector.toString()=='false'?'Dev':'Prod'}"/> - </bean> - - + <!-- <bean id="SimpleInMemoryTransactionStorage" class="at.asitplus.eidas.specific.connector.storage.SimpleInMemoryTransactionStorage" /> --> @@ -30,10 +20,16 @@ class="at.asitplus.eidas.specific.connector.storage.eIDASCacheTransactionStoreDecorator"/> <bean id="CacheWitheIDASBackend" class="at.asitplus.eidas.specific.connector.storage.CacheWitheIDASBackend"> - <constructor-arg ref="springServiceCMapspecificMSSpCorProvider#{distributedEnvSuffixSpecificConnector.toString()}"/> + <constructor-arg ref="msNodeCacheImpl"/> </bean> - <bean id="defaultHazelcastInstance" class="java.lang.String"> + <bean id="msNodeCacheImpl" class="eu.eidas.auth.cache.ConcurrentCacheServiceIgniteSpecificCommunicationImpl"> + <property name="igniteInstanceInitializerSpecificCommunication" ref="eidasIgniteInstanceInitializerSpecificCommunication"/> + <property name="cacheName" value="msConnectorCache"/> + </bean> + + + <!-- bean id="defaultHazelcastInstance" class="java.lang.String"> <constructor-arg value="eidasHazelcastInstance"/> </bean> @@ -50,6 +46,6 @@ <bean id="springServiceCMapspecificMSSpCorProviderDev" class="eu.eidas.auth.commons.cache.ConcurrentMapServiceDefaultImpl"> <property name="expireAfterAccess" value="1800"/> <property name="maximumSize" value="1000"/> - </bean> + </bean --> </beans>
\ No newline at end of file diff --git a/connector/src/main/resources/templates/countrySelection.html b/connector/src/main/resources/templates/countrySelection.html index 9ea9c08e..3937b464 100644 --- a/connector/src/main/resources/templates/countrySelection.html +++ b/connector/src/main/resources/templates/countrySelection.html @@ -1,219 +1,255 @@ <!DOCTYPE html> -<html> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorator="fragments/base" + th:with="lang=${#locale.language}" th:lang="${lang}"> + <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="$contextPath/css/css_country.css"/> - - -<title>eIDAS-Login</title> + <link rel="stylesheet" href="$contextPath/static/css/css_country.css" th:href="@{/static/css/css_country.css}"/> + <script type="text/javascript" src="$contextPath/static/js/js_country.js" th:attr="src=@{/static/static/js/js_country.js}"></script> + <title th:text="#{gui.countryselection.title}">eIDAS-Login Länderauswahl</title> </head> + <body> <div id="page"> - <h2> Select your country </h2> + <div class="languageselection" th:include="language_selection :: selectlanguage"> + LanguageSelectionBlock + </div> + + <h2 th:text="#{gui.countryselection.header.selection}"> Select your country </h2> <div id="country"> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Belgium-EU_.png" alt="Belgium-eID"/> - <input type="submit" value="Belgium"> + <a><img class="countryimage" src="$contextPath/img/countries/Belgium-EU.png" alt="Belgium-eID" + th:attr="src=@{img/countries/Belgium-EU.png},alt=#{gui.countryselection.country.be.logo.alt}"/></a> + <input type="submit" value="Belgium" th:attr="value=#{gui.countryselection.country.be}"> <input type="hidden" name="selectedCountry" value="BE"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Bulgaria-EU_.png" alt="Bulgaria-eID"/> - <input type="submit" value="Bulgaria"> + <a><img class="countryimage" src="$contextPath/img/countries/Bulgaria-EU.png" alt="Bulgaria-eID" + th:attr="src=@{img/countries/Bulgaria-EU.png},alt=#{gui.countryselection.country.bg.logo.alt}"/></a> + <input type="submit" value="Bulgaria" th:attr="value=#{gui.countryselection.country.bg}" > <input type="hidden" name="selectedCountry" value="BG"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Croatia-EU_.png" alt="Croatia-eID"/> - <input type="submit" value="Croatia"> + <a><img class="countryimage" src="$contextPath/img/countries/Croatia-EU.png" alt="Croatia-eID" + th:attr="src=@{img/countries/Croatia-EU.png},alt=#{gui.countryselection.country.hr.logo.alt}"/></a> + <input type="submit" value="Croatia" th:attr="value=#{gui.countryselection.country.hr}"> <input type="hidden" name="selectedCountry" value="HR"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Cyprus-EU_.png" alt="Cyprus-eID"/> - <input type="submit" value="Cyprus"> + <a><img class="countryimage" src="$contextPath/img/countries/Cyprus-EU.png" alt="Cyprus-eID" + th:attr="src=@{img/countries/Cyprus-EU.png},alt=#{gui.countryselection.country.cy.logo.alt}"/></a> + <input type="submit" value="Cyprus" th:attr="value=#{gui.countryselection.country.cy}"> <input type="hidden" name="selectedCountry" value="CY"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/CzechRepublic-EU_.png" alt="CzechRepublic-eID"/> - <input type="submit" value="Czech Republic"> + <a><img class="countryimage" src="$contextPath/img/countries/CzechRepublic-EU.png" alt="CzechRepublic-eID" + th:attr="src=@{img/countries/CzechRepublic-EU.png},alt=#{gui.countryselection.country.cz.logo.alt}"/></a> + <input type="submit" value="CzechRepublic" th:attr="value=#{gui.countryselection.country.cz}"> <input type="hidden" name="selectedCountry" value="CZ"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Denmark-EU_.png" alt="Denmark-eID"/> - <input type="submit" value="Denmark"> + <a><img class="countryimage" src="$contextPath/img/countries/Denmark-EU.png" alt="Denmark-eID" + th:attr="src=@{img/countries/Denmark-EU.png},alt=#{gui.countryselection.country.dk.logo.alt}"/></a> + <input type="submit" value="Denmark" th:attr="value=#{gui.countryselection.country.dk}"> <input type="hidden" name="selectedCountry" value="DK"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/germany-eu_.png" alt="Germany-eID"/> - <input type="submit" value="Germany" role="button" id="button"> + <a><img class="countryimage" src="$contextPath/img/countries/germany-eu_.png" alt="Germany-eID" + th:attr="src=@{img/countries/germany-eu_.png},alt=#{gui.countryselection.country.de.logo.alt}"/></a> + <input type="submit" role="button" value="Deutschland / Germany" th:attr="value=#{gui.countryselection.country.de}" /> <input type="hidden" name="selectedCountry" value="DE"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Estonia-EU_.png" alt="Estonia-eID"/> - <input type="submit" value="Estonia"> + <a><img class="countryimage" src="$contextPath/img/countries/Estonia-EU.png" alt="Estonia-eID" + th:attr="src=@{img/countries/Estonia-EU.png},alt=#{gui.countryselection.country.ee.logo.alt}"/></a> + <input type="submit" value="Estonia" th:attr="value=#{gui.countryselection.country.ee}"> <input type="hidden" name="selectedCountry" value="EE"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Finland-EU_.png" alt="Finland-eID"/> - <input type="submit" value="Finland"> + <a><img class="countryimage" src="$contextPath/img/countries/Finland-EU.png" alt="Finland-eID" + th:attr="src=@{img/countries/Finland-EU.png},alt=#{gui.countryselection.country.fi.logo.alt}"/></a> + <input type="submit" value="Finland" th:attr="value=#{gui.countryselection.country.fi}"> <input type="hidden" name="selectedCountry" value="FI"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/France-EU_.png" alt="France-eID"/> - <input type="submit" value="France"> + <a><img class="countryimage" src="$contextPath/img/countries/France-EU.png" alt="France-eID" + th:attr="src=@{img/countries/France-EU.png},alt=#{gui.countryselection.country.fr.logo.alt}"/></a> + <input type="submit" value="France" th:attr="value=#{gui.countryselection.country.fr}"> <input type="hidden" name="selectedCountry" value="FR"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Greece-EU_.png" alt="Greece-eID"/> - <input type="submit" value="Greece"> + <a><img class="countryimage" src="$contextPath/img/countries/Greece-EU.png" alt="Greece-eID" + th:attr="src=@{img/countries/Greece-EU.png},alt=#{gui.countryselection.country.gr.logo.alt}"/></a> + <input type="submit" value="Greece" th:attr="value=#{gui.countryselection.country.gr}"> <input type="hidden" name="selectedCountry" value="GR"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Hungary-EU_.png" alt="Hungary-eID"/> - <input type="submit" value="Hungary"> + <a><img class="countryimage" src="$contextPath/img/countries/Hungary-EU.png" alt="Hungary-eID" + th:attr="src=@{img/countries/Hungary-EU.png},alt=#{gui.countryselection.country.hu.logo.alt}"/></a> + <input type="submit" value="Hungary" th:attr="value=#{gui.countryselection.country.hu}"> <input type="hidden" name="selectedCountry" value="HU"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Iceland.png" alt="Italy-eID"/> - <input type="submit" value="Iceland"> + <a><img class="countryimage" src="$contextPath/img/countries/Ireland-EU.png" alt="Ireland-eID" + th:attr="src=@{img/countries/Iceland.png},alt=#{gui.countryselection.country.is.logo.alt}"/></a> + <input type="submit" value="Ireland" th:attr="value=#{gui.countryselection.country.is}"/> <input type="hidden" name="selectedCountry" value="IS"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Ireland-EU_.png" alt="Ireland-eID"/> - <input type="submit" value="Ireland"> + <a><img class="countryimage" src="$contextPath/img/countries/Ireland-EU.png" alt="Ireland-eID" + th:attr="src=@{img/countries/Ireland-EU.png},alt=#{gui.countryselection.country.ir.logo.alt}"/></a> + <input type="submit" value="Ireland" th:attr="value=#{gui.countryselection.country.ir}"> <input type="hidden" name="selectedCountry" value="IE"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Italy-EU_.png" alt="Italy-eID"/> - <input type="submit" value="Italy"> + <a><img class="countryimage" src="$contextPath/img/countries/Italy-EU.png" alt="Italy-eID" + th:attr="src=@{img/countries/Italy-EU.png},alt=#{gui.countryselection.country.it.logo.alt}"/></a> + <input type="submit" value="Italy" th:attr="value=#{gui.countryselection.country.it}"> <input type="hidden" name="selectedCountry" value="IT"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Latvia-EU_.png" alt="Latvia-eID"/> - <input type="submit" value="Latvia"> + <a><img class="countryimage" src="$contextPath/img/countries/Latvia-EU.png" alt="Latvia-eID" + th:attr="src=@{img/countries/Latvia-EU.png},alt=#{gui.countryselection.country.lv.logo.alt}"/></a> + <input type="submit" value="Latvia" th:attr="value=#{gui.countryselection.country.lv}"> <input type="hidden" name="selectedCountry" value="LV"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Lithuania-EU_.png" alt="Latvia-eID"/> - <input type="submit" value="Lithuania"> + <a><img class="countryimage" src="$contextPath/img/countries/Luxembourg-EU.png" alt="Luxembourg-eID" + th:attr="src=@{img/countries/Luxembourg-EU.png},alt=#{gui.countryselection.country.lu.logo.alt}"/></a> + <input type="submit" value="Luxembourg" th:attr="value=#{gui.countryselection.country.lu}"> <input type="hidden" name="selectedCountry" value="LT"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Luxembourg-EU_.png" alt="Luxembourg-eID"/> - <input type="submit" value="Luxembourg"> + <a><img class="countryimage" src="$contextPath/img/countries/Luxembourg-EU.png" alt="Luxembourg-eID" + th:attr="src=@{img/countries/Luxembourg-EU.png},alt=#{gui.countryselection.country.lu.logo.alt}"/></a> + <input type="submit" value="Luxembourg" th:attr="value=#{gui.countryselection.country.lu}"> <input type="hidden" name="selectedCountry" value="LU"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Malta-EU_.png" alt="Malta-eID"/> - <input type="submit" value="Malta"> + <a><img class="countryimage" src="$contextPath/img/countries/Malta-EU.png" alt="Malta-eID" + th:attr="src=@{img/countries/Malta-EU.png},alt=#{gui.countryselection.country.mt.logo.alt}"/></a> + <input type="submit" value="Malta" th:attr="value=#{gui.countryselection.country.mt}"> <input type="hidden" name="selectedCountry" value="MT"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/TheNetherlands-EU_.png" alt="Netherlands-eID"/> - <input type="submit" value="Netherlands"> + <a><img class="countryimage" src="$contextPath/img/countries/TheNetherlands-EU_.png" alt="Netherlands-eID" + th:attr="src=@{img/countries/TheNetherlands-EU_.png},alt=#{gui.countryselection.country.nl.logo.alt}"/></a> + <input type="submit" value="Netherlands" th:attr="value=#{gui.countryselection.country.nl}"> <input type="hidden" name="selectedCountry" value="NL"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Poland-EU_.png" alt="Poland-eID"/> - <input type="submit" value="Poland"> - <input type="hidden" name="selectedCountry" value="PL"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <a><img class="countryimage" src="$contextPath/img/countries/Poland-EU.png" alt="Poland-eID" + th:attr="src=@{img/countries/Poland-EU.png},alt=#{gui.countryselection.country.pl.logo.alt}"/></a> + <input type="submit" value="Poland" th:attr="value=#{gui.countryselection.country.pl}"> + <input type="hidden" name="selectedCountry" value="PL"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Portugal-EU_.png" alt="Portugal-eID"/> - <input type="submit" value="Portugal"> + <a><img class="countryimage" src="$contextPath/img/countries/Portugal-EU.png" alt="Portugal-eID" + th:attr="src=@{img/countries/Portugal-EU.png},alt=#{gui.countryselection.country.pt.logo.alt}"/></a> + <input type="submit" value="Portugal" th:attr="value=#{gui.countryselection.country.pt}"> <input type="hidden" name="selectedCountry" value="PT"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Romania-EU_.png" alt="Romania-eID"/> - <input type="submit" value="Romania"> + <a><img class="countryimage" src="$contextPath/img/countries/Romania-EU.png" alt="Romania-eID" + th:attr="src=@{img/countries/Romania-EU.png},alt=#{gui.countryselection.country.ro.logo.alt}"/></a> + <input type="submit" value="Romania" th:attr="value=#{gui.countryselection.country.ro}"> <input type="hidden" name="selectedCountry" value="RO"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Slovakia-EU_.png" alt="Slovakia-eID"/> - <input type="submit" value="Slovakia"> + <a><img class="countryimage" src="$contextPath/img/countries/Slovakia-EU.png" alt="Slovakia-eID" + th:attr="src=@{img/countries/Slovakia-EU.png},alt=#{gui.countryselection.country.sk.logo.alt}"/></a> + <input type="submit" value="Slovakia" th:attr="value=#{gui.countryselection.country.sk}"> <input type="hidden" name="selectedCountry" value="SK"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Slovenia-EU_.png" alt="Slovenia-eID"/> - <input type="submit" value="Slovenia"> + <a><img class="countryimage" src="$contextPath/img/countries/Slovenia-EU.png" alt="Slovenia-eID" + th:attr="src=@{img/countries/Slovenia-EU.png},alt=#{gui.countryselection.country.si.logo.alt}"/></a> + <input type="submit" value="Slovenia" th:attr="value=#{gui.countryselection.country.si}"> <input type="hidden" name="selectedCountry" value="SI"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Spain-EU_.png" alt="Spain-eID"/> - <input type="submit" value="Spain"> + <a><img class="countryimage" src="$contextPath/img/countries/Spain-EU.png" alt="Spain-eID" + th:attr="src=@{img/countries/Spain-EU.png},alt=#{gui.countryselection.country.es.logo.alt}"/></a> + <input type="submit" value="Spain" th:attr="value=#{gui.countryselection.country.es}"> <input type="hidden" name="selectedCountry" value="ES"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/Sweden-EU_.png" alt="Sweden-eID"/> - <input type="submit" value="Sweden"> + <a><img class="countryimage" src="$contextPath/img/countries/Sweden-EU.png" alt="Sweden-eID" + th:attr="src=@{img/countries/Sweden-EU.png},alt=#{gui.countryselection.country.se.logo.alt}"/></a> + <input type="submit" value="Sweden" th:attr="value=#{gui.countryselection.country.se}"> <input type="hidden" name="selectedCountry" value="SE"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> <form class="block" method="post" action="$contextPath$submitEndpoint"> - <img class="countryimage" src="$contextPath/img/countries/UnitedKingdom-EU_.png" alt="UnitedKingdom-eID"/> - <input type="submit" value="United Kingdom"> + <a><img class="countryimage" src="$contextPath/img/countries/UnitedKingdom-EU.png" alt="UnitedKingdom-eID" + th:attr="src=@{img/countries/UnitedKingdom-EU.png},alt=#{gui.countryselection.country.uk.logo.alt}"/></a> + <input type="submit" value="United Kingdom" th:attr="value=#{gui.countryselection.country.uk}"> <input type="hidden" name="selectedCountry" value="UK"> - <input type="hidden" name="pendingid" value="$pendingReqID"> + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}" /> </form> - <form class="block" method="post" action="$contextPath$submitEndpoint"> - <input type="submit" value="Abbrechen/Cancel"> - <input type="hidden" name="stopAuthProcess" value="true"> - <input type="hidden" name="pendingid" value="$pendingReqID"> - </form> + <form class="block" method="post" action="$contextPath$submitEndpoint" th:attr="action=@{${submitEndpoint}}"> + <input type="submit" class="btn btn-outline-primary btn-block" value="Abbrechen/Cancel" th:attr="value=#{gui.countryselection.cancle}"> + <input type="hidden" name="stopAuthProcess" value="true" > + <input type="hidden" name="pendingid" value="$pendingid" th:attr="value=${pendingid}"> + </form> </div> </div> </body> diff --git a/connector/src/main/resources/templates/error_message.html b/connector/src/main/resources/templates/error_message.html index fc9b75a1..86f9d29d 100644 --- a/connector/src/main/resources/templates/error_message.html +++ b/connector/src/main/resources/templates/error_message.html @@ -1,36 +1,36 @@ -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> +<!DOCTYPE HTML> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorator="fragments/base" + th:with="lang=${#locale.language}" th:lang="${lang}"> + <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> - <link rel="stylesheet" href="$contextPath/css/css_error.css" /> + <link rel="stylesheet" href="$contextPath/css/css_error.css" th:href="@{/css/css_error.css}" /> - <title>An error arise ... </title> + <title th:text="#{gui.errorpage.msg.title}">An error arise ... </title> </head> <body> <div id="page"> <div id="page1" class="case selected-case" role="main"> <h2 class="OA_header" role="heading">Authentication error arise</h2> - <!--div id="main"--> - <!--div id="leftcontent" class="hell" role="application"--> - - - + <div class="hell" role="application" > - <p>The authentication stops on account of a process error:</p> - <br/> - <p><b>Error Code:</b> $errorCode</p> - <p><b>Error Message:</b >$errorMsg</p> + <h2 class="OA_header" role="heading" th:text="#{gui.errorpage.msg.title}">Error Header</h2> + + <div id="alert_area" class="hell" role="application" > + <p th:text="#{gui.errorpage.msg.information}">Error Information</p> + <br/> + <p><b th:text="#{gui.errorpage.msg.errorcode}">Code :</b> <span th:text="${errorCode}"></span></p> + <p><b th:text="#{gui.errorpage.msg.errormsg}">Msg :</b > <span th:text="${#messages.msgWithParams('__${errorCode}__', '__${errorParams}__')}"></span></p> + </div> + <!-- errorMsg --> </div> + <div th:if="${stacktrace}"> + <p><b th:text="#{gui.errorpage.msg.stacktrace}">fullError</b> <span th:text="${stacktrace}"></span></p> + </div> - #if($stacktrace) - <div> - <p><b>Stacktrace:</b> $stacktrace</p> - </div> - #end - - <!--/div---> - <!--/div--> </div> </div> </body> diff --git a/connector/src/main/resources/templates/language_selection.html b/connector/src/main/resources/templates/language_selection.html new file mode 100644 index 00000000..a268eb17 --- /dev/null +++ b/connector/src/main/resources/templates/language_selection.html @@ -0,0 +1,15 @@ +<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:th="http://www.thymeleaf.org"> + + <body> + + <div th:fragment="selectlanguage"> + <a th:href="@{|${submitEndpoint}?pendingid=${pendingid}|(lang='de')}" th:text="#{gui.general.language.selection.de}">Spache1</a> + <span> </span> + <a th:href="@{|${submitEndpoint}?pendingid=${pendingid}|(lang='en')}" th:text="#{gui.general.language.selection.en}">Spache2</a> + </div> + + </body> + +</html>
\ No newline at end of file diff --git a/connector_lib/pom.xml b/connector_lib/pom.xml index 590adb22..0771f3e5 100644 --- a/connector_lib/pom.xml +++ b/connector_lib/pom.xml @@ -5,11 +5,10 @@ <parent> <groupId>at.asitplus.eidas</groupId> <artifactId>ms_specific</artifactId> - <version>1.x</version> + <version>1.0.3-snapshot</version> </parent> <groupId>at.asitplus.eidas.ms_specific</groupId> <artifactId>connector_lib</artifactId> - <version>${egiz.eidas.version}</version> <name>ms_specific_connector_lib</name> <packaging>jar</packaging> diff --git a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/MSeIDASNodeConstants.java b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/MSeIDASNodeConstants.java index eee1ad62..0835daf8 100644 --- a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/MSeIDASNodeConstants.java +++ b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/MSeIDASNodeConstants.java @@ -39,6 +39,8 @@ public class MSeIDASNodeConstants { public static final String PROP_CONFIG_TECHNICALLOG_WRITE_MDS_INTO_TECH_LOG = "technicallog.write.MDS.into.techlog"; public static final String PROP_CONFIG_WEBCONTENT_STATIC_PATH = "webcontent.static.directory"; + public static final String PROP_CONFIG_WEBCONTENT_PROPERTIES_PATH = "webcontent.properties"; + public static final String PROP_CONFIG_WEBCONTENT_TEMPLATES_PATH = "webcontent.templates"; public static final String PROP_CONFIG_MONITORING_EIDASNODE_METADATAURL = "monitoring.eIDASNode.metadata.url"; @@ -117,4 +119,5 @@ public class MSeIDASNodeConstants { public static final List<String> COUNTRY_SELECTION_PARAM_WHITELIST = Arrays.asList(REQ_PARAM_SELECTED_COUNTRY, REQ_PARAM_SELECTED_ENVIRONMENT); + } diff --git a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/DefaultGUIBuilderImpl.java b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/DefaultVelocityGUIBuilderImpl.java index f4049267..e618e68d 100644 --- a/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/DefaultGUIBuilderImpl.java +++ b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/DefaultVelocityGUIBuilderImpl.java @@ -28,18 +28,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; -import at.gv.egiz.eaaf.core.api.gui.IGUIFormBuilder; 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; -@Service("DefaultGUIBuilderImpl") -public class DefaultGUIBuilderImpl extends AbstractVelocityGUIFormBuilderImpl implements IGUIFormBuilder { - private static final Logger log = LoggerFactory.getLogger(DefaultGUIBuilderImpl.class); +@Service("DefaultVelocityGUIBuilderImpl") +public class DefaultVelocityGUIBuilderImpl extends AbstractVelocityGUIFormBuilderImpl { + private static final Logger log = LoggerFactory.getLogger(DefaultVelocityGUIBuilderImpl.class); private static final String CLASSPATH_HTMLTEMPLATES_DIR = "templates/"; - public DefaultGUIBuilderImpl() throws GUIBuildException { + public DefaultVelocityGUIBuilderImpl() throws GUIBuildException { super(); } 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 new file mode 100644 index 00000000..84218611 --- /dev/null +++ b/connector_lib/src/main/java/at/asitplus/eidas/specific/connector/gui/SpringMVCGUIFormBuilderImpl.java @@ -0,0 +1,110 @@ +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.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 { + if (mv.getStatus() != null) + response.setStatus(mv.getStatus().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<String, Object> 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/eidas_modules/authmodule-eIDAS-v2/pom.xml b/eidas_modules/authmodule-eIDAS-v2/pom.xml index b04592b4..ab2d9d21 100644 --- a/eidas_modules/authmodule-eIDAS-v2/pom.xml +++ b/eidas_modules/authmodule-eIDAS-v2/pom.xml @@ -4,18 +4,18 @@ <parent> <groupId>at.asitplus.eidas.ms_specific</groupId> <artifactId>modules</artifactId> - <version>1.x</version> + <version>1.0.3-snapshot</version> </parent> <groupId>at.asitplus.eidas.ms_specific.modules</groupId> <artifactId>authmodule-eIDAS-v2</artifactId> <name>eIDAS v2 authentication module</name> - <version>${egiz.eidas.version}</version> <description>eIDAS module based on eIDAS node reference implementation v2.x</description> <properties> - <eidas-commons.version>2.2.1-egiz</eidas-commons.version> - <eidas-light-commons.version>2.2.1-egiz</eidas-light-commons.version> - <eidas-specific-communication-definition.version>2.2.1-egiz</eidas-specific-communication-definition.version> + <eidas-commons.version>2.3.0</eidas-commons.version> + <eidas-light-commons.version>2.3.0</eidas-light-commons.version> + <eidas-specific-communication-definition.version>2.3.0</eidas-specific-communication-definition.version> + <eidas-jcache-ignite-specific-communication.version>2.3.0</eidas-jcache-ignite-specific-communication.version> <org.xerial.sqlite-jdbc.version>3.23.1</org.xerial.sqlite-jdbc.version> </properties> @@ -28,13 +28,13 @@ <repositories> <repository> <id>egiz-commons</id> - <url>https://demo.egiz.gv.at/int-repo/</url> + <url>https://apps.egiz.gv.at/maven/</url> <releases> <enabled>true</enabled> </releases> </repository> <repository> - <id>local</id> + <id>eIDASNode-local</id> <name>local</name> <url>file:${basedir}/repository</url> </repository> @@ -86,6 +86,12 @@ <version>${eidas-specific-communication-definition.version}</version> </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-ignite-specific-communication</artifactId> + <version>${eidas-jcache-ignite-specific-communication.version}</version> + </dependency> + <!-- other third party libs --> <dependency> <groupId>org.apache.commons</groupId> @@ -138,7 +144,11 @@ <artifactId>spring-test</artifactId> <scope>test</scope> </dependency> - + <dependency> + <groupId>com.github.skjolber</groupId> + <artifactId>mockito-soap-cxf</artifactId> + <scope>test</scope> + </dependency> </dependencies> <build> diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0-sources.jar b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0-sources.jar Binary files differnew file mode 100644 index 00000000..b6e62460 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0-sources.jar diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0.jar b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0.jar Binary files differnew file mode 100644 index 00000000..c48ff7d1 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0.jar diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0.pom b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0.pom new file mode 100644 index 00000000..395564ee --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-commons/2.3.0/eidas-commons-2.3.0.pom @@ -0,0 +1,109 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <artifactId>eidas-commons</artifactId> + <packaging>${mod.packaging.type}</packaging> + <name>eIDAS Commons</name> + <description> + The EIDASCommons library provides beans, Java Interfaces and utility classes to integrate EidasNode and SAML + Engine. + </description> + <parent> + <groupId>eu.eidas</groupId> + <artifactId>eidas-parent</artifactId> + <version>2.3.0</version> + <relativePath>../EIDAS-Parent/pom.xml</relativePath> + </parent> + <dependencies> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-light-commons</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk15on</artifactId> + </dependency> + <!-- Bouncy Castle --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + </dependency> + <dependency> + <groupId>org.owasp.encoder</groupId> + <artifactId>encoder</artifactId> + </dependency> + <dependency> + <groupId>com.hazelcast</groupId> + <artifactId>hazelcast</artifactId> + </dependency> + <dependency> + <groupId>com.hazelcast</groupId> + <artifactId>hazelcast-wm</artifactId> + </dependency> + <dependency> + <groupId>javax.cache</groupId> + <artifactId>cache-api</artifactId> + <version>1.1.0</version> + </dependency> + <!-- TEST --> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>aopalliance</groupId> + <artifactId>aopalliance</artifactId> + <version>1.0</version> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <resources> + <resource> + <directory>${project.basedir}/src/main/resources</directory> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + <testResources> + <testResource> + <directory>src/test/resources</directory> + <includes> + <include>log4j.xml</include> + <include>*.properties</include> + </includes> + </testResource> + </testResources> + </build> + <profiles> + <profile> + <id>metrics</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + </plugin> + </plugins> + </reporting> +</project> diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite-specific-communication/2.3.0/eidas-jcache-ignite-specific-communication-2.3.0.jar b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite-specific-communication/2.3.0/eidas-jcache-ignite-specific-communication-2.3.0.jar Binary files differnew file mode 100644 index 00000000..414e5022 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite-specific-communication/2.3.0/eidas-jcache-ignite-specific-communication-2.3.0.jar diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite-specific-communication/2.3.0/eidas-jcache-ignite-specific-communication-2.3.0.pom b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite-specific-communication/2.3.0/eidas-jcache-ignite-specific-communication-2.3.0.pom new file mode 100644 index 00000000..0ac5ffbb --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite-specific-communication/2.3.0/eidas-jcache-ignite-specific-communication-2.3.0.pom @@ -0,0 +1,61 @@ +<!-- + ~ Copyright (c) 2018 by European Commission + ~ + ~ Licensed under the EUPL, Version 1.2 or - as soon they will be + ~ approved by the European Commission - subsequent versions of the + ~ EUPL (the "Licence"); + ~ You may not use this work except in compliance with the Licence. + ~ You may obtain a copy of the Licence at: + ~ https://joinup.ec.europa.eu/page/eupl-text-11-12 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the Licence is distributed on an "AS IS" basis, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + ~ implied. + ~ See the Licence for the specific language governing permissions and + ~ limitations under the Licence. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <artifactId>eidas-jcache-ignite-specific-communication</artifactId> + <packaging>jar</packaging> + <name>eIDAS JCache Ignite Specific Communication</name> + <description>Implements JCache using Ignite with Specific Communication Definition's beans configurations.</description> + + <parent> + <groupId>eu.eidas</groupId> + <artifactId>eidas-parent</artifactId> + <version>2.3.0</version> + <relativePath>../EIDAS-Parent/pom.xml</relativePath> + </parent> + + <properties> + <ignite.version>2.7.0</ignite.version> + </properties> + + <dependencies> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-ignite</artifactId> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-slf4j</artifactId> + <version>${ignite.version}</version> + <scope>test</scope> + </dependency> + </dependencies> + +</project> diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite/2.3.0/eidas-jcache-ignite-2.3.0.jar b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite/2.3.0/eidas-jcache-ignite-2.3.0.jar Binary files differnew file mode 100644 index 00000000..f9be7373 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite/2.3.0/eidas-jcache-ignite-2.3.0.jar diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite/2.3.0/eidas-jcache-ignite-2.3.0.pom b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite/2.3.0/eidas-jcache-ignite-2.3.0.pom new file mode 100644 index 00000000..fcf5870c --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-jcache-ignite/2.3.0/eidas-jcache-ignite-2.3.0.pom @@ -0,0 +1,94 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <artifactId>eidas-jcache-ignite</artifactId> + <packaging>jar</packaging> + <name>eIDAS JCache Ignite</name> + <description>Implements JCache using Ignite.</description> + + <parent> + <groupId>eu.eidas</groupId> + <artifactId>eidas-parent</artifactId> + <version>2.3.0</version> + <relativePath>../EIDAS-Parent/pom.xml</relativePath> + </parent> + + <properties> + <ignite.version>2.7.0</ignite.version> + </properties> + + <dependencies> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-commons</artifactId> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </dependency> + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-core</artifactId> + <version>${ignite.version}</version> + <exclusions> + <exclusion> + <groupId>org.gridgain</groupId> + <artifactId>ignite-shmem</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-spring</artifactId> + <version>${ignite.version}</version> + <exclusions> + <exclusion> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-indexing</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-expression</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-tx</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-jdbc</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.ignite</groupId> + <artifactId>ignite-slf4j</artifactId> + <version>${ignite.version}</version> + </dependency> + </dependencies> +</project> diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0-sources.jar b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0-sources.jar Binary files differnew file mode 100644 index 00000000..82a3ad74 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0-sources.jar diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0.jar b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0.jar Binary files differnew file mode 100644 index 00000000..845f8ab2 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0.jar diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0.pom b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0.pom new file mode 100644 index 00000000..a9813636 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-light-commons/2.3.0/eidas-light-commons-2.3.0.pom @@ -0,0 +1,55 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <artifactId>eidas-light-commons</artifactId> + <packaging>${mod.packaging.type}</packaging> + <name>eIDAS Light Commons</name> + <description> + The EIDASLightCommons library provides Java Interfaces and utility classes to integrate EIDASCommons and eIDAS Specific Communication Definition. + </description> + <parent> + <groupId>eu.eidas</groupId> + <artifactId>eidas-parent</artifactId> + <version>2.3.0</version> + <relativePath>../EIDAS-Parent/pom.xml</relativePath> + </parent> + <dependencies> + <dependency> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + </dependency> + <dependency> + <groupId>com.ibm.icu</groupId> + <artifactId>icu4j</artifactId> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + <profiles> + <profile> + <id>metrics</id> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + </plugin> + </plugins> + </reporting> +</project> diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-parent/2.3.0/eidas-parent-2.3.0.pom b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-parent/2.3.0/eidas-parent-2.3.0.pom new file mode 100644 index 00000000..fa4680c8 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-parent/2.3.0/eidas-parent-2.3.0.pom @@ -0,0 +1,906 @@ +<!-- + ~ Copyright (c) 2018 by European Commission + ~ + ~ Licensed under the EUPL, Version 1.2 or - as soon they will be + ~ approved by the European Commission - subsequent versions of the + ~ EUPL (the "Licence"); + ~ You may not use this work except in compliance with the Licence. + ~ You may obtain a copy of the Licence at: + ~ https://joinup.ec.europa.eu/page/eupl-text-11-12 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the Licence is distributed on an "AS IS" basis, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + ~ implied. + ~ See the Licence for the specific language governing permissions and + ~ limitations under the Licence. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>eu.eidas</groupId> + <artifactId>eidas-parent</artifactId> + <packaging>pom</packaging> + <name>eIDAS Node Parent</name> + <version>2.3.0</version> + <description> + The EIDAS-Parent provides artifacts versions for Eidas Node components. + </description> + <properties> + <!-- 1) Project properties --> + <proj.name>EIDASParent</proj.name> + <proj.name.eidas>EidasNode</proj.name.eidas> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <app.packaging.type>war</app.packaging.type> + <mod.packaging.type>jar</mod.packaging.type> + <timestamp>${maven.build.timestamp}</timestamp> + <!-- java version targeted in the compile phase --> + <java.version>1.8</java.version> + + <samlspec.version>0.5.2</samlspec.version> + <samlspecacept.version>0.5.1</samlspecacept.version> + + <!-- 2) Library dependency versions --> + <spring.version>4.3.18.RELEASE</spring.version> + <opensaml.not-yet-commons-ssl.version>0.3.9</opensaml.not-yet-commons-ssl.version> + <opensaml.openws.version>1.5.5</opensaml.openws.version> + <opensaml.version>3.3.0</opensaml.version> + <opensaml.api.version>3.3.0</opensaml.api.version> + <!--shibboleth.xmlsupport.version>8.0-SNAPSHOT</shibboleth.xmlsupport.version--> + <shibboleth.xmlsupport.version>7.3.0</shibboleth.xmlsupport.version> + <servlet.version>3.0.1</servlet.version> + <jsp.api>2.0</jsp.api> + <jstl.version>1.1.2</jstl.version> + <apache.taglibs>1.2.5</apache.taglibs> + <jasper.version>6.0.53</jasper.version> + <slf4j.version>1.7.10</slf4j.version> + <logback.version>1.1.2</logback.version> + <mockito.version>1.10.19</mockito.version> + <junit.version>4.12</junit.version> + <hamcrest.version>1.3</hamcrest.version> + <commons.codec>1.9</commons.codec> + <commons.collections>3.2.2</commons.collections> + <commons.io>2.4</commons.io> + <commons.lang>2.6</commons.lang> + <commons.logging>1.1.3</commons.logging> + <commons.httpclient>4.5.5</commons.httpclient> + <commons.httpcore>4.4.9</commons.httpcore> + <commons.lang3>3.1</commons.lang3> + <hazelcast.version>3.2</hazelcast.version> + <bouncycastle.version>1.60</bouncycastle.version> + <owasp.version>1.1.1</owasp.version> + <owasp.dependency-check.version>1.4.0</owasp.dependency-check.version> + <joda.time.version>2.6</joda.time.version> + <log4j.version>1.2.17</log4j.version> + <log4j.api>2.3</log4j.api> + <xmlunit.version>1.5</xmlunit.version> + <bdr.econnector.version>1.2.2</bdr.econnector.version> + <struts.version>2.3.34</struts.version> + <!--<icu4j.version>55.1</icu4j.version>--> + <vaadin.version>7.4.2</vaadin.version> + <vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version> + <vaadin-spring.version>1.0.0.beta1</vaadin-spring.version> + <vaadin4spring.version>0.0.5.RELEASE</vaadin4spring.version> + <jetty.plugin.version>9.2.3.v20140905</jetty.plugin.version> + <guava.version>19.0</guava.version> + <jsr305.version>3.0.1</jsr305.version> + <icu4j.version>57.1</icu4j.version> + + <!-- 3) maven plugin versions --> + <javadoc.plugin.version>2.8.1</javadoc.plugin.version> + <compile.plugin.version>2.3.2</compile.plugin.version> + <surefire.plugin.version>2.19.1</surefire.plugin.version> + <war.plugin.version>3.2.0</war.plugin.version> + <ear.plugin.version>2.7</ear.plugin.version> + <resources.plugin.version>2.4</resources.plugin.version> + <cobertura.plugin.version>2.7</cobertura.plugin.version> + <remote.resources.plugin.version>1.5</remote.resources.plugin.version> + <source.plugin.version>2.1.2</source.plugin.version> + <install.plugin.version>2.5.2</install.plugin.version> + <clean.plugin.version>2.6.1</clean.plugin.version> + </properties> + + <dependencyManagement> + <dependencies> + <!-- eIDAS modules --> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>SimpleProtocol</artifactId> + <version>0.0.2</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-commons</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-light-commons</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-configmodule</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-encryption</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-saml-engine</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-updater</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-saml-metadata</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-specific-connector</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-specific-proxyservice</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-specific-communication-definition</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-dev</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-dev-node</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-dev-specific-communication</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-ignite</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-ignite-node</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-ignite-specific-communication</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-hazelcast</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-hazelcast-node</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-hazelcast-specific-communication</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-node</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-sp</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-idp</artifactId> + <version>${project.version}</version> + </dependency> + <!-- Joda --> + <dependency> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + <version>${joda.time.version}</version> + </dependency> + <!-- SLF4J logging --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>log4j-over-slf4j</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jul-to-slf4j</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + <version>${slf4j.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>${slf4j.version}</version> + </dependency> + <!-- commons-logging --> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>${commons.logging}</version> + </dependency> + <!-- Log4J --> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>${log4j.version}</version> + <exclusions> + <exclusion> + <groupId>javax.jms</groupId> + <artifactId>jms</artifactId> + </exclusion> + <exclusion> + <groupId>com.sun.jdmk</groupId> + <artifactId>jmxtools</artifactId> + </exclusion> + <exclusion> + <groupId>com.sun.jmx</groupId> + <artifactId>jmxri</artifactId> + </exclusion> + <exclusion> + <artifactId>mail</artifactId> + <groupId>javax.mail</groupId> + </exclusion> + </exclusions> + </dependency> + <!-- LogBack --> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>${logback.version}</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <!-- Bouncy Castle --> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk15on</artifactId> + <version>${bouncycastle.version}</version> + <!-- Wildfly issue: please keep provided as the default scope for all the components of the project and override it if needed --> + <scope>provided</scope> + </dependency> + <!-- Apache Commons --> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>${commons.codec}</version> + </dependency> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>${commons.collections}</version> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + <version>${commons.httpclient}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpcore</artifactId> + <version>${commons.httpcore}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>${commons.io}</version> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>${commons.lang}</version> + </dependency> + <dependency> + <groupId>org.owasp.encoder</groupId> + <artifactId>encoder</artifactId> + <version>${owasp.version}</version> + </dependency> + <dependency> + <groupId>org.owasp.encoder</groupId> + <artifactId>encoder-jsp</artifactId> + <version>${owasp.version}</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>${guava.version}</version> + </dependency> + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + <version>${jsr305.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.opensaml</groupId> + <artifactId>opensaml-core</artifactId> + <version>${opensaml.version}</version> + <exclusions> + <exclusion> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </exclusion> + <exclusion> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + </exclusion> + <exclusion> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + <exclusion> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </exclusion> + <exclusion> + <groupId>joda-time</groupId> + <artifactId>joda-time</artifactId> + </exclusion> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.velocity</groupId> + <artifactId>velocity</artifactId> + </exclusion> + <exclusion> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk15on</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>log4j-over-slf4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>jul-to-slf4j</artifactId> + </exclusion> + <exclusion> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.opensaml</groupId> + <artifactId>opensaml-saml-api</artifactId> + <version>${opensaml.version}</version> + </dependency> + <dependency> + <groupId>org.opensaml</groupId> + <artifactId>opensaml-saml-impl</artifactId> + <version>${opensaml.version}</version> + </dependency> + <dependency> + <groupId>net.shibboleth.utilities</groupId> + <artifactId>java-support</artifactId> + <version>${shibboleth.xmlsupport.version}</version> + </dependency> + <dependency> + <groupId>org.opensaml</groupId> + <artifactId>opensaml-xmlsec-api</artifactId> + <version>${opensaml.version}</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + <version>${servlet.version}</version> + <scope>provided</scope> + </dependency> + <!-- JSP --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jsp-api</artifactId> + <version>${jsp.api}</version> + <scope>provided</scope> + </dependency> + <!-- JSTL --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>jstl</artifactId> + <version>${jstl.version}</version> + </dependency> + <dependency> + <groupId>org.apache.taglibs</groupId> + <artifactId>taglibs-standard-impl</artifactId> + <version>${apache.taglibs}</version> + </dependency> + <dependency> + <groupId>taglibs</groupId> + <artifactId>standard</artifactId> + <version>${jstl.version}</version> + </dependency> + <!-- Spring --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.version}</version> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context-support</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>${spring.version}</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>${xalan.version}</version> + </dependency> + <dependency> + <groupId>org.opensaml</groupId> + <artifactId>opensaml-xmlsec-impl</artifactId> + <version>${opensaml.version}</version> + </dependency> + <!-- https://mvnrepository.com/artifact/org.apache.tomcat/jasper-el --> + <dependency> + <groupId>org.apache.tomcat</groupId> + <artifactId>jasper-el</artifactId> + <version>${jasper.version}</version> + </dependency> + <!-- HazelCast --> + <dependency> + <groupId>com.hazelcast</groupId> + <artifactId>hazelcast</artifactId> + <version>${hazelcast.version}</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.hazelcast</groupId> + <artifactId>hazelcast-wm</artifactId> + <version>${hazelcast.version}</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + </exclusion> + <exclusion> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </exclusion> + </exclusions> + </dependency> + <!-- Struts2 --> + <dependency> + <groupId>org.apache.struts</groupId> + <artifactId>struts2-core</artifactId> + <version>${struts.version}</version> + </dependency> + <!-- ICU --> + <dependency> + <groupId>com.ibm.icu</groupId> + <artifactId>icu4j</artifactId> + <version>${icu4j.version}</version> + </dependency> + + <!-- UNIT TEST Dependencies --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>${junit.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-all</artifactId> + <version>${hamcrest.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>${mockito.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>xmlunit</groupId> + <artifactId>xmlunit</artifactId> + <version>${xmlunit.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>${spring.version}</version> + <scope>test</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <!-- Dependencies in common for all modules --> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </dependency> + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + </dependency> + + <!-- UNIT TEST Dependencies in common for all modules --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <exclusions> + <exclusion> + <artifactId>hamcrest-core</artifactId> + <groupId>org.hamcrest</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-all</artifactId> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <exclusions> + <exclusion> + <artifactId>hamcrest-core</artifactId> + <groupId>org.hamcrest</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>xmlunit</groupId> + <artifactId>xmlunit</artifactId> + </dependency> + </dependencies> + + <build> + <pluginManagement> + <plugins> + + <plugin> + <groupId>com.orctom.mojo</groupId> + <artifactId>was-maven-plugin</artifactId> + <version>1.0.8</version> + <configuration> + <wasHome>c:/pgm/wlp</wasHome> + <applicationName>${proj.name}</applicationName> + <host>localhost</host> + <server>server01</server> + <node>node01</node> + <virtualHost>default_host</virtualHost> + <verbose>true</verbose> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.tomcat.maven</groupId> + <artifactId>tomcat7-maven-plugin</artifactId> + <version>2.2</version> + <configuration> + <url>http://localhost:8080/manager/text</url> + <server>tomcat</server> + <path>/${proj.name}</path> + <username>admin</username> + <password>admin</password> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>${war.plugin.version}</version> + <configuration> + <webResources> + <resource> + <directory>${project.basedir}/src/main/webapp/WEB-INF</directory> + <filtering>true</filtering> + <targetPath>WEB-INF</targetPath> + <includes> + <include>**/web.xml</include> + </includes> + </resource> + </webResources> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>${source.plugin.version}</version> + <executions> + <execution> + <id>attach-sources</id> + <phase>verify</phase> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>cobertura-maven-plugin</artifactId> + <version>${cobertura.plugin.version}</version> + <configuration> + <formats> + <format>html</format> + <format>xml</format> + </formats> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>${resources.plugin.version}</version> + </plugin> + <!--plugin> + <groupId>org.owasp</groupId> + <artifactId>dependency-check-maven</artifactId> + <version>${owasp.dependency-check.version}</version> + <configuration> + <failBuildOnCVSS>8</failBuildOnCVSS> + </configuration> + <executions> + <execution> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin--> + </plugins> + </pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${compile.plugin.version}</version> + <configuration> + <source>${java.version}</source> + <target>${java.version}</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>${surefire.plugin.version}</version> + <configuration> + <skip>false</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>${javadoc.plugin.version}</version> + <configuration> + <detectLinks>true</detectLinks> + </configuration> + </plugin> + </plugins> + </build> + <modules> + <module>../EIDAS-Light-Commons</module> + <module>../EIDAS-Commons</module> + <module>../EIDAS-ConfigModule</module> + <module>../EIDAS-Encryption</module> + <module>../EIDAS-Metadata</module> + <module>../EIDAS-SpecificCommunicationDefinition</module> + <!--start of TODO remove when/if EIDAS-Node pom does not depend on eidas-jcache-dev-node artifact to test--> + <module>../EIDAS-JCache-Dev</module> + <module>../EIDAS-JCache-Dev-Node</module> + <!--TODOEND--> + </modules> + <profiles> + <profile> + <id>NodeOnly</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <modules> + <module>../EIDAS-SAMLEngine</module> + <module>../EIDAS-UPDATER</module> + <module>../EIDAS-Node</module> + </modules> + </profile> + <profile> + <id>DemoToolsOnly</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <modules> + <module>../EIDAS-SimpleProtocol</module> + <module>../EIDAS-SpecificProxyService</module> + <module>../EIDAS-SpecificConnector</module> + <module>../EIDAS-SP</module> + <module>../EIDAS-IdP-1.0</module> + </modules> + </profile> + <profile> + <id>nodeJcacheIgnite</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <modules> + <module>../EIDAS-JCache-Ignite</module> + <module>../EIDAS-JCache-Ignite-Node</module> + </modules> + </profile> + <profile> + <id>nodeJcacheHazelcast</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <modules> + <module>../EIDAS-JCache-Hazelcast</module> + <module>../EIDAS-JCache-Hazelcast-Node</module> + </modules> + </profile> + <profile> + <id>nodeJcacheDev</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <modules> + <module>../EIDAS-JCache-Dev</module> + <module>../EIDAS-JCache-Dev-Node</module> + </modules> + </profile> + <profile> + <id>specificCommunicationJcacheIgnite</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <modules> + <module>../EIDAS-JCache-Ignite</module> + <module>../EIDAS-JCache-Ignite-Specific-Communication</module> + </modules> + </profile> + <profile> + <id>specificCommunicationJcacheHazelcast</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <modules> + <module>../EIDAS-JCache-Hazelcast</module> + <module>../EIDAS-JCache-Hazelcast-Specific-Communication</module> + </modules> + </profile> + <profile> + <id>specificCommunicationJcacheDev</id> + <activation> + <activeByDefault>false</activeByDefault> + <property> + <name>specificJar</name> + </property> + </activation> + <modules> + <module>../EIDAS-JCache-Dev</module> + <module>../EIDAS-JCache-Dev-Specific-Communication</module> + </modules> + </profile> + <profile> + <id>Config</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <modules> + <module>../EIDAS-Config</module> + </modules> + </profile> + </profiles> +</project> diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0-sources.jar b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0-sources.jar Binary files differnew file mode 100644 index 00000000..c3dc8e3d --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0-sources.jar diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0.jar b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0.jar Binary files differnew file mode 100644 index 00000000..9d26bcf5 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0.jar diff --git a/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0.pom b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0.pom new file mode 100644 index 00000000..fbf96ccf --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/repository/eu/eidas/eidas-specific-communication-definition/2.3.0/eidas-specific-communication-definition-2.3.0.pom @@ -0,0 +1,113 @@ +<!-- + ~ Copyright (c) 2018 by European Commission + ~ + ~ Licensed under the EUPL, Version 1.2 or - as soon they will be + ~ approved by the European Commission - subsequent versions of the + ~ EUPL (the "Licence"); + ~ You may not use this work except in compliance with the Licence. + ~ You may obtain a copy of the Licence at: + ~ https://joinup.ec.europa.eu/page/eupl-text-11-12 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the Licence is distributed on an "AS IS" basis, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + ~ implied. + ~ See the Licence for the specific language governing permissions and + ~ limitations under the Licence. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <artifactId>eidas-specific-communication-definition</artifactId> + <packaging>jar</packaging> + <name>eIDAS Specific Communication Definition</name> + <description>Defines and implements the communication protocol to be used between specific and node modules. + </description> + <parent> + <groupId>eu.eidas</groupId> + <artifactId>eidas-parent</artifactId> + <version>2.3.0</version> + <relativePath>../EIDAS-Parent/pom.xml</relativePath> + </parent> + <dependencies> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-context</artifactId> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-commons</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-dev</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + <profiles> + <profile> + <id>specificCommunicationJcacheIgnite</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <dependencies> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-ignite-specific-communication</artifactId> + </dependency> + </dependencies> + </profile> + <profile> + <id>specificCommunicationJcacheHazelcast</id> + <dependencies> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-hazelcast-specific-communication</artifactId> + </dependency> + </dependencies> + </profile> + <profile> + <id>specificCommunicationJcacheProvidedImpl</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + </profile> + <profile> + <id>specificCommunicationJcacheDev</id> + <!-- <activation> --> + <!-- <property> --> + <!-- <name>specificJar</name> --> + <!-- </property> --> + <!-- </activation> --> + <dependencies> + <dependency> + <groupId>eu.eidas</groupId> + <artifactId>eidas-jcache-dev-specific-communication</artifactId> + </dependency> + </dependencies> + </profile> + </profiles> +</project> diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java index a3d28304..9d213109 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/szr/SZRClient.java @@ -139,7 +139,6 @@ public class SZRClient { //build response log.trace(new String(szrResponse)); - log.trace("Signature successfully created. Extracting from MOA-SS container."); // ok, we have success Document doc = DOMUtils.parseDocument( @@ -162,10 +161,7 @@ public class SZRClient { idl.setPersonInfo(jaxbElement.getGetIdentityLinkReturn().getPersonInfo()); return idl; - - - //IdentityLinkType idlResp = this.szr.getIdentityLink(personInfo, keyValue, insertERnP); - + } catch ( Exception e) { log.warn("SZR communication FAILED. Reason: " + e.getMessage(), e); throw new SZRCommunicationException("ernb.02", new Object[] {e.getMessage()}, e); diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java index ea5ec25f..b38c3678 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java @@ -50,7 +50,7 @@ import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.Constants; import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.exception.eIDASAuthenticationException; import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.service.eIDASAttributeRegistry; import at.gv.egiz.eaaf.core.api.data.EAAFConstants; -import at.gv.egiz.eaaf.core.api.gui.IGUIFormBuilder; +import at.gv.egiz.eaaf.core.api.gui.ISpringMVCGUIFormBuilder; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; import at.gv.egiz.eaaf.core.api.idp.ISPConfiguration; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; @@ -82,7 +82,7 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { @Autowired eIDASAttributeRegistry attrRegistry; @Autowired ApplicationContext context; @Autowired ITransactionStorage transactionStore; - @Autowired IGUIFormBuilder guiBuilder; + @Autowired ISpringMVCGUIFormBuilder guiBuilder; @Override public void execute(ExecutionContext executionContext, @@ -181,7 +181,10 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { authnRequestBuilder.citizenCountryCode(citizenCountryCode); //set relay state - authnRequestBuilder.relayState(pendingReq.getPendingRequestId()); + /*TODO: SecureToken PendingRequestId generates a validation exception in eIDASNode because + * eIDASNode implements limit on size for RelayState (80characaters) + */ + //authnRequestBuilder.relayState(pendingReq.getPendingRequestId()); //build and add requested attribute set ImmutableAttributeMap reqAttrMap = translateToEidasAttributes(attrRegistry.getAttributeSetFromConfiguration()); @@ -242,7 +245,7 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { config.putCustomParameter(null, Constants.TEMPLATE_POST_FORWARD_TOKEN_VALUE, tokenBase64); - guiBuilder.build(request, response, config, "BKU-Selection form"); + guiBuilder.build(request, response, config, "Forward to eIDASNode form"); } diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/templates/eidas_node_forward.html b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/templates/eidas_node_forward.html index 85e1d18f..186937d7 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/resources/templates/eidas_node_forward.html +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/resources/templates/eidas_node_forward.html @@ -1,7 +1,11 @@ <!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<html xmlns:th="http://www.thymeleaf.org" + xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" + layout:decorator="fragments/base" + th:with="lang=${#locale.language}" th:lang="${lang}"> <head> - <script src="$contextPath/autocommit.js"></script> + <script src="$contextPath/autocommit.js" + th:attr="src=@{/autocommit.js}"></script> </head> <body> <noscript> @@ -14,9 +18,11 @@ <div id="alert">Your login is being processed. Thank you for waiting.</div> - <form action="${endPoint}" method="post" target="_parent"> + <form action="${endPoint}" method="post" target="_parent" + th:attr="action=@{${endPoint}}"> <div> - <input type="hidden" name="${tokenName}" value="${tokenValue}" /> + <input type="hidden" name="${tokenName}" value="${tokenValue}" + th:attr="value=${tokenValue},name=${tokenName}" /> </div> <noscript> <div> diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java index efc3862a..7ae30845 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTest.java @@ -22,14 +22,27 @@ *******************************************************************************/ package at.asitplus.test.eidas.specific.modules.authmodule_eIDASv2; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; + import java.io.IOException; import java.security.InvalidKeyException; import java.security.MessageDigest; import java.security.NoSuchProviderException; import java.util.List; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.ws.soap.SOAPFaultException; + import org.apache.commons.lang3.StringUtils; +import org.apache.cxf.binding.soap.SoapFault; +import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.Ignore; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; @@ -40,6 +53,9 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.util.Base64Utils; import org.w3._2000._09.xmldsig.KeyValueType; import org.w3c.dom.Element; +import org.xml.sax.SAXException; + +import com.skjolberg.mockito.soap.SoapServiceRule; import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.Constants; import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.exception.SZRCommunicationException; @@ -54,8 +70,11 @@ import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink; import at.gv.egiz.eaaf.core.exceptions.EAAFParserException; import at.gv.egiz.eaaf.core.impl.data.Trible; import at.gv.egiz.eaaf.core.impl.idp.auth.data.SimpleIdentityLinkAssertionParser; +import at.gv.egiz.eaaf.core.impl.utils.DOMUtils; +import szrservices.GetIdentityLinkEidasResponse; import szrservices.IdentityLinkType; import szrservices.PersonInfoType; +import szrservices.SZR; import szrservices.SZRException_Exception; import szrservices.TravelDocumentType; @@ -78,74 +97,72 @@ public class SZRClientTest { private static final String DUMMY_TARGET = EAAFConstants.URN_PREFIX_CDID + "ZP"; - @Test - public void dummyTest() { - - } - - - /* - * getIdentityLink without RAW mode does not contain a valid signature - */ - //@Test -// public void getIdentityLink() throws SZRException_Exception, EAAFParserException, NoSuchProviderException, IOException, InvalidKeyException, eIDASAuthenticationException { -// log.debug("Starting connecting SZR Gateway"); -// IdentityLinkType result = szrClient.getIdentityLink( -// getPersonInfo(), -// dummyCodeForKeys(), -// basicConfig.getBasicMOAIDConfigurationBoolean( -// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_DEBUG_INSERTERNB, -// true) -// ); -// -// Element idlFromSZR = (Element)result.getAssertion(); -// IIdentityLink identityLink = new SimpleIdentityLinkAssertionParser(idlFromSZR).parseIdentityLink(); -// if (identityLink == null) -// throw new SZRCommunicationException("ernb.00", new Object[] {"bPK is null or empty"}); -// -// } + @BeforeClass + public static void classInitializer() throws IOException { + final String current = new java.io.File( "." ).toURI().toString(); + System.setProperty("eidas.ms.configuration", current + "../../basicConfig/default_config.properties"); + + } - @Test - @Ignore - public void getIdentityLinkRawMode() throws SZRException_Exception, EAAFParserException, NoSuchProviderException, IOException, InvalidKeyException, eIDASAuthenticationException { - log.debug("Starting connecting SZR Gateway"); - IdentityLinkType result = szrClient.getIdentityLinkInRawMode( - getPersonInfo()); - - Element idlFromSZR = (Element)result.getAssertion(); - IIdentityLink identityLink = new SimpleIdentityLinkAssertionParser(idlFromSZR).parseIdentityLink(); - - if (identityLink == null) - throw new SZRCommunicationException("ernb.00", new Object[] {"NO IDL object"}); - - System.out.println(identityLink.getSerializedSamlAssertion()); - - if (StringUtils.isEmpty(identityLink.getFamilyName())) - throw new SZRCommunicationException("ernb.00", new Object[] {"NO FamilyName from IDL"}); - - if (StringUtils.isEmpty(identityLink.getGivenName())) - throw new SZRCommunicationException("ernb.00", new Object[] {"NO GivenName from IDL"}); - - if (StringUtils.isEmpty(identityLink.getDateOfBirth())) - throw new SZRCommunicationException("ernb.00", new Object[] {"NO DateOfBirthName from IDL"}); - - if (StringUtils.isEmpty(identityLink.getIdentificationType())) - throw new SZRCommunicationException("ernb.00", new Object[] {"NO baseIdType from IDL"}); + @Rule + public SoapServiceRule soap = SoapServiceRule.newInstance(); - if (StringUtils.isEmpty(identityLink.getIdentificationValue())) - throw new SZRCommunicationException("ernb.00", new Object[] {"NO baseId from IDL"}); - - if (StringUtils.isEmpty(identityLink.getSerializedSamlAssertion())) - throw new SZRCommunicationException("ernb.00", new Object[] {"NO serialized IDL"}); - - if (identityLink.getSamlAssertion() == null ) - throw new SZRCommunicationException("ernb.00", new Object[] {"NO raw IDL"}); + @Test + public void getIdentityLinkRawModeValidResponse() throws SZRException_Exception, EAAFParserException, NoSuchProviderException, IOException, InvalidKeyException, eIDASAuthenticationException, JAXBException { + setSZRResponseIdentityLink("/data/szr/szr_resp_valid_1.xml", "http://localhost:1234/demoszr"); + try { + log.debug("Starting connecting SZR Gateway"); + IdentityLinkType result = szrClient.getIdentityLinkInRawMode( + getPersonInfo()); - + Assert.assertNotNull(result); + Assert.assertNotNull(result.getAssertion()); + + IIdentityLink identityLink = new SimpleIdentityLinkAssertionParser((Element)result.getAssertion()).parseIdentityLink(); + Assert.assertNotNull(identityLink); + + System.out.println(identityLink.getSerializedSamlAssertion()); + + checkElement("Mustermann", identityLink.getFamilyName()); + checkElement("Hans", identityLink.getGivenName()); + checkElement("1989-05-05", identityLink.getDateOfBirth()); + checkElement("urn:publicid:gv.at:baseid", identityLink.getIdentificationType()); + checkElement("k+zDM1BVpN1WJO4x7ZQ3ng==", identityLink.getIdentificationValue()); + Assert.assertNotNull(identityLink.getSerializedSamlAssertion()); + Assert.assertNotNull(identityLink.getSamlAssertion()); + + } catch (SZRCommunicationException e) { + Assert.fail(); + + } + } -// @Test + @Test + public void getIdentityLinkRawModeErrorTravelerDocExists() throws SZRException_Exception, EAAFParserException, NoSuchProviderException, IOException, InvalidKeyException, eIDASAuthenticationException, JAXBException, ParserConfigurationException, SAXException { + setSZRExceptionIdentityLink("/data/szr/szr_resp_error_travelerdocexists.xml", "http://localhost:1234/demoszr"); + + try { + log.debug("Starting connecting SZR Gateway"); + IdentityLinkType result = szrClient.getIdentityLinkInRawMode( + getPersonInfo()); + Assert.fail(); + + } catch (SZRCommunicationException e) { + checkElement("ernb.02", e.getErrorId()); + Assert.assertNotNull(e.getCause()); + org.springframework.util.Assert.isInstanceOf(SOAPFaultException.class, e.getCause()); + Assert.assertNotNull(((SOAPFaultException)e.getCause()).getFault()); + checkElement("p344:F455", ((SOAPFaultException)e.getCause()).getFault().getFaultCode()); + checkElement("The travel document you sent to insert a person already exists for another person. Either check the document or have the person altered accordingly", ((SOAPFaultException)e.getCause()).getFault().getFaultString()); + + } + + } + + @Ignore + @Test public void getbPKTest() throws SZRException_Exception, eIDASAuthenticationException { String bPK = szrClient.getBPK(getPersonInfo(), DUMMY_TARGET, basicConfig.getBasicConfiguration( @@ -158,6 +175,39 @@ public class SZRClientTest { } + private void checkElement(String expected, String value) { + Assert.assertNotNull(value); + Assert.assertEquals(expected, value); + + } + + + private void setSZRResponseIdentityLink(String responseXmlPath, String serviceURL) throws JAXBException, SZRException_Exception { + final SZR szrServiceMock = soap.mock(SZR.class, serviceURL); + final JAXBContext jaxbContext = JAXBContext.newInstance( + szrservices.ObjectFactory.class, + org.xmlsoap.schemas.ws._2002._04.secext.ObjectFactory.class, + org.w3._2001._04.xmldsig_more.ObjectFactory.class, + org.w3._2000._09.xmldsig.ObjectFactory.class, + at.gv.egov.pvp1.ObjectFactory.class, + at.gv.e_government.reference.namespace.persondata._20020228.ObjectFactory.class); + final Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); + final GetIdentityLinkEidasResponse szrResponse= (GetIdentityLinkEidasResponse) jaxbUnmarshaller.unmarshal(this.getClass().getResourceAsStream(responseXmlPath)); + when(szrServiceMock.getIdentityLinkEidas(any(PersonInfoType.class))).thenReturn(szrResponse.getGetIdentityLinkReturn()); + + } + + private void setSZRExceptionIdentityLink(String responseXmlPath, String serviceURL) throws JAXBException,ParserConfigurationException, SAXException, IOException, SZRException_Exception { + final SZR szrServiceMock = soap.mock(SZR.class, serviceURL); + final Element detailerror = DOMUtils.parseXmlNonValidating(this.getClass().getResourceAsStream(responseXmlPath)); + final javax.xml.namespace.QName qName = new javax.xml.namespace.QName("urn:SZRServices","F455", "p344"); + final SoapFault fault = new SoapFault("The travel document you sent to insert a person already exists for another person. Either check the document or have the person altered accordingly", qName); + fault.setRole("urn:SZRServices"); + fault.setDetail(detailerror); + when(szrServiceMock.getIdentityLinkEidas(any(PersonInfoType.class))).thenThrow(fault); + + } + private String createHashFromUniqueId(String uniqueId) throws eIDASAuthenticationException { try { MessageDigest md = MessageDigest.getInstance("SHA-256"); @@ -236,4 +286,25 @@ public class SZRClientTest { return null; } + + /* + * getIdentityLink without RAW mode does not contain a valid signature + */ + //@Test +// public void getIdentityLink() throws SZRException_Exception, EAAFParserException, NoSuchProviderException, IOException, InvalidKeyException, eIDASAuthenticationException { +// log.debug("Starting connecting SZR Gateway"); +// IdentityLinkType result = szrClient.getIdentityLink( +// getPersonInfo(), +// dummyCodeForKeys(), +// basicConfig.getBasicMOAIDConfigurationBoolean( +// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_DEBUG_INSERTERNB, +// true) +// ); +// +// Element idlFromSZR = (Element)result.getAssertion(); +// IIdentityLink identityLink = new SimpleIdentityLinkAssertionParser(idlFromSZR).parseIdentityLink(); +// if (identityLink == null) +// throw new SZRCommunicationException("ernb.00", new Object[] {"bPK is null or empty"}); +// +// } } diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTestProduction.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTestProduction.java new file mode 100644 index 00000000..db4f2417 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/SZRClientTestProduction.java @@ -0,0 +1,240 @@ +/******************************************************************************* + * Copyright 2018 A-SIT Plus GmbH + * AT-specific eIDAS Connector has been developed in a cooperation between EGIZ, + * A-SIT Plus GmbH, A-SIT, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "License"); + * You may not use this work except in compliance with the License. + * You may obtain a copy of the License at: + * https://joinup.ec.europa.eu/news/understanding-eupl-v12 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +package at.asitplus.test.eidas.specific.modules.authmodule_eIDASv2; + +import java.io.IOException; +import java.security.InvalidKeyException; +import java.security.MessageDigest; +import java.security.NoSuchProviderException; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.util.Base64Utils; +import org.w3._2000._09.xmldsig.KeyValueType; +import org.w3c.dom.Element; + +import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.Constants; +import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.exception.SZRCommunicationException; +import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.exception.eIDASAuthenticationException; +import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.szr.SZRClient; +import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.utils.eIDASResponseUtils; +import at.gv.e_government.reference.namespace.persondata._20020228.PersonNameType; +import at.gv.e_government.reference.namespace.persondata._20020228.PhysicalPersonType; +import at.gv.egiz.eaaf.core.api.data.EAAFConstants; +import at.gv.egiz.eaaf.core.api.idp.IConfiguration; +import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink; +import at.gv.egiz.eaaf.core.exceptions.EAAFParserException; +import at.gv.egiz.eaaf.core.impl.data.Trible; +import at.gv.egiz.eaaf.core.impl.idp.auth.data.SimpleIdentityLinkAssertionParser; +import szrservices.IdentityLinkType; +import szrservices.PersonInfoType; +import szrservices.SZRException_Exception; +import szrservices.TravelDocumentType; + +@Ignore +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration("/SpringTest-context_basic_test.xml") +public class SZRClientTestProduction { + private static final Logger log = LoggerFactory.getLogger(SZRClientTestProduction.class); + + @Autowired SZRClient szrClient; + @Autowired IConfiguration basicConfig; + + private static final String givenName = "Franz"; + private static final String familyName = "Mustermann"; + //private static final String dateOfBirth = "1989-05-05"; + private static final String dateOfBirth = "1989-05-04"; + private static final String eIDASeID = "IS/AT/1234sdgsdfg56789ABCDEF"; + + //Dummy public RSA Key + private static final String PUBKEY_EXPONENT = "AQAB"; + private static final String PUBKEY_MODULUS = "AJZyj/+sdCMDRq9RkvbFcgSTVn/OfS8EUE81ddwP8MNuJ1kd1SWBUJPaQX2JLJHrL54mkOhrkhH2M/zcuOTu8nW9TOEgXGjrRB/0HpiYKpV+VDJViyyc/GacNLxN4Anw4pima6gHYaJIw9hQkL/nuO2hyh8PGJd7rxeFXJmbLy+X"; + + private static final String DUMMY_TARGET = EAAFConstants.URN_PREFIX_CDID + "ZP"; + + @Test + public void dummyTest() { + + } + + + /* + * getIdentityLink without RAW mode does not contain a valid signature + */ + //@Test +// public void getIdentityLink() throws SZRException_Exception, EAAFParserException, NoSuchProviderException, IOException, InvalidKeyException, eIDASAuthenticationException { +// log.debug("Starting connecting SZR Gateway"); +// IdentityLinkType result = szrClient.getIdentityLink( +// getPersonInfo(), +// dummyCodeForKeys(), +// basicConfig.getBasicMOAIDConfigurationBoolean( +// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_DEBUG_INSERTERNB, +// true) +// ); +// +// Element idlFromSZR = (Element)result.getAssertion(); +// IIdentityLink identityLink = new SimpleIdentityLinkAssertionParser(idlFromSZR).parseIdentityLink(); +// if (identityLink == null) +// throw new SZRCommunicationException("ernb.00", new Object[] {"bPK is null or empty"}); +// +// } + + @Test + public void getIdentityLinkRawMode() throws SZRException_Exception, EAAFParserException, NoSuchProviderException, IOException, InvalidKeyException, eIDASAuthenticationException { + log.debug("Starting connecting SZR Gateway"); + IdentityLinkType result = szrClient.getIdentityLinkInRawMode( + getPersonInfo()); + + Element idlFromSZR = (Element)result.getAssertion(); + IIdentityLink identityLink = new SimpleIdentityLinkAssertionParser(idlFromSZR).parseIdentityLink(); + + if (identityLink == null) + throw new SZRCommunicationException("ernb.00", new Object[] {"NO IDL object"}); + + System.out.println(identityLink.getSerializedSamlAssertion()); + + if (StringUtils.isEmpty(identityLink.getFamilyName())) + throw new SZRCommunicationException("ernb.00", new Object[] {"NO FamilyName from IDL"}); + + if (StringUtils.isEmpty(identityLink.getGivenName())) + throw new SZRCommunicationException("ernb.00", new Object[] {"NO GivenName from IDL"}); + + if (StringUtils.isEmpty(identityLink.getDateOfBirth())) + throw new SZRCommunicationException("ernb.00", new Object[] {"NO DateOfBirthName from IDL"}); + + if (StringUtils.isEmpty(identityLink.getIdentificationType())) + throw new SZRCommunicationException("ernb.00", new Object[] {"NO baseIdType from IDL"}); + + if (StringUtils.isEmpty(identityLink.getIdentificationValue())) + throw new SZRCommunicationException("ernb.00", new Object[] {"NO baseId from IDL"}); + + if (StringUtils.isEmpty(identityLink.getSerializedSamlAssertion())) + throw new SZRCommunicationException("ernb.00", new Object[] {"NO serialized IDL"}); + + if (identityLink.getSamlAssertion() == null ) + throw new SZRCommunicationException("ernb.00", new Object[] {"NO raw IDL"}); + + + + } + +// @Test + public void getbPKTest() throws SZRException_Exception, eIDASAuthenticationException { + String bPK = szrClient.getBPK(getPersonInfo(), DUMMY_TARGET, + basicConfig.getBasicConfiguration( + Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_VKZ, + "no VKZ defined")); + + if (StringUtils.isEmpty(bPK)) + throw new SZRCommunicationException("ernb.01", new Object[] {"bPK is null or empty"}); + + + } + + private String createHashFromUniqueId(String uniqueId) throws eIDASAuthenticationException { + try { + MessageDigest md = MessageDigest.getInstance("SHA-256"); + byte[] hash = md.digest(uniqueId.getBytes("UTF-8")); + String hashBase64 = new String(Base64Utils.encode(hash), "UTF-8").replaceAll("\r\n", ""); + return hashBase64; + + } catch (Exception ex) { + throw new eIDASAuthenticationException("internal.03", new Object[]{}, ex); + + } + } + + private PersonInfoType getPersonInfo() throws eIDASAuthenticationException { + PersonInfoType personInfo = new PersonInfoType(); + PersonNameType personName = new PersonNameType(); + PhysicalPersonType naturalPerson = new PhysicalPersonType(); + TravelDocumentType eDocument = new TravelDocumentType(); + + naturalPerson.setName(personName ); + personInfo.setPerson(naturalPerson ); + personInfo.setTravelDocument(eDocument ); + + //parse some eID attributes + Trible<String, String, String> eIdentifier = + eIDASResponseUtils.parseEidasPersonalIdentifier((String)eIDASeID); + String uniqueId = createHashFromUniqueId(eIdentifier.getThird()); + String citizenCountry = eIdentifier.getFirst(); + + //person information + personName.setFamilyName((String)familyName); + personName.setGivenName((String)givenName); + naturalPerson.setDateOfBirth(dateOfBirth); + eDocument.setIssuingCountry(citizenCountry); + eDocument.setDocumentNumber(uniqueId); + + //eID document information + eDocument.setDocumentType(basicConfig.getBasicConfiguration( + Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_EDOCUMENTTYPE, + Constants.SZR_CONSTANTS_DEFAULT_DOCUMENT_TYPE)); + + //TODO: that should be removed +// eDocument.setIssueDate(basicConfig.getBasicConfiguration( +// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_ISSUING_DATE)); +// eDocument.setIssuingAuthority(basicConfig.getBasicConfiguration( +// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_ISSUING_AUTHORITY)); + + return personInfo; + } + + + private List<KeyValueType> dummyCodeForKeys() throws IOException, NoSuchProviderException, InvalidKeyException { +// if (basicConfig.getBasicMOAIDConfigurationBoolean( +// Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_KEYS_USEDUMMY, +// false)) { +// List<KeyValueType> keyvalueList = new ArrayList<KeyValueType>(); +// try { +// // set key values +// RSAKeyValueType rsa = new RSAKeyValueType(); +// rsa.setExponent(PUBKEY_EXPONENT); +// rsa.setModulus(PUBKEY_MODULUS); +// +// KeyValueType key = new KeyValueType(); +// key.setRSAKeyValue(rsa); +// keyvalueList.add(key); +// +// return keyvalueList; +// } catch (Exception e) { +// log.error("TestCode has an internal ERROR", e); +// throw e; +// +// } +// +// } + + return null; + + } +} diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java index cd7895ba..df2920cb 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/test/eidas/specific/modules/authmodule_eIDASv2/eIDASAttributePostProcessingTest.java @@ -24,7 +24,7 @@ package at.asitplus.test.eidas.specific.modules.authmodule_eIDASv2; import static org.junit.Assert.fail; -import java.io.File; +import java.io.IOException; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Map; @@ -44,18 +44,6 @@ import at.asitplus.eidas.specific.modules.authmodule_eIDASv2.service.EIDPostProc @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/SpringTest-context_basic_test.xml") public class eIDASAttributePostProcessingTest { - - @BeforeClass - public static void classInitializer() throws Exception { - final String currentDir = new java.io.File( "." ).getCanonicalPath(); - File configFile = new java.io.File(currentDir + "./../../basicConfig/default_config.properties"); - if (!configFile.exists()) { - throw new Exception("Default Configuration not found. Test will will be FAIL"); - - } - System.setProperty("eidas.ms.configuration", configFile.toURI().toASCIIString()); - - } @Autowired private EIDPostProcessingService postProcessor; @@ -115,10 +103,14 @@ public class eIDASAttributePostProcessingTest { private static final String P2_PLACEOFBIRTH = "Nirgendwo"; private static final String P2_BIRTHNAME = "Musterkind"; - @Test - public void dummyTest() { - - } + + @BeforeClass + public static void classInitializer() throws IOException { + final String current = new java.io.File( "." ).toURI().toString(); + System.setProperty("eidas.ms.configuration", current + "../../basicConfig/default_config.properties"); + + } + @Test public void DEWithHexLowerCase() throws Exception { diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/szr/szr_resp_error_travelerdocexists.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/szr/szr_resp_error_travelerdocexists.xml new file mode 100644 index 00000000..d627ded2 --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/szr/szr_resp_error_travelerdocexists.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> + <faultcode xmlns:p344="urn:SZRServices" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">p344:F455</faultcode> + <faultstring>The travel document you sent to insert a person already exists for another person. Either check the document or have the person altered accordingly</faultstring> + <faultactor>urn:SZRServices</faultactor> +</SOAP-ENV:Fault> diff --git a/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/szr/szr_resp_valid_1.xml b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/szr/szr_resp_valid_1.xml new file mode 100644 index 00000000..c376caef --- /dev/null +++ b/eidas_modules/authmodule-eIDAS-v2/src/test/resources/data/szr/szr_resp_valid_1.xml @@ -0,0 +1,50 @@ +<ns6:GetIdentityLinkEidasResponse xmlns="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:ns2="http://egov.gv.at/pvp1.xsd" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#" xmlns:ns4="http://www.w3.org/2001/04/xmldsig-more#" xmlns:ns5="http://schemas.xmlsoap.org/ws/2002/04/secext" xmlns:ns6="urn:SZRServices"><ns6:GetIdentityLinkReturn><ns6:PersonInfo><ns6:Person><Identification><Value>k+zDM1BVpN1WJO4x7ZQ3ng==</Value><Type>urn:publicid:gv.at:baseid</Type></Identification><Name><GivenName>Franz</GivenName><FamilyName>Mustermann</FamilyName></Name><Sex>unknown</Sex><DateOfBirth>1989-05-05</DateOfBirth></ns6:Person></ns6:PersonInfo><ns6:Assertion><saml:Assertion xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:ecdsa="http://www.w3.org/2001/04/xmldsig-more#" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:si="http://www.w3.org/2001/XMLSchema-instance" AssertionID="szr.bmi.gv.at-AssertionID15650069652921" IssueInstant="2019-08-05T14:09:25+01:00" Issuer="http://portal.bmi.gv.at/ref/szr/issuer" MajorVersion="1" MinorVersion="0"> + <saml:AttributeStatement> + <saml:Subject> + <saml:SubjectConfirmation> + <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches</saml:ConfirmationMethod> + <saml:SubjectConfirmationData> + <pr:Person si:type="pr:PhysicalPersonType"><pr:Identification><pr:Value>k+zDM1BVpN1WJO4x7ZQ3ng==</pr:Value><pr:Type>urn:publicid:gv.at:baseid</pr:Type></pr:Identification><pr:Name><pr:GivenName>Hans</pr:GivenName><pr:FamilyName primary="undefined">Mustermann</pr:FamilyName></pr:Name><pr:DateOfBirth>1989-05-05</pr:DateOfBirth></pr:Person> + </saml:SubjectConfirmationData> + </saml:SubjectConfirmation> + </saml:Subject> + </saml:AttributeStatement> + <dsig:Signature> + <dsig:SignedInfo> + <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> + <dsig:Reference URI=""> + <dsig:Transforms> + <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> + <dsig:XPath>not(ancestor-or-self::pr:Identification)</dsig:XPath> + </dsig:Transform> + <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> + </dsig:Transforms> + <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> + <dsig:DigestValue>GZjlsEXIhUPBSbOR1R8P4dzRJHE=</dsig:DigestValue> + </dsig:Reference> + <dsig:Reference Type="http://www.w3.org/2000/09/xmldsig#Manifest" URI="#manifest"> + <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> + <dsig:DigestValue>lCnWsFICFg0ogj0Ha7++Y9gyOQg=</dsig:DigestValue> + </dsig:Reference> + </dsig:SignedInfo> + <dsig:SignatureValue> + a6tPfkdriEzAyQh2jU3/4j48baaPnY/i510OHx0vwHRvXLz80UyZzffdmtaRuk3iHVxgUMd9 + Ld0DLsRt6tFJiPLyBCo0QCuqaOwgTcuUI3Ku/oySpqMjqug3AMdrhxW2j41yQlzvkjiZTT4j + zQ9GHFnZnnob0+bBflqIjZOl4xc= + </dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIICTzCCAbigAwIBAgIBADANBgkqhkiG9w0BAQUFADATMREwDwYDVQQDEwhTWlJQRVJTQjAeFw0wNTA3MDEwMDAwMDBaFw00MDEyMzEyMzU5NTlaMBMxETAPBgNVBAMTCFNaUlBFUlNCMIIBHzANBgkqhkiG9w0BAQEFAAOCAQwAMIIBBwKBgQDGNmo9LOohefioGreKU6j6R05jUwHuddziSOQPolmMSXQG6NnnlLQaITv7BEmFj+EBqaOc+891wgZCRvNA2h+fHdJ69QXi/xjCovJI5SHh9jA+ssqhZ68iXOZHPq4WeegtYiYyJaRxWF+iPLqSm+bknS/KuBUcZol9SM3r6CMf0wKBgHytGrIelzc9ZN97VYXLkOJxi4TNSSj3Q/1TIC0s+HSzjbD694Y6ufINpR+IQm5epLTdXx9Dxv19bYnsLEIt0niMd2Cnm1DxXe8iNaDzpWec7fbRT6vDBwtTnyQkGfu2GGF3nSvVZ5AUDbLdAfZLOlbwsZmPnWU1zktSkLgKnT2XozIwMDAuBglghkgBhvhCAQ0EIRMfQ3JlYXRlZCBieSB6L09TIElDU0YgLSBIQ1I3NzgwIDANBgkqhkiG9w0BAQUFAAOBgQBwPc3l/Qf4myH8rsAAM5HqdCR68bMegWgNVxlPNl5DNJEE2hbPhIJ/K6TF6cjROYKDVuQ/+drtsZcrEOaqhqD3qw7MXAiT9GurV99YM/qTBsMy13yjU3LqeFX25Om8JlccGF5G+iHrVjfNQEUocGnGxCAPMlBvGwia4JjJcIPx7Q==</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo> + <dsig:Object> + <dsig:Manifest Id="manifest"> + <dsig:Reference URI=""> + <dsig:Transforms> + <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> + <dsig:XPath>not(ancestor-or-self::dsig:Signature)</dsig:XPath> + </dsig:Transform> + </dsig:Transforms> + <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> + <dsig:DigestValue>SbpaaSlLolEX5D9P7HyTPnImvns=</dsig:DigestValue> + </dsig:Reference> + </dsig:Manifest> + </dsig:Object> + </dsig:Signature> +</saml:Assertion></ns6:Assertion><ns6:AdditionalInfo>ERN</ns6:AdditionalInfo></ns6:GetIdentityLinkReturn></ns6:GetIdentityLinkEidasResponse>
\ No newline at end of file diff --git a/eidas_modules/pom.xml b/eidas_modules/pom.xml index 219096ff..2c7e0564 100644 --- a/eidas_modules/pom.xml +++ b/eidas_modules/pom.xml @@ -4,7 +4,7 @@ <parent> <groupId>at.asitplus.eidas</groupId> <artifactId>ms_specific</artifactId> - <version>1.x</version> + <version>1.0.3-snapshot</version> </parent> <groupId>at.asitplus.eidas.ms_specific</groupId> <artifactId>modules</artifactId> @@ -3,14 +3,14 @@ <modelVersion>4.0.0</modelVersion> <groupId>at.asitplus.eidas</groupId> <artifactId>ms_specific</artifactId> - <version>1.x</version> + <version>1.0.3-snapshot</version> <packaging>pom</packaging> <name>MS specific eIDAS components</name> <properties> <!-- Project versions--> - <egiz.eidas.version>1.0.2</egiz.eidas.version> + <egiz.eidas.version>1.0.3-snapshot</egiz.eidas.version> <!-- ===================================================================== --> @@ -19,6 +19,7 @@ <eaaf-core.version>1.0.8</eaaf-core.version> <org.springframework.version>5.1.8.RELEASE</org.springframework.version> + <org.thymeleaf-spring5.version>3.0.11.RELEASE</org.thymeleaf-spring5.version> <cxf.version>3.3.2</cxf.version> <org.apache.commons-lang3.version>3.9</org.apache.commons-lang3.version> @@ -28,7 +29,8 @@ <joda-time.version>2.10.3</joda-time.version> <surefire.version>2.22.1</surefire.version> <org.slf4j.version>1.7.26</org.slf4j.version> - + <mockito-soap-cxf.version>1.0.5</mockito-soap-cxf.version> + </properties> <profiles> @@ -43,7 +45,7 @@ <repositories> <repository> <id>egiz-commons</id> - <url>http://demo.egiz.gv.at/int-repo/</url> + <url>https://apps.egiz.gv.at/maven/</url> <releases> <enabled>true</enabled> </releases> @@ -111,6 +113,11 @@ <version>${org.springframework.version}</version> </dependency> <dependency> + <groupId>org.thymeleaf</groupId> + <artifactId>thymeleaf-spring5</artifactId> + <version>${org.thymeleaf-spring5.version}</version> + </dependency> + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${org.slf4j.version}</version> @@ -176,6 +183,12 @@ <version>${org.springframework.version}</version> <scope>test</scope> </dependency> + <dependency> + <groupId>com.github.skjolber</groupId> + <artifactId>mockito-soap-cxf</artifactId> + <version>${mockito-soap-cxf.version}</version> + <scope>test</scope> + </dependency> </dependencies> </dependencyManagement> @@ -213,7 +226,14 @@ <version>${surefire.version}</version> </dependency> </dependencies> - </plugin> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>versions-maven-plugin</artifactId> + <version>2.7</version> + </plugin> + </plugins> </pluginManagement> </build> |