aboutsummaryrefslogtreecommitdiff
path: root/ms_specific_connector
diff options
context:
space:
mode:
authorThomas <>2023-09-27 14:07:56 +0200
committerThomas <>2024-01-26 18:49:57 +0100
commitb3a0302041d08ba8360d96216b6da67580850717 (patch)
tree9dc2fc819ce886ce1365c94ac3ae9f2a9adbab35 /ms_specific_connector
parent1a77d8ff850d014cd81fcc1fd867a2953b497833 (diff)
downloadNational_eIDAS_Gateway-b3a0302041d08ba8360d96216b6da67580850717.tar.gz
National_eIDAS_Gateway-b3a0302041d08ba8360d96216b6da67580850717.tar.bz2
National_eIDAS_Gateway-b3a0302041d08ba8360d96216b6da67580850717.zip
feat(eidas): refactoring to eIDAS node v2.7
Diffstat (limited to 'ms_specific_connector')
-rw-r--r--ms_specific_connector/src/main/resources/application.properties13
-rw-r--r--ms_specific_connector/src/main/resources/environmentContext.xml50
-rw-r--r--ms_specific_connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java10
3 files changed, 68 insertions, 5 deletions
diff --git a/ms_specific_connector/src/main/resources/application.properties b/ms_specific_connector/src/main/resources/application.properties
index ed0e6ec9..5a31c119 100644
--- a/ms_specific_connector/src/main/resources/application.properties
+++ b/ms_specific_connector/src/main/resources/application.properties
@@ -111,6 +111,19 @@ eidas.ms.auth.eIDAS.node_v2.loa.requested.minimum=http://eidas.europa.eu/LoA/hig
#eidas.ms.auth.eIDAS.node_v2.loa.ua.requested=http://eidas.europa.eu/NotNotified/LoA/high
+ # TODO change namespaces if required
+lightToken.connector.request.issuer.name=specificCommunicationDefinitionConnectorRequest
+lightToken.connector.request.node.id=specificConnector
+lightToken.connector.request.secret=mySecretConnectorRequest
+lightToken.connector.request.algorithm=SHA-256
+lightToken.connector.response.issuer.name=specificCommunicationDefinitionConnectorResponse
+lightToken.connector.response.node.id=specificConnector
+lightToken.connector.response.secret=mySecretConnectorResponse
+lightToken.connector.response.algorithm=SHA-256
+incoming.lightRequest.max.number.characters=65535
+
+
+
#eidas.ms.auth.eIDAS.szrclient.useTestService=true
#eidas.ms.auth.eIDAS.szrclient.endpoint.prod=
#eidas.ms.auth.eIDAS.szrclient.endpoint.test=http://localhost:1234/demoszr
diff --git a/ms_specific_connector/src/main/resources/environmentContext.xml b/ms_specific_connector/src/main/resources/environmentContext.xml
new file mode 100644
index 00000000..9e90076d
--- /dev/null
+++ b/ms_specific_connector/src/main/resources/environmentContext.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2023 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.
+ -->
+<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-4.1.xsd">
+
+ <!--
+
+ Configuration repository path either from ENVIRONMENT variable or COMMAND LINE -D option of
+ EIDAS_CONNECTOR_CONFIG_REPOSITORY and
+ For any other option - like hard-coded values - modify this file.
+ Hard coding example:
+
+ <bean id="specificCommunicationConfigRepository" class="java.lang.String">
+ <constructor-arg value="c:/PGM/projects/configEidas/glassfish/" />
+ </bean>
+
+ -->
+
+ <!--mandatory ENV-->
+ <!--exported to: eidas-specific-connector module-->
+ <bean id="specificConnectorConfigRepository" class="java.lang.String">
+ <constructor-arg
+ value="#{ systemProperties['SPECIFIC_CONNECTOR_CONFIG_REPOSITORY'] ?: (systemEnvironment['SPECIFIC_CONNECTOR_CONFIG_REPOSITORY'].endsWith(systemProperties['file.separator']) ? systemEnvironment['SPECIFIC_CONNECTOR_CONFIG_REPOSITORY'] : (systemEnvironment['SPECIFIC_CONNECTOR_CONFIG_REPOSITORY'] + systemProperties['file.separator'])) }"/>
+ </bean>
+
+ <!--exported to: eidas-specific-communication-definition module-->
+ <bean id="specificCommunicationConfigRepository" class="java.lang.String">
+ <constructor-arg
+ value="#{ specificConnectorConfigRepository }"/>
+ </bean>
+
+
+</beans> \ No newline at end of file
diff --git a/ms_specific_connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java b/ms_specific_connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
index 5e7d92b2..02e4ee79 100644
--- a/ms_specific_connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
+++ b/ms_specific_connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
@@ -98,7 +98,6 @@ import eu.eidas.auth.commons.attribute.ImmutableAttributeMap;
import eu.eidas.auth.commons.light.ILightRequest;
import eu.eidas.auth.commons.protocol.impl.AuthenticationResponse;
import eu.eidas.auth.commons.tx.BinaryLightToken;
-import eu.eidas.specificcommunication.SpecificCommunicationDefinitionBeanNames;
import eu.eidas.specificcommunication.exception.SpecificCommunicationException;
import eu.eidas.specificcommunication.protocol.SpecificCommunicationService;
import lombok.SneakyThrows;
@@ -180,8 +179,9 @@ public class FullStartUpAndProcessTest {
+ "../basicConfig/eIDAS/");
System.setProperty("SPECIFIC_CONNECTOR_CONFIG_REPOSITORY", current.substring("file:".length())
+ "../basicConfig/eIDAS/");
- System.setProperty("SPECIFIC_PROXY_SERVICE_CONFIG_REPOSITORY", current.substring("file:".length())
- + "../basicConfig/eIDAS/");
+
+ //System.setProperty("SPECIFIC_PROXY_SERVICE_CONFIG_REPOSITORY", current.substring("file:".length())
+ // + "../basicConfig/eIDAS/");
EaafOpenSaml3xInitializer.eaafInitialize();
@@ -648,7 +648,7 @@ public class FullStartUpAndProcessTest {
throws SpecificCommunicationException, URISyntaxException {
final SpecificCommunicationService springManagedSpecificConnectorCommunicationService =
(SpecificCommunicationService) wac.getBean(
- SpecificCommunicationDefinitionBeanNames.SPECIFIC_CONNECTOR_COMMUNICATION_SERVICE.toString());
+ EidasConstants.SPECIFIC_CONNECTOR_COMMUNICATION_SERVICE);
//read request and validate basic properties
ILightRequest req = springManagedSpecificConnectorCommunicationService.getAndRemoveRequest(eidasNodeReqToken,
@@ -687,7 +687,7 @@ public class FullStartUpAndProcessTest {
.subject(RandomStringUtils.randomAlphabetic(10))
.statusCode(statusCode)
.inResponseTo(reqId)
- .subjectNameIdFormat("afaf")
+ .subjectNameIdFormat("urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified")
.levelOfAssurance(loa)
.attributes(attributeMap)
.build();