aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java5
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java20
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java21
-rw-r--r--id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties4
4 files changed, 31 insertions, 19 deletions
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 f4cdeddb7..55a20d558 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
@@ -388,6 +388,11 @@ public class AuthConfigurationProvider extends ConfigurationProvider {
moaidconfig = ConfigurationDBRead.getMOAIDConfiguration();
Logger.info("MOA-ID 2.0 is loaded.");
+ if (moaidconfig == null) {
+ Logger.warn("NO MOA-ID configuration found.");
+ throw new ConfigurationException("config.18", null);
+ }
+
// //TODO: only for Testing!!!
// if (MiscUtil.isNotEmpty(xmlconfigout)) {
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
index c807fdc7d..cb35e708c 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java
@@ -222,16 +222,18 @@ public class BuildFromLegacyConfig {
String[] transformsInfos = builder.loadTransformsInfos(transformsInfoFileNames);
List<TransformsInfoType> auth_transformInfos = new ArrayList<TransformsInfoType>();
-
- for (int i=0; i<transformsInfos.length; i++) {
-// for (String transformInfo : transformsInfos) {
- TransformsInfoType transforminfotype = new TransformsInfoType();
- transforminfotype.setFilename(transformsInfoFileNames[i]);
+ if (transformsInfos != null && transformsInfos.length > 0) {
+ for (int i=0; i<transformsInfos.length; i++) {
+
+ TransformsInfoType transforminfotype = new TransformsInfoType();
+ transforminfotype.setFilename(transformsInfoFileNames[i]);
- //TODO: Transformation is stored in BASE64
- transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
- auth_transformInfos.add(transforminfotype);
- }
+ transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
+ auth_transformInfos.add(transforminfotype);
+ }
+
+ }
+
SecurityLayer auth_securityLayer = new SecurityLayer();
auth_securityLayer.setTransformsInfo(auth_transformInfos);
generalAuth.setSecurityLayer(auth_securityLayer);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java
index 1dfebea03..3abc94b02 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/ConfigurationBuilder.java
@@ -28,6 +28,7 @@ import iaik.pki.pathvalidation.ChainingModes;
import iaik.utils.RFC2253NameParser;
import iaik.utils.RFC2253NameParserException;
+import java.io.IOException;
import java.math.BigInteger;
import java.net.MalformedURLException;
import java.net.URL;
@@ -409,19 +410,21 @@ public class ConfigurationBuilder {
String[] transformsInfos;
- if (MiscUtil.isNotEmpty(rootConfigFileDir_)) {
transformsInfos = new String[transformsInfoFileNames.length];
for (int i = 0; i < transformsInfoFileNames.length; i++) {
+
String fileURL = transformsInfoFileNames[i];
-
- //if fileURL is relative to rootConfigFileDir make it absolute
- fileURL = FileUtils.makeAbsoluteURL(fileURL, rootConfigFileDir_);
- String transformsInfo = FileUtils.readURL(fileURL, DEFAULT_ENCODING);
- transformsInfos[i] = transformsInfo;
+ try {
+ // if fileURL is relative to rootConfigFileDir make it absolute
+ fileURL = FileUtils.makeAbsoluteURL(fileURL, rootConfigFileDir_);
+
+ String transformsInfo = FileUtils.readURL(fileURL, DEFAULT_ENCODING);
+ transformsInfos[i] = transformsInfo;
+
+ } catch (IOException e) {
+ Logger.info("Transformation with URL " + fileURL + " can not be loaded");
+ }
}
-
- } else
- transformsInfos = new String[0];
return transformsInfos;
}
diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
index 95bcad1ec..4cfa3f83e 100644
--- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
+++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
@@ -24,7 +24,8 @@ auth.03=Fehler beim Abholen einer Datei von der URL "{0}": Interne Fehlermeldung
auth.04=Fehler beim Auslesen der Resource "{0}": {1}
auth.05=Fehlender Parameter "{1}" beim Aufruf von "{0}"
auth.06=Fehler beim Speichern der Anmeldedaten, fehlerhaftes SAML-Artifact Format (SAML-Artifact={0})
-auth.07=Aufruf von {0} muss mit Schema "https:" erfolgen. <br><b>Hinweis:</b> Bitte Dokumentation zu GenericConfiguration: "FrontendServlets.EnableHTTPConnection" beachten.
+#auth.07=Aufruf von {0} muss mit Schema "https:" erfolgen. <br><b>Hinweis:</b> Bitte Dokumentation zu GenericConfiguration: "FrontendServlets.EnableHTTPConnection" beachten.
+auth.07=Aufruf von {0} muss mit Schema "https:" erfolgen.
auth.08=In der B?rgerkartenumgebung ist ein Fehler aufgetreten\: <br>Fehlercode <i>{0}</i>\: {1}
auth.09=Zur Auswahlseite der B?rgertenumgebung (URL\={0}) konnte keine Verbindung hergestellt werden. \: <br>HTTP-Statuscode <i>{1}</i>
auth.10=Fehler beim Aufruf von "{0}": Parameter "{1}" fehlt
@@ -64,6 +65,7 @@ config.14=LoginParameterResolver-Fehler: {0}
config.15=Das Personenbindungs-Trust-Profil (TrustProfileID = {0}) darf nicht für die Verifikation anderer Infoboxen verwendet werden.
config.16=MOA ID Proxy konnte nicht gestartet werden. Das Element ConnnectionParameter im allgemeinen Konfigurationsteil der MOA-ID-PROXY Konfigurationsdatei fehlt.
config.17=Fehler beim initialisieren von Hibernate
+config.18=Keine MOA-ID 2.x Konfiguration gefunden.
parser.00=Leichter Fehler beim Parsen: {0}
parser.01=Fehler beim Parsen: {0}