From ed033b4105eec8c00189729bd4b38b17c6b40509 Mon Sep 17 00:00:00 2001 From: Alexander Marsalek Date: Thu, 7 Jan 2021 18:16:45 +0100 Subject: Resolve merge comments --- connector/src/main/resources/properties/status_messages_en.properties | 3 +++ 1 file changed, 3 insertions(+) (limited to 'connector/src/main') diff --git a/connector/src/main/resources/properties/status_messages_en.properties b/connector/src/main/resources/properties/status_messages_en.properties index 80228a47..c430fc90 100644 --- a/connector/src/main/resources/properties/status_messages_en.properties +++ b/connector/src/main/resources/properties/status_messages_en.properties @@ -6,6 +6,9 @@ eidas.04=Request contains no sessionToken. Authentication process stops eidas.05=Received eIDAS response-message is not valid. Reason: {0} eidas.06=LoA from eIDAS response-message {0} does not match to requested LoA eidas.07=eIDAS Response attribute-validation FAILED. Attribute:{0} Reason: {1} +eidas.08=An unexpected error occurred. +eidas.09=An error occurred while loading your data from official registers. Please contact the support. + config.01=No configuration-file parameter found. Maybe Java SystemD parameter is missing config.03=Can not load configuration from path {0} (See logs for more details) -- cgit v1.2.3 From 9bb8ba415faee8bd454da6def37daf545bb559e1 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 26 Jan 2021 07:40:01 +0100 Subject: update SAML2 IDP elements of MS-specific Connector to current snapshot version (1.1.12-SNAPSHOT) of eaaf_module_pvp2_idp --- .../resources/specific_eIDAS_connector.beans.xml | 74 ++++++++++------------ 1 file changed, 34 insertions(+), 40 deletions(-) (limited to 'connector/src/main') diff --git a/connector/src/main/resources/specific_eIDAS_connector.beans.xml b/connector/src/main/resources/specific_eIDAS_connector.beans.xml index f6fdeefe..c59496b4 100644 --- a/connector/src/main/resources/specific_eIDAS_connector.beans.xml +++ b/connector/src/main/resources/specific_eIDAS_connector.beans.xml @@ -14,106 +14,100 @@ + class="at.asitplus.eidas.specific.connector.config.StaticResourceConfiguration" /> + class="at.asitplus.eidas.specific.connector.controller.ProcessEngineSignalController" /> - - - + + class="at.asitplus.eidas.specific.connector.auth.AuthenticationManager" /> + class="at.asitplus.eidas.specific.connector.builder.AuthenticationDataBuilder" /> + class="at.asitplus.eidas.specific.connector.config.PvpEndPointConfiguration" /> + class="at.asitplus.eidas.specific.connector.provider.PvpEndPointCredentialProvider" /> + class="at.asitplus.eidas.specific.connector.provider.PvpMetadataConfigurationFactory" /> - - - + class="at.asitplus.eidas.specific.connector.controller.Pvp2SProfileEndpoint"> + + + class="at.asitplus.eidas.specific.connector.verification.AuthnRequestValidator" /> - + - - - + class="at.gv.egiz.eaaf.modules.pvp2.idp.impl.MetadataAction"> + - - - + class="at.gv.egiz.eaaf.modules.pvp2.idp.impl.AuthenticationAction"> + + + class="at.gv.egiz.eaaf.core.impl.idp.auth.services.ProtocolAuthenticationService"> + class="at.gv.egiz.eaaf.core.impl.utils.SecurePendingRequestIdGenerationStrategy" /> + class="at.asitplus.eidas.specific.connector.provider.PvpMetadataProvider" /> + class="at.asitplus.eidas.specific.connector.builder.PvpSubjectNameGenerator" /> + class="at.asitplus.eidas.specific.connector.mapper.LoALevelMapper" /> + class="at.asitplus.eidas.specific.connector.gui.GuiBuilderConfigurationFactory" /> + class="at.asitplus.eidas.specific.connector.gui.DefaultVelocityGuiBuilderImpl" /> + class="at.asitplus.eidas.specific.connector.gui.SpringMvcGuiFormBuilderImpl" /> + class="at.asitplus.eidas.specific.connector.provider.StatusMessageProvider" /> + class="at.asitplus.eidas.specific.connector.logger.RevisionLogger" /> + class="at.asitplus.eidas.specific.connector.logger.StatisticLogger" /> + class="at.asitplus.eidas.specific.connector.processes.tasks.GenerateCountrySelectionFrameTask" + scope="prototype" /> + class="at.asitplus.eidas.specific.connector.processes.tasks.EvaluateCountrySelectionTask" + scope="prototype" /> \ No newline at end of file -- cgit v1.2.3 From de03adfbe79968f65bb711d7b3a583eeb1054140 Mon Sep 17 00:00:00 2001 From: Alexander Marsalek Date: Mon, 1 Feb 2021 09:42:38 +0100 Subject: more transitions & tests --- connector/src/main/resources/properties/status_messages_en.properties | 1 + 1 file changed, 1 insertion(+) (limited to 'connector/src/main') diff --git a/connector/src/main/resources/properties/status_messages_en.properties b/connector/src/main/resources/properties/status_messages_en.properties index c430fc90..9dcbe1a1 100644 --- a/connector/src/main/resources/properties/status_messages_en.properties +++ b/connector/src/main/resources/properties/status_messages_en.properties @@ -8,6 +8,7 @@ eidas.06=LoA from eIDAS response-message {0} does not match to requested LoA eidas.07=eIDAS Response attribute-validation FAILED. Attribute:{0} Reason: {1} eidas.08=An unexpected error occurred. eidas.09=An error occurred while loading your data from official registers. Please contact the support. +eidas.10=Invalid user input. config.01=No configuration-file parameter found. Maybe Java SystemD parameter is missing -- cgit v1.2.3 From ebd7e620fca36b0b545ebcaaaff8d092e1c42e22 Mon Sep 17 00:00:00 2001 From: Christian Kollmann Date: Mon, 22 Feb 2021 10:17:20 +0100 Subject: Fix type in property "gui.countryselection.cancel" --- .../main/resources/templates/countrySelection.html | 170 ++++++++++----------- 1 file changed, 85 insertions(+), 85 deletions(-) (limited to 'connector/src/main') diff --git a/connector/src/main/resources/templates/countrySelection.html b/connector/src/main/resources/templates/countrySelection.html index 3937b464..b15234eb 100644 --- a/connector/src/main/resources/templates/countrySelection.html +++ b/connector/src/main/resources/templates/countrySelection.html @@ -3,12 +3,12 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorator="fragments/base" th:with="lang=${#locale.language}" th:lang="${lang}"> - + - + eIDAS-Login Länderauswahl @@ -17,236 +17,236 @@
LanguageSelectionBlock
- +

Select your country

- -
+ + Belgium-eID - + - +
- -
+ + Bulgaria-eID - +
- -
+ + Croatia-eID - +
- -
+ + Cyprus-eID + th:attr="src=@{img/countries/Cyprus-EU.png},alt=#{gui.countryselection.country.cy.logo.alt}"/> - +
- -
+ + CzechRepublic-eID - +
- -
+ + Denmark-eID - +
-
+ Germany-eID
- -
+ + Estonia-eID
- -
+ + Finland-eID
- -
+ + France-eID
- -
+ + Greece-eID + th:attr="src=@{img/countries/Greece-EU.png},alt=#{gui.countryselection.country.gr.logo.alt}"/> - +
- -
+ + Hungary-eID + th:attr="src=@{img/countries/Hungary-EU.png},alt=#{gui.countryselection.country.hu.logo.alt}"/>
- -
+ + Ireland-eID
- -
+ + Ireland-eID
- -
+ + Italy-eID
- -
+ + Latvia-eID - +
- -
+ + Luxembourg-eID - +
- -
+ + Luxembourg-eID
- -
+ + Malta-eID
- -
+ + Netherlands-eID - + - +
- -
+ + Poland-eID - +
- -
+ + Portugal-eID + th:attr="src=@{img/countries/Portugal-EU.png},alt=#{gui.countryselection.country.pt.logo.alt}"/> - +
- -
+ + Romania-eID + th:attr="src=@{img/countries/Romania-EU.png},alt=#{gui.countryselection.country.ro.logo.alt}"/> - +
- -
+ + Slovakia-eID - +
- -
+ + Slovenia-eID - +
- -
+ + Spain-eID - +
- -
+ + Sweden-eID - +
- -
+ + UnitedKingdom-eID
- -
- + + +
-- cgit v1.2.3 From 9f0fa316c8f7adeb3529cb4c3b2c553f085f7d95 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Tue, 15 Jun 2021 12:14:51 +0200 Subject: add ZMR client, to some re-factoring, and a lot of bug-fixing --- connector/src/main/resources/application.properties | 14 ++++++++++++++ .../resources/properties/status_messages_en.properties | 5 +---- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'connector/src/main') diff --git a/connector/src/main/resources/application.properties b/connector/src/main/resources/application.properties index b13b6c18..e9c3afd1 100644 --- a/connector/src/main/resources/application.properties +++ b/connector/src/main/resources/application.properties @@ -82,6 +82,20 @@ eidas.ms.auth.eIDAS.szrclient.eidasbind.mds.inject=false #eidas.ms.auth.eIDAS.authblock.key.password=f/+saJBc3a}*/T^s + +#### matching###### +# ZMR communication +#eidas.ms.auth.eIDAS.zmrclient.endpoint=http://localhost:1234/demozmr +#eidas.ms.auth.eIDAS.zmrclient.ssl.keyStore.type=jks +#eidas.ms.auth.eIDAS.zmrclient.ssl.keyStore.path=keys/junit.jks +#eidas.ms.auth.eIDAS.zmrclient.ssl.keyStore.password=password +#eidas.ms.auth.eIDAS.zmrclient.ssl.trustStore.path= +#eidas.ms.auth.eIDAS.zmrclient.ssl.trustStore.password= + +#eidas.ms.auth.eIDAS.zmrclient.req.organisation.behoerdennr=jUnit123456 + + + #Raw eIDAS Id data storage eidas.ms.auth.eIDAS.szrclient.workarounds.eidmapping.revisionlog.active=true diff --git a/connector/src/main/resources/properties/status_messages_en.properties b/connector/src/main/resources/properties/status_messages_en.properties index 9dcbe1a1..f07a8705 100644 --- a/connector/src/main/resources/properties/status_messages_en.properties +++ b/connector/src/main/resources/properties/status_messages_en.properties @@ -5,10 +5,7 @@ eidas.03=No CitizenCountry available. Can not start eIDAS authentication process eidas.04=Request contains no sessionToken. Authentication process stops eidas.05=Received eIDAS response-message is not valid. Reason: {0} eidas.06=LoA from eIDAS response-message {0} does not match to requested LoA -eidas.07=eIDAS Response attribute-validation FAILED. Attribute:{0} Reason: {1} -eidas.08=An unexpected error occurred. -eidas.09=An error occurred while loading your data from official registers. Please contact the support. -eidas.10=Invalid user input. +eidas.07=eIDAS Response attribute-validation FAILED. Attribute:{0} Reason: {1}. config.01=No configuration-file parameter found. Maybe Java SystemD parameter is missing -- cgit v1.2.3 From 6e1a69773284177a0f6c7233c4bcdf7f4bd96681 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Tue, 15 Jun 2021 18:15:19 +0200 Subject: further optimizations and bug fixing in matching code --- .../eidas/specific/connector/provider/StatusMessageProvider.java | 8 +++----- connector/src/main/resources/specific_eIDAS_connector.beans.xml | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'connector/src/main') diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java index 073f7513..55ce044d 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java @@ -92,14 +92,12 @@ public class StatusMessageProvider implements IStatusMessenger { @Override public String getResponseErrorCode(Throwable throwable) { - String errorCode = IStatusMessenger.CODES_EXTERNAL_ERROR_GENERIC; if (throwable instanceof EaafException) { - errorCode = mapInternalErrorToExternalError(((EaafException) throwable).getErrorId()); - + return ((EaafException) throwable).getErrorId(); + } - // TODO: maybe more internal switches are required - return errorCode; + return IStatusMessenger.CODES_INTERNAL_ERROR_GENERIC; } diff --git a/connector/src/main/resources/specific_eIDAS_connector.beans.xml b/connector/src/main/resources/specific_eIDAS_connector.beans.xml index c59496b4..4608086e 100644 --- a/connector/src/main/resources/specific_eIDAS_connector.beans.xml +++ b/connector/src/main/resources/specific_eIDAS_connector.beans.xml @@ -24,6 +24,9 @@ + + -- cgit v1.2.3 From 249e3805da249afafe164ae7dc43884ba3777727 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 16 Jun 2021 11:51:11 +0200 Subject: add ZMR update process into ZMRClient --- connector/src/main/resources/application.properties | 2 ++ 1 file changed, 2 insertions(+) (limited to 'connector/src/main') diff --git a/connector/src/main/resources/application.properties b/connector/src/main/resources/application.properties index e9c3afd1..8263ea82 100644 --- a/connector/src/main/resources/application.properties +++ b/connector/src/main/resources/application.properties @@ -93,6 +93,8 @@ eidas.ms.auth.eIDAS.szrclient.eidasbind.mds.inject=false #eidas.ms.auth.eIDAS.zmrclient.ssl.trustStore.password= #eidas.ms.auth.eIDAS.zmrclient.req.organisation.behoerdennr=jUnit123456 +#eidas.ms.auth.eIDAS.zmrclient.req.update.reason.code=EIDAS-KITT +#eidas.ms.auth.eIDAS.zmrclient.req.update.reason.text=KITT for eIDAS Matching -- cgit v1.2.3 From cbf1d0408519d0763a1a87b733c16a1ba5d022ba Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Wed, 7 Jul 2021 09:31:43 +0200 Subject: add HTML template for additional eID information --- .../config/StaticResourceConfiguration.java | 207 --------------------- .../controller/ProcessEngineSignalController.java | 3 +- .../resources/specific_eIDAS_connector.beans.xml | 3 - 3 files changed, 2 insertions(+), 211 deletions(-) delete mode 100644 connector/src/main/java/at/asitplus/eidas/specific/connector/config/StaticResourceConfiguration.java (limited to 'connector/src/main') 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 deleted file mode 100644 index a1e953f1..00000000 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/config/StaticResourceConfiguration.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * 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.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.eidas.specific.connector.config; - -import java.net.MalformedURLException; -import java.util.List; - -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.WebMvcConfigurer; -import org.thymeleaf.templateresolver.FileTemplateResolver; - -import at.asitplus.eidas.specific.connector.MsEidasNodeConstants; -import at.gv.egiz.eaaf.core.api.idp.IConfiguration; -import at.gv.egiz.eaaf.core.api.logging.IMessageSourceLocation; -import at.gv.egiz.eaaf.core.impl.utils.FileUtils; - -/** - * Spring configurator for Web resources. - * - * @author tlenz - * - */ -@Configuration -@EnableWebMvc -public class StaticResourceConfiguration implements WebMvcConfigurer { - private static final Logger log = LoggerFactory.getLogger(StaticResourceConfiguration.class); - private static final String[] CLASSPATH_RESOURCE_LOCATIONS = { - "/" - }; - - private static final String DEFAULT_MESSAGE_SOURCE = "classpath:properties/status_messages"; - - @Autowired - private IConfiguration basicConfig; - - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - final String staticResources = basicConfig.getBasicConfiguration( - MsEidasNodeConstants.PROP_CONFIG_WEBCONTENT_STATIC_PATH); - try { - if (StringUtils.isNotEmpty(staticResources)) { - String absPath = FileUtils.makeAbsoluteUrl(staticResources, basicConfig - .getConfigurationRootDirectory()); - if (!absPath.endsWith("/")) { - absPath += "/"; - } - - registry.addResourceHandler("/static/**").addResourceLocations(absPath); - log.info("Add Ressourcefolder: " + absPath + " for static Web content"); - - } else { - log.debug("No Ressourcefolder for static Web content"); - } - - } catch (final MalformedURLException e) { - log.warn("Can NOT initialize ressourcefolder for static Web content", e); - - } - - registry.addResourceHandler("/**").addResourceLocations(CLASSPATH_RESOURCE_LOCATIONS); - - } - - /** - * Get a message source with only internal message properties. - * - * @param ressourceLocations List of source-locations - * @return - */ - @Bean - public ReloadableResourceBundleMessageSource internalMessageSource( - @Autowired(required = false) final List ressourceLocations) { - final ReloadableResourceBundleMessageSource messageSource = - new ReloadableResourceBundleMessageSource(); - - // add default message source - messageSource.setBasename(DEFAULT_MESSAGE_SOURCE); - - if (ressourceLocations != null) { - // load more message sources - for (final IMessageSourceLocation el : ressourceLocations) { - if (el.getMessageSourceLocation() != null) { - for (final String source : el.getMessageSourceLocation()) { - messageSource.addBasenames(source); - log.debug("Add additional messageSources: {}", el.getMessageSourceLocation().toArray()); - - } - } - } - } - - messageSource.setDefaultEncoding("UTF-8"); - return messageSource; - - } - - /** - * Get full message source with internal and external message-properties files. - * - * @param ressourceLocations List of source-locations - * @return - */ - @Bean - public ReloadableResourceBundleMessageSource messageSource( - @Autowired(required = false) final List ressourceLocations) { - final ReloadableResourceBundleMessageSource messageSource = - new ReloadableResourceBundleMessageSource(); - messageSource.setDefaultEncoding("UTF-8"); - messageSource.setParentMessageSource(internalMessageSource(ressourceLocations)); - - 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; - - } - - /** - * Get a Tyhmeleaf Template-Resolver with external configuration path. - * - * @return - */ - @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("HTML"); - viewResolver.setCacheable(false); - - log.info("Add Ressourcefolder: {} for dynamic Web content templates", absPath); - 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); - - } - - throw new RuntimeException("Can NOT initialize HTML template resolver"); - - } -} diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/controller/ProcessEngineSignalController.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/controller/ProcessEngineSignalController.java index 1bf1ad67..6e2879a8 100644 --- a/connector/src/main/java/at/asitplus/eidas/specific/connector/controller/ProcessEngineSignalController.java +++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/controller/ProcessEngineSignalController.java @@ -46,7 +46,8 @@ import at.gv.egiz.eaaf.core.impl.idp.controller.AbstractProcessEngineSignalContr public class ProcessEngineSignalController extends AbstractProcessEngineSignalController { @RequestMapping(value = { - MsEidasNodeConstants.ENDPOINT_COUNTRYSELECTION + MsEidasNodeConstants.ENDPOINT_COUNTRYSELECTION, + MsEidasNodeConstants.ENDPOINT_OTHER_LOGIN_METHOD_SELECTION }, method = { RequestMethod.POST, RequestMethod.GET }) public void performGenericAuthenticationProcess(HttpServletRequest req, HttpServletResponse resp) diff --git a/connector/src/main/resources/specific_eIDAS_connector.beans.xml b/connector/src/main/resources/specific_eIDAS_connector.beans.xml index 4608086e..ec16a7d2 100644 --- a/connector/src/main/resources/specific_eIDAS_connector.beans.xml +++ b/connector/src/main/resources/specific_eIDAS_connector.beans.xml @@ -13,9 +13,6 @@ - - -- cgit v1.2.3