aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2019-02-18 08:31:36 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2019-02-18 08:31:36 +0100
commit19613c89cb1e4680af4dde6c623c42cd00c65f8a (patch)
tree4b849a5c347d9a177ad30a6f533c0488c99a9031 /id/server/idserverlib/src/main/java/at
parentffb4fc9f4ff9e1779ae4da8017fc686881a3e8ae (diff)
downloadmoa-id-spss-19613c89cb1e4680af4dde6c623c42cd00c65f8a.tar.gz
moa-id-spss-19613c89cb1e4680af4dde6c623c42cd00c65f8a.tar.bz2
moa-id-spss-19613c89cb1e4680af4dde6c623c42cd00c65f8a.zip
set UTF-8 encoding as default
add additional trace logging
Diffstat (limited to 'id/server/idserverlib/src/main/java/at')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java12
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/UniqueSessionIdentifierInterceptor.java7
2 files changed, 9 insertions, 10 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
index 66093b851..a35b45af2 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
@@ -63,10 +63,8 @@ public class MOAIDAuthInitializer {
*/
public static void initialize(GenericWebApplicationContext rootContext) throws ConfigurationException,
PKIException, IOException, GeneralSecurityException {
- Logger.setHierarchy("moa.id.auth");
- Logger.info("Default java file.encoding: "
- + System.getProperty("file.encoding"));
-
+ Logger.info("Set SystemProperty for UTF-8 file.encoding as default");
+ System.setProperty("file.encoding", "UTF-8");
//JDK bug workaround according to:
// http://jce.iaik.tugraz.at/products/03_cms/faq/index.php#JarVerifier
@@ -149,11 +147,7 @@ public class MOAIDAuthInitializer {
throw new ConfigurationException("config.10", new Object[] { e
.toString() }, e);
}
-
-
- //IAIK.addAsProvider();
- //ECCProvider.addAsProvider();
-
+
Security.insertProviderAt(IAIK.getInstance(), 0);
ECCelerate eccProvider = ECCelerate.getInstance();
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/UniqueSessionIdentifierInterceptor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/UniqueSessionIdentifierInterceptor.java
index 5aa3a691f..791aa51b7 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/UniqueSessionIdentifierInterceptor.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/UniqueSessionIdentifierInterceptor.java
@@ -38,6 +38,7 @@ import at.gv.egiz.eaaf.core.impl.utils.Random;
import at.gv.egiz.eaaf.core.impl.utils.TransactionIDUtils;
import at.gv.egovernment.moa.id.moduls.SSOManager;
import at.gv.egovernment.moa.util.MiscUtil;
+import at.gv.egovernment.moaspss.logging.Logger;
/**
* @author tlenz
@@ -58,6 +59,8 @@ public class UniqueSessionIdentifierInterceptor implements HandlerInterceptor {
String uniqueSessionIdentifier = null;
+ Logger.trace("PreProcess req. in " + UniqueSessionIdentifierInterceptor.class.getName());
+
//if SSOManager is available, search SessionIdentifier in SSO session
if (ssomanager != null) {
String ssoId = ssomanager.getSSOSessionID(request);
@@ -78,8 +81,10 @@ public class UniqueSessionIdentifierInterceptor implements HandlerInterceptor {
}
//if NO SSOSession and no PendingRequest create new SessionIdentifier
- if (StringUtils.isEmpty(uniqueSessionIdentifier))
+ if (StringUtils.isEmpty(uniqueSessionIdentifier)) {
uniqueSessionIdentifier = Random.nextHexRandom16();
+ Logger.debug("Set new UniqueSessionIdentifier: " + uniqueSessionIdentifier);
+ }
TransactionIDUtils.setSessionId(uniqueSessionIdentifier);
request.setAttribute(EAAFConstants.UNIQUESESSIONIDENTIFIER, uniqueSessionIdentifier);