diff options
14 files changed, 45 insertions, 88 deletions
diff --git a/eaaf-springboot-utils/pom.xml b/eaaf-springboot-utils/pom.xml index 0846b1ca..3ce54516 100644 --- a/eaaf-springboot-utils/pom.xml +++ b/eaaf-springboot-utils/pom.xml @@ -66,11 +66,6 @@ <!-- Test dependencies --> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <scope>test</scope> diff --git a/eaaf_core/pom.xml b/eaaf_core/pom.xml index 2e9023a6..10aa328c 100644 --- a/eaaf_core/pom.xml +++ b/eaaf_core/pom.xml @@ -98,11 +98,6 @@ <!-- For testing --> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <scope>test</scope> diff --git a/eaaf_core_api/pom.xml b/eaaf_core_api/pom.xml index 7ee6cac5..259f0c5c 100644 --- a/eaaf_core_api/pom.xml +++ b/eaaf_core_api/pom.xml @@ -53,11 +53,6 @@ <artifactId>javax.servlet-api</artifactId> <scope>provided</scope> </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> </dependencies> <build> diff --git a/eaaf_core_utils/pom.xml b/eaaf_core_utils/pom.xml index e0cb88e3..7b79211a 100644 --- a/eaaf_core_utils/pom.xml +++ b/eaaf_core_utils/pom.xml @@ -98,11 +98,6 @@ </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <scope>test</scope> diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/X509Utils.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/X509Utils.java index e2fc4d1b..4d872ebe 100644 --- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/X509Utils.java +++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/X509Utils.java @@ -1,12 +1,11 @@ package at.gv.egiz.eaaf.core.impl.utils; import java.security.cert.X509Certificate; +import java.util.Arrays; import java.util.List; import javax.security.auth.x500.X500Principal; -import org.springframework.util.CollectionUtils; - public class X509Utils { /** @@ -17,7 +16,7 @@ public class X509Utils { * @return sorted Certificate Chain */ public static List<X509Certificate> sortCertificates(X509Certificate[] certChain) { - return sortCertificates(CollectionUtils.arrayToList(certChain)); + return sortCertificates(Arrays.asList(certChain)); } diff --git a/eaaf_modules/eaaf_module_auth_sl20/pom.xml b/eaaf_modules/eaaf_module_auth_sl20/pom.xml index b9c64873..0c3ba8c8 100644 --- a/eaaf_modules/eaaf_module_auth_sl20/pom.xml +++ b/eaaf_modules/eaaf_module_auth_sl20/pom.xml @@ -53,11 +53,6 @@ </dependency> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <scope>test</scope> diff --git a/eaaf_modules/eaaf_module_moa-sig/pom.xml b/eaaf_modules/eaaf_module_moa-sig/pom.xml index f1889d13..a09c3340 100644 --- a/eaaf_modules/eaaf_module_moa-sig/pom.xml +++ b/eaaf_modules/eaaf_module_moa-sig/pom.xml @@ -161,14 +161,7 @@ <artifactId>jaxen</artifactId> </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <scope>test</scope> diff --git a/eaaf_modules/eaaf_module_pvp2_core/pom.xml b/eaaf_modules/eaaf_module_pvp2_core/pom.xml index 1ce539ee..a39d305a 100644 --- a/eaaf_modules/eaaf_module_pvp2_core/pom.xml +++ b/eaaf_modules/eaaf_module_pvp2_core/pom.xml @@ -82,11 +82,6 @@ <!-- Testing --> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <scope>test</scope> diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/binding/PostBindingTest.java b/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/binding/PostBindingTest.java index f14a9093..3288df14 100644 --- a/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/binding/PostBindingTest.java +++ b/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/binding/PostBindingTest.java @@ -511,7 +511,7 @@ public class PostBindingTest { Assert.assertEquals("http StatusCode", 200, httpResp.getStatus()); Assert.assertNotNull("PVP msg is null", httpResp.getContentLength()); - Assert.assertEquals("ContentType", "text/html", httpResp.getContentType()); + Assert.assertEquals("ContentType", "text/html;charset=UTF-8", httpResp.getContentType()); Assert.assertEquals("Encoding", "UTF-8", httpResp.getCharacterEncoding()); final String http = httpResp.getContentAsString(); @@ -545,7 +545,7 @@ public class PostBindingTest { Assert.assertEquals("http StatusCode", 200, httpResp.getStatus()); Assert.assertNotNull("PVP msg is null", httpResp.getContentLength()); - Assert.assertEquals("ContentType", "text/html", httpResp.getContentType()); + Assert.assertEquals("ContentType", "text/html;charset=UTF-8", httpResp.getContentType()); Assert.assertEquals("Encoding", "UTF-8", httpResp.getCharacterEncoding()); final String http = httpResp.getContentAsString(); @@ -581,7 +581,7 @@ public class PostBindingTest { Assert.assertEquals("http StatusCode", 200, httpResp.getStatus()); Assert.assertNotNull("PVP msg is null", httpResp.getContentLength()); - Assert.assertEquals("ContentType", "text/html", httpResp.getContentType()); + Assert.assertEquals("ContentType", "text/html;charset=UTF-8", httpResp.getContentType()); Assert.assertEquals("Encoding", "UTF-8", httpResp.getCharacterEncoding()); final String http = httpResp.getContentAsString(); @@ -619,7 +619,7 @@ public class PostBindingTest { Assert.assertEquals("http StatusCode", 200, httpResp.getStatus()); Assert.assertNotNull("PVP msg is null", httpResp.getContentLength()); - Assert.assertEquals("ContentType", "text/html", httpResp.getContentType()); + Assert.assertEquals("ContentType", "text/html;charset=UTF-8", httpResp.getContentType()); Assert.assertEquals("Encoding", "UTF-8", httpResp.getCharacterEncoding()); final String http = httpResp.getContentAsString(); @@ -657,7 +657,7 @@ public class PostBindingTest { Assert.assertEquals("http StatusCode", 200, httpResp.getStatus()); Assert.assertNotNull("PVP msg is null", httpResp.getContentLength()); - Assert.assertEquals("ContentType", "text/html", httpResp.getContentType()); + Assert.assertEquals("ContentType", "text/html;charset=UTF-8", httpResp.getContentType()); Assert.assertEquals("Encoding", "UTF-8", httpResp.getCharacterEncoding()); final String http = httpResp.getContentAsString(); diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/binding/SoapBindingTest.java b/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/binding/SoapBindingTest.java index f3a7e01d..5393179d 100644 --- a/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/binding/SoapBindingTest.java +++ b/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/binding/SoapBindingTest.java @@ -3,19 +3,6 @@ package at.gv.egiz.eaaf.modules.pvp2.test.binding; import java.io.ByteArrayOutputStream; import java.io.UnsupportedEncodingException; -import at.gv.egiz.eaaf.core.api.IRequest; -import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl; -import at.gv.egiz.eaaf.modules.pvp2.api.message.InboundMessageInterface; -import at.gv.egiz.eaaf.modules.pvp2.api.metadata.IPvp2MetadataProvider; -import at.gv.egiz.eaaf.modules.pvp2.exception.CredentialsNotAvailableException; -import at.gv.egiz.eaaf.modules.pvp2.exception.Pvp2Exception; -import at.gv.egiz.eaaf.modules.pvp2.impl.binding.SoapBinding; -import at.gv.egiz.eaaf.modules.pvp2.impl.metadata.PvpMetadataResolverFactory; -import at.gv.egiz.eaaf.modules.pvp2.impl.opensaml.initialize.EaafOpenSaml3xInitializer; -import at.gv.egiz.eaaf.modules.pvp2.impl.utils.Saml2Utils; -import at.gv.egiz.eaaf.modules.pvp2.impl.validation.EaafUriCompare; -import at.gv.egiz.eaaf.modules.pvp2.test.dummy.DummyCredentialProvider; - import org.joda.time.DateTime; import org.junit.Assert; import org.junit.Before; @@ -38,6 +25,18 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import at.gv.egiz.eaaf.core.api.IRequest; +import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl; +import at.gv.egiz.eaaf.modules.pvp2.api.message.InboundMessageInterface; +import at.gv.egiz.eaaf.modules.pvp2.api.metadata.IPvp2MetadataProvider; +import at.gv.egiz.eaaf.modules.pvp2.exception.CredentialsNotAvailableException; +import at.gv.egiz.eaaf.modules.pvp2.exception.Pvp2Exception; +import at.gv.egiz.eaaf.modules.pvp2.impl.binding.SoapBinding; +import at.gv.egiz.eaaf.modules.pvp2.impl.metadata.PvpMetadataResolverFactory; +import at.gv.egiz.eaaf.modules.pvp2.impl.opensaml.initialize.EaafOpenSaml3xInitializer; +import at.gv.egiz.eaaf.modules.pvp2.impl.utils.Saml2Utils; +import at.gv.egiz.eaaf.modules.pvp2.impl.validation.EaafUriCompare; +import at.gv.egiz.eaaf.modules.pvp2.test.dummy.DummyCredentialProvider; import net.shibboleth.utilities.java.support.logic.Constraint; import net.shibboleth.utilities.java.support.net.URIComparator; import net.shibboleth.utilities.java.support.xml.SerializeSupport; @@ -204,7 +203,7 @@ public class SoapBindingTest { Assert.assertEquals("http StatusCode", 200, httpResp.getStatus()); Assert.assertNotNull("PVP msg is null", httpResp.getContentLength()); - Assert.assertEquals("ContentType", "text/xml", httpResp.getContentType()); + Assert.assertEquals("ContentType", "text/xml;charset=UTF-8", httpResp.getContentType()); Assert.assertEquals("Encoding", "UTF-8", httpResp.getCharacterEncoding()); final String http = httpResp.getContentAsString(); diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/metadata/MetadataResolverTest.java b/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/metadata/MetadataResolverTest.java index 1cbc2f14..72d6ebb8 100644 --- a/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/metadata/MetadataResolverTest.java +++ b/eaaf_modules/eaaf_module_pvp2_core/src/test/java/at/gv/egiz/eaaf/modules/pvp2/test/metadata/MetadataResolverTest.java @@ -241,7 +241,7 @@ public class MetadataResolverTest { Assert.fail("Untrusted signature not detected"); } catch (final Pvp2MetadataException e) { - Assert.assertEquals("Wrong errorCode", "internal.pvp.07", e.getErrorId()); + Assert.assertEquals("Wrong errorCode", "internal.pvp.09", e.getErrorId()); } diff --git a/eaaf_modules/eaaf_module_pvp2_idp/pom.xml b/eaaf_modules/eaaf_module_pvp2_idp/pom.xml index 47d2d8e4..1a9de245 100644 --- a/eaaf_modules/eaaf_module_pvp2_idp/pom.xml +++ b/eaaf_modules/eaaf_module_pvp2_idp/pom.xml @@ -31,11 +31,6 @@ <!-- Testing --> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <scope>test</scope> diff --git a/eaaf_modules/eaaf_module_pvp2_sp/pom.xml b/eaaf_modules/eaaf_module_pvp2_sp/pom.xml index d1914ef6..5a9a6d0e 100644 --- a/eaaf_modules/eaaf_module_pvp2_sp/pom.xml +++ b/eaaf_modules/eaaf_module_pvp2_sp/pom.xml @@ -37,11 +37,6 @@ <!-- Only for testing --> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <scope>test</scope> @@ -47,10 +47,10 @@ <io.grpc-core.version>1.34.0</io.grpc-core.version> <!-- Other third-party libs --> - <spring-boot-starter-web.version>2.3.7.RELEASE</spring-boot-starter-web.version> - <org.springframework.version>5.2.12.RELEASE</org.springframework.version> - <org.opensaml.version>3.4.5</org.opensaml.version> - <org.apache.santuario.xmlsec.version>2.2.0</org.apache.santuario.xmlsec.version> + <spring-boot-starter-web.version>2.4.5</spring-boot-starter-web.version> + <org.springframework.version>5.3.6</org.springframework.version> + <org.opensaml.version>3.4.6</org.opensaml.version> + <org.apache.santuario.xmlsec.version>2.2.1</org.apache.santuario.xmlsec.version> <org.cryptacular.version>1.2.4</org.cryptacular.version> <org.bouncycastle.bcprov-jdk15to18.version>1.68</org.bouncycastle.bcprov-jdk15to18.version> <org.bouncycastle.bctls-jdk15to18.version>1.68</org.bouncycastle.bctls-jdk15to18.version> @@ -58,7 +58,7 @@ <org.slf4j.version>1.7.30</org.slf4j.version> <ch.qos.logback-access.version>1.2.3</ch.qos.logback-access.version> <commons-codec.version>1.15</commons-codec.version> - <org.apache.commons-lang3.version>3.11</org.apache.commons-lang3.version> + <org.apache.commons-lang3.version>3.12.0</org.apache.commons-lang3.version> <org.apache.commons-text.version>1.9</org.apache.commons-text.version> <org.apache.commons-collections>3.2.2</org.apache.commons-collections> <org.apache.commons-collections4>4.4</org.apache.commons-collections4> @@ -67,16 +67,16 @@ <javax.servlet-api>3.0.1</javax.servlet-api> <org.apache.velocity.version>1.7</org.apache.velocity.version> <javax.annotation-api>1.3.2</javax.annotation-api> - <joda-time.version>2.10.8</joda-time.version> + <joda-time.version>2.10.10</joda-time.version> <jsr305.version>3.0.2</jsr305.version> - <com.google.guava.version>30.0-jre</com.google.guava.version> + <com.google.guava.version>30.1.1-jre</com.google.guava.version> <org.owasp.encoder.version>1.2.3</org.owasp.encoder.version> <httpclient.version>4.5.13</httpclient.version> <httpcore.version>4.4.14</httpcore.version> - <com.fasterxml.jackson.core.version>2.12.0</com.fasterxml.jackson.core.version> - <org.bitbucket.b_c.jose4j.version>0.7.2</org.bitbucket.b_c.jose4j.version> + <com.fasterxml.jackson.core.version>2.12.3</com.fasterxml.jackson.core.version> + <org.bitbucket.b_c.jose4j.version>0.7.6</org.bitbucket.b_c.jose4j.version> <jaxen.jaxen.version>1.1.6</jaxen.jaxen.version> <xerces.version>2.12.0</xerces.version> @@ -84,7 +84,7 @@ <!-- jUnit testing --> <surefire.version>2.22.1</surefire.version> - <junit.version>4.13.1</junit.version> + <junit-jupiter-api.version>5.7.1</junit-jupiter-api.version> <com.squareup.okhttp3.version>4.4.1</com.squareup.okhttp3.version> <org.powermock.version>2.0.9</org.powermock.version> @@ -93,9 +93,9 @@ <!-- Code quality checks --> <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version> - <maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version> + <maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version> <maven-pmd-plugin.version>3.14.0</maven-pmd-plugin.version> - <spotbugs-maven-plugin.version>4.1.4</spotbugs-maven-plugin.version> + <spotbugs-maven-plugin.version>4.2.0</spotbugs-maven-plugin.version> <findsecbugs-plugin.version>1.11.0</findsecbugs-plugin.version> <dependency-check-maven.version>6.0.3</dependency-check-maven.version> @@ -591,12 +591,6 @@ <!-- Testing --> <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>${junit.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${org.springframework.version}</version> @@ -651,6 +645,18 @@ </dependencyManagement> <dependencies> <dependency> + <groupId>org.junit.vintage</groupId> + <artifactId>junit-vintage-engine</artifactId> + <version>${junit-jupiter-api.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-migrationsupport</artifactId> + <version>${junit-jupiter-api.version}</version> + <scope>test</scope> + </dependency> + <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${org.projectlombok.lombok.version}</version> |