aboutsummaryrefslogtreecommitdiff
path: root/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-08-02 12:02:35 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-08-02 12:02:35 +0200
commitfda1a8333b9bd11d0457125c3156a39f03d74bd6 (patch)
treebf4f40ac11e5adb8ab654370e7b621e688eb40c4 /eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks
parentae8fac8033b435de8d77cadb2a84088c2b8fceb6 (diff)
downloadNational_eIDAS_Gateway-fda1a8333b9bd11d0457125c3156a39f03d74bd6.tar.gz
National_eIDAS_Gateway-fda1a8333b9bd11d0457125c3156a39f03d74bd6.tar.bz2
National_eIDAS_Gateway-fda1a8333b9bd11d0457125c3156a39f03d74bd6.zip
Refactoring to eIDASNode 2.2, eaaf-components 1.0.8
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks')
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java14
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/GenerateAuthnRequestTask.java12
-rw-r--r--eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java4
3 files changed, 16 insertions, 14 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java
index 481f9e1d..cc1d6ae4 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/CreateIdentityLinkTask.java
@@ -114,7 +114,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
writeMDSLogInformation(eIDData);
//connect SZR-Gateway
- if(basicConfig.getBasicMOAIDConfigurationBoolean(
+ if(basicConfig.getBasicConfigurationBoolean(
Constants.CONIG_PROPS_EIDAS_SZRCLIENT_DEBUG_USEDUMMY, false)) {
log.warn("SZR-Dummy IS ACTIVE! IdentityLink is NOT VALID!!!!");
// create fake IdL
@@ -185,7 +185,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
//set PlaceOfBirth if available
if (eIDData.getPlaceOfBirth() != null) {
log.trace("Find 'PlaceOfBirth' attribute: " + eIDData.getPlaceOfBirth());
- if (basicConfig.getBasicMOAIDConfigurationBoolean(
+ if (basicConfig.getBasicConfigurationBoolean(
Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_SETPLACEOFBIRTHIFAVAILABLE,
true)) {
naturalPerson.setPlaceOfBirth(eIDData.getPlaceOfBirth());
@@ -197,7 +197,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
//set BirthName if available
if (eIDData.getBirthName() != null) {
log.trace("Find 'BirthName' attribute: " + eIDData.getBirthName());
- if (basicConfig.getBasicMOAIDConfigurationBoolean(
+ if (basicConfig.getBasicConfigurationBoolean(
Constants.CONIG_PROPS_EIDAS_SZRCLIENT_PARAMS_SETBIRTHNAMEIFAVAILABLE,
true)) {
AlternativeNameType alternativeName = new AlternativeNameType();
@@ -215,7 +215,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
identityLink = new SimpleIdentityLinkAssertionParser(idlFromSZR).parseIdentityLink();
//write ERnB inputdata into revisionlog
- if (basicConfig.getBasicMOAIDConfigurationBoolean(
+ if (basicConfig.getBasicConfigurationBoolean(
Constants.CONIG_PROPS_EIDAS_SZRCLIENT_WORKAROUND_REVISIONLOGDATASTORE_ACTIVE, false)) {
revisionsLogger.logEvent(pendingReq,
MSConnectorEventCodes.SZR_ERNB_EIDAS_RAW_ID,
@@ -226,7 +226,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
}
//get bPK from SZR
- if (basicConfig.getBasicMOAIDConfigurationBoolean(
+ if (basicConfig.getBasicConfigurationBoolean(
Constants.CONIG_PROPS_EIDAS_SZRCLIENT_DEBUG_USESRZFORBPKGENERATION, true)) {
bPK = szrClient.getBPK(
personInfo,
@@ -370,7 +370,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
private void writeMDSLogInformation(ERnBeIDData eIDData) {
//log MDS and country code into technical log
- if (basicConfig.getBasicMOAIDConfigurationBoolean(
+ if (basicConfig.getBasicConfigurationBoolean(
MSeIDASNodeConstants.PROP_CONFIG_TECHNICALLOG_WRITE_MDS_INTO_TECH_LOG, false))
log.info("eIDAS Auth. for user: "
+ eIDData.getGivenName() + " "
@@ -379,7 +379,7 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask {
+ "from " + eIDData.getCitizenCountryCode());
//log MDS and country code into revision log
- if (basicConfig.getBasicMOAIDConfigurationBoolean(
+ if (basicConfig.getBasicConfigurationBoolean(
MSeIDASNodeConstants.PROP_CONFIG_REVISIONLOG_WRITE_MDS_INTO_REVISION_LOG, false))
revisionsLogger.logEvent(pendingReq, MSConnectorEventCodes.RESPONSE_FROM_EIDAS_MDSDATA,
"{" + eIDData.getGivenName() + ","
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 0020a222..ea5ec25f 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
@@ -156,7 +156,7 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask {
//TODO: only for eIDAS ref. node 2.0 and 2.1 because it need 'Providername' for any SPType
String providerName = pendingReq.getRawData(Constants.DATA_PROVIDERNAME, String.class);
if (StringUtils.isNotEmpty(providerName)
- && basicConfig.getBasicMOAIDConfigurationBoolean(
+ && basicConfig.getBasicConfigurationBoolean(
Constants.CONIG_PROPS_EIDAS_NODE_WORKAROUND_ADD_ALWAYS_PROVIDERNAME,
false)
)
@@ -195,7 +195,7 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask {
final String tokenBase64 = BinaryLightTokenHelper.encodeBinaryLightTokenBase64(token);
//Workaround, because eIDAS node ref. impl. does not return relayState
- if (basicConfig.getBasicMOAIDConfigurationBoolean(
+ if (basicConfig.getBasicConfigurationBoolean(
Constants.CONIG_PROPS_EIDAS_NODE_WORKAROUND_USEREQUESTIDASTRANSACTIONIDENTIFIER,
false)) {
log.trace("Put lightRequestId into transactionstore as session-handling backup");
@@ -236,13 +236,13 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask {
Constants.TEMPLATE_POST_FORWARD_NAME,
null);
- config.putCustomParameter(Constants.TEMPLATE_POST_FORWARD_ENDPOINT, forwardURL);
- config.putCustomParameter(Constants.TEMPLATE_POST_FORWARD_TOKEN_NAME,
+ config.putCustomParameter(null, Constants.TEMPLATE_POST_FORWARD_ENDPOINT, forwardURL);
+ config.putCustomParameter(null, Constants.TEMPLATE_POST_FORWARD_TOKEN_NAME,
EidasParameterKeys.TOKEN.toString());
- config.putCustomParameter(Constants.TEMPLATE_POST_FORWARD_TOKEN_VALUE,
+ config.putCustomParameter(null, Constants.TEMPLATE_POST_FORWARD_TOKEN_VALUE,
tokenBase64);
- guiBuilder.build(response, config, "BKU-Selection form");
+ guiBuilder.build(request, response, config, "BKU-Selection form");
}
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java
index 93e25102..2698d4ea 100644
--- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java
+++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/authmodule_eIDASv2/tasks/ReceiveAuthnResponseTask.java
@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import at.asitplus.eidas.specific.connector.MSConnectorEventCodes;
+import at.asitplus.eidas.specific.connector.MSeIDASNodeConstants;
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;
@@ -83,7 +84,8 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask {
// ******* MS-specificresponse validation **********
// **********************************************************
String spCountry = basicConfig.getBasicConfiguration(Constants.CONIG_PROPS_EIDAS_NODE_COUNTRYCODE, "AT");
- eIDASResponseValidator.validateResponse(pendingReq, eIDASResponse, spCountry, attrRegistry);
+ String citizenCountryCode = (String) executionContext.get(MSeIDASNodeConstants.REQ_PARAM_SELECTED_COUNTRY);
+ eIDASResponseValidator.validateResponse(pendingReq, eIDASResponse, spCountry, citizenCountryCode, attrRegistry);
// **********************************************************