From ac531e30d13d6714e2ac61f7329e6adc130aa288 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 24 May 2019 12:23:41 +0200 Subject: untested switch to EAAF-components 1.0.7 --- id/server/modules/moa-id-module-eIDAS/pom.xml | 11 +++++++++++ .../AustrianAuthWitheID4UAuthenticationModulImpl.java | 17 +++++++++++++---- .../moa/id/auth/modules/eidas/eID4UAPSignalServlet.java | 3 ++- .../moa/id/auth/modules/eidas/eIDASSignalServlet.java | 3 ++- .../eidas/engine/MOAeIDASChainingMetadataProvider.java | 2 +- .../eidas/tasks/CollectAddtionalAttributesTask.java | 2 +- .../auth/modules/eidas/utils/eIDASAttributeBuilder.java | 2 +- .../moa/id/protocols/eidas/EIDASProtocol.java | 6 +++--- 8 files changed, 34 insertions(+), 12 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 5f4192645..6dabb938e 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -69,6 +69,12 @@ + + + com.google.code.gson + gson + 2.8.5 + eu.eidas.extension.eID4U @@ -76,6 +82,11 @@ ${eID4U.module.version} + + at.gv.egiz.components + egiz-spring-api + + com.google.code.findbugs jsr305 diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/AustrianAuthWitheID4UAuthenticationModulImpl.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/AustrianAuthWitheID4UAuthenticationModulImpl.java index d3aa7b4a0..6efa55ac8 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/AustrianAuthWitheID4UAuthenticationModulImpl.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/AustrianAuthWitheID4UAuthenticationModulImpl.java @@ -30,6 +30,7 @@ import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.IRequestStorage; 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.PendingReqIdValidationException; import at.gv.egovernment.moa.id.auth.modules.internal.DefaultCitizenCardAuthModuleImpl; import at.gv.egovernment.moa.id.protocols.eidas.EIDASData; import at.gv.egovernment.moa.logging.Logger; @@ -72,11 +73,19 @@ public class AustrianAuthWitheID4UAuthenticationModulImpl extends DefaultCitizen Logger.warn("Process execution context contains NO 'pendingReqId'. Looks very suspect!"); else { - IRequest pendingReq = requestStore.getPendingRequest(pendingReqId); - if (pendingReq != null && pendingReq instanceof EIDASData) { - return "eID4UAttributCollectionAuthentication"; - + IRequest pendingReq; + try { + pendingReq = requestStore.getPendingRequest(pendingReqId); + if (pendingReq != null && pendingReq instanceof EIDASData) { + return "eID4UAttributCollectionAuthentication"; + + } + + } catch (PendingReqIdValidationException e) { + Logger.warn("Validation of PendingRequestId FAILED. Reason: " + e.getMessage()); + } + } } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eID4UAPSignalServlet.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eID4UAPSignalServlet.java index c8c65ce76..65b6d1725 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eID4UAPSignalServlet.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eID4UAPSignalServlet.java @@ -9,6 +9,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import at.gv.egiz.eaaf.core.exceptions.EAAFException; import at.gv.egiz.eaaf.core.impl.idp.controller.AbstractProcessEngineSignalController; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Constants; import at.gv.egovernment.moa.id.util.CookieUtils; @@ -26,7 +27,7 @@ public class eID4UAPSignalServlet extends AbstractProcessEngineSignalController @RequestMapping(value = {eID4UConstants.HTTP_ENDPOINT_AP_CONSENT_RETURN }, method = {RequestMethod.POST, RequestMethod.GET}) - public void performCitizenCardAuthentication(HttpServletRequest req, HttpServletResponse resp) throws IOException { + public void performCitizenCardAuthentication(HttpServletRequest req, HttpServletResponse resp) throws IOException, EAAFException { signalProcessManagement(req, resp); } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java index 49d98ed33..70c86dad8 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java @@ -32,6 +32,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import at.gv.egiz.eaaf.core.exceptions.EAAFException; import at.gv.egiz.eaaf.core.impl.idp.controller.AbstractProcessEngineSignalController; import at.gv.egovernment.moa.logging.Logger; @@ -54,7 +55,7 @@ public class eIDASSignalServlet extends AbstractProcessEngineSignalController { "/eidas/sp/redirect" }, method = {RequestMethod.POST, RequestMethod.GET}) - public void performCitizenCardAuthentication(HttpServletRequest req, HttpServletResponse resp) throws IOException { + public void performCitizenCardAuthentication(HttpServletRequest req, HttpServletResponse resp) throws IOException, EAAFException { signalProcessManagement(req, resp); } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java index feeff6f84..2a401bb04 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java @@ -29,7 +29,7 @@ import org.opensaml.xml.XMLObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import at.gv.egiz.eaaf.core.api.IDestroyableObject; +import at.gv.egiz.components.spring.api.IDestroyableObject; import at.gv.egiz.eaaf.core.api.IGarbageCollectorProcessing; import at.gv.egiz.eaaf.core.api.IPostStartupInitializable; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java index a58bc4f8d..d2ddc7ef8 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java @@ -16,6 +16,7 @@ import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; import at.gv.egiz.eaaf.core.api.storage.ITransactionStorage; 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.builder.SimpleStringAttributeGenerator; import at.gv.egiz.eaaf.core.impl.idp.builder.attributes.BPKAttributeBuilder; import at.gv.egiz.eaaf.core.impl.utils.Random; import at.gv.egiz.eid4u.api.attributes.Definitions; @@ -23,7 +24,6 @@ import at.gv.egovernment.moa.id.auth.builder.AuthenticationDataBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionWrapper; import at.gv.egovernment.moa.id.auth.modules.eidas.eID4UConstants; import at.gv.egovernment.moa.id.auth.modules.eidas.eid4u.utils.AttributeScopeMapper; -import at.gv.egovernment.moa.id.protocols.builder.attributes.SimpleStringAttributeGenerator; import at.gv.egovernment.moa.id.protocols.eidas.EIDASData; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Constants; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20SessionObject; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/eIDASAttributeBuilder.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/eIDASAttributeBuilder.java index d2323d161..4a6f83e5f 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/eIDASAttributeBuilder.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/eIDASAttributeBuilder.java @@ -36,9 +36,9 @@ import at.gv.egiz.eaaf.core.api.idp.IAuthData; import at.gv.egiz.eaaf.core.api.idp.ISPConfiguration; import at.gv.egiz.eaaf.core.exceptions.AttributeBuilderException; import at.gv.egiz.eaaf.core.impl.data.Pair; +import at.gv.egiz.eaaf.core.impl.idp.builder.SimpleStringAttributeGenerator; import at.gv.egiz.eaaf.modules.pvp2.impl.builder.PVPAttributeBuilder; import at.gv.egovernment.moa.id.data.IMOAAuthData; -import at.gv.egovernment.moa.id.protocols.builder.attributes.SimpleStringAttributeGenerator; import at.gv.egovernment.moa.id.protocols.eidas.attributes.builder.IeIDASAttribute; import at.gv.egovernment.moa.id.protocols.eidas.attributes.builder.eIDASMetadata; import at.gv.egovernment.moa.logging.Logger; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java index 7c9e66ba0..3996ad59c 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java @@ -48,7 +48,7 @@ import at.gv.egiz.eaaf.core.api.idp.IModulInfo; import at.gv.egiz.eaaf.core.api.idp.ISPConfiguration; import at.gv.egiz.eaaf.core.exceptions.EAAFException; import at.gv.egiz.eaaf.core.impl.gui.velocity.VelocityProvider; -import at.gv.egiz.eaaf.core.impl.idp.controller.AbstractAuthProtocolModulController; +import at.gv.egiz.eaaf.core.impl.idp.controller.AbstractController; import at.gv.egiz.eaaf.core.impl.utils.KeyValueUtils; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; @@ -82,7 +82,7 @@ import eu.eidas.engine.exceptions.EIDASSAMLEngineException; * @author tlenz */ @Controller -public class EIDASProtocol extends AbstractAuthProtocolModulController implements IModulInfo { +public class EIDASProtocol extends AbstractController implements IModulInfo { public static final String eIDAS_GENERIC_REQ_DATA_LEVELOFASSURENCE = "eIDAS_GENERIC_REQ_DATA_LEVELOFASSURENCE"; @@ -169,7 +169,7 @@ public class EIDASProtocol extends AbstractAuthProtocolModulController implement pendingReq.setAction(eIDASAuthenticationRequest.class.getName()); //switch to session authentication - performAuthentication(req, resp, pendingReq); + protAuthService.performAuthentication(req, resp, pendingReq); } /* -- cgit v1.2.3 From 66859cd53d4181350525e91c4d35071932675ca7 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 29 May 2019 14:04:44 +0200 Subject: refactoring from MOA-ID 3.4.x to MOA E-ID Proxy 4.0.x --- .../auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java | 6 +++--- .../eidas/tasks/ReceiveConsentForAddtionalAttributesTask.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java index 2a401bb04..a1d6bb225 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java @@ -82,7 +82,7 @@ public class MOAeIDASChainingMetadataProvider extends SimpleMetadataProvider imp protected void initializeEidasMetadataFromFileSystem() throws ConfigurationException { try { - Map metadataToLoad = authConfig.getBasicMOAIDConfigurationWithPrefix(Constants.CONIG_PROPS_EIDAS_METADATA_URLS_LIST_PREFIX); + Map metadataToLoad = authConfig.getBasicConfigurationWithPrefix(Constants.CONIG_PROPS_EIDAS_METADATA_URLS_LIST_PREFIX); if (!metadataToLoad.isEmpty()) { Logger.info("Load static configurated eIDAS metadata ... "); for (String metaatalocation : metadataToLoad.values()) { @@ -441,14 +441,14 @@ public class MOAeIDASChainingMetadataProvider extends SimpleMetadataProvider imp //FIX: change hostname validation default flag to true when httpClient is updated to > 4.4 MOAHttpProtocolSocketFactory protoSocketFactory = new MOAHttpProtocolSocketFactory( PVPConstants.SSLSOCKETFACTORYNAME, - basicConfig.getBasicMOAIDConfigurationBoolean( + basicConfig.getBasicConfigurationBoolean( AuthConfiguration.PROP_KEY_SSL_USE_JVM_TRUSTSTORE, false), moaAuthConfig.getTrustedCACertificates(), null, AuthConfiguration.DEFAULT_X509_CHAININGMODE, moaAuthConfig.isTrustmanagerrevoationchecking(), moaAuthConfig.getRevocationMethodOrder(), - moaAuthConfig.getBasicMOAIDConfigurationBoolean( + moaAuthConfig.getBasicConfigurationBoolean( AuthConfiguration.PROP_KEY_SSL_HOSTNAME_VALIDATION, false)); httpClient.setCustomSSLTrustStore(metadataURL, protoSocketFactory); diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveConsentForAddtionalAttributesTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveConsentForAddtionalAttributesTask.java index e878f8ab1..3e7dcbdfc 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveConsentForAddtionalAttributesTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveConsentForAddtionalAttributesTask.java @@ -86,7 +86,7 @@ public class ReceiveConsentForAddtionalAttributesTask extends AbstractAuthServle tokenServiceURL); CloseableHttpClient httpClient = HttpClientWithProxySupport.getHttpClient( sslFactory, - authConfig.getBasicMOAIDConfigurationBoolean(AuthConfiguration.PROP_KEY_OVS_SSL_HOSTNAME_VALIDATION, true)); + authConfig.getBasicConfigurationBoolean(AuthConfiguration.PROP_KEY_OVS_SSL_HOSTNAME_VALIDATION, true)); //build request URL URIBuilder uriBuilderToken = new URIBuilder(tokenServiceURL); -- cgit v1.2.3 From 062816757bf3f436fd03c2bdad1e8e6711411c3f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 27 Jun 2019 08:32:35 +0200 Subject: add log messages --- .../modules/eidas/config/ModifiedEncryptionSW.java | 19 +++++++++++++++---- .../eidas/eid4u/utils/AttributeScopeMapper.java | 10 +++++++++- 2 files changed, 24 insertions(+), 5 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java index 8779436e0..1b0f258ab 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java @@ -99,10 +99,21 @@ public class ModifiedEncryptionSW extends KeyStoreSamlEngineEncryption { return useEncryption; } catch(NullPointerException | ConfigurationException e) { - Logger.warn("failed to gather information about encryption for countryCode " + countryCode + " - thus, enabling encryption"); - if(Logger.isDebugEnabled()) - e.printStackTrace(); - return true; + try { + return !Boolean.valueOf( + AuthConfigurationProviderFactory.getInstance().getBasicConfiguration( + "moa.id.protocols.eIDAS.encryption.disabled", + "false" + )); + + } catch (ConfigurationException e1) { + Logger.warn("failed to gather information about encryption for countryCode " + countryCode + " - thus, enabling encryption"); + if(Logger.isDebugEnabled()) + e.printStackTrace(); + + return true; + + } } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java index 69cc131ff..48e64da62 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eid4u/utils/AttributeScopeMapper.java @@ -180,7 +180,12 @@ public class AttributeScopeMapper { if (StringUtils.isNotEmpty(eIDASAttr)) { if (!AttributeScopeMapper.getInstance().isComplexeScope(key)) { Logger.debug("Map simple TUG scope: " + key + " to eIDAS attribute: " + eIDASAttr); - result.put(eIDASAttr, el.getValue().getAsString()); + if (StringUtils.isNotEmpty(el.getValue().getAsString())) { + Logger.trace("eIDAS attribute: " + eIDASAttr + " has value: " + el.getValue().getAsString()); + result.put(eIDASAttr, el.getValue().getAsString()); + + } else + Logger.info("Ignore empty attr: "+ eIDASAttr); } else { Logger.trace("Find complex TUG scope: " + key); @@ -205,6 +210,7 @@ public class AttributeScopeMapper { address.cvAddressArea(jsonObject.get(AttributeScopeMapper.HomeInstitutionAddressStreet).getAsString()); address.thoroughfare(jsonObject.get(AttributeScopeMapper.HomeInstitutionAddressStreet).getAsString()); result.put(attr, address.build()); + Logger.debug("Add eIDAS attr: " + Definitions.HOMEINSTITUTIONADDRESS_NAME); } else if (Definitions.TEMPORARYADDRESS_NAME.equals(attr)) { address.postCode(jsonObject.get(AttributeScopeMapper.StudyAddressPostalCode).getAsString()); @@ -212,6 +218,7 @@ public class AttributeScopeMapper { address.cvAddressArea(jsonObject.get(AttributeScopeMapper.StudyAddressStreet).getAsString()); address.thoroughfare(jsonObject.get(AttributeScopeMapper.StudyAddressStreet).getAsString()); result.put(attr, address.build()); + Logger.debug("Add eIDAS attr: " + Definitions.TEMPORARYADDRESS_NAME); } else if (eu.eidas.auth.engine.core.eidas.spec.NaturalPersonSpec.Definitions.CURRENT_ADDRESS.getNameUri().toString().equals(attr)) { address.postCode(jsonObject.get(AttributeScopeMapper.PermanentAddressPostalCode).getAsString()); @@ -219,6 +226,7 @@ public class AttributeScopeMapper { address.cvAddressArea(jsonObject.get(AttributeScopeMapper.PermanentAddressStreet).getAsString()); address.thoroughfare(jsonObject.get(AttributeScopeMapper.PermanentAddressStreet).getAsString()); result.put(attr, address.build()); + Logger.debug("Add eIDAS attr: " + eu.eidas.auth.engine.core.eidas.spec.NaturalPersonSpec.Definitions.CURRENT_ADDRESS); } else { Logger.warn("Complexe eID4U attribute: " + attr + " is NOT SUPPORTED yet!"); -- cgit v1.2.3 From 67ca77e89aef7e75d43eb29f7be24ad68d2d5c8a Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 5 Aug 2019 14:39:22 +0200 Subject: fix eID4U attribute processing with multi-value results --- .../moa/id/protocols/eidas/EIDASProtocol.java | 4 +++ .../eid4u/CurrentLevelOfStudyAttrBuilder.java | 29 ++++++++++++++++++++-- .../builder/eid4u/FieldOfStudyAttrBuilder.java | 23 +++++++++++++++-- .../eidas/eid4u/AttributeScopeMapperTest.java | 4 +-- 4 files changed, 54 insertions(+), 6 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java index 3996ad59c..3ba7664a8 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java @@ -170,6 +170,7 @@ public class EIDASProtocol extends AbstractController implements IModulInfo { //switch to session authentication protAuthService.performAuthentication(req, resp, pendingReq); + } /* @@ -375,6 +376,7 @@ public class EIDASProtocol extends AbstractController implements IModulInfo { } catch (MOAIDException e) { Logger.info("eIDAS AuthnRequest preProcessing FAILED. Msg:" + e.getMessage()); + Logger.debug("eIDAS AuthnReq: " + base64SamlToken); //write revision log entries if (pendingReq != null) @@ -384,6 +386,7 @@ public class EIDASProtocol extends AbstractController implements IModulInfo { } catch (EIDASSAMLEngineException e) { Logger.info("eIDAS AuthnRequest preProcessing FAILED. Msg:" + e.getMessage()); + Logger.debug("eIDAS AuthnReq: " + base64SamlToken); //write revision log entries if (pendingReq != null) @@ -393,6 +396,7 @@ public class EIDASProtocol extends AbstractController implements IModulInfo { } catch(Exception e) { Logger.warn("eIDAS AuthnRequest preProcessing FAILED. Msg:" + e.getMessage(), e); + Logger.debug("eIDAS AuthnReq: " + base64SamlToken); //write revision log entries if (pendingReq != null) diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/CurrentLevelOfStudyAttrBuilder.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/CurrentLevelOfStudyAttrBuilder.java index 5210676c2..a0a7ff95e 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/CurrentLevelOfStudyAttrBuilder.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/CurrentLevelOfStudyAttrBuilder.java @@ -9,19 +9,44 @@ import at.gv.egiz.eaaf.core.exceptions.AttributeBuilderException; import at.gv.egiz.eid4u.api.attributes.Definitions; import at.gv.egovernment.moa.id.protocols.eidas.attributes.builder.IeIDASAttribute; import at.gv.egovernment.moa.id.protocols.eidas.attributes.builder.eIDASMetadata; +import at.gv.egovernment.moa.logging.Logger; @eIDASMetadata public class CurrentLevelOfStudyAttrBuilder implements IeIDASAttribute { + private static final String DELIMITER = ";"; + @Override public ATT build(ISPConfiguration oaParam, IAuthData authData, IAttributeGenerator g) throws AttributeBuilderException { String idType= authData.getGenericData(getName(), String.class); - if (StringUtils.isNotEmpty(idType)) + if (StringUtils.isNotEmpty(idType)) { + String[] split = idType.split(DELIMITER); + if (split.length > 1) { + //select the highest level + int currentValue = -1; + for (String el : split) { + int elInt; + try { + elInt = Integer.valueOf(el); + if (currentValue < elInt) + currentValue = elInt; + + } catch (NumberFormatException e) { + Logger.warn("Can NOT convert CurrentLevelOfStudy: " + el, e); + + } + + } + + idType = String.valueOf(currentValue); + + } + return g.buildStringAttribute(Definitions.CURRENTLEVELOFSTUDY_FRIENDLYNAME, getName(), idType); - else + } else throw new AttributeBuilderException("Attribute '" + getName() + "' is not available"); } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/FieldOfStudyAttrBuilder.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/FieldOfStudyAttrBuilder.java index ba486079e..28023a219 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/FieldOfStudyAttrBuilder.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/FieldOfStudyAttrBuilder.java @@ -13,15 +13,34 @@ import at.gv.egovernment.moa.id.protocols.eidas.attributes.builder.eIDASMetadata @eIDASMetadata public class FieldOfStudyAttrBuilder implements IeIDASAttribute { + private static final String DELIMITER = ";"; + private static final String UNDEFINED_CODE = "9999"; + @Override public ATT build(ISPConfiguration oaParam, IAuthData authData, IAttributeGenerator g) throws AttributeBuilderException { String idType= authData.getGenericData(getName(), String.class); - if (StringUtils.isNotEmpty(idType)) + if (StringUtils.isNotEmpty(idType)) { + String[] split = idType.split(DELIMITER); + if (split.length > 1) { + String currentSelected = UNDEFINED_CODE; + for (String el : split) { + if (!el.equals(currentSelected)) { + //select first that is not undefined code + currentSelected = el; + break; + } + + } + + idType = currentSelected; + } + + return g.buildStringAttribute(Definitions.FIELDOFSTUDY_FRIENDLYNAME, getName(), idType); - else + } else throw new AttributeBuilderException("Attribute '" + getName() + "' is not available"); } diff --git a/id/server/modules/moa-id-module-eIDAS/src/test/java/test/at/gv/egovernment/moa/id/modules/eidas/eid4u/AttributeScopeMapperTest.java b/id/server/modules/moa-id-module-eIDAS/src/test/java/test/at/gv/egovernment/moa/id/modules/eidas/eid4u/AttributeScopeMapperTest.java index 0daa90b40..1df15cf24 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/test/java/test/at/gv/egovernment/moa/id/modules/eidas/eid4u/AttributeScopeMapperTest.java +++ b/id/server/modules/moa-id-module-eIDAS/src/test/java/test/at/gv/egovernment/moa/id/modules/eidas/eid4u/AttributeScopeMapperTest.java @@ -37,8 +37,8 @@ public class AttributeScopeMapperTest { Assert.assertTrue("eID4u attribte-table is EMPTY after mapping", !result.isEmpty()); - Assert.assertTrue(result.containsKey(Definitions.COUNTRYOFBIRTH_NAME)); - Assert.assertEquals("", result.get(Definitions.COUNTRYOFBIRTH_NAME)); + Assert.assertFalse(result.containsKey(Definitions.COUNTRYOFBIRTH_NAME)); + //Assert.assertEquals("", result.get(Definitions.COUNTRYOFBIRTH_NAME)); Assert.assertTrue(result.containsKey(Definitions.CURRENTDEGREE_NAME)); Assert.assertEquals("Dr.techn.", result.get(Definitions.CURRENTDEGREE_NAME)); -- cgit v1.2.3 From b0a0f1baf5a17df00c61d151c03ba3e6f6a99685 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 5 Aug 2019 14:40:23 +0200 Subject: change version structure of project --- id/server/modules/moa-id-module-eIDAS/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 6dabb938e..199c6edb9 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -3,7 +3,7 @@ MOA.id.server.modules moa-id-modules - ${moa-id-version} + 4.0.1-snapshot moa-id-module-eIDAS MOA-ID eIDAS Module -- cgit v1.2.3 From 513195d7a67845c2f13c63372dacd936de460de3 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 6 Aug 2019 07:26:42 +0200 Subject: add egiz mirror of shibboleth repo into eIDAS-proxy module --- id/server/modules/moa-id-module-eIDAS/pom.xml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 199c6edb9..246179a44 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -30,13 +30,20 @@ - local + moaid_local local file:${basedir}/../../../../repository egiz-commons - https://demo.egiz.gv.at/int-repo/ + https://apps.egiz.gv.at/maven/ + + true + + + + egiz-commons + https://apps.egiz.gv.at/shibboleth_nexus/ true -- cgit v1.2.3 From dfd9841f52be288bb4b4609591fcff0cb6b361e8 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 6 Aug 2019 08:24:00 +0200 Subject: fix duplicated repo name --- id/server/modules/moa-id-module-eIDAS/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 246179a44..a2dff9a9f 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -42,7 +42,7 @@ - egiz-commons + egiz-shibboleth-mirror https://apps.egiz.gv.at/shibboleth_nexus/ true -- cgit v1.2.3 From 86d637b64f5e5e57575ce10de4881c6c9a7f946f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 6 Aug 2019 09:08:40 +0200 Subject: change order of repos --- id/server/modules/moa-id-module-eIDAS/pom.xml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index a2dff9a9f..578116cf2 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -29,6 +29,13 @@ true + + egiz-shibboleth-mirror + https://apps.egiz.gv.at/shibboleth_nexus/ + + true + + moaid_local local @@ -41,13 +48,7 @@ true - - egiz-shibboleth-mirror - https://apps.egiz.gv.at/shibboleth_nexus/ - - true - - + -- cgit v1.2.3 From cdcf96f74ecb1834cb045aac983b023d957d8b74 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 6 Aug 2019 09:44:39 +0200 Subject: one more --- id/server/modules/moa-id-module-eIDAS/pom.xml | 48 +++++++++++---------------- 1 file changed, 19 insertions(+), 29 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 578116cf2..07679a5a7 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -22,36 +22,26 @@ - - - default - - true - - - - egiz-shibboleth-mirror - https://apps.egiz.gv.at/shibboleth_nexus/ - - true - - - - moaid_local - local - file:${basedir}/../../../../repository - - - egiz-commons - https://apps.egiz.gv.at/maven/ - - true - - - - - + + + egiz-shibboleth-mirror + egiz-shibboleth-mirror + https://apps.egiz.gv.at/shibboleth_nexus/ + + + moaid_local + local + file:${basedir}/../../../../repository + + + egiz-commons + https://apps.egiz.gv.at/maven/ + + true + + + -- cgit v1.2.3 From 08c8055371a1b72e66126ad118622e4288da2494 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 6 Aug 2019 10:16:56 +0200 Subject: add opensaml as dependency --- id/server/modules/moa-id-module-eIDAS/pom.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 07679a5a7..ed7cbdb41 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -27,7 +27,7 @@ egiz-shibboleth-mirror egiz-shibboleth-mirror - https://apps.egiz.gv.at/shibboleth_nexus/ + https://apps.egiz.gv.at/shibboleth_nexus/ moaid_local @@ -102,6 +102,19 @@ test + + org.opensaml + opensaml + + + org.opensaml + xmltooling + + + org.opensaml + openws + + eu.eidas -- cgit v1.2.3 From 435b147177223e6cf8513b35c0a33acbe4b63c93 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 6 Aug 2019 10:27:27 +0200 Subject: exclude log4j-over-slf4j to prohibit cycling dependencies --- id/server/modules/moa-id-module-eIDAS/pom.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index ed7cbdb41..2087ae8f6 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -105,14 +105,32 @@ org.opensaml opensaml + + + org.slf4j + log4j-over-slf4j + + org.opensaml xmltooling + + + org.slf4j + log4j-over-slf4j + + org.opensaml openws + + + org.slf4j + log4j-over-slf4j + + -- cgit v1.2.3 From b968a1e700e963f49e5820e1f11cacc19ef17a8f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 8 Aug 2019 07:42:55 +0200 Subject: set one flag in pom --- id/server/modules/moa-id-module-eIDAS/pom.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 2087ae8f6..6f09fa4fb 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -27,7 +27,10 @@ egiz-shibboleth-mirror egiz-shibboleth-mirror - https://apps.egiz.gv.at/shibboleth_nexus/ + https://apps.egiz.gv.at/shibboleth_nexus/ + + true + moaid_local -- cgit v1.2.3 From 84b0604fa11e7f73e3e78b981d628f768a880f35 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 4 Nov 2019 09:18:18 +0100 Subject: add some eID4U modifications --- .../eidas/tasks/CollectAddtionalAttributesTask.java | 6 ++++++ .../builder/eid4u/CurrentDegreeAttrBuilder.java | 18 ++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java index d2ddc7ef8..ab4179981 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java @@ -84,6 +84,12 @@ public class CollectAddtionalAttributesTask extends AbstractAuthServletTask { } + if (MiscUtil.isEmpty(scopes)) { + scopes = "ANY@tugraz.idm.attr.EmailStud"; + Logger.info("Add dummy-scope: '" + scopes + "' because its emtpy!!"); + + } + Logger.debug("Load eID4U AP-Config:" + " EntityID: " + uniqueID + " RedirectURL:" + redirectURI diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/CurrentDegreeAttrBuilder.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/CurrentDegreeAttrBuilder.java index 7b4c16a5a..cc4026253 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/CurrentDegreeAttrBuilder.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/attributes/builder/eid4u/CurrentDegreeAttrBuilder.java @@ -9,17 +9,31 @@ import at.gv.egiz.eaaf.core.exceptions.AttributeBuilderException; import at.gv.egiz.eid4u.api.attributes.Definitions; import at.gv.egovernment.moa.id.protocols.eidas.attributes.builder.IeIDASAttribute; import at.gv.egovernment.moa.id.protocols.eidas.attributes.builder.eIDASMetadata; +import at.gv.egovernment.moa.logging.Logger; @eIDASMetadata public class CurrentDegreeAttrBuilder implements IeIDASAttribute { + private static final String DELIMITER = ";"; + @Override public ATT build(ISPConfiguration oaParam, IAuthData authData, IAttributeGenerator g) throws AttributeBuilderException { String idType= authData.getGenericData(getName(), String.class); - if (StringUtils.isNotEmpty(idType)) - return g.buildStringAttribute(Definitions.CURRENTDEGREE_FRIENDLYNAME, getName(), idType); + if (StringUtils.isNotEmpty(idType)) { + String[] split = idType.split(DELIMITER); + if (split.length > 1) { + Logger.debug("Find more than one attribute values: " + idType + " Using first one ... "); + return g.buildStringAttribute(Definitions.CURRENTDEGREE_FRIENDLYNAME, getName(), split[0]); + + } else { + return g.buildStringAttribute(Definitions.CURRENTDEGREE_FRIENDLYNAME, getName(), idType); + + } + + + } else throw new AttributeBuilderException("Attribute '" + getName() + "' is not available"); -- cgit v1.2.3 From e4fa532f93f10115e1f39c97cc96e5950a048884 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 11 Dec 2019 16:01:38 +0100 Subject: update to EAAF-Components 1.0.13.1 Enforce E-ID authentication based on Service-Provider configuration --- ...strianAuthWitheID4UAuthenticationModulImpl.java | 29 ++++------------------ .../eidas/eIDASAuthenticationModulImpl.java | 3 ++- .../engine/MOAeIDASChainingMetadataProvider.java | 6 ++--- .../tasks/CollectAddtionalAttributesTask.java | 6 +++-- 4 files changed, 14 insertions(+), 30 deletions(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/AustrianAuthWitheID4UAuthenticationModulImpl.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/AustrianAuthWitheID4UAuthenticationModulImpl.java index 6efa55ac8..daaf6a0f5 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/AustrianAuthWitheID4UAuthenticationModulImpl.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/AustrianAuthWitheID4UAuthenticationModulImpl.java @@ -23,17 +23,13 @@ package at.gv.egovernment.moa.id.auth.modules.eidas; -import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.IRequestStorage; -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.PendingReqIdValidationException; import at.gv.egovernment.moa.id.auth.modules.internal.DefaultCitizenCardAuthModuleImpl; import at.gv.egovernment.moa.id.protocols.eidas.EIDASData; -import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; /** @@ -64,29 +60,14 @@ public class AustrianAuthWitheID4UAuthenticationModulImpl extends DefaultCitizen * @see at.gv.egovernment.moa.id.auth.modules.AuthModule#selectProcess(at.gv.egovernment.moa.id.process.api.ExecutionContext) */ @Override - public String selectProcess(ExecutionContext context) { - String selectedProcessID = super.selectProcess(context); + public String selectProcess(ExecutionContext context, IRequest pendingReq) { + String selectedProcessID = super.selectProcess(context, pendingReq); if (MiscUtil.isNotEmpty(selectedProcessID)) { - String pendingReqId = (String)context.get(EAAFConstants.PROCESS_ENGINE_PENDINGREQUESTID); - - if (StringUtils.isEmpty(pendingReqId)) - Logger.warn("Process execution context contains NO 'pendingReqId'. Looks very suspect!"); - - else { - IRequest pendingReq; - try { - pendingReq = requestStore.getPendingRequest(pendingReqId); - if (pendingReq != null && pendingReq instanceof EIDASData) { - return "eID4UAttributCollectionAuthentication"; + if (pendingReq != null && pendingReq instanceof EIDASData) { + return "eID4UAttributCollectionAuthentication"; - } - - } catch (PendingReqIdValidationException e) { - Logger.warn("Validation of PendingRequestId FAILED. Reason: " + e.getMessage()); - - } - } + } return selectedProcessID; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASAuthenticationModulImpl.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASAuthenticationModulImpl.java index ec042949a..cf9a5cc60 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASAuthenticationModulImpl.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASAuthenticationModulImpl.java @@ -24,6 +24,7 @@ package at.gv.egovernment.moa.id.auth.modules.eidas; import org.apache.commons.lang3.StringUtils; +import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.idp.auth.modules.AuthModule; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; @@ -52,7 +53,7 @@ public class eIDASAuthenticationModulImpl implements AuthModule { * @see at.gv.egovernment.moa.id.auth.modules.AuthModule#selectProcess(at.gv.egovernment.moa.id.process.api.ExecutionContext) */ @Override - public String selectProcess(ExecutionContext context) { + public String selectProcess(ExecutionContext context, IRequest pendingReq) { if (StringUtils.isNotBlank((String) context.get("ccc")) || StringUtils.isNotBlank((String) context.get("CCC"))) return "eIDASAuthentication"; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java index a1d6bb225..e879fd95b 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java @@ -32,7 +32,7 @@ import org.springframework.stereotype.Service; import at.gv.egiz.components.spring.api.IDestroyableObject; import at.gv.egiz.eaaf.core.api.IGarbageCollectorProcessing; import at.gv.egiz.eaaf.core.api.IPostStartupInitializable; -import at.gv.egiz.eaaf.core.api.idp.IConfiguration; +import at.gv.egiz.eaaf.core.api.idp.IConfigurationWithSP; import at.gv.egiz.eaaf.core.impl.utils.FileUtils; import at.gv.egiz.eaaf.modules.pvp2.api.metadata.IRefreshableMetadataProvider; import at.gv.egiz.eaaf.modules.pvp2.impl.metadata.MetadataFilterChain; @@ -52,7 +52,7 @@ import eu.eidas.auth.engine.AbstractProtocolEngine; public class MOAeIDASChainingMetadataProvider extends SimpleMetadataProvider implements ObservableMetadataProvider, IGarbageCollectorProcessing, IDestroyableObject, IRefreshableMetadataProvider, IPostStartupInitializable{ - @Autowired(required=true) IConfiguration basicConfig; + @Autowired(required=true) IConfigurationWithSP basicConfig; private Timer timer = null; @@ -82,7 +82,7 @@ public class MOAeIDASChainingMetadataProvider extends SimpleMetadataProvider imp protected void initializeEidasMetadataFromFileSystem() throws ConfigurationException { try { - Map metadataToLoad = authConfig.getBasicConfigurationWithPrefix(Constants.CONIG_PROPS_EIDAS_METADATA_URLS_LIST_PREFIX); + Map metadataToLoad = basicConfig.getBasicConfigurationWithPrefix(Constants.CONIG_PROPS_EIDAS_METADATA_URLS_LIST_PREFIX); if (!metadataToLoad.isEmpty()) { Logger.info("Load static configurated eIDAS metadata ... "); for (String metaatalocation : metadataToLoad.values()) { diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java index ab4179981..3b976b99e 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CollectAddtionalAttributesTask.java @@ -12,6 +12,7 @@ import org.springframework.stereotype.Component; import com.google.common.collect.UnmodifiableIterator; import at.gv.egiz.eaaf.core.api.idp.IAuthData; +import at.gv.egiz.eaaf.core.api.idp.IConfigurationWithSP; import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; import at.gv.egiz.eaaf.core.api.storage.ITransactionStorage; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; @@ -43,6 +44,7 @@ public class CollectAddtionalAttributesTask extends AbstractAuthServletTask { @Autowired private OAuth20AuthAction openIDAuthAction; @Autowired private ITransactionStorage transactionStorage; @Autowired private AuthenticationDataBuilder authDataBuilder; + @Autowired(required=true) protected IConfigurationWithSP authConfigWithSp; @Override public void execute(ExecutionContext context, HttpServletRequest httpReq, HttpServletResponse httpResp) @@ -102,10 +104,10 @@ public class CollectAddtionalAttributesTask extends AbstractAuthServletTask { //generate fake OpenID_Connect request OAuth20AuthRequest fakeOpenIDReq = new OAuth20AuthRequest(); - fakeOpenIDReq.initialize(httpReq, authConfig); + fakeOpenIDReq.initialize(httpReq, authConfigWithSp); fakeOpenIDReq.setSPEntityId(uniqueID); fakeOpenIDReq.setModule(OAuth20Protocol.NAME); - fakeOpenIDReq.setOnlineApplicationConfiguration(authConfig.getServiceProviderConfiguration(uniqueID)); + fakeOpenIDReq.setOnlineApplicationConfiguration(authConfigWithSp.getServiceProviderConfiguration(uniqueID)); fakeOpenIDReq.setScope("openId profile"); //populate with SessionData -- cgit v1.2.3 From 31e23d3cedeecf980e39b9637237cb8f3d01ad9f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 11 Dec 2019 16:08:19 +0100 Subject: change version to 4.1.0 --- id/server/modules/moa-id-module-eIDAS/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 6f09fa4fb..4562f3239 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -3,7 +3,7 @@ MOA.id.server.modules moa-id-modules - 4.0.1-snapshot + 4.1.0 moa-id-module-eIDAS MOA-ID eIDAS Module -- cgit v1.2.3 From 222e9ba48d45fc1e644e40d25998ebf7ba34046f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 19 Feb 2020 14:59:30 +0100 Subject: switch to version 4.1.1 --- id/server/modules/moa-id-module-eIDAS/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 4562f3239..cc01f2809 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -3,7 +3,7 @@ MOA.id.server.modules moa-id-modules - 4.1.0 + 4.1.1 moa-id-module-eIDAS MOA-ID eIDAS Module -- cgit v1.2.3 From e82fd34793ae92e755f6b203fbcad53ee3d9581e Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 6 Apr 2020 10:03:25 +0200 Subject: switch to next snapshot version --- id/server/modules/moa-id-module-eIDAS/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server/modules/moa-id-module-eIDAS') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index cc01f2809..2ff410400 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -3,7 +3,7 @@ MOA.id.server.modules moa-id-modules - 4.1.1 + 4.1.2-SNAPSHOT moa-id-module-eIDAS MOA-ID eIDAS Module -- cgit v1.2.3