diff options
author | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2021-02-15 10:38:44 +0100 |
---|---|---|
committer | Alexander Marsalek <amarsalek@iaik.tugraz.at> | 2021-02-15 10:38:44 +0100 |
commit | faca8b55b133adb7e01d891df1b45d24b7690111 (patch) | |
tree | 5f111c3f54f6f48a7357da263cd9c9272e2a7321 /eidas_modules/authmodule-eIDAS-v2/src/main/java | |
parent | eeecdd8e6063298bb6414b9f6a8b0bc4cee2eba4 (diff) | |
download | National_eIDAS_Gateway-faca8b55b133adb7e01d891df1b45d24b7690111.tar.gz National_eIDAS_Gateway-faca8b55b133adb7e01d891df1b45d24b7690111.tar.bz2 National_eIDAS_Gateway-faca8b55b133adb7e01d891df1b45d24b7690111.zip |
Constants for GUI endpoints, load values from config, ID Austria signal controller
Diffstat (limited to 'eidas_modules/authmodule-eIDAS-v2/src/main/java')
5 files changed, 22 insertions, 8 deletions
diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthConstants.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthConstants.java index b32b6a2b..8cbfb5f8 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthConstants.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthConstants.java @@ -34,6 +34,7 @@ public class IdAustriaClientAuthConstants { public static final String CONFIG_PROPS_KEYSTORE_NAME = CONFIG_PROPS_PREFIX + "keystore.name"; public static final String CONFIG_PROPS_KEYSTORE_PATH = CONFIG_PROPS_PREFIX + "keystore.path"; public static final String CONFIG_PROPS_KEYSTORE_PASSWORD = CONFIG_PROPS_PREFIX + "keystore.password"; + public static final String CONFIG_PROPS_AUTH_URL = CONFIG_PROPS_PREFIX + "authurl"; public static final String CONFIG_PROPS_SIGN_METADATA_KEY_PASSWORD = CONFIG_PROPS_PREFIX + "metadata.sign.password"; public static final String CONFIG_PROPS_SIGN_METADATA_ALIAS = CONFIG_PROPS_PREFIX diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthMetadataController.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthMetadataController.java index b105eb82..00b742dd 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthMetadataController.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthMetadataController.java @@ -1,6 +1,7 @@ package at.asitplus.eidas.specific.modules.auth.eidas.v2.idaustriaclient; +import at.gv.egiz.eaaf.core.api.idp.IConfiguration; import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.impl.idp.controller.AbstractController; import at.gv.egiz.eaaf.modules.pvp2.api.IPvp2BasicConfiguration; @@ -34,6 +35,8 @@ public class IdAustriaClientAuthMetadataController extends AbstractController { IdAustriaClientAuthCredentialProvider credentialProvider; @Autowired IPvp2BasicConfiguration pvpConfiguration; + @Autowired + private IConfiguration basicConfig; /** * Default construction with logging. @@ -61,7 +64,8 @@ public class IdAustriaClientAuthMetadataController extends AbstractController { EaafException { // check PublicURL prefix try { - final String authUrl = "https://eid.egiz.gv.at/idp/shibboleth";//TODO load from config + final String authUrl = basicConfig.getBasicConfiguration( + IdAustriaClientAuthConstants.CONFIG_PROPS_AUTH_URL); // initialize metadata builder configuration final IdAustriaClientAuthMetadataConfiguration metadataConfig = diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthSignalController.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthSignalController.java index 5906c7b9..1aceb88e 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthSignalController.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/idaustriaclient/IdAustriaClientAuthSignalController.java @@ -28,6 +28,7 @@ import lombok.extern.slf4j.Slf4j; public class IdAustriaClientAuthSignalController extends AbstractProcessEngineSignalController { public static final String HTTP_PARAM_RELAYSTATE = "RelayState"; + public static final String HTTP_PARAM_PENDINGREQUESTID = "pendingid"; /** * Default constructor with logging. diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiQueryAustrianResidenceTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiQueryAustrianResidenceTask.java index a80b8550..02f8c5b7 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiQueryAustrianResidenceTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateGuiQueryAustrianResidenceTask.java @@ -61,12 +61,12 @@ public class GenerateGuiQueryAustrianResidenceTask extends AbstractAuthServletTa basicConfig, pendingReq, basicConfig.getBasicConfiguration(//TODO - MsEidasNodeConstants.PROP_CONFIG_WEBCONTENT_TEMPLATES_OTHER_LOGIN_METHOD_SELECTION, - MsEidasNodeConstants.TEMPLATE_HTML_OTHERLOGINMETHODS), - MsEidasNodeConstants.ENDPOINT_OTHERLOGINMETHODSELECTION, + MsEidasNodeConstants.PROP_CONFIG_WEBCONTENT_TEMPLATES_RESIDENCY, + MsEidasNodeConstants.TEMPLATE_HTML_RESIDENCY), + MsEidasNodeConstants.ENDPOINT_RESIDENCY_INPUT, resourceLoader); - guiBuilder.build(request, response, config, "Other login methods selection form"); + guiBuilder.build(request, response, config, "Query Austrian residency"); } catch (final Exception e) { log.error("Initial search FAILED.", e); diff --git a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateMobilePhoneSignatureRequestTask.java b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateMobilePhoneSignatureRequestTask.java index 76f78a78..b4fe8bd7 100644 --- a/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateMobilePhoneSignatureRequestTask.java +++ b/eidas_modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/tasks/GenerateMobilePhoneSignatureRequestTask.java @@ -30,7 +30,9 @@ import at.asitplus.eidas.specific.modules.auth.eidas.v2.idaustriaclient.IdAustri import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.data.ExtendedPvpAttributeDefinitions; import at.gv.egiz.eaaf.core.api.data.PvpAttributeDefinitions; +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.api.storage.ITransactionStorage; import at.gv.egiz.eaaf.core.exceptions.EaafConfigurationException; import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask; @@ -74,6 +76,10 @@ public class GenerateMobilePhoneSignatureRequestTask extends AbstractAuthServlet IdAustriaClientAuthCredentialProvider credential; @Autowired IdAustriaClientAuthMetadataProvider metadataService; + @Autowired + private IConfiguration basicConfig; + @Autowired + protected ITransactionStorage transactionStorage; @Override public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) @@ -82,9 +88,11 @@ public class GenerateMobilePhoneSignatureRequestTask extends AbstractAuthServlet log.trace("Starting GenerateMobilePhoneSignatureRequestTask"); //step 15a - // get entityID for ms-specific eIDAS node + // get entityID for ms-specific ID Austria node //TODO load from config - final String msNodeEntityID = "classpath:/data/idp_metadata_classpath_entity.xml"; + final String msNodeEntityID = basicConfig.getBasicConfiguration( + IdAustriaClientAuthConstants.CONFIG_PROPS_NODE_ENTITYID); + // final String msNodeEntityID = "classpath:/data/idp_metadata_classpath_entity.xml"; if (StringUtils.isEmpty(msNodeEntityID)) { log.info("eIDAS authentication not possible -> NO EntityID for central eIDAS node FOUND!"); @@ -123,7 +131,7 @@ public class GenerateMobilePhoneSignatureRequestTask extends AbstractAuthServlet * but encrypted PendingRequestId is much longer. */ String relayState = Random.nextProcessReferenceValue(); - // transactionStorage.put(relayState, pendingReq.getPendingRequestId(), -1); + transactionStorage.put(relayState, pendingReq.getPendingRequestId(), -1); // build and transmit AuthnRequest authnReqBuilder.buildAuthnRequest(pendingReq, authnReqConfig, relayState, response); |