aboutsummaryrefslogtreecommitdiff
path: root/connector
diff options
context:
space:
mode:
Diffstat (limited to 'connector')
-rw-r--r--connector/pom.xml16
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java7
-rw-r--r--connector/src/main/resources/specific_eIDAS_connector.beans.xml3
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java11
-rw-r--r--connector/src/test/java/at/asitplus/eidas/specific/connector/test/saml2/Pvp2SProfileEndPointTest.java10
-rw-r--r--connector/src/test/resources/spring/SpringTest_connector.beans.xml2
6 files changed, 35 insertions, 14 deletions
diff --git a/connector/pom.xml b/connector/pom.xml
index f386c08f..dff75c08 100644
--- a/connector/pom.xml
+++ b/connector/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>at.asitplus.eidas</groupId>
<artifactId>ms_specific</artifactId>
- <version>1.2.3</version>
+ <version>1.2.4-SNAPSHOT</version>
</parent>
<groupId>at.asitplus.eidas.ms_specific</groupId>
@@ -33,6 +33,16 @@
<dependency>
<groupId>at.gv.egiz.eaaf</groupId>
<artifactId>eaaf_module_pvp2_idp</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcpkix-jdk15on</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>at.asitplus.eidas.ms_specific</groupId>
@@ -88,6 +98,10 @@
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-to-slf4j</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java
index 881eeb8a..e4c68004 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/verification/AuthnRequestValidator.java
@@ -53,6 +53,7 @@ import at.gv.egiz.eaaf.core.exceptions.AuthnRequestValidatorException;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
import at.gv.egiz.eaaf.core.exceptions.EaafStorageException;
import at.gv.egiz.eaaf.core.impl.idp.controller.protocols.RequestImpl;
+import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils;
import at.gv.egiz.eaaf.modules.pvp2.api.reqattr.EaafRequestedAttribute;
import at.gv.egiz.eaaf.modules.pvp2.api.reqattr.EaafRequestedAttributes;
import at.gv.egiz.eaaf.modules.pvp2.api.validation.IAuthnRequestPostProcessor;
@@ -211,7 +212,11 @@ public class AuthnRequestValidator implements IAuthnRequestPostProcessor {
} else {
if (el.getAttributeValues() != null && el.getAttributeValues().size() == 1) {
final String transactionId = el.getAttributeValues().get(0).getDOM().getTextContent();
- ((RequestImpl) pendingReq).setUniqueTransactionIdentifier(transactionId);
+ ((RequestImpl) pendingReq).setUniqueTransactionIdentifier(transactionId);
+ log.info("Find transactionId: {} from requesting service. Replace old id: {} ",
+ transactionId, TransactionIdUtils.getTransactionId());
+ TransactionIdUtils.setTransactionId(transactionId);
+
return true;
} else {
diff --git a/connector/src/main/resources/specific_eIDAS_connector.beans.xml b/connector/src/main/resources/specific_eIDAS_connector.beans.xml
index ec16a7d2..a417a0e5 100644
--- a/connector/src/main/resources/specific_eIDAS_connector.beans.xml
+++ b/connector/src/main/resources/specific_eIDAS_connector.beans.xml
@@ -89,7 +89,8 @@
class="at.asitplus.eidas.specific.connector.gui.DefaultVelocityGuiBuilderImpl" />
<bean id="mvcGUIBuilderImpl"
- class="at.asitplus.eidas.specific.connector.gui.SpringMvcGuiFormBuilderImpl" />
+ class="at.gv.egiz.eaaf.core.impl.gui.builder.SpringMvcGuiFormBuilderImpl" />
+
<bean id="StatusMessageProvider"
class="at.asitplus.eidas.specific.connector.provider.StatusMessageProvider" />
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
index 4e66d324..893ab4cb 100644
--- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
+++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/FullStartUpAndProcessTest.java
@@ -9,6 +9,7 @@ import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.math.BigInteger;
import java.net.URISyntaxException;
+import java.time.Instant;
import java.util.Map;
import java.util.Timer;
@@ -16,7 +17,6 @@ import javax.xml.transform.TransformerException;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.ignite.Ignition;
-import org.joda.time.DateTime;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
@@ -57,6 +57,7 @@ import at.asitplus.eidas.specific.connector.controller.ProcessEngineSignalContro
import at.asitplus.eidas.specific.connector.controller.Pvp2SProfileEndpoint;
import at.asitplus.eidas.specific.connector.provider.PvpEndPointCredentialProvider;
import at.asitplus.eidas.specific.connector.provider.PvpMetadataProvider;
+import at.asitplus.eidas.specific.connector.test.saml2.Pvp2SProfileEndPointTest;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.Constants;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.EidasSignalServlet;
import at.asitplus.eidas.specific.modules.auth.eidas.v2.service.EidasAttributeRegistry;
@@ -540,10 +541,10 @@ public class FullStartUpAndProcessTest {
IOException, MarshallingException, ComponentInitializationException {
final RequestAbstractType authnReq = (RequestAbstractType) XMLObjectSupport.unmarshallFromInputStream(
XMLObjectProviderRegistrySupport.getParserPool(),
- FullStartUpAndProcessTest.class.getResourceAsStream("/data/pvp2_authn_1.xml"));
- authnReq.setIssueInstant(DateTime.now());
- RequestAbstractType signedAuthnReq =
- Saml2Utils.signSamlObject(authnReq, credentialProvider.getMessageSigningCredential(), true);
+ Pvp2SProfileEndPointTest.class.getResourceAsStream("/data/pvp2_authn_1.xml"));
+ authnReq.setIssueInstant(Instant.now());
+ RequestAbstractType signedAuthnReq =
+ Saml2Utils.signSamlObject(authnReq, credentialProvider.getMessageSigningCredential(), true);
String b64 = Base64Utils.encodeToString(DomUtils.serializeNode(
XMLObjectSupport.getMarshaller(signedAuthnReq).marshall(signedAuthnReq)).getBytes("UTF-8"));
saml2Req.setParameter("SAMLRequest", b64);
diff --git a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/saml2/Pvp2SProfileEndPointTest.java b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/saml2/Pvp2SProfileEndPointTest.java
index bcba3e11..6b39bd76 100644
--- a/connector/src/test/java/at/asitplus/eidas/specific/connector/test/saml2/Pvp2SProfileEndPointTest.java
+++ b/connector/src/test/java/at/asitplus/eidas/specific/connector/test/saml2/Pvp2SProfileEndPointTest.java
@@ -6,12 +6,12 @@ import java.io.UnsupportedEncodingException;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
+import java.time.Instant;
import java.util.List;
import java.util.Timer;
import javax.xml.transform.TransformerException;
-import org.joda.time.DateTime;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -129,7 +129,7 @@ public class Pvp2SProfileEndPointTest {
final RequestAbstractType authnReq = (RequestAbstractType) XMLObjectSupport.unmarshallFromInputStream(
XMLObjectProviderRegistrySupport.getParserPool(),
Pvp2SProfileEndPointTest.class.getResourceAsStream("/data/pvp2_authn_3.xml"));
- authnReq.setIssueInstant(DateTime.now());
+ authnReq.setIssueInstant(Instant.now());
RequestAbstractType signedAuthnReq =
Saml2Utils.signSamlObject(authnReq, credentialProvider.getMetaDataSigningCredential(), true);
String b64 = Base64Utils.encodeToString(DomUtils.serializeNode(
@@ -166,7 +166,7 @@ public class Pvp2SProfileEndPointTest {
final RequestAbstractType authnReq = (RequestAbstractType) XMLObjectSupport.unmarshallFromInputStream(
XMLObjectProviderRegistrySupport.getParserPool(),
Pvp2SProfileEndPointTest.class.getResourceAsStream("/data/pvp2_authn_1.xml"));
- authnReq.setIssueInstant(DateTime.now());
+ authnReq.setIssueInstant(Instant.now());
RequestAbstractType signedAuthnReq =
Saml2Utils.signSamlObject(authnReq, credentialProvider.getMetaDataSigningCredential(), true);
String b64 = Base64Utils.encodeToString(DomUtils.serializeNode(
@@ -203,7 +203,7 @@ public class Pvp2SProfileEndPointTest {
final RequestAbstractType authnReq = (RequestAbstractType) XMLObjectSupport.unmarshallFromInputStream(
XMLObjectProviderRegistrySupport.getParserPool(),
Pvp2SProfileEndPointTest.class.getResourceAsStream("/data/pvp2_authn_1.xml"));
- authnReq.setIssueInstant(DateTime.now());
+ authnReq.setIssueInstant(Instant.now());
RequestAbstractType signedAuthnReq =
Saml2Utils.signSamlObject(authnReq, credentialProvider.getMetaDataSigningCredential(), true);
String b64 = Base64Utils.encodeToString(DomUtils.serializeNode(
@@ -240,7 +240,7 @@ public class Pvp2SProfileEndPointTest {
final RequestAbstractType authnReq = (RequestAbstractType) XMLObjectSupport.unmarshallFromInputStream(
XMLObjectProviderRegistrySupport.getParserPool(),
Pvp2SProfileEndPointTest.class.getResourceAsStream("/data/pvp2_authn_1.xml"));
- authnReq.setIssueInstant(DateTime.now());
+ authnReq.setIssueInstant(Instant.now());
RequestAbstractType signedAuthnReq =
Saml2Utils.signSamlObject(authnReq, credentialProvider.getMessageSigningCredential(), true);
String b64 = Base64Utils.encodeToString(DomUtils.serializeNode(
diff --git a/connector/src/test/resources/spring/SpringTest_connector.beans.xml b/connector/src/test/resources/spring/SpringTest_connector.beans.xml
index 81fff7dd..0645ed31 100644
--- a/connector/src/test/resources/spring/SpringTest_connector.beans.xml
+++ b/connector/src/test/resources/spring/SpringTest_connector.beans.xml
@@ -89,7 +89,7 @@
class="at.asitplus.eidas.specific.connector.gui.DefaultVelocityGuiBuilderImpl" />
<bean id="mvcGUIBuilderImpl"
- class="at.asitplus.eidas.specific.connector.gui.SpringMvcGuiFormBuilderImpl" />
+ class="at.gv.egiz.eaaf.core.impl.gui.builder.SpringMvcGuiFormBuilderImpl" />
<bean id="templateEngine"
class="org.thymeleaf.spring5.SpringTemplateEngine">