aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
Diffstat (limited to 'id')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java15
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java6
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java23
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources_de.properties6
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources_en.properties4
-rw-r--r--id/server/auth/src/main/webapp/WEB-INF/web.xml12
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java5
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/IDPSingleLogOutServlet.java12
8 files changed, 35 insertions, 48 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java
index e176e5141..bea6220ff 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java
@@ -85,19 +85,14 @@ public class ConfigurationProvider {
public static ConfigurationProvider getInstance() throws ConfigurationException {
if (instance == null) {
- synchronized (ConfigurationProvider.class) {
- instance = new ConfigurationProvider();
- }
+ instance = new ConfigurationProvider();
+ instance.inizialize();
}
return instance;
}
-
- private ConfigurationProvider() throws ConfigurationException {
- inizialize();
- }
-
+
private void inizialize() throws ConfigurationException {
configFileName = System.getProperty(SYSTEM_PROP_CONFIG);
@@ -143,10 +138,10 @@ public class ConfigurationProvider {
} catch (FileNotFoundException e) {
- throw new ConfigurationException("config.01", e);
+ throw new ConfigurationException("config.01", new Object[]{configFileName}, e);
} catch (IOException e) {
- throw new ConfigurationException("config.02", e);
+ throw new ConfigurationException("config.02", new Object[]{configFileName}, e);
} catch (MOADatabaseException e) {
throw new ConfigurationException("config.03", e);
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java
index ebabd600d..3aa3910cc 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/exception/ConfigurationException.java
@@ -35,7 +35,11 @@ public class ConfigurationException extends Exception {
public ConfigurationException(String errorname, Throwable e) {
super(LanguageHelper.getErrorString(errorname, null), e);
}
-
+
+ public ConfigurationException(String errorname, Object[] params, Throwable e) {
+ super(LanguageHelper.getErrorString(errorname, params, null), e);
+ }
+
public ConfigurationException(Throwable e) {
super(e);
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java
index 9ca1d08cc..1f631afea 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java
@@ -75,17 +75,6 @@ public class AuthenticationFilter implements Filter{
private static String[] excludedPages = null;
private static Pattern excludedRegEx = null;
-
-
- public AuthenticationFilter() throws ServletException {
- try {
- config = ConfigurationProvider.getInstance();
-
- } catch (ConfigurationException e) {
- throw new ServletException(AuthenticationFilter.class + ": Configuration can not be loaded!", e);
- }
- }
-
public static String getErrorPage() {
return errorPage;
}
@@ -224,9 +213,17 @@ public class AuthenticationFilter implements Filter{
}
}
- public void init(FilterConfig filterConfig) throws ServletException {
+ public void init(FilterConfig filterConfig) throws ServletException {
log.debug("Starting init of " + this.getClass().getName() + ".");
-
+
+ try {
+ config = ConfigurationProvider.getInstance();
+
+ } catch (ConfigurationException e) {
+ throw new ServletException(e.getMessage(), e);
+
+ }
+
// login page
loginPage = StringUtils.trim(filterConfig.getInitParameter(WEB_XML_INIT_PARAM_LOGIN_PAGE));
if (MiscUtil.isEmpty(loginPage)) {
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
index f379a7a34..a4e5a5d05 100644
--- a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
+++ b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
@@ -1,8 +1,8 @@
title=MOA-ID 2.x Configuration Tool
-config.01=Configfile is not found.
-config.02=Configfile is not readable.
+config.01=Configfile is not found. ({0})
+config.02=Configfile is not readable. ({0})
config.03=Hibernate Database connector can not be initialized
config.04=OpenSAML (PVP2 Login) can not be initialized
config.05=Configuration file not defined
@@ -38,7 +38,7 @@ error.oa.oauth.keystore=Keystore darf nicht leer sein und muss eine richtige URL
mail.userrequest.subject=Accountanforderung MOA-ID 2.x Konfigurationstool
-webpages.slo.error=Der Abmeldevorgang bei allen Online-Applikationen war nicht erfolgreich. Bitte schlie \u00dfen Sie aus Sicherheitsgr\u00FCnden ihren Browser.
+webpages.slo.error=Der Abmeldevorgang bei allen Online-Applikationen war nicht erfolgreich. Bitte schlie \t\u00DFen Sie aus Sicherheitsgr\u00FCnden ihren Browser.
webpages.slo.success=Sie wurden erfolgreich bei allen Online-Applikationen abgemeldet.
webpages.error.header=Es ist ein Fehler aufgetreten
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
index 398df94a5..c9f4e1eb2 100644
--- a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
+++ b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties
@@ -1,8 +1,8 @@
title=MOA-ID 2.x Configuration Tool
-config.01=Configfile is not found.
-config.02=Configfile is not readable.
+config.01=Configfile is not found. ({0})
+config.02=Configfile is not readable. ({0})
config.03=Hibernate Database connector can not be initialized
config.04=OpenSAML (PVP2 Login) can not be initialized
config.05=Configuration file is not defined
diff --git a/id/server/auth/src/main/webapp/WEB-INF/web.xml b/id/server/auth/src/main/webapp/WEB-INF/web.xml
index d60d73fd2..4efda0c79 100644
--- a/id/server/auth/src/main/webapp/WEB-INF/web.xml
+++ b/id/server/auth/src/main/webapp/WEB-INF/web.xml
@@ -94,11 +94,11 @@
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
</servlet>
- <!-- JSP servlet -->
- <servlet>
+ <!-- JSP servlet -->
+<!-- <servlet>
<servlet-name>jspservlet</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
- </servlet>
+ </servlet> -->
<servlet>
<servlet-name>PEPSConnectorServlet</servlet-name>
<display-name>PEPSConnectorServlet</display-name>
@@ -143,15 +143,15 @@
<!-- servlet mapping for jsp pages -->
<!-- errorpage.jsp (customizeable) -->
- <servlet-mapping>
+<!-- <servlet-mapping>
<servlet-name>jspservlet</servlet-name>
<url-pattern>/errorpage-auth.jsp</url-pattern>
</servlet-mapping>
- <!-- message.jsp (customizeable) used for non error messages (e.g. ConfigurationUpdate) -->
+ message.jsp (customizeable) used for non error messages (e.g. ConfigurationUpdate)
<servlet-mapping>
<servlet-name>jspservlet</servlet-name>
<url-pattern>/message-auth.jsp</url-pattern>
- </servlet-mapping>
+ </servlet-mapping> -->
<!-- <servlet-mapping>
<servlet-name>SelectBKU</servlet-name>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java
index 175aeeab7..8a5782bcf 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java
@@ -45,13 +45,9 @@
package at.gv.egovernment.moa.id.auth.servlet;
-import iaik.security.ecc.provider.ECCProvider;
-import iaik.security.provider.IAIK;
-
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.security.Security;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
@@ -60,7 +56,6 @@ import java.util.Map;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
-import javax.servlet.ServletContextEvent;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/IDPSingleLogOutServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/IDPSingleLogOutServlet.java
index 0e72f219d..778c5ef34 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/IDPSingleLogOutServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/IDPSingleLogOutServlet.java
@@ -74,8 +74,8 @@ public class IDPSingleLogOutServlet extends AuthServlet {
context.put("errorMsg",
MOAIDMessageProvider.getInstance().getMessage("slo.01", null));
- ssomanager.printSingleLogOutInfo(context, resp);
-
+ ssomanager.printSingleLogOutInfo(context, resp);
+
} catch (MOAIDException e) {
handleErrorNoRedirect(e.getMessage(), e, req, resp);
@@ -84,12 +84,8 @@ public class IDPSingleLogOutServlet extends AuthServlet {
}
- }
-
- if (MiscUtil.isNotEmpty(status)) {
- //print status information
-
-
+ return;
+
} else if (MiscUtil.isNotEmpty(ssoid)) {
if (ssomanager.isValidSSOSession(ssoid, null)) {