aboutsummaryrefslogtreecommitdiff
path: root/connector/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'connector/src/main')
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/MsSpecificSpringBootApplicationContextInitializer.java2
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/SpringBootApplicationInitializer.java15
-rw-r--r--connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java4
-rw-r--r--connector/src/main/resources/application.properties4
4 files changed, 20 insertions, 5 deletions
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/MsSpecificSpringBootApplicationContextInitializer.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/MsSpecificSpringBootApplicationContextInitializer.java
index 5160bdf5..399d1286 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/MsSpecificSpringBootApplicationContextInitializer.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/MsSpecificSpringBootApplicationContextInitializer.java
@@ -41,7 +41,7 @@ public class MsSpecificSpringBootApplicationContextInitializer extends
}
super.initialize(applicationContext);
-
+
}
private void injectConfiguration(String configPath, ConfigurableApplicationContext applicationContext) {
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/SpringBootApplicationInitializer.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/SpringBootApplicationInitializer.java
index 0d3226bf..f0cf8698 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/SpringBootApplicationInitializer.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/SpringBootApplicationInitializer.java
@@ -4,8 +4,11 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
+import at.gv.egiz.eaaf.core.api.IStatusMessenger;
import at.gv.egiz.eaaf.core.impl.logging.LogMessageProviderFactory;
import at.gv.egiz.eaaf.core.impl.logging.SimpleStatusMessager;
+import at.gv.egiz.eaaf.core.impl.utils.Random;
+import at.gv.egiz.eaaf.modules.pvp2.impl.opensaml.initialize.EaafOpenSaml3xInitializer;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@@ -18,8 +21,9 @@ public class SpringBootApplicationInitializer {
* Starts MS-specific eIDAS-Implementation SpringBoot application.
*
* @param args Starting parameters
+ * @throws Throwable In case of a start-up error
*/
- public static void main(final String[] args) {
+ public static void main(final String[] args) throws Throwable {
try {
log.info("=============== Initializing Spring-Boot context! ===============");
LogMessageProviderFactory.setStatusMessager(new SimpleStatusMessager());
@@ -27,9 +31,18 @@ public class SpringBootApplicationInitializer {
new SpringApplication(SpringBootApplicationInitializer.class);
springApp.addInitializers(new MsSpecificSpringBootApplicationContextInitializer());
+ log.info("Bootstrap openSAML .... ");
+ EaafOpenSaml3xInitializer.eaafInitialize();
+
log.debug("Run SpringBoot initialization process ... ");
ctx = springApp.run(args);
+ // initialize status messenger
+ LogMessageProviderFactory.setStatusMessager(ctx.getBean(IStatusMessenger.class));
+
+ log.info("Seed random number generator ... ");
+ Random.seedRandom();
+
log.info("Initialization of MS-specific eIDAS-Implementation finished.");
} catch (final Throwable e) {
diff --git a/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java b/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java
index d38da6fe..073f7513 100644
--- a/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java
+++ b/connector/src/main/java/at/asitplus/eidas/specific/connector/provider/StatusMessageProvider.java
@@ -94,8 +94,8 @@ public class StatusMessageProvider implements IStatusMessenger {
public String getResponseErrorCode(Throwable throwable) {
String errorCode = IStatusMessenger.CODES_EXTERNAL_ERROR_GENERIC;
if (throwable instanceof EaafException) {
- errorCode = ((EaafException) throwable).getErrorId();
-
+ errorCode = mapInternalErrorToExternalError(((EaafException) throwable).getErrorId());
+
}
// TODO: maybe more internal switches are required
diff --git a/connector/src/main/resources/application.properties b/connector/src/main/resources/application.properties
index 2cb0c83a..68e07714 100644
--- a/connector/src/main/resources/application.properties
+++ b/connector/src/main/resources/application.properties
@@ -13,13 +13,15 @@ app.build.artifactId=ms_connector
spring.boot.admin.client.enabled=false
+
+
#############################################################################
## MS-speccific eIDAS-Connector configuration
#proxy.context.url.prefix=
eidas.ms.context.url.request.validation=false
#proxy.configRootDir=file:/.../config/
eidas.ms.context.use.clustermode=true
-
+eidas.ms.core.logging.level.info.errorcodes=auth.21
##Monitoring
eidas.ms.monitoring.eIDASNode.metadata.url=