summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2020-12-09 14:44:41 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2020-12-09 14:44:41 +0100
commita126c249b8ed83dce4386331a49d04a42b53e448 (patch)
treef2e035c580e4f3acf4d69a91c4d7219587d5aeae
parent50b25badd1592ae68ca24ccfe16517b745e0df84 (diff)
parent4e2417b8b5e59b9659900ad36ce7248810813aeb (diff)
downloadEAAF-Components-a126c249b8ed83dce4386331a49d04a42b53e448.tar.gz
EAAF-Components-a126c249b8ed83dce4386331a49d04a42b53e448.tar.bz2
EAAF-Components-a126c249b8ed83dce4386331a49d04a42b53e448.zip
Merge branch 'feature/gitlabci' into 'nightlyBuild'
Feature/gitlabci See merge request egiz/eaaf_components!5
-rw-r--r--.cisettings.xml37
-rw-r--r--.gitlab-ci.yml79
-rw-r--r--eaaf_core/pom.xml8
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java6
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java2
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyWithHsmTest.java2
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java73
-rw-r--r--eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java1
-rw-r--r--pom.xml77
9 files changed, 210 insertions, 75 deletions
diff --git a/.cisettings.xml b/.cisettings.xml
new file mode 100644
index 00000000..8556c6a8
--- /dev/null
+++ b/.cisettings.xml
@@ -0,0 +1,37 @@
+<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
+ <servers>
+ <server>
+ <id>gitlab</id>
+ <configuration>
+ <httpHeaders>
+ <property>
+ <name>Job-Token</name>
+ <value>${env.CI_JOB_TOKEN}</value>
+ </property>
+ </httpHeaders>
+ </configuration>
+ </server>
+ <server>
+ <id>gitlab-localbuild</id>
+ <configuration>
+ <httpHeaders>
+ <property>
+ <name>Private-Token</name>
+ <value>${env.PRIVATE_TOKEN}</value>
+ </property>
+ </httpHeaders>
+ </configuration>
+ </server>
+ <server>
+ <id>egizMaven</id>
+ <username>${env.EGIZ_MAVEN_USER}</username>
+ <password>${env.EGIZ_MAVEN_PASSWORD}</password>
+ <configuration>
+ <knownHostsProvider implementation="org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider">
+ <hostKeyChecking>no</hostKeyChecking>
+ </knownHostsProvider>
+ </configuration>
+ </server>
+ </servers>
+</settings>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..37ca635e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,79 @@
+image: maven:latest
+
+variables:
+ LC_ALL: "en_US.UTF-8"
+ LANG: "en_US.UTF-8"
+ LANGUAGE: "en_US"
+ LIB_NAME: "eaaf-components"
+ MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true --settings ${CI_PROJECT_DIR}/.cisettings.xml"
+ MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=${CI_PROJECT_DIR}/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
+ GIT_SUBMODULE_STRATEGY: recursive
+ GIT_DEPTH: "2"
+ SECURE_LOG_LEVEL: "debug"
+
+include:
+ - template: Dependency-Scanning.gitlab-ci.yml
+ - template: Security/SAST.gitlab-ci.yml
+ - template: Secret-Detection.gitlab-ci.yml
+ - template: Code-Quality.gitlab-ci.yml
+
+stages:
+ - assemble
+ - test
+ - package
+ - release
+
+cache:
+ paths:
+ - ".m2/repository"
+
+assemble:
+ stage: assemble
+ except:
+ - tags
+ script: |
+ mvn $MAVEN_CLI_OPTS compile test
+ artifacts:
+ when: always
+ reports:
+ junit: "**/target/surefire-reports/TEST-*.xml"
+
+publishToGitlab:
+ stage: package
+ except:
+ - tags
+ before_script:
+ - mkdir -p ~/.ssh
+ - ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts
+ - chmod 644 ~/.ssh/known_hosts
+ script: |
+ export VERSION=$(mvn -B help:evaluate -Dexpression=project.version -B | grep -v "\[INFO\]" | grep -Po "\d+\.\d+\.\d+((-\w*)+)?")
+ echo "Publishing version $VERSION for $LIB_NAME to public EGIZ maven"
+ mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P jenkinsDeploy -DskipTests
+ echo "VERSION=$VERSION" >> variables.env
+ artifacts:
+ when: always
+ reports:
+ dotenv: variables.env
+
+release:
+ stage: release
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
+ needs:
+ - job: publishToGitlab
+ artifacts: true
+ when: manual
+ only:
+ - master
+ before_script:
+ - mkdir -p ~/.ssh
+ - ssh-keyscan apps.egiz.gv.at >> ~/.ssh/known_hosts
+ - chmod 644 ~/.ssh/known_hosts
+ script: |
+ echo "Releasing version $VERSION of $LIB_NAME"
+ echo "Publishing version $VERSION to public EGIZ maven"
+ mvn $MAVEN_CLI_OPTS deploy -s .cisettings.xml -P jenkinsDeploy
+ release:
+ name: "$VERSION"
+ tag_name: "v$VERSION"
+ description: "$(cat README.md)"
diff --git a/eaaf_core/pom.xml b/eaaf_core/pom.xml
index 60057db3..a1eee06e 100644
--- a/eaaf_core/pom.xml
+++ b/eaaf_core/pom.xml
@@ -54,8 +54,8 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
- </dependency>
- <dependency>
+ </dependency>
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
@@ -75,6 +75,10 @@
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
</dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java
index 53ea54dc..125dcb09 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/logging/EaafUtilsMessageSourceTest.java
@@ -2,19 +2,21 @@ package at.gv.egiz.eaaf.core.impl.logging;
import java.util.List;
-import at.gv.egiz.eaaf.core.api.logging.IMessageSourceLocation;
-
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
+import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import at.gv.egiz.eaaf.core.api.logging.IMessageSourceLocation;
+
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/spring/test_eaaf_pvp_not_lazy.beans.xml")
+@DirtiesContext
public class EaafUtilsMessageSourceTest {
@Autowired
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java
index 8b437dcf..09a9543a 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest.java
@@ -20,6 +20,7 @@ import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -33,6 +34,7 @@ import at.gv.egiz.eaaf.core.impl.utils.AuthenticatedEncryptionPendingRequestIdGe
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/spring/test_eaaf_pvp_not_lazy.beans.xml")
+@DirtiesContext
public class AuthenticatedEncryptionPendingRequestIdGenerationStrategyTest {
@Autowired private EaafKeyStoreFactory keyStoreFactory;
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyWithHsmTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyWithHsmTest.java
index 95a2b7a7..b588bb3a 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyWithHsmTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/impl/utils/test/AuthenticatedEncryptionPendingRequestIdGenerationStrategyWithHsmTest.java
@@ -4,6 +4,7 @@ import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -12,6 +13,7 @@ import at.gv.egiz.eaaf.core.impl.utils.AuthenticatedEncryptionPendingRequestIdGe
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/spring/test_eaaf_pvp_not_lazy_with_hsm.beans.xml")
+@DirtiesContext
public class AuthenticatedEncryptionPendingRequestIdGenerationStrategyWithHsmTest {
@Autowired private AuthenticatedEncryptionPendingRequestIdGenerationStrategy pendingIdStrategy;
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java
index c0bd6f20..6d1b63d7 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/credentials/EaafKeyStoreFactoryTest.java
@@ -19,6 +19,7 @@ import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.annotation.DirtiesContext.ClassMode;
import org.springframework.test.annotation.DirtiesContext.MethodMode;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -45,7 +46,7 @@ import io.grpc.StatusRuntimeException;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/spring/test_eaaf_pvp_lazy.beans.xml")
-@DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
+@DirtiesContext(classMode = ClassMode.BEFORE_EACH_TEST_METHOD)
public class EaafKeyStoreFactoryTest {
private static final String HSM_FACASE_HOST = "eid.a-sit.at";
@@ -72,7 +73,7 @@ public class EaafKeyStoreFactoryTest {
/**
* jUnit test set-up.
*/
- @Before
+ @Before
public void testSetup() {
mapConfig.clearAllConfig();
Security.removeProvider(HsmFacadeProvider.getInstance().getName());
@@ -80,7 +81,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void startWithoutConfigHsmFacadeConfig() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -88,7 +89,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void buildyStoreWithOutConfig() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -106,7 +107,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void buildyStoreWithPkcs11() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -125,7 +126,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreWithoutConfig() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -144,7 +145,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreWithoutConfigSecond() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -163,7 +164,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreWithoutPassword() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -184,7 +185,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreWithoutPath() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -206,7 +207,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreWithoutType() throws EaafException {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -224,7 +225,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreWithWrongPath() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -247,7 +248,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreWithWrongPassword() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -270,7 +271,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreSuccessJks() throws EaafException {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -290,7 +291,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreAccessOperations() throws EaafException, KeyStoreException {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -359,7 +360,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void softwareKeyStoreSuccessPkcs12() throws EaafException {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -379,7 +380,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void symmetricSoftwareKeyWithOutConfig() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -399,7 +400,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void symmetricSoftwareKeyWithOutSalt() {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -420,7 +421,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void symmetricSoftwareKeyValid() throws EaafException {
final EaafKeyStoreFactory keyStoreFactory = context.getBean(EaafKeyStoreFactory.class);
Assert.assertFalse("HSM Facade state wrong", keyStoreFactory.isHsmFacadeInitialized());
@@ -439,7 +440,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeNoHostConfig() {
context.getBean(EaafKeyStoreFactory.class);
@@ -447,7 +448,7 @@ public class EaafKeyStoreFactoryTest {
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeOnlyHostConfig() {
mapConfig.putConfigValue(EaafKeyStoreFactory.CONFIG_PROP_HSM_FACADE_HOST,
RandomStringUtils.randomNumeric(10));
@@ -462,7 +463,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeMissingPort() {
mapConfig.putConfigValue(EaafKeyStoreFactory.CONFIG_PROP_HSM_FACADE_HOST,
RandomStringUtils.randomNumeric(10));
@@ -482,7 +483,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeMissingUsername() {
mapConfig.putConfigValue(EaafKeyStoreFactory.CONFIG_PROP_HSM_FACADE_HOST,
RandomStringUtils.randomNumeric(10));
@@ -501,7 +502,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeMissingPassword() {
mapConfig.putConfigValue(EaafKeyStoreFactory.CONFIG_PROP_HSM_FACADE_HOST,
RandomStringUtils.randomNumeric(10));
@@ -521,7 +522,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeMissingTrustedCertificate() {
mapConfig.putConfigValue(EaafKeyStoreFactory.CONFIG_PROP_HSM_FACADE_HOST,
RandomStringUtils.randomNumeric(10));
@@ -543,7 +544,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeMissingTrustedCertificateFile() {
mapConfig.putConfigValue(EaafKeyStoreFactory.CONFIG_PROP_HSM_FACADE_HOST,
RandomStringUtils.randomNumeric(10));
@@ -566,8 +567,8 @@ public class EaafKeyStoreFactoryTest {
}
}
- @Test
- @DirtiesContext
+ @Test
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeMissingWrongTrustedCertificate() {
mapConfig.putConfigValue(EaafKeyStoreFactory.CONFIG_PROP_HSM_FACADE_HOST,
RandomStringUtils.randomNumeric(10));
@@ -591,7 +592,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeInitialized() {
mapConfig.putConfigValue(EaafKeyStoreFactory.CONFIG_PROP_HSM_FACADE_HOST,
RandomStringUtils.randomNumeric(10));
@@ -610,7 +611,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeAlreadLoaded() {
HsmFacadeProvider provider = HsmFacadeProvider.getInstance();
Security.addProvider(provider);
@@ -621,7 +622,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeKeyStoreNoKeyStoreName() {
configureHsmFacade();
@@ -643,7 +644,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeKeyStoreSuccess() throws EaafException {
configureHsmFacade();
@@ -671,7 +672,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void symmetricHsmFacadeKeyWithOutConfig() {
configureHsmFacade();
@@ -693,7 +694,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void symmetricHsmFacadeKeyWithOutKeyAlias() {
configureHsmFacade();
@@ -716,7 +717,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void symmetricHsmFacadeKeyWrongKeyAlias() {
configureHsmFacade();
@@ -741,7 +742,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void symmetricHsmFacadeKeyValid() throws EaafException {
configureHsmFacade();
@@ -762,7 +763,7 @@ public class EaafKeyStoreFactoryTest {
}
@Test
- @DirtiesContext
+ @DirtiesContext(methodMode = MethodMode.BEFORE_METHOD)
public void hsmFacadeKeyStoreSuccessASitTestFacade() throws EaafException, KeyStoreException {
configureHsmFacade();
diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java
index 433e6893..c88e05d5 100644
--- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java
+++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java
@@ -42,6 +42,7 @@ import okhttp3.tls.HeldCertificate;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/spring/test_eaaf_pvp_not_lazy.beans.xml")
+@DirtiesContext
public class HttpClientFactoryTest {
@Autowired private EaafKeyStoreFactory keyStoreFactory;
diff --git a/pom.xml b/pom.xml
index 309dab97..c9f7309a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,38 +43,39 @@
<iaik.prod.iaik_xades.version>2.13_moa</iaik.prod.iaik_xades.version>
<iaik.prod.iaik_xsect.version>2.14_moa</iaik.prod.iaik_xsect.version>
- <hsm-facade-provider.version>0.5.1</hsm-facade-provider.version>
- <io.grpc-core.version>1.30.2</io.grpc-core.version>
+ <hsm-facade-provider.version>0.5.3-SNAPSHOT</hsm-facade-provider.version>
+ <io.grpc-core.version>1.34.0</io.grpc-core.version>
<!-- Other third-party libs -->
<org.springframework.version>5.2.8.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>
- <org.bouncycastle.bcprov-jdk15to18.version>1.66</org.bouncycastle.bcprov-jdk15to18.version>
- <org.bouncycastle.bctls-jdk15to18.version>1.66</org.bouncycastle.bctls-jdk15to18.version>
+ <org.bouncycastle.bcprov-jdk15to18.version>1.67</org.bouncycastle.bcprov-jdk15to18.version>
+ <org.bouncycastle.bctls-jdk15to18.version>1.67</org.bouncycastle.bctls-jdk15to18.version>
<org.slf4j.version>1.7.30</org.slf4j.version>
- <commons-codec.version>1.14</commons-codec.version>
+ <commons-codec.version>1.15</commons-codec.version>
<org.apache.commons-lang3.version>3.11</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>
- <commons-io.version>2.7</commons-io.version>
+ <commons-io.version>2.8.0</commons-io.version>
<commons-fileupload.version>1.4</commons-fileupload.version>
<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.6</joda-time.version>
+ <joda-time.version>2.10.8</joda-time.version>
<jsr305.version>3.0.2</jsr305.version>
- <com.google.guava.version>29.0-jre</com.google.guava.version>
+ <com.google.guava.version>30.0-jre</com.google.guava.version>
- <httpclient.version>4.5.12</httpclient.version>
- <httpcore.version>4.4.13</httpcore.version>
+ <httpclient.version>4.5.13</httpclient.version>
+ <httpcore.version>4.4.14</httpcore.version>
- <com.fasterxml.jackson.core.version>2.11.1</com.fasterxml.jackson.core.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>
<jaxen.jaxen.version>1.1.6</jaxen.jaxen.version>
- <xerces.version>2.11.0</xerces.version>
+ <xerces.version>2.12.0</xerces.version>
<xalan.version>2.7.1</xalan.version>
<!-- jUnit testing -->
@@ -86,11 +87,11 @@
<org.projectlombok.lombok.version>1.18.12</org.projectlombok.lombok.version>
<!-- Code quality checks -->
- <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
- <maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
- <maven-pmd-plugin.version>3.12.0</maven-pmd-plugin.version>
- <spotbugs-maven-plugin.version>3.1.12.2</spotbugs-maven-plugin.version>
- <dependency-check-maven.version>5.3.2</dependency-check-maven.version>
+ <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
+ <maven-checkstyle-plugin.version>3.1.1</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>
+ <dependency-check-maven.version>6.0.3</dependency-check-maven.version>
<license.outputDirectory>${project.build.directory}/thirdparty_licenses</license.outputDirectory>
<pmw_rules_location>https://apps.egiz.gv.at/checkstyle/egiz_pmd_checks.xml</pmw_rules_location>
@@ -99,25 +100,13 @@
<repositories>
<repository>
- <id>asit-snapshot</id>
- <url>https://dev.a-sit.at/repositories/snapshot</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
+ <id>gitlab</id>
+ <url>https://gitlab.iaik.tugraz.at/api/v4/groups/119/-/packages/maven</url>
</repository>
<repository>
- <id>asit-release</id>
- <url>https://dev.a-sit.at/repositories/release</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
+ <id>gitlab-localbuild</id>
+ <url>https://gitlab.iaik.tugraz.at/api/v4/groups/119/-/packages/maven</url>
+ </repository>
<repository>
<id>egiz-commons</id>
<url>https://apps.egiz.gv.at/maven/</url>
@@ -143,6 +132,19 @@
</activation>
</profile>
<profile>
+ <id>gitlabDeploy</id>
+ <distributionManagement>
+ <repository>
+ <id>gitlab</id>
+ <url>https://gitlab.iaik.tugraz.at/api/v4/projects/507/packages/maven</url>
+ </repository>
+ <snapshotRepository>
+ <id>gitlab</id>
+ <url>https://gitlab.iaik.tugraz.at/api/v4/projects/507/packages/maven</url>
+ </snapshotRepository>
+ </distributionManagement>
+ </profile>
+ <profile>
<id>jenkinsDeploy</id>
<distributionManagement>
<repository>
@@ -353,6 +355,11 @@
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax.annotation-api}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>${org.apache.commons-collections}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -737,4 +744,4 @@
</plugins>
</reporting>
-</project> \ No newline at end of file
+</project>