From 0200aaf8a6773756406beca73630a786eaad08e4 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 24 Feb 2014 16:30:27 +0100 Subject: add error message if SL-Transformation is not found --- .../java/at/gv/egovernment/moa/id/config/ConfigurationUtils.java | 6 ++---- .../egovernment/moa/id/config/auth/AuthConfigurationProvider.java | 8 +++++++- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'id') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationUtils.java index a5ee41a9d..1a2136ebd 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationUtils.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationUtils.java @@ -44,12 +44,10 @@ public class ConfigurationUtils { list.add(encoded); } catch (UnsupportedEncodingException e) { - Logger.warn("Transformation can not be loaded. An encoding error ocurs"); - return null; + Logger.warn("Transformation can not be loaded. An encoding error ocurs", e); } catch (IOException e) { - Logger.warn("Transformation can not be loaded from database."); - return null; + Logger.warn("Transformation can not be loaded from database.", e); } } return list; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java index 1a3c1b0a1..f9a038d9f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java @@ -663,7 +663,13 @@ public class AuthConfigurationProvider extends ConfigurationProvider { Logger.warn("Error in MOA-ID Configuration. No generalAuthConfiguration->SecurityLayer found"); throw new ConfigurationException("config.02", null); } else { - TransformsInfos = ConfigurationUtils.getTransformInfos(seclayer.getTransformsInfo()); + TransformsInfos = ConfigurationUtils.getTransformInfos(seclayer.getTransformsInfo()); + + if (TransformsInfos == null || TransformsInfos.size() == 0) { + Logger.error("No Security-Layer Transformation found."); + throw new ConfigurationException("config.05", new Object[]{"Security-Layer Transformation"}); + } + } //set IdentityLinkSignerSubjectNames -- cgit v1.2.3