aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
Diffstat (limited to 'id')
-rw-r--r--id/server/idserverlib/pom.xml33
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java6
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java99
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java5
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/OAParameter.java176
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigLoader.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfiguration.java8
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java8
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java57
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/DynamicOAAuthParameters.java8
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java1138
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java40
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/SSOManager.java20
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/utils/MOASAMLSOAPClient.java1
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MetadataSignatureFilter.java4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java1
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java14
-rw-r--r--id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml5
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java6
-rw-r--r--id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java6
-rw-r--r--id/server/moa-id-commons/pom.xml15
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java98
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationUtil.java6
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java802
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java454
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java872
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/DatabaseConfigPropertyImpl.java2
-rw-r--r--id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml5
-rw-r--r--id/server/moa-id-commons/src/main/resources/bindings.xjb4
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/moaid_config_3.0.xsd1057
-rw-r--r--id/server/moa-id-commons/src/main/resources/configuration.beans.xml_old59
-rw-r--r--id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml5
-rw-r--r--id/server/moa-id-commons/src/main/resources/persistence_template.xml24
-rw-r--r--id/server/moa-id-commons/src/test/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBReadTest.java2
-rw-r--r--id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java4
-rw-r--r--id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleLocalSignResponseTask.java7
-rw-r--r--id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleResponseWithoutSignatureTask.java7
-rw-r--r--id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java4
50 files changed, 1846 insertions, 3264 deletions
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml
index 722c41d43..9c0aea1ef 100644
--- a/id/server/idserverlib/pom.xml
+++ b/id/server/idserverlib/pom.xml
@@ -60,12 +60,12 @@
<dependency>
<groupId>MOA.id.server</groupId>
<artifactId>moa-id-commons</artifactId>
- <exclusions>
+<!-- <exclusions>
<exclusion>
<artifactId>hyperjaxb3-ejb-runtime</artifactId>
<groupId>org.jvnet.hyperjaxb3</groupId>
</exclusion>
- </exclusions>
+ </exclusions> -->
</dependency>
<dependency>
@@ -135,17 +135,7 @@
<artifactId>axis</artifactId>
</dependency>
-<!-- <dependency>
- <groupId>org.glassfish.metro</groupId>
- <artifactId>webservices-tools</artifactId>
- <version>2.3</version>
- </dependency> -->
-<!-- <dependency>
- <groupId>org.glassfish.metro</groupId>
- <artifactId>webservices-rt</artifactId>
- <version>2.3</version>
- </dependency> -->
-
+
<dependency>
<groupId>at.gv.util</groupId>
<artifactId>egovutils</artifactId>
@@ -480,20 +470,17 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
- <version>2.5.4</version>
</dependency>
<!-- databinding; ObjectMapper, JsonNode and related classes are here -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
- <version>2.5.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
- <version>2.5.4</version>
</dependency>
<dependency>
@@ -532,6 +519,20 @@
<version>${org.apache.commons.lang3.version}</version>
</dependency>
+<!-- <dependency>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>runtime</artifactId>
+ <version>0.4.1.5</version>
+ </dependency> -->
+
+<!-- <dependency>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>jaxb2-basics-runtime</artifactId>
+ <version>0.9.4</version>
+ </dependency> -->
+
+
+
<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
index 67547d8a2..0d9c1ec20 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
@@ -44,7 +44,7 @@ import at.gv.egovernment.moa.id.auth.exception.MISSimpleClientException;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.ServiceException;
import at.gv.egovernment.moa.id.client.SZRGWClientException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.commons.db.StatisticLogDBUtils;
import at.gv.egovernment.moa.id.commons.db.dao.statistic.StatisticLog;
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
@@ -212,7 +212,7 @@ public class StatisticLogger {
}
}
- ConfigurationDBUtils.closeSession();
+
try {
StatisticLogDBUtils.saveOrUpdate(dblog);
@@ -284,7 +284,7 @@ public class StatisticLogger {
generateErrorLogFormThrowable(throwable, dblog);
- ConfigurationDBUtils.closeSession();
+
try {
StatisticLogDBUtils.saveOrUpdate(dblog);
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
index d7694ac2c..91a91642d 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -1084,7 +1084,7 @@ public class AuthenticationServer extends MOAIDAuthConstants {
* BASE64</strike><br/>New id of the authenticated MOA session or {@code null} in case of mandate mode (???)
* @throws BKUException
*/
- public String verifyAuthenticationBlock(IRequest pendingReq, AuthenticationSession session,
+ public void verifyAuthenticationBlock(IRequest pendingReq, AuthenticationSession session,
String xmlCreateXMLSignatureReadResponse)
throws AuthenticationException, BuildException, ParseException,
ConfigurationException, ServiceException, ValidateException, BKUException {
@@ -1132,24 +1132,6 @@ public class AuthenticationServer extends MOAIDAuthConstants {
// invokes the call
domVsresp = new SignatureVerificationInvoker()
.verifyXMLSignature(domVsreq);
- // debug output
-
- // } catch ( ServiceException e) {
- // Logger.error("Signature verification error. ", e);
- // Logger.error("Signed Data: " + session.getAuthBlock());
- // try {
- // Logger.error("VerifyRequest: " + DOMUtils.serializeNode(domVsreq));
- // } catch (TransformerException e1) {
- // e1.printStackTrace();
- //
- // } catch (IOException e1) {
- // e1.printStackTrace();
- //
- // }
- //
- // throw e;
- // }
-
// parses the <VerifyXMLSignatureResponse>
VerifyXMLSignatureResponse vsresp = new VerifyXMLSignatureResponseParser(
@@ -1202,80 +1184,20 @@ public class AuthenticationServer extends MOAIDAuthConstants {
throw e;
}
-
- // // post processing of the infoboxes
- // Iterator iter = session.getInfoboxValidatorIterator();
- // boolean formpending = false;
- // if (iter != null) {
- // while (!formpending && iter.hasNext()) {
- // Vector infoboxValidatorVector = (Vector) iter.next();
- // String identifier = (String) infoboxValidatorVector.get(0);
- // String friendlyName = (String) infoboxValidatorVector.get(1);
- // InfoboxValidator infoboxvalidator = (InfoboxValidator) infoboxValidatorVector
- // .get(2);
- // InfoboxValidationResult infoboxValidationResult = null;
- // try {
- // infoboxValidationResult = infoboxvalidator.validate(csresp
- // .getSamlAssertion());
- // } catch (ValidateException e) {
- // Logger.error("Error validating " + identifier + " infobox:"
- // + e.getMessage());
- // throw new ValidateException("validator.44",
- // new Object[]{friendlyName});
- // }
- // if (!infoboxValidationResult.isValid()) {
- // Logger.info("Validation of " + identifier
- // + " infobox failed.");
- // throw new ValidateException("validator.40", new Object[]{
- // friendlyName,
- // infoboxValidationResult.getErrorMessage()});
- // }
- // String form = infoboxvalidator.getForm();
- // if (ParepUtils.isEmpty(form)) {
- // AddAdditionalSAMLAttributes(
- // session,
- // infoboxValidationResult.getExtendedSamlAttributes(),
- // identifier, friendlyName);
- // } else {
- // return "Redirect to Input Processor";
- // }
- // }
- // }
-
+
session.setXMLVerifySignatureResponse(vsresp);
session.setSignerCertificate(vsresp.getX509certificate());
vsresp.setX509certificate(null);
session.setForeigner(false);
+ //set QAA Level four in case of card authentifcation
+ session.setQAALevel(PVPConstants.STORK_QAA_1_4);
+
MOAReversionLogger.getInstance().logEvent(pendingReq.getOnlineApplicationConfiguration(),
pendingReq, MOAIDEventConstants.AUTHPROCESS_AUTHBLOCK_VALIDATED);
MOAReversionLogger.getInstance().logPersonalInformationEvent(pendingReq, session.getIdentityLink()
);
-
- if (session.getUseMandate()) {
- // mandate mode
- return null;
-
- } else {
-
- session.setAuthenticatedUsed(false);
- session.setAuthenticated(true);
-
- //set QAA Level four in case of card authentifcation
- session.setQAALevel(PVPConstants.STORK_QAA_1_4);
-
-
- String oldsessionID = session.getSessionID();
-
- //Session is implicte stored in changeSessionID!!!
- String newMOASessionID = AuthenticationSessionStoreage.changeSessionID(session);
-
- Logger.info("Changed MOASession " + oldsessionID + " to Session " + newMOASessionID);
- Logger.info("Daten angelegt zu MOASession " + newMOASessionID);
-
- return newMOASessionID;
- }
}
/**
@@ -1358,10 +1280,10 @@ public class AuthenticationServer extends MOAIDAuthConstants {
* @param sessionID session ID of the running authentication session
* @return String "new Session"
*/
- public String getForeignAuthenticationData(AuthenticationSession session)
+ public void getForeignAuthenticationData(AuthenticationSession session)
throws AuthenticationException, BuildException, ParseException,
ConfigurationException, ServiceException, ValidateException {
-
+
if (session == null)
throw new AuthenticationException("auth.10", new Object[]{
REQ_VERIFY_AUTH_BLOCK, PARAM_SESSIONID});
@@ -1369,17 +1291,10 @@ public class AuthenticationServer extends MOAIDAuthConstants {
X509Certificate cert = session.getSignerCertificate();
vsresp.setX509certificate(cert);
- session.setAuthenticatedUsed(false);
- session.setAuthenticated(true);
-
-
session.setXMLVerifySignatureResponse(vsresp);
session.setSignerCertificate(vsresp.getX509certificate());
vsresp.setX509certificate(null);
session.setForeigner(true);
-
- //TODO: regenerate MOASession ID!
- return "new Session";
}
/**
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
index 1a311993e..72a7d3ba1 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
@@ -127,7 +127,7 @@ public class SignatureVerificationInvoker {
VerifyXMLSignatureResponse vsresponse = svs.verifyXMLSignature(vsrequest);
Document result = new VerifyXMLSignatureResponseBuilder().build(vsresponse);
- Logger.setHierarchy("moa.id.auth");
+ //Logger.setHierarchy("moa.id.auth");
return result.getDocumentElement();
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java
index ed3089a41..0cfd16262 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java
@@ -19,7 +19,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.process.api.ExecutionContext;
import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage;
import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
@@ -95,7 +95,7 @@ public class CertificateReadRequestTask extends AbstractAuthServletTask {
throw new TaskExecutionException(e.getMessage(), e);
} finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java
index 183467d87..df3d90aab 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java
@@ -21,7 +21,7 @@ import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
import at.gv.egovernment.moa.id.auth.servlet.GenerateIFrameTemplateServlet;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.id.moduls.RequestStorage;
@@ -129,7 +129,7 @@ public class CreateIdentityLinkFormTask extends AbstractAuthServletTask {
}
finally {
- ConfigurationDBUtils.closeSession();
+
TransactionIDUtils.removeTransactionId();
TransactionIDUtils.removeSessionId();
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java
index 2931d26e2..4951dcab8 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java
@@ -24,7 +24,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.config.ConnectionParameter;
import at.gv.egovernment.moa.id.config.auth.AuthConfiguration;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
@@ -176,7 +176,7 @@ public class GetMISSessionIDTask extends AbstractAuthServletTask {
}
finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java
index fc5fb6c58..c172fc6f3 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java
@@ -13,7 +13,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.config.auth.AuthConfiguration;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
@@ -98,7 +98,7 @@ public class PrepareAuthBlockSignatureTask extends AbstractAuthServletTask {
}
finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java
index 25e0dd37f..6a30e40c1 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java
@@ -28,7 +28,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.id.config.ConnectionParameter;
import at.gv.egovernment.moa.id.config.auth.AuthConfiguration;
@@ -147,7 +147,7 @@ public class VerifyAuthenticationBlockTask extends AbstractAuthServletTask {
finally {
- ConfigurationDBUtils.closeSession();
+
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java
index 26c10399d..5e0be0f2c 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java
@@ -22,7 +22,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.id.moduls.RequestStorage;
@@ -166,7 +166,7 @@ public class VerifyCertificateTask extends AbstractAuthServletTask {
finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java
index 821bb572a..f0a0024e5 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java
@@ -19,7 +19,7 @@ import at.gv.egovernment.moa.id.auth.exception.ParseException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.moduls.IRequest;
import at.gv.egovernment.moa.id.moduls.RequestStorage;
import at.gv.egovernment.moa.id.process.api.ExecutionContext;
@@ -104,7 +104,7 @@ public class VerifyIdentityLinkTask extends AbstractAuthServletTask {
}
finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java
index 1d4b442da..a840b34e2 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GenerateIFrameTemplateServlet.java
@@ -40,8 +40,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.registration.ModuleRegistration;
import at.gv.egovernment.moa.id.auth.parser.StartAuthentificationParameterParser;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TemplateType;
+
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
@@ -207,7 +206,7 @@ public class GenerateIFrameTemplateServlet extends AuthServlet {
}
finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java
index 77675175e..c1e084a59 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/LogOutServlet.java
@@ -53,7 +53,7 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
import at.gv.egovernment.moa.id.moduls.AuthenticationManager;
@@ -122,7 +122,7 @@ public class LogOutServlet extends AuthServlet {
return;
} finally {
- ConfigurationDBUtils.closeSession();
+
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java
index 431a7e0f7..7dd8645c6 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletResponse;
import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
import at.gv.egovernment.moa.id.auth.builder.RedirectFormBuilder;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
import at.gv.egovernment.moa.id.moduls.SSOManager;
@@ -135,7 +135,7 @@ public class RedirectServlet extends AuthServlet{
return;
} finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/OAParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/OAParameter.java
deleted file mode 100644
index e9019ded4..000000000
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/OAParameter.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright 2014 Federal Chancellery Austria
- * MOA-ID has been developed in a cooperation between BRZ, the Federal
- * Chancellery Austria - ICT staff unit, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://www.osor.eu/eupl/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- *
- * This product combines work with different licenses. See the "NOTICE" text
- * file for details on the various modules and licenses.
- * The "NOTICE" text file is part of the distribution. Any derivative works
- * that you distribute must include a readable copy of the "NOTICE" text file.
- ******************************************************************************/
-/*
- * Copyright 2003 Federal Chancellery Austria MOA-ID has been developed in a cooperation between
- * BRZ, the Federal Chancellery Austria - ICT staff unit, and Graz University of Technology.
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by the European
- * Commission - subsequent versions of the EUPL (the "Licence"); You may not use this work except in
- * compliance with the Licence. You may obtain a copy of the Licence at: http://www.osor.eu/eupl/
- * Unless required by applicable law or agreed to in writing, software distributed under the Licence
- * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the Licence for the specific language governing permissions and limitations under
- * the Licence. This product combines work with different licenses. See the "NOTICE" text file for
- * details on the various modules and licenses. The "NOTICE" text file is part of the distribution.
- * Any derivative works that you distribute must include a readable copy of the "NOTICE" text file.
- */
-
-package at.gv.egovernment.moa.id.config;
-
-import java.io.Serializable;
-
-import at.gv.egovernment.moa.id.commons.db.dao.config.OAOAUTH20;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
-
-/**
- * Configuration parameters belonging to an online application, to be used within both, the MOA ID
- * Auth and the MOA ID PROXY component.
- *
- * @author Harald Bratko
- */
-public class OAParameter implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- public OAParameter() { }
-
- public OAParameter(OnlineApplication oa) {
-
- this.oaType = oa.getType();
-
- if (this.oaType.equals("businessService"))
- this.businessService = true;
- else
- this.businessService = false;
-
- this.publicURLPrefix = oa.getPublicURLPrefix();
-
- this.friendlyName = oa.getFriendlyName();
-
- this.target = oa.getTarget();
-
- this.targetFriendlyName = oa.getTargetFriendlyName();
-
- this.removePBKFromAuthblock = oa.isRemoveBPKFromAuthBlock();
-
- this.oAuth20Config = oa.getAuthComponentOA().getOAOAUTH20();
-
- this.isInderfederationIDP = oa.isIsInterfederationIDP();
-
- this.isSTORKPVPGateway = oa.isIsInterfederationGateway();
-
- }
-
- /**
- * type of the online application (maybe "PublicService" or "BusinessService")
- */
- private String oaType;
-
- /**
- * specifies whether the online application is a business application or not (<code>true</code>
- * if value of {@link #oaType} is "businessService"
- */
- protected boolean businessService;
-
-
- /**
- * public URL prefix of the online application
- */
- protected String publicURLPrefix;
-
- /**
- * specifies a human readable name of the Online Application
- */
- protected String friendlyName;
-
- /**
- * specified a specific target for the Online Application (overwrites the target in der request)
- */
- protected String target;
- /**
- * specifies a friendly name for the target
- */
- protected String targetFriendlyName;
-
- protected boolean removePBKFromAuthblock;
-
- protected Boolean isInderfederationIDP;
-
- protected Boolean isSTORKPVPGateway;
-
- /**
- * Contains the oAuth 2.0 configuration (client id, secret and redirect uri)
- */
- private OAOAUTH20 oAuth20Config;
-
- public String getOaType() {
- return oaType;
- }
-
- public boolean getBusinessService() {
- return businessService;
- }
-
- public String getPublicURLPrefix() {
- return publicURLPrefix;
- }
-
- public String getFriendlyName() {
- return friendlyName;
- }
-
- public String getTarget() {
- return target;
- }
-
- public String getTargetFriendlyName() {
- return targetFriendlyName;
- }
-
- public boolean isRemovePBKFromAuthBlock() {
- return removePBKFromAuthblock;
- }
-
- public OAOAUTH20 getoAuth20Config() {
- return oAuth20Config;
- }
-
- /**
- * @return the isInderfederationIDP
- */
- public boolean isInderfederationIDP() {
- if (isInderfederationIDP == null)
- return false;
-
- return isInderfederationIDP;
- }
-
- public boolean isSTORKPVPGateway() {
- if (isSTORKPVPGateway == null)
- return false;
-
- return isSTORKPVPGateway;
- }
-
-
-
-}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigLoader.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigLoader.java
index 87e40c1b3..1f43a0d8a 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigLoader.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigLoader.java
@@ -22,7 +22,7 @@
*******************************************************************************/
package at.gv.egovernment.moa.id.config.auth;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.protocols.pvp2x.metadata.MOAMetadataProvider;
import at.gv.egovernment.moa.logging.Logger;
@@ -43,7 +43,7 @@ public class AuthConfigLoader implements Runnable {
Logger.warn("MOA-ID Configuration validation is not possible, actually. Reuse old configuration.", e);
} finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfiguration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfiguration.java
index 4f321764a..ebe08b615 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfiguration.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfiguration.java
@@ -4,8 +4,6 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
-import at.gv.egovernment.moa.id.commons.db.dao.config.PVP2;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TimeOuts;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.ConfigurationProvider;
import at.gv.egovernment.moa.id.config.ConnectionParameter;
@@ -23,16 +21,10 @@ public interface AuthConfiguration extends ConfigurationProvider{
public ProtocolAllowed getAllowedProtocols();
- @Deprecated
- public PVP2 getGeneralPVP2DBConfig();
-
public Map<String, String> getConfigurationWithPrefix(final String Prefix);
public String getConfigurationWithKey(final String key);
- @Deprecated
- public TimeOuts getTimeOuts() throws ConfigurationException;
-
public int getTransactionTimeOut();
public int getSSOCreatedTimeOut();
public int getSSOUpdatedTimeOut();
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 03f4a300a..c25751aa4 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
@@ -70,7 +70,7 @@
//import at.gv.egovernment.moa.id.auth.modules.internal.tasks.GetMISSessionIDTask;
//import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants;
//import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead;
-//import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+//
//import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils;
//import at.gv.egovernment.moa.id.commons.db.StatisticLogDBUtils;
//import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral;
@@ -791,7 +791,7 @@
// }
//
// //close Database
-// // ConfigurationDBUtils.closeSession();
+// //
//
// date = new Date();
// }
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java
index d3292b021..963d1f50e 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java
@@ -47,6 +47,7 @@
package at.gv.egovernment.moa.id.config.auth;
import java.io.IOException;
+import java.io.Serializable;
import java.security.PrivateKey;
import java.util.ArrayList;
import java.util.Collection;
@@ -85,8 +86,13 @@ import at.gv.egovernment.moa.util.MiscUtil;
*
* @author Thomas Lenz
*/
-public class OAAuthParameter implements IOAAuthParameters {
+public class OAAuthParameter implements IOAAuthParameters, Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6522544229837934376L;
+
final public static String DEFAULT_KEYBOXIDENTIFIER = "SecureSignatureKeypair";
private Map<String, String> oaConfiguration;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
index f706bb376..a151d6dbe 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java
@@ -24,8 +24,6 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants;
import at.gv.egovernment.moa.id.commons.config.persistence.MOAIDConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.PVP2;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TimeOuts;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.ConfigurationProviderImpl;
import at.gv.egovernment.moa.id.config.ConfigurationUtils;
@@ -231,19 +229,6 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
}
-
-
- /**
- * Returns the general PVP2 configuration. NOTE: may return {@code null}.
- *
- * @return the general PVP2 configuration or {@code null}.
- *
- * @deprecated
- */
- public PVP2 getGeneralPVP2DBConfig() {
- return null;
- }
-
/* (non-Javadoc)
* @see at.gv.egovernment.moa.id.config.auth.AuthConfiguration#getTransactionTimeOut()
@@ -290,48 +275,6 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide
}
}
-
- /**
- * Returns the configured timeouts, or a default timeout.
- *
- * @return the configured timeout, or the default (never {@code null}).
- * @throws ConfigurationException is thrown in case of missing {@link AuthComponentGeneral}.
- *
- * @deprecated
- */
- public TimeOuts getTimeOuts() throws ConfigurationException {
-
- TimeOuts timeouts = new TimeOuts();
-
- // set default timeouts
- timeouts.setAssertion(new BigInteger("300"));
- timeouts.setMOASessionCreated(new BigInteger("2700"));
- timeouts.setMOASessionUpdated(new BigInteger("1200"));
-
-// AuthComponentGeneral authComponentGeneral = getAuthComponentGeneral();
-// // search timeouts in config
-// GeneralConfiguration generalConfiguration = authComponentGeneral.getGeneralConfiguration();
-// if (generalConfiguration != null) {
-// if (generalConfiguration.getTimeOuts() != null) {
-// if (generalConfiguration.getTimeOuts().getAssertion() != null) {
-// timeouts.setAssertion(generalConfiguration.getTimeOuts().getAssertion());
-// }
-//
-// if (generalConfiguration.getTimeOuts().getMOASessionCreated() != null) {
-// timeouts.setMOASessionCreated(generalConfiguration.getTimeOuts().getMOASessionCreated());
-// }
-//
-// if (generalConfiguration.getTimeOuts().getMOASessionUpdated() != null) {
-// timeouts.setMOASessionUpdated(generalConfiguration.getTimeOuts().getMOASessionUpdated());
-// }
-//
-// } else {
-// Logger.info("No TimeOuts defined. Use default values");
-// }
-// }
- return timeouts;
- }
-
/**
* Returns an alternative source ID. NOTE: may return {@code null}.
*
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/DynamicOAAuthParameters.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/DynamicOAAuthParameters.java
index 44f4da027..e59ac827b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/DynamicOAAuthParameters.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/DynamicOAAuthParameters.java
@@ -22,6 +22,7 @@
*/
package at.gv.egovernment.moa.id.config.auth.data;
+import java.io.Serializable;
import java.security.PrivateKey;
import java.util.Collection;
import java.util.List;
@@ -35,8 +36,13 @@ import at.gv.egovernment.moa.id.config.stork.StorkAttributeProviderPlugin;
* @author tlenz
*
*/
-public class DynamicOAAuthParameters implements IOAAuthParameters {
+public class DynamicOAAuthParameters implements IOAAuthParameters, Serializable{
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1648437815185614566L;
+
private String publicURLPrefix;
private String businessTarget;
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 54156330f..887a7e40f 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
@@ -1,570 +1,570 @@
-/*******************************************************************************
- * Copyright 2014 Federal Chancellery Austria
- * MOA-ID has been developed in a cooperation between BRZ, the Federal
- * Chancellery Austria - ICT staff unit, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://www.osor.eu/eupl/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- *
- * This product combines work with different licenses. See the "NOTICE" text
- * file for details on the various modules and licenses.
- * The "NOTICE" text file is part of the distribution. Any derivative works
- * that you distribute must include a readable copy of the "NOTICE" text file.
- *******************************************************************************/
-package at.gv.egovernment.moa.id.config.legacy;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.net.URI;
-import java.nio.file.Path;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.w3c.dom.Element;
-
-import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral;
-import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA;
-import at.gv.egovernment.moa.id.commons.db.dao.config.BKUURLS;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModeType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ConnectionParameterClientAuthType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.Contact;
-import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ForeignIdentities;
-import at.gv.egovernment.moa.id.commons.db.dao.config.GeneralConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber;
-import at.gv.egovernment.moa.id.commons.db.dao.config.IdentityLinkSigners;
-import at.gv.egovernment.moa.id.commons.db.dao.config.LegacyAllowed;
-import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.MOAKeyBoxSelector;
-import at.gv.egovernment.moa.id.commons.db.dao.config.MOASP;
-import at.gv.egovernment.moa.id.commons.db.dao.config.Mandates;
-import at.gv.egovernment.moa.id.commons.db.dao.config.MandatesProfileNameItem;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OAPVP2;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OASAML1;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OASSO;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OAuth;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineMandates;
-import at.gv.egovernment.moa.id.commons.db.dao.config.Organization;
-import at.gv.egovernment.moa.id.commons.db.dao.config.PVP2;
-import at.gv.egovernment.moa.id.commons.db.dao.config.Protocols;
-import at.gv.egovernment.moa.id.commons.db.dao.config.SAML1;
-import at.gv.egovernment.moa.id.commons.db.dao.config.SLRequestTemplates;
-import at.gv.egovernment.moa.id.commons.db.dao.config.SSO;
-import at.gv.egovernment.moa.id.commons.db.dao.config.SecurityLayer;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TemplateType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TimeOuts;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TransformsInfoType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TrustAnchor;
-import at.gv.egovernment.moa.id.commons.db.dao.config.VerifyAuthBlock;
-import at.gv.egovernment.moa.id.commons.db.dao.config.VerifyIdentityLink;
-import at.gv.egovernment.moa.id.config.ConfigurationException;
-import at.gv.egovernment.moa.id.config.ConfigurationProvider;
-
-import at.gv.egovernment.moa.id.data.IssuerAndSerial;
-import at.gv.egovernment.moa.logging.Logger;
-import at.gv.egovernment.moa.util.Base64Utils;
-import at.gv.egovernment.moa.util.DOMUtils;
-import at.gv.egovernment.moa.util.FileUtils;
-import at.gv.egovernment.moa.util.MiscUtil;
-
-public class BuildFromLegacyConfig {
-
- private static final String GENERIC_CONFIG_PARAM_SOURCEID = "AuthenticationServer.SourceID";
-
- private static final String SEARCHBKUTEMPLATE_LOCAL = "https://127.0.0.1:3496/";
- private static final String SEARCHBKUTEMPLATE_HANDY = "https://www.handy-signatur.at";
- private static final String SEARCHBKUTEMPLATE_ONLINE = "bkuonline/http-security-layer-request";
-
- public static final String AUTH_SESSION_TIMEOUT_PROPERTY =
- "AuthenticationSession.TimeOut";
- /**
- * The name of the generic configuration property giving the authentication data time out.
- */
- public static final String AUTH_DATA_TIMEOUT_PROPERTY =
- "AuthenticationData.TimeOut";
-
-
- public static MOAIDConfiguration build(File fileName, String rootConfigFileDir, MOAIDConfiguration oldconfig) throws ConfigurationException {
- InputStream stream = null;
- Element configElem;
- ConfigurationBuilder builder;
-
- Logger.info("Load Legacy-Configuration from file=" + fileName);
-
- try {
- // load the main config file
- stream = new BufferedInputStream(new FileInputStream(fileName));
- configElem = DOMUtils.parseXmlValidating(stream);
-
- } catch (Throwable t) {
- throw new ConfigurationException("config.03", null, t);
- }
-
- finally {
- try {
- if (stream != null) {
- stream.close();
- }
- } catch (IOException e) {
-
- }
- }
-
- try {
- String oldbkuonline = "";
- String oldbkulocal = "";
- String oldbkuhandy = "";
-
- // build the internal datastructures
- builder = new ConfigurationBuilder(configElem, rootConfigFileDir);
-
-
- MOAIDConfiguration moaIDConfig = new MOAIDConfiguration();
-
- AuthComponentGeneral generalAuth = new AuthComponentGeneral();
- moaIDConfig.setAuthComponentGeneral(generalAuth);
-
-
- //not supported by MOA-ID 2.0
- //ConnectionParameter bKUConnectionParameter = builder.buildAuthBKUConnectionParameter();
- //bKUSelectable = (bKUConnectionParameter!=null);
- //bKUSelectionType = builder.buildAuthBKUSelectionType();
-
-
- //Load generic Config
- Map<String, String> genericConfiguration = builder.buildGenericConfiguration();
- GeneralConfiguration authGeneral = new GeneralConfiguration();
-
- if (genericConfiguration.containsKey(ConfigurationProvider.TRUST_MANAGER_REVOCATION_CHECKING))
- authGeneral.setTrustManagerRevocationChecking(
- Boolean.valueOf((String)genericConfiguration.get(ConfigurationProvider.TRUST_MANAGER_REVOCATION_CHECKING)));
- else
- authGeneral.setTrustManagerRevocationChecking(true);
-
- if (genericConfiguration.containsKey(ConfigurationProvider.DIRECTORY_CERTSTORE_PARAMETER_PROPERTY))
- authGeneral.setCertStoreDirectory(
- (String)genericConfiguration.get(ConfigurationProvider.DIRECTORY_CERTSTORE_PARAMETER_PROPERTY));
- else
- authGeneral.setTrustManagerRevocationChecking(true);
-
-
- //Load Assertion and Session timeouts
- TimeOuts timeOuts = new TimeOuts();
- if (genericConfiguration.containsKey(AUTH_DATA_TIMEOUT_PROPERTY))
- timeOuts.setAssertion(BigInteger.valueOf(Long.valueOf((String)genericConfiguration.get(AUTH_DATA_TIMEOUT_PROPERTY))));
- else
- timeOuts.setAssertion(BigInteger.valueOf(2*60)); //default 2min
-
- if (genericConfiguration.containsKey(AUTH_SESSION_TIMEOUT_PROPERTY))
- timeOuts.setAssertion(BigInteger.valueOf(Long.valueOf((String)genericConfiguration.get(AUTH_SESSION_TIMEOUT_PROPERTY))));
- else
- timeOuts.setAssertion(BigInteger.valueOf(30*60)); //default 30min
-
- timeOuts.setMOASessionUpdated(BigInteger.valueOf(15*60)); //default 15min
- authGeneral.setTimeOuts(timeOuts);
- generalAuth.setGeneralConfiguration(authGeneral);
-
- Protocols auth_protocols = new Protocols();
- generalAuth.setProtocols(auth_protocols);
-
- LegacyAllowed prot_legacy = new LegacyAllowed();
- auth_protocols.setLegacyAllowed(prot_legacy);
- final List<String> PROTOCOLS_LEGACY_ALLOWED = Arrays.asList("id_saml1","id_pvp2x");
- prot_legacy.setProtocolName(PROTOCOLS_LEGACY_ALLOWED);
-
- //set SAML1 config
- SAML1 saml1 = new SAML1();
- saml1.setIsActive(true);
- if (genericConfiguration.containsKey(GENERIC_CONFIG_PARAM_SOURCEID))
- saml1.setSourceID((String)genericConfiguration.get(GENERIC_CONFIG_PARAM_SOURCEID));
- auth_protocols.setSAML1(saml1);
-
- //set OAuth config
- OAuth oauth = new OAuth();
- oauth.setIsActive(true);
- auth_protocols.setOAuth(oauth);
-
- //set PVP2.1 config
- PVP2 prot_pvp2 = new PVP2();
- auth_protocols.setPVP2(prot_pvp2);
- prot_pvp2.setPublicURLPrefix("https://....");
- prot_pvp2.setIssuerName("MOA-ID 2.x IDP");
-
- Organization pvp2_org = new Organization();
- prot_pvp2.setOrganization(pvp2_org);
- pvp2_org.setDisplayName("OrganisationDisplayName");
- pvp2_org.setName("OrganisatioName");
- pvp2_org.setURL("http://testorganisation.at");
-
- List<Contact> pvp2_contacts = new ArrayList<Contact>();
- prot_pvp2.setContact(pvp2_contacts);
-
- Contact pvp2_contact = new Contact();
- pvp2_contact.setCompany("OrganisationDisplayName");
- pvp2_contact.setGivenName("Max");
-
-
- List<String> mails = new ArrayList<String>();
- pvp2_contact.setMail(mails);
- mails.add("max@muster.mann");
-
- List<String> phones = new ArrayList<String>();
- pvp2_contact.setPhone(phones);
- phones.add("01 5555 5555");
-
- pvp2_contact.setSurName("Mustermann");
- pvp2_contact.setType("technical");
- pvp2_contacts.add(pvp2_contact);
-
- //SSO
- SSO auth_sso = new SSO();
- generalAuth.setSSO(auth_sso);
- auth_sso.setTarget("");
- auth_sso.setFriendlyName("");
-
-
- //set SecurityLayer Transformations
- String[] transformsInfoFileNames = builder.buildTransformsInfoFileNames(builder.getConfigElem(), ConfigurationBuilder.AUTH_SECLAYER_TRANSFORMS_INFO_FILENAME_XPATH);
- String[] transformsInfos = builder.loadTransformsInfos(transformsInfoFileNames);
-
- List<TransformsInfoType> auth_transformInfos = new ArrayList<TransformsInfoType>();
- if (transformsInfos != null && transformsInfos.length > 0) {
- for (int i=0; i<transformsInfos.length; i++) {
-
- TransformsInfoType transforminfotype = new TransformsInfoType();
-
- if (transformsInfoFileNames[i] != null &&
- transformsInfos[i] != null) {
- String fileURL = FileUtils.makeAbsoluteURL(transformsInfoFileNames[i], rootConfigFileDir);
- Path fileName_ = new File(new URI(fileURL)).toPath().getFileName();
- transforminfotype.setFilename(fileName_.toString());
-
- transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
- auth_transformInfos.add(transforminfotype);
-
- } else
- Logger.warn("AuthBlock Transformation " + transformsInfoFileNames[i]
- + "not found.");
- }
-
- }
-
- SecurityLayer auth_securityLayer = new SecurityLayer();
- auth_securityLayer.setTransformsInfo(auth_transformInfos);
- generalAuth.setSecurityLayer(auth_securityLayer);
-
-
- //set MOASP configuration
- MOASP auth_moaSP = new MOASP();
- generalAuth.setMOASP(auth_moaSP);
-
- //set MOASP connection
- ConnectionParameter moaSpConnectionParameter = builder.buildMoaSpConnectionParameter();
- if (moaSpConnectionParameter != null) {
- ConnectionParameterClientAuthType auth_moaSP_connection =
- parseConnectionParameterClientAuth(moaSpConnectionParameter);
- auth_moaSP.setConnectionParameter(auth_moaSP_connection);
- }
-
- //set VerifyIdentityLink
- String moaSpIdentityLinkTrustProfileID = builder.getMoaSpIdentityLinkTrustProfileID();
- VerifyIdentityLink auth_moaSP_verifyIdentityLink = new VerifyIdentityLink();
- auth_moaSP_verifyIdentityLink.setTrustProfileID(moaSpIdentityLinkTrustProfileID);
- auth_moaSP.setVerifyIdentityLink(auth_moaSP_verifyIdentityLink);
-
- //set VerifyAuthBlock
- String moaSpAuthBlockTrustProfileID = builder.getMoaSpAuthBlockTrustProfileID();
- VerifyAuthBlock auth_moaSP_verifyAuthBlock = new VerifyAuthBlock();
- auth_moaSP_verifyAuthBlock.setTrustProfileID(moaSpAuthBlockTrustProfileID);
- String[] moaSpAuthBlockVerifyTransformsInfoIDs = builder.buildMoaSpAuthBlockVerifyTransformsInfoIDs();
- List<String> transformlist = new ArrayList<String>();
- Collections.addAll(transformlist, moaSpAuthBlockVerifyTransformsInfoIDs);
- auth_moaSP_verifyAuthBlock.setVerifyTransformsInfoProfileID(transformlist);
- auth_moaSP.setVerifyAuthBlock(auth_moaSP_verifyAuthBlock);
-
-
- //set IdentityLinkSigners
- IdentityLinkSigners auth_idsigners = new IdentityLinkSigners();
- generalAuth.setIdentityLinkSigners(auth_idsigners);
- List<String> identityLinkX509SubjectNames = builder.getIdentityLink_X509SubjectNames();
- auth_idsigners.setX509SubjectName(identityLinkX509SubjectNames);
-
-
- //not supported by MOA-ID 2.0
- VerifyInfoboxParameters defaultVerifyInfoboxParameters = null;
-// Node defaultVerifyInfoboxParamtersElem = XPathUtils.selectSingleNode(configElem, ConfigurationBuilder.AUTH_VERIFY_INFOBOXES_XPATH);
-// if (defaultVerifyInfoboxParamtersElem != null) {
-// defaultVerifyInfoboxParameters =
-// builder.buildVerifyInfoboxParameters((Element)defaultVerifyInfoboxParamtersElem, null, moaSpIdentityLinkTrustProfileID);
+///*******************************************************************************
+// * Copyright 2014 Federal Chancellery Austria
+// * MOA-ID has been developed in a cooperation between BRZ, the Federal
+// * Chancellery Austria - ICT staff unit, and Graz University of Technology.
+// *
+// * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+// * the European Commission - subsequent versions of the EUPL (the "Licence");
+// * You may not use this work except in compliance with the Licence.
+// * You may obtain a copy of the Licence at:
+// * http://www.osor.eu/eupl/
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the Licence is distributed on an "AS IS" basis,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the Licence for the specific language governing permissions and
+// * limitations under the Licence.
+// *
+// * This product combines work with different licenses. See the "NOTICE" text
+// * file for details on the various modules and licenses.
+// * The "NOTICE" text file is part of the distribution. Any derivative works
+// * that you distribute must include a readable copy of the "NOTICE" text file.
+// *******************************************************************************/
+//package at.gv.egovernment.moa.id.config.legacy;
+//
+//import java.io.BufferedInputStream;
+//import java.io.File;
+//import java.io.FileInputStream;
+//import java.io.IOException;
+//import java.io.InputStream;
+//import java.math.BigInteger;
+//import java.net.URI;
+//import java.nio.file.Path;
+//import java.util.ArrayList;
+//import java.util.Arrays;
+//import java.util.Collections;
+//import java.util.List;
+//import java.util.Map;
+//import java.util.Properties;
+//import java.util.Set;
+//
+//import org.w3c.dom.Element;
+//
+//import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.BKUURLS;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModeType;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.ConnectionParameterClientAuthType;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.Contact;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.ForeignIdentities;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.GeneralConfiguration;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.IdentityLinkSigners;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.LegacyAllowed;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.MOAKeyBoxSelector;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.MOASP;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.Mandates;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.MandatesProfileNameItem;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.OAPVP2;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.OASAML1;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.OASSO;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.OAuth;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineMandates;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.Organization;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.PVP2;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.Protocols;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.SAML1;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.SLRequestTemplates;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.SSO;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.SecurityLayer;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.TemplateType;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.TimeOuts;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.TransformsInfoType;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.TrustAnchor;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.VerifyAuthBlock;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.VerifyIdentityLink;
+//import at.gv.egovernment.moa.id.config.ConfigurationException;
+//import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+//
+//import at.gv.egovernment.moa.id.data.IssuerAndSerial;
+//import at.gv.egovernment.moa.logging.Logger;
+//import at.gv.egovernment.moa.util.Base64Utils;
+//import at.gv.egovernment.moa.util.DOMUtils;
+//import at.gv.egovernment.moa.util.FileUtils;
+//import at.gv.egovernment.moa.util.MiscUtil;
+//
+//public class BuildFromLegacyConfig {
+//
+// private static final String GENERIC_CONFIG_PARAM_SOURCEID = "AuthenticationServer.SourceID";
+//
+// private static final String SEARCHBKUTEMPLATE_LOCAL = "https://127.0.0.1:3496/";
+// private static final String SEARCHBKUTEMPLATE_HANDY = "https://www.handy-signatur.at";
+// private static final String SEARCHBKUTEMPLATE_ONLINE = "bkuonline/http-security-layer-request";
+//
+// public static final String AUTH_SESSION_TIMEOUT_PROPERTY =
+// "AuthenticationSession.TimeOut";
+// /**
+// * The name of the generic configuration property giving the authentication data time out.
+// */
+// public static final String AUTH_DATA_TIMEOUT_PROPERTY =
+// "AuthenticationData.TimeOut";
+//
+//
+// public static MOAIDConfiguration build(File fileName, String rootConfigFileDir, MOAIDConfiguration oldconfig) throws ConfigurationException {
+// InputStream stream = null;
+// Element configElem;
+// ConfigurationBuilder builder;
+//
+// Logger.info("Load Legacy-Configuration from file=" + fileName);
+//
+// try {
+// // load the main config file
+// stream = new BufferedInputStream(new FileInputStream(fileName));
+// configElem = DOMUtils.parseXmlValidating(stream);
+//
+// } catch (Throwable t) {
+// throw new ConfigurationException("config.03", null, t);
+// }
+//
+// finally {
+// try {
+// if (stream != null) {
+// stream.close();
+// }
+// } catch (IOException e) {
+//
+// }
+// }
+//
+// try {
+// String oldbkuonline = "";
+// String oldbkulocal = "";
+// String oldbkuhandy = "";
+//
+// // build the internal datastructures
+// builder = new ConfigurationBuilder(configElem, rootConfigFileDir);
+//
+//
+// MOAIDConfiguration moaIDConfig = new MOAIDConfiguration();
+//
+// AuthComponentGeneral generalAuth = new AuthComponentGeneral();
+// moaIDConfig.setAuthComponentGeneral(generalAuth);
+//
+//
+// //not supported by MOA-ID 2.0
+// //ConnectionParameter bKUConnectionParameter = builder.buildAuthBKUConnectionParameter();
+// //bKUSelectable = (bKUConnectionParameter!=null);
+// //bKUSelectionType = builder.buildAuthBKUSelectionType();
+//
+//
+// //Load generic Config
+// Map<String, String> genericConfiguration = builder.buildGenericConfiguration();
+// GeneralConfiguration authGeneral = new GeneralConfiguration();
+//
+// if (genericConfiguration.containsKey(ConfigurationProvider.TRUST_MANAGER_REVOCATION_CHECKING))
+// authGeneral.setTrustManagerRevocationChecking(
+// Boolean.valueOf((String)genericConfiguration.get(ConfigurationProvider.TRUST_MANAGER_REVOCATION_CHECKING)));
+// else
+// authGeneral.setTrustManagerRevocationChecking(true);
+//
+// if (genericConfiguration.containsKey(ConfigurationProvider.DIRECTORY_CERTSTORE_PARAMETER_PROPERTY))
+// authGeneral.setCertStoreDirectory(
+// (String)genericConfiguration.get(ConfigurationProvider.DIRECTORY_CERTSTORE_PARAMETER_PROPERTY));
+// else
+// authGeneral.setTrustManagerRevocationChecking(true);
+//
+//
+// //Load Assertion and Session timeouts
+// TimeOuts timeOuts = new TimeOuts();
+// if (genericConfiguration.containsKey(AUTH_DATA_TIMEOUT_PROPERTY))
+// timeOuts.setAssertion(BigInteger.valueOf(Long.valueOf((String)genericConfiguration.get(AUTH_DATA_TIMEOUT_PROPERTY))));
+// else
+// timeOuts.setAssertion(BigInteger.valueOf(2*60)); //default 2min
+//
+// if (genericConfiguration.containsKey(AUTH_SESSION_TIMEOUT_PROPERTY))
+// timeOuts.setAssertion(BigInteger.valueOf(Long.valueOf((String)genericConfiguration.get(AUTH_SESSION_TIMEOUT_PROPERTY))));
+// else
+// timeOuts.setAssertion(BigInteger.valueOf(30*60)); //default 30min
+//
+// timeOuts.setMOASessionUpdated(BigInteger.valueOf(15*60)); //default 15min
+// authGeneral.setTimeOuts(timeOuts);
+// generalAuth.setGeneralConfiguration(authGeneral);
+//
+// Protocols auth_protocols = new Protocols();
+// generalAuth.setProtocols(auth_protocols);
+//
+// LegacyAllowed prot_legacy = new LegacyAllowed();
+// auth_protocols.setLegacyAllowed(prot_legacy);
+// final List<String> PROTOCOLS_LEGACY_ALLOWED = Arrays.asList("id_saml1","id_pvp2x");
+// prot_legacy.setProtocolName(PROTOCOLS_LEGACY_ALLOWED);
+//
+// //set SAML1 config
+// SAML1 saml1 = new SAML1();
+// saml1.setIsActive(true);
+// if (genericConfiguration.containsKey(GENERIC_CONFIG_PARAM_SOURCEID))
+// saml1.setSourceID((String)genericConfiguration.get(GENERIC_CONFIG_PARAM_SOURCEID));
+// auth_protocols.setSAML1(saml1);
+//
+// //set OAuth config
+// OAuth oauth = new OAuth();
+// oauth.setIsActive(true);
+// auth_protocols.setOAuth(oauth);
+//
+// //set PVP2.1 config
+// PVP2 prot_pvp2 = new PVP2();
+// auth_protocols.setPVP2(prot_pvp2);
+// prot_pvp2.setPublicURLPrefix("https://....");
+// prot_pvp2.setIssuerName("MOA-ID 2.x IDP");
+//
+// Organization pvp2_org = new Organization();
+// prot_pvp2.setOrganization(pvp2_org);
+// pvp2_org.setDisplayName("OrganisationDisplayName");
+// pvp2_org.setName("OrganisatioName");
+// pvp2_org.setURL("http://testorganisation.at");
+//
+// List<Contact> pvp2_contacts = new ArrayList<Contact>();
+// prot_pvp2.setContact(pvp2_contacts);
+//
+// Contact pvp2_contact = new Contact();
+// pvp2_contact.setCompany("OrganisationDisplayName");
+// pvp2_contact.setGivenName("Max");
+//
+//
+// List<String> mails = new ArrayList<String>();
+// pvp2_contact.setMail(mails);
+// mails.add("max@muster.mann");
+//
+// List<String> phones = new ArrayList<String>();
+// pvp2_contact.setPhone(phones);
+// phones.add("01 5555 5555");
+//
+// pvp2_contact.setSurName("Mustermann");
+// pvp2_contact.setType("technical");
+// pvp2_contacts.add(pvp2_contact);
+//
+// //SSO
+// SSO auth_sso = new SSO();
+// generalAuth.setSSO(auth_sso);
+// auth_sso.setTarget("");
+// auth_sso.setFriendlyName("");
+//
+//
+// //set SecurityLayer Transformations
+// String[] transformsInfoFileNames = builder.buildTransformsInfoFileNames(builder.getConfigElem(), ConfigurationBuilder.AUTH_SECLAYER_TRANSFORMS_INFO_FILENAME_XPATH);
+// String[] transformsInfos = builder.loadTransformsInfos(transformsInfoFileNames);
+//
+// List<TransformsInfoType> auth_transformInfos = new ArrayList<TransformsInfoType>();
+// if (transformsInfos != null && transformsInfos.length > 0) {
+// for (int i=0; i<transformsInfos.length; i++) {
+//
+// TransformsInfoType transforminfotype = new TransformsInfoType();
+//
+// if (transformsInfoFileNames[i] != null &&
+// transformsInfos[i] != null) {
+// String fileURL = FileUtils.makeAbsoluteURL(transformsInfoFileNames[i], rootConfigFileDir);
+// Path fileName_ = new File(new URI(fileURL)).toPath().getFileName();
+// transforminfotype.setFilename(fileName_.toString());
+//
+// transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
+// auth_transformInfos.add(transforminfotype);
+//
+// } else
+// Logger.warn("AuthBlock Transformation " + transformsInfoFileNames[i]
+// + "not found.");
+// }
+//
+// }
+//
+// SecurityLayer auth_securityLayer = new SecurityLayer();
+// auth_securityLayer.setTransformsInfo(auth_transformInfos);
+// generalAuth.setSecurityLayer(auth_securityLayer);
+//
+//
+// //set MOASP configuration
+// MOASP auth_moaSP = new MOASP();
+// generalAuth.setMOASP(auth_moaSP);
+//
+// //set MOASP connection
+// ConnectionParameter moaSpConnectionParameter = builder.buildMoaSpConnectionParameter();
+// if (moaSpConnectionParameter != null) {
+// ConnectionParameterClientAuthType auth_moaSP_connection =
+// parseConnectionParameterClientAuth(moaSpConnectionParameter);
+// auth_moaSP.setConnectionParameter(auth_moaSP_connection);
+// }
+//
+// //set VerifyIdentityLink
+// String moaSpIdentityLinkTrustProfileID = builder.getMoaSpIdentityLinkTrustProfileID();
+// VerifyIdentityLink auth_moaSP_verifyIdentityLink = new VerifyIdentityLink();
+// auth_moaSP_verifyIdentityLink.setTrustProfileID(moaSpIdentityLinkTrustProfileID);
+// auth_moaSP.setVerifyIdentityLink(auth_moaSP_verifyIdentityLink);
+//
+// //set VerifyAuthBlock
+// String moaSpAuthBlockTrustProfileID = builder.getMoaSpAuthBlockTrustProfileID();
+// VerifyAuthBlock auth_moaSP_verifyAuthBlock = new VerifyAuthBlock();
+// auth_moaSP_verifyAuthBlock.setTrustProfileID(moaSpAuthBlockTrustProfileID);
+// String[] moaSpAuthBlockVerifyTransformsInfoIDs = builder.buildMoaSpAuthBlockVerifyTransformsInfoIDs();
+// List<String> transformlist = new ArrayList<String>();
+// Collections.addAll(transformlist, moaSpAuthBlockVerifyTransformsInfoIDs);
+// auth_moaSP_verifyAuthBlock.setVerifyTransformsInfoProfileID(transformlist);
+// auth_moaSP.setVerifyAuthBlock(auth_moaSP_verifyAuthBlock);
+//
+//
+// //set IdentityLinkSigners
+// IdentityLinkSigners auth_idsigners = new IdentityLinkSigners();
+// generalAuth.setIdentityLinkSigners(auth_idsigners);
+// List<String> identityLinkX509SubjectNames = builder.getIdentityLink_X509SubjectNames();
+// auth_idsigners.setX509SubjectName(identityLinkX509SubjectNames);
+//
+//
+// //not supported by MOA-ID 2.0
+// VerifyInfoboxParameters defaultVerifyInfoboxParameters = null;
+//// Node defaultVerifyInfoboxParamtersElem = XPathUtils.selectSingleNode(configElem, ConfigurationBuilder.AUTH_VERIFY_INFOBOXES_XPATH);
+//// if (defaultVerifyInfoboxParamtersElem != null) {
+//// defaultVerifyInfoboxParameters =
+//// builder.buildVerifyInfoboxParameters((Element)defaultVerifyInfoboxParamtersElem, null, moaSpIdentityLinkTrustProfileID);
+//// }
+//
+//
+// //Set ForeignIdentities
+// ForeignIdentities auth_foreign = new ForeignIdentities();
+// generalAuth.setForeignIdentities(auth_foreign);
+//
+// //set Connection parameters
+// ConnectionParameter foreignIDConnectionParameter = builder.buildForeignIDConnectionParameter();
+// ConnectionParameterClientAuthType auth_foreign_connection =
+// parseConnectionParameterClientAuth(foreignIDConnectionParameter);
+// auth_foreign.setConnectionParameter(auth_foreign_connection);
+//
+// //set OnlineMandates config
+// ConnectionParameter onlineMandatesConnectionParameter = builder.buildOnlineMandatesConnectionParameter();
+// if (onlineMandatesConnectionParameter != null) {
+// OnlineMandates auth_mandates = new OnlineMandates();
+// generalAuth.setOnlineMandates(auth_mandates);
+// auth_mandates.setConnectionParameter(
+// parseConnectionParameterClientAuth(onlineMandatesConnectionParameter));
// }
-
-
- //Set ForeignIdentities
- ForeignIdentities auth_foreign = new ForeignIdentities();
- generalAuth.setForeignIdentities(auth_foreign);
-
- //set Connection parameters
- ConnectionParameter foreignIDConnectionParameter = builder.buildForeignIDConnectionParameter();
- ConnectionParameterClientAuthType auth_foreign_connection =
- parseConnectionParameterClientAuth(foreignIDConnectionParameter);
- auth_foreign.setConnectionParameter(auth_foreign_connection);
-
- //set OnlineMandates config
- ConnectionParameter onlineMandatesConnectionParameter = builder.buildOnlineMandatesConnectionParameter();
- if (onlineMandatesConnectionParameter != null) {
- OnlineMandates auth_mandates = new OnlineMandates();
- generalAuth.setOnlineMandates(auth_mandates);
- auth_mandates.setConnectionParameter(
- parseConnectionParameterClientAuth(onlineMandatesConnectionParameter));
- }
-
-
- //TODO: add auth template configuration!!!
-
-
- if (oldconfig != null) {
- if (oldconfig.getDefaultBKUs() != null) {
- oldbkuhandy = oldconfig.getDefaultBKUs().getHandyBKU();
- oldbkulocal = oldconfig.getDefaultBKUs().getLocalBKU();
- oldbkuonline = oldconfig.getDefaultBKUs().getOnlineBKU();
- }
- } else {
- List<String> trustbkus = builder.getTrustedBKUs();
- for (String trustbku : trustbkus) {
- if (MiscUtil.isEmpty(oldbkuonline) && trustbku.endsWith(SEARCHBKUTEMPLATE_ONLINE))
- oldbkuonline = trustbku;
-
- if (MiscUtil.isEmpty(oldbkuhandy) && trustbku.startsWith(SEARCHBKUTEMPLATE_HANDY))
- oldbkuhandy = trustbku;
-
- if (MiscUtil.isEmpty(oldbkulocal) && trustbku.startsWith(SEARCHBKUTEMPLATE_LOCAL))
- oldbkulocal = trustbku;
- }
-
- }
-
-
- //set OnlineApplications
- OAAuthParameter[] onlineApplicationAuthParameters = builder.buildOnlineApplicationAuthParameters(defaultVerifyInfoboxParameters, moaSpIdentityLinkTrustProfileID);
-
- ArrayList<OnlineApplication> moa_oas = new ArrayList<OnlineApplication>();
- moaIDConfig.setOnlineApplication(moa_oas);
-
- for (OAAuthParameter oa : onlineApplicationAuthParameters) {
- OnlineApplication moa_oa = new OnlineApplication();
-
- //set general OA configuration
- moa_oa.setCalculateHPI(false); //TODO: Bernd fragen warum das nicht direkt über den Bereichsidentifyer definert wird
- moa_oa.setFriendlyName(oa.getFriendlyName());
- moa_oa.setKeyBoxIdentifier(MOAKeyBoxSelector.fromValue(oa.getKeyBoxIdentifier()));
- moa_oa.setPublicURLPrefix(oa.getPublicURLPrefix());
- moa_oa.setTarget(oa.getTarget());
- moa_oa.setTargetFriendlyName(oa.getTargetFriendlyName());
- moa_oa.setType(oa.getOaType());
- moa_oa.setIsActive(true);
-
-
- AuthComponentOA oa_auth = new AuthComponentOA();
- moa_oa.setAuthComponentOA(oa_auth);
-
- //SLLayer Version / useIframe
-// oa_auth.setSlVersion(oa.getSlVersion());
-// oa_auth.setUseIFrame(false);
-// oa_auth.setUseUTC(oa.getUseUTC());
-
- //BKUURLs
- BKUURLS bkuurls = new BKUURLS();
- bkuurls.setOnlineBKU(oldbkuonline);
- bkuurls.setHandyBKU(oldbkuhandy);
- bkuurls.setLocalBKU(oldbkulocal);
- oa_auth.setBKUURLS(bkuurls);
-
- //IdentificationNumber
- IdentificationNumber idnumber = new IdentificationNumber();
- idnumber.setValue(oa.getIdentityLinkDomainIdentifier());
- idnumber.setType(oa.getIdentityLinkDomainIdentifierType());
- oa_auth.setIdentificationNumber(idnumber);
-
- //set Templates
- TemplatesType templates = new TemplatesType();
- oa_auth.setTemplates(templates);
- templates.setAditionalAuthBlockText("");
- TemplateType template = new TemplateType();
- template.setURL(oa.getTemplateURL());
- ArrayList<TemplateType> template_list = new ArrayList<TemplateType>();
- template_list.add(template);
- templates.setTemplate(template_list);
-
-
- //TransformsInfo not supported by MOAID 2.0
- String[] transforminfos = oa.getTransformsInfos();
- for (String e1 : transforminfos) {
- if (MiscUtil.isNotEmpty(e1)) {
- Logger.warn("OA specific transformation for OA " + oa.getPublicURLPrefix()
- + " are not supported. USE AdditionalAuthBlock text!");
- }
- }
-
- //VerifyInfoBoxes not supported by MOAID 2.0
-
- //set Mandates
- Mandates oa_mandates = new Mandates();
- oa_auth.setMandates(oa_mandates);
- List<MandatesProfileNameItem> profileList = new ArrayList<MandatesProfileNameItem>();
-
- String oldProfiles = oa.getMandateProfiles();
- if (MiscUtil.isNotEmpty(oldProfiles)) {
- String[] oldprofileList = oldProfiles.split(",");
- for (int i=0; i<oldprofileList.length; i++) {
- MandatesProfileNameItem item = new MandatesProfileNameItem();
- item.setItem(oldprofileList[i].trim());
- profileList.add(item);
- }
- oa_mandates.setProfileNameItems(profileList );
- }
-
- //STORK
- //TODO: OA specific STORK config is deactivated in MOA 1.5.2
-
- //SSO
- OASSO oa_sso = new OASSO();
- oa_auth.setOASSO(oa_sso);
- oa_sso.setUseSSO(true);
- oa_sso.setSingleLogOutURL("");
- oa_sso.setAuthDataFrame(true);
-
- //OA_SAML1
- OASAML1 oa_saml1 = new OASAML1();
- oa_auth.setOASAML1(oa_saml1);
- oa_saml1.setConditionLength(BigInteger.valueOf(oa.getConditionLength()));
- oa_saml1.setProvideAUTHBlock(oa.getProvideAuthBlock());
- oa_saml1.setProvideCertificate(oa.getProvideCertifcate());
- oa_saml1.setProvideFullMandatorData(oa.getProvideFullMandatorData());
- oa_saml1.setProvideIdentityLink(oa.getProvideIdentityLink());
- oa_saml1.setProvideStammzahl(oa.getProvideStammzahl());
- oa_saml1.setUseCondition(oa.getUseCondition());
- oa_saml1.setIsActive(true);
- oa_saml1.setProvideAllErrors(false);
-
- //OA_PVP2
- OAPVP2 oa_pvp2 = new OAPVP2();
- oa_auth.setOAPVP2(oa_pvp2);
-
- moa_oas.add(moa_oa);
- //ConfigurationDBUtils.save(moa_oa);
- }
-
- //removed from MOAID 2.0 config
- //identityLinkX509SubjectNames = builder.getIdentityLink_X509SubjectNames();
-
-
- //set chaining modes
- ChainingModes moa_chainingModes = new ChainingModes();
- moaIDConfig.setChainingModes(moa_chainingModes);
-
-
-
- String defaultmode = builder.getDefaultChainingMode();
- ChainingModeType type;
- if (defaultmode.equals(iaik.pki.pathvalidation.ChainingModes.CHAIN_MODE))
- type = ChainingModeType.CHAINING;
- else
- type = ChainingModeType.PKIX;
-
-
- moa_chainingModes.setSystemDefaultMode(type);
-
- Map<IssuerAndSerial, String> chainingModes = builder.buildChainingModes();
- List<TrustAnchor> chaining_anchor = new ArrayList<TrustAnchor>();
- Set<IssuerAndSerial> chaining_anchor_map = chainingModes.keySet();
- for (IssuerAndSerial e1 : chaining_anchor_map) {
- TrustAnchor trustanchor = new TrustAnchor();
-
- ChainingModeType type1 = ChainingModeType.fromValue(chainingModes.get(e1));
- trustanchor.setMode(type1);
-
- trustanchor.setX509IssuerName(e1.getIssuerDN());
- trustanchor.setX509SerialNumber(e1.getSerial());
- chaining_anchor.add(trustanchor);
- }
- moa_chainingModes.setTrustAnchor(chaining_anchor);
-
-
- //set trustedCACertificate path
- moaIDConfig.setTrustedCACertificates(builder.getTrustedCACertificates());
-
-
- //Not required in MOAID 2.0 config (DefaultBKUs & SLRequestTemplates)
- //trustedBKUs = builder.getTrustedBKUs();
- //trustedTemplateURLs = builder.getTrustedTemplateURLs();
-
-
- //set DefaultBKUs
- DefaultBKUs moa_defaultbkus = new DefaultBKUs();
- moaIDConfig.setDefaultBKUs(moa_defaultbkus);
- moa_defaultbkus.setOnlineBKU(oldbkuonline);
- moa_defaultbkus.setHandyBKU(oldbkuhandy);
- moa_defaultbkus.setLocalBKU(oldbkulocal);
-
-
- //set SLRequest Templates
- SLRequestTemplates moa_slrequesttemp = new SLRequestTemplates();
- moaIDConfig.setSLRequestTemplates(moa_slrequesttemp);
- moa_slrequesttemp.setOnlineBKU("http://localhost:8080/moa-id-auth/template_onlineBKU.html");
- moa_slrequesttemp.setHandyBKU("http://localhost:8080/moa-id-auth/template_handyBKU.html");
- moa_slrequesttemp.setLocalBKU("http://127.0.0.1:8080/moa-id-auth/template_localBKU.html");
-
- return moaIDConfig;
-
- } catch (Throwable t) {
- throw new ConfigurationException("config.02", null, t);
- }
- }
-
- private static ConnectionParameterClientAuthType parseConnectionParameterClientAuth(
- ConnectionParameter old) {
- ConnectionParameterClientAuthType auth_moaSP_connection = new ConnectionParameterClientAuthType();
- auth_moaSP_connection.setURL(old.getUrl());
-
- //TODO: remove from Database config!!!!!
-// auth_moaSP_connection.setAcceptedServerCertificates(old.getAcceptedServerCertificates());
-// ClientKeyStore auth_moaSP_connection_keyStore = new ClientKeyStore();
-// auth_moaSP_connection_keyStore.setValue(old.getClientKeyStore());
-// auth_moaSP_connection_keyStore.setPassword(old.getClientKeyStorePassword());
-// auth_moaSP_connection.setClientKeyStore(auth_moaSP_connection_keyStore);
- return auth_moaSP_connection;
- }
-
- private static Properties getGeneralPVP2ProperiesConfig(Properties props) {
- Properties configProp = new Properties();
- for (Object key : props.keySet()) {
- String propPrefix = "protocols.pvp2.";
- if (key.toString().startsWith(propPrefix)) {
- String propertyName = key.toString().substring(propPrefix.length());
- configProp.put(propertyName, props.get(key.toString()));
- }
- }
- return configProp;
- }
-}
+//
+//
+// //TODO: add auth template configuration!!!
+//
+//
+// if (oldconfig != null) {
+// if (oldconfig.getDefaultBKUs() != null) {
+// oldbkuhandy = oldconfig.getDefaultBKUs().getHandyBKU();
+// oldbkulocal = oldconfig.getDefaultBKUs().getLocalBKU();
+// oldbkuonline = oldconfig.getDefaultBKUs().getOnlineBKU();
+// }
+// } else {
+// List<String> trustbkus = builder.getTrustedBKUs();
+// for (String trustbku : trustbkus) {
+// if (MiscUtil.isEmpty(oldbkuonline) && trustbku.endsWith(SEARCHBKUTEMPLATE_ONLINE))
+// oldbkuonline = trustbku;
+//
+// if (MiscUtil.isEmpty(oldbkuhandy) && trustbku.startsWith(SEARCHBKUTEMPLATE_HANDY))
+// oldbkuhandy = trustbku;
+//
+// if (MiscUtil.isEmpty(oldbkulocal) && trustbku.startsWith(SEARCHBKUTEMPLATE_LOCAL))
+// oldbkulocal = trustbku;
+// }
+//
+// }
+//
+//
+// //set OnlineApplications
+// OAAuthParameter[] onlineApplicationAuthParameters = builder.buildOnlineApplicationAuthParameters(defaultVerifyInfoboxParameters, moaSpIdentityLinkTrustProfileID);
+//
+// ArrayList<OnlineApplication> moa_oas = new ArrayList<OnlineApplication>();
+// moaIDConfig.setOnlineApplication(moa_oas);
+//
+// for (OAAuthParameter oa : onlineApplicationAuthParameters) {
+// OnlineApplication moa_oa = new OnlineApplication();
+//
+// //set general OA configuration
+// moa_oa.setCalculateHPI(false); //TODO: Bernd fragen warum das nicht direkt über den Bereichsidentifyer definert wird
+// moa_oa.setFriendlyName(oa.getFriendlyName());
+// moa_oa.setKeyBoxIdentifier(MOAKeyBoxSelector.fromValue(oa.getKeyBoxIdentifier()));
+// moa_oa.setPublicURLPrefix(oa.getPublicURLPrefix());
+// moa_oa.setTarget(oa.getTarget());
+// moa_oa.setTargetFriendlyName(oa.getTargetFriendlyName());
+// moa_oa.setType(oa.getOaType());
+// moa_oa.setIsActive(true);
+//
+//
+// AuthComponentOA oa_auth = new AuthComponentOA();
+// moa_oa.setAuthComponentOA(oa_auth);
+//
+// //SLLayer Version / useIframe
+//// oa_auth.setSlVersion(oa.getSlVersion());
+//// oa_auth.setUseIFrame(false);
+//// oa_auth.setUseUTC(oa.getUseUTC());
+//
+// //BKUURLs
+// BKUURLS bkuurls = new BKUURLS();
+// bkuurls.setOnlineBKU(oldbkuonline);
+// bkuurls.setHandyBKU(oldbkuhandy);
+// bkuurls.setLocalBKU(oldbkulocal);
+// oa_auth.setBKUURLS(bkuurls);
+//
+// //IdentificationNumber
+// IdentificationNumber idnumber = new IdentificationNumber();
+// idnumber.setValue(oa.getIdentityLinkDomainIdentifier());
+// idnumber.setType(oa.getIdentityLinkDomainIdentifierType());
+// oa_auth.setIdentificationNumber(idnumber);
+//
+// //set Templates
+// TemplatesType templates = new TemplatesType();
+// oa_auth.setTemplates(templates);
+// templates.setAditionalAuthBlockText("");
+// TemplateType template = new TemplateType();
+// template.setURL(oa.getTemplateURL());
+// ArrayList<TemplateType> template_list = new ArrayList<TemplateType>();
+// template_list.add(template);
+// templates.setTemplate(template_list);
+//
+//
+// //TransformsInfo not supported by MOAID 2.0
+// String[] transforminfos = oa.getTransformsInfos();
+// for (String e1 : transforminfos) {
+// if (MiscUtil.isNotEmpty(e1)) {
+// Logger.warn("OA specific transformation for OA " + oa.getPublicURLPrefix()
+// + " are not supported. USE AdditionalAuthBlock text!");
+// }
+// }
+//
+// //VerifyInfoBoxes not supported by MOAID 2.0
+//
+// //set Mandates
+// Mandates oa_mandates = new Mandates();
+// oa_auth.setMandates(oa_mandates);
+// List<MandatesProfileNameItem> profileList = new ArrayList<MandatesProfileNameItem>();
+//
+// String oldProfiles = oa.getMandateProfiles();
+// if (MiscUtil.isNotEmpty(oldProfiles)) {
+// String[] oldprofileList = oldProfiles.split(",");
+// for (int i=0; i<oldprofileList.length; i++) {
+// MandatesProfileNameItem item = new MandatesProfileNameItem();
+// item.setItem(oldprofileList[i].trim());
+// profileList.add(item);
+// }
+// oa_mandates.setProfileNameItems(profileList );
+// }
+//
+// //STORK
+// //TODO: OA specific STORK config is deactivated in MOA 1.5.2
+//
+// //SSO
+// OASSO oa_sso = new OASSO();
+// oa_auth.setOASSO(oa_sso);
+// oa_sso.setUseSSO(true);
+// oa_sso.setSingleLogOutURL("");
+// oa_sso.setAuthDataFrame(true);
+//
+// //OA_SAML1
+// OASAML1 oa_saml1 = new OASAML1();
+// oa_auth.setOASAML1(oa_saml1);
+// oa_saml1.setConditionLength(BigInteger.valueOf(oa.getConditionLength()));
+// oa_saml1.setProvideAUTHBlock(oa.getProvideAuthBlock());
+// oa_saml1.setProvideCertificate(oa.getProvideCertifcate());
+// oa_saml1.setProvideFullMandatorData(oa.getProvideFullMandatorData());
+// oa_saml1.setProvideIdentityLink(oa.getProvideIdentityLink());
+// oa_saml1.setProvideStammzahl(oa.getProvideStammzahl());
+// oa_saml1.setUseCondition(oa.getUseCondition());
+// oa_saml1.setIsActive(true);
+// oa_saml1.setProvideAllErrors(false);
+//
+// //OA_PVP2
+// OAPVP2 oa_pvp2 = new OAPVP2();
+// oa_auth.setOAPVP2(oa_pvp2);
+//
+// moa_oas.add(moa_oa);
+// //ConfigurationDBUtils.save(moa_oa);
+// }
+//
+// //removed from MOAID 2.0 config
+// //identityLinkX509SubjectNames = builder.getIdentityLink_X509SubjectNames();
+//
+//
+// //set chaining modes
+// ChainingModes moa_chainingModes = new ChainingModes();
+// moaIDConfig.setChainingModes(moa_chainingModes);
+//
+//
+//
+// String defaultmode = builder.getDefaultChainingMode();
+// ChainingModeType type;
+// if (defaultmode.equals(iaik.pki.pathvalidation.ChainingModes.CHAIN_MODE))
+// type = ChainingModeType.CHAINING;
+// else
+// type = ChainingModeType.PKIX;
+//
+//
+// moa_chainingModes.setSystemDefaultMode(type);
+//
+// Map<IssuerAndSerial, String> chainingModes = builder.buildChainingModes();
+// List<TrustAnchor> chaining_anchor = new ArrayList<TrustAnchor>();
+// Set<IssuerAndSerial> chaining_anchor_map = chainingModes.keySet();
+// for (IssuerAndSerial e1 : chaining_anchor_map) {
+// TrustAnchor trustanchor = new TrustAnchor();
+//
+// ChainingModeType type1 = ChainingModeType.fromValue(chainingModes.get(e1));
+// trustanchor.setMode(type1);
+//
+// trustanchor.setX509IssuerName(e1.getIssuerDN());
+// trustanchor.setX509SerialNumber(e1.getSerial());
+// chaining_anchor.add(trustanchor);
+// }
+// moa_chainingModes.setTrustAnchor(chaining_anchor);
+//
+//
+// //set trustedCACertificate path
+// moaIDConfig.setTrustedCACertificates(builder.getTrustedCACertificates());
+//
+//
+// //Not required in MOAID 2.0 config (DefaultBKUs & SLRequestTemplates)
+// //trustedBKUs = builder.getTrustedBKUs();
+// //trustedTemplateURLs = builder.getTrustedTemplateURLs();
+//
+//
+// //set DefaultBKUs
+// DefaultBKUs moa_defaultbkus = new DefaultBKUs();
+// moaIDConfig.setDefaultBKUs(moa_defaultbkus);
+// moa_defaultbkus.setOnlineBKU(oldbkuonline);
+// moa_defaultbkus.setHandyBKU(oldbkuhandy);
+// moa_defaultbkus.setLocalBKU(oldbkulocal);
+//
+//
+// //set SLRequest Templates
+// SLRequestTemplates moa_slrequesttemp = new SLRequestTemplates();
+// moaIDConfig.setSLRequestTemplates(moa_slrequesttemp);
+// moa_slrequesttemp.setOnlineBKU("http://localhost:8080/moa-id-auth/template_onlineBKU.html");
+// moa_slrequesttemp.setHandyBKU("http://localhost:8080/moa-id-auth/template_handyBKU.html");
+// moa_slrequesttemp.setLocalBKU("http://127.0.0.1:8080/moa-id-auth/template_localBKU.html");
+//
+// return moaIDConfig;
+//
+// } catch (Throwable t) {
+// throw new ConfigurationException("config.02", null, t);
+// }
+// }
+//
+// private static ConnectionParameterClientAuthType parseConnectionParameterClientAuth(
+// ConnectionParameter old) {
+// ConnectionParameterClientAuthType auth_moaSP_connection = new ConnectionParameterClientAuthType();
+// auth_moaSP_connection.setURL(old.getUrl());
+//
+// //TODO: remove from Database config!!!!!
+//// auth_moaSP_connection.setAcceptedServerCertificates(old.getAcceptedServerCertificates());
+//// ClientKeyStore auth_moaSP_connection_keyStore = new ClientKeyStore();
+//// auth_moaSP_connection_keyStore.setValue(old.getClientKeyStore());
+//// auth_moaSP_connection_keyStore.setPassword(old.getClientKeyStorePassword());
+//// auth_moaSP_connection.setClientKeyStore(auth_moaSP_connection_keyStore);
+// return auth_moaSP_connection;
+// }
+//
+// private static Properties getGeneralPVP2ProperiesConfig(Properties props) {
+// Properties configProp = new Properties();
+// for (Object key : props.keySet()) {
+// String propPrefix = "protocols.pvp2.";
+// if (key.toString().startsWith(propPrefix)) {
+// String propertyName = key.toString().substring(propPrefix.length());
+// configProp.put(propertyName, props.get(key.toString()));
+// }
+// }
+// return configProp;
+// }
+//}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java
index 0b45bb461..59b3a632a 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/entrypoints/DispatcherServlet.java
@@ -30,6 +30,8 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants;
+import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger;
import at.gv.egovernment.moa.id.advancedlogging.StatisticLogger;
import at.gv.egovernment.moa.id.advancedlogging.TransactionIDUtils;
@@ -43,7 +45,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.ProtocolNotActiveException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.servlet.AuthServlet;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
import at.gv.egovernment.moa.id.data.IAuthData;
@@ -132,6 +134,7 @@ public class DispatcherServlet extends AuthServlet{
if (errorRequest != null) {
RequestStorage.removePendingRequest(pendingRequestID);
+ MOAReversionLogger.getInstance().logEvent(errorRequest, MOAIDEventConstants.TRANSACTION_ERROR);
try {
IModulInfo handlingModule = ModulStorage
@@ -247,6 +250,7 @@ public class DispatcherServlet extends AuthServlet{
String ssoId = ssomanager.getSSOSessionID(req);
IRequest protocolRequest = null;
+ String uniqueSessionIdentifier = null;
try {
Object idObject = req.getParameter(PARAM_TARGET_PENDINGREQUESTID);
@@ -268,6 +272,22 @@ public class DispatcherServlet extends AuthServlet{
}
} else {
try {
+
+ //load unique session identifier with SSO-sessionID
+ uniqueSessionIdentifier = ssomanager.getUniqueSessionIdentifier(ssoId);
+ if (MiscUtil.isEmpty(uniqueSessionIdentifier))
+ uniqueSessionIdentifier = Random.nextRandom();
+ TransactionIDUtils.setSessionId(uniqueSessionIdentifier);
+
+ //set transactionID to Logger
+ protocolRequestID = Random.nextRandom();
+ TransactionIDUtils.setTransactionId(protocolRequestID);
+
+ //log information for security and process reversion
+ MOAReversionLogger.getInstance().logEvent(MOAIDEventConstants.SESSION_CREATED, uniqueSessionIdentifier);
+ MOAReversionLogger.getInstance().logEvent(MOAIDEventConstants.TRANSACTION_CREATED, protocolRequestID);
+ MOAReversionLogger.getInstance().logEvent(uniqueSessionIdentifier, protocolRequestID, MOAIDEventConstants.SESSION_IP, req.getRemoteAddr());
+
protocolRequest = info.preProcess(req, resp, action);
//request is a valid interfederation response
@@ -394,6 +414,9 @@ public class DispatcherServlet extends AuthServlet{
Logger.warn("Request sends an old SSO Session ID("+ssoId+")! " +
"Invalidate the corresponding MOASession with ID="+ correspondingMOASession);
+ MOAReversionLogger.getInstance().logEvent(protocolRequest.getOnlineApplicationConfiguration(),
+ protocolRequest, MOAIDEventConstants.AUTHPROCESS_SSO_INVALID);
+
AuthenticationSessionStoreage.destroySession(correspondingMOASession);
ssomanager.deleteSSOSessionID(req, resp);
}
@@ -424,6 +447,10 @@ public class DispatcherServlet extends AuthServlet{
boolean tryperform = authmanager.tryPerformAuthentication(
req, resp);
+ if (tryperform)
+ MOAReversionLogger.getInstance().logEvent(protocolRequest.getOnlineApplicationConfiguration(),
+ protocolRequest, MOAIDEventConstants.AUTHPROCESS_FINISHED);
+
if (protocolRequest.forceAuth()) {
if (!tryperform) {
authmanager.doAuthentication(req, resp,
@@ -452,6 +479,9 @@ public class DispatcherServlet extends AuthServlet{
if (useSSOOA && isValidSSOSession) {
+ MOAReversionLogger.getInstance().logEvent(protocolRequest.getOnlineApplicationConfiguration(),
+ protocolRequest, MOAIDEventConstants.AUTHPROCESS_SSO);
+
moasessionID = ssomanager.getMOASession(ssoId);
moasession = AuthenticationSessionStoreage.getSession(moasessionID);
@@ -535,6 +565,9 @@ public class DispatcherServlet extends AuthServlet{
}
+ //log transaction_destroy to reversionslog
+ MOAReversionLogger.getInstance().logEvent(MOAIDEventConstants.TRANSACTION_DESTROYED, protocolRequestID);
+
} catch (WrongParametersException ex) {
handleWrongParameters(ex, req, resp);
@@ -547,7 +580,10 @@ public class DispatcherServlet extends AuthServlet{
}
finally {
- ConfigurationDBUtils.closeSession();
+
+
+ TransactionIDUtils.removeTransactionId();
+ TransactionIDUtils.removeSessionId();
}
Logger.info("Clossing Dispatcher processing loop");
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/SSOManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/SSOManager.java
index 5fc1f3c4d..3fd99f6fc 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/SSOManager.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/SSOManager.java
@@ -42,11 +42,13 @@ import org.hibernate.Query;
import org.hibernate.Session;
import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionExtensions;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils;
import at.gv.egovernment.moa.id.commons.db.dao.session.AuthenticatedSessionStore;
import at.gv.egovernment.moa.id.commons.db.dao.session.InterfederationSessionStore;
import at.gv.egovernment.moa.id.commons.db.dao.session.OldSSOSessionIDStore;
+import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage;
@@ -176,6 +178,24 @@ public class SSOManager {
}
+ public String getUniqueSessionIdentifier(String ssoSessionID) {
+ try {
+ if (MiscUtil.isNotEmpty(ssoSessionID)) {
+ String moaSessionID = AuthenticationSessionStoreage.getMOASessionSSOID(ssoSessionID);
+ if (MiscUtil.isNotEmpty(moaSessionID)) {
+ AuthenticationSessionExtensions extSessionInformation = AuthenticationSessionStoreage.getAuthenticationSessionExtensions(moaSessionID);
+ return extSessionInformation.getUniqueSessionId();
+
+ }
+ }
+ } catch (MOADatabaseException e) {
+ Logger.debug("No SSO Session with SSO sessionID: " + ssoSessionID);
+ }
+
+ return null;
+ }
+
+
public String existsOldSSOSession(String ssoId) {
Logger.trace("Check that the SSOID has already been used");
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/utils/MOASAMLSOAPClient.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/utils/MOASAMLSOAPClient.java
index 2915ff683..4d12c38da 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/utils/MOASAMLSOAPClient.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/utils/MOASAMLSOAPClient.java
@@ -35,7 +35,6 @@ import org.opensaml.xml.XMLObject;
import org.opensaml.xml.parse.BasicParserPool;
import org.opensaml.xml.security.SecurityException;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModeType;
import at.gv.egovernment.moa.id.commons.ex.MOAHttpProtocolSocketFactoryException;
import at.gv.egovernment.moa.id.commons.utils.MOAHttpProtocolSocketFactory;
import at.gv.egovernment.moa.id.config.ConfigurationException;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MetadataSignatureFilter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MetadataSignatureFilter.java
index 6dac4bba1..149874ce0 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MetadataSignatureFilter.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MetadataSignatureFilter.java
@@ -37,7 +37,7 @@ import org.opensaml.xml.XMLObject;
import org.opensaml.xml.security.x509.BasicX509Credential;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.NoCredentialsException;
import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.filter.SignatureValidationException;
import at.gv.egovernment.moa.id.protocols.pvp2x.verification.EntityVerifier;
@@ -151,7 +151,7 @@ public class MetadataSignatureFilter implements MetadataFilter {
throw new MOAIDException("Invalid Metadata file Root element is no EntitiesDescriptor", null);
}
- ConfigurationDBUtils.closeSession();
+
Logger.info("Metadata signature policy check done OK");
} catch (MOAIDException e) {
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
index de1924ba1..8c34d4806 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
@@ -23,7 +23,6 @@
package at.gv.egovernment.moa.id.protocols.stork2;
import at.gv.egovernment.moa.id.commons.MOAIDConstants;
-import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin;
import at.gv.egovernment.moa.id.config.stork.StorkAttributeProviderPlugin;
import at.gv.egovernment.moa.id.protocols.stork2.attributeproviders.AttributeProvider;
import at.gv.egovernment.moa.id.protocols.stork2.attributeproviders.EHvdAttributeProviderPlugin;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java
index 30c59af6d..bde0f362d 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/ConsentEvaluator.java
@@ -91,7 +91,7 @@ public class ConsentEvaluator implements IAction {
}
//TODO: CHECK: req.getOAURL() should return the unique OA identifier
- OAAuthParameter oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(req.getOAURL());
+ OAAuthParameter oaParam = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(req.getOAURL());
if (oaParam == null)
throw new AuthenticationException("stork.12", new Object[]{req.getOAURL()});
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java
index ea0062620..def89d0d9 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/attributeproviders/SignedDocAttributeRequestProvider.java
@@ -31,29 +31,24 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.Properties;
import javax.activation.DataSource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.namespace.QName;
import javax.xml.transform.Source;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.stream.StreamSource;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.BindingProvider;
import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.AttributeStatusType;
-import org.apache.commons.codec.binary.Base64;
+
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.NotImplementedException;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
-import org.bouncycastle.util.encoders.UrlBase64;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.config.auth.AuthConfiguration;
@@ -65,11 +60,11 @@ import at.gv.egovernment.moa.id.protocols.stork2.MOASTORKRequest;
import at.gv.egovernment.moa.id.protocols.stork2.UnsupportedAttributeException;
import at.gv.egovernment.moa.id.util.VelocityProvider;
import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Base64Utils;
import eu.stork.oasisdss.api.ApiUtils;
import eu.stork.oasisdss.api.LightweightSourceResolver;
import eu.stork.oasisdss.api.ResultMajor;
import eu.stork.oasisdss.api.exceptions.ApiUtilsException;
-import eu.stork.oasisdss.api.exceptions.UtilsException;
import eu.stork.oasisdss.profile.AnyType;
import eu.stork.oasisdss.profile.Base64Data;
import eu.stork.oasisdss.profile.DocumentType;
@@ -85,7 +80,6 @@ import eu.stork.peps.auth.commons.STORKAttrQueryRequest;
import eu.stork.peps.auth.engine.STORKSAMLEngine;
import eu.stork.peps.exceptions.STORKSAMLEngineException;
import eu.stork.documentservice.DocumentService;
-import eu.stork.documentservice.data.DatabaseConnectorMySQLImpl;
/**
* Forwards a signedDoc attribute request to the oasis-dss service instance
*/
@@ -175,7 +169,7 @@ public class SignedDocAttributeRequestProvider extends AttributeProvider {
Logger.debug("signresponse method: " + httpReq.getMethod());
Logger.debug("signresponse content type: " + httpReq.getContentType());
Logger.debug("signresponse parameter:"+base64);
- String signResponseString = new String(Base64.decodeBase64(base64), "UTF8");
+ String signResponseString = new String(Base64Utils.decode(base64, false), "UTF8");
Logger.debug("RECEIVED signresponse:"+signResponseString);
//create SignResponse object
Source response = new StreamSource(new java.io.StringReader(signResponseString));
@@ -445,7 +439,7 @@ public class SignedDocAttributeRequestProvider extends AttributeProvider {
e.printStackTrace();
}
- context.put("signrequest", Base64.encodeBase64String(signRequestString.getBytes("UTF8")));
+ context.put("signrequest", Base64Utils.encode(signRequestString.getBytes("UTF8")));
context.put("clienturl", url);
context.put("action", oasisDssWebFormURL);
diff --git a/id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml b/id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml
index e9e4eb23d..f2b2f5adf 100644
--- a/id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml
+++ b/id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml
@@ -26,11 +26,6 @@
<bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="${jpaVendorAdapter.generateDdl}" />
-<!-- <property name="generateDdl">
- <bean class="java.lang.Boolean">
- <constructor-arg value="${jpaVendorAdapter.generateDdl}"/>
- </bean>
- </property> -->
<property name="databasePlatform" value="${configuration.hibernate.dialect}" />
</bean>
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java
index 5355f14d3..7288ae2b2 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java
@@ -14,7 +14,7 @@ import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils;
import at.gv.egovernment.moa.id.commons.db.dao.session.InterfederationSessionStore;
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
@@ -62,13 +62,13 @@ public class SpringExpressionAwareProcessEngineTest {
props.load(in);
try {
- ConfigurationDBUtils.initHibernate(props);
+ //ConfigurationDBUtils.initHibernate(props);
Configuration config = new Configuration();
config.addProperties(props);
config.addAnnotatedClass(ProcessInstanceStore.class);
config.addAnnotatedClass(InterfederationSessionStore.class);
MOASessionDBUtils.initHibernate(config, props);
- } catch (MOADatabaseException e) {
+ } catch (Exception e) {
e.printStackTrace();
}
}
diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java
index 4f24468fe..fa9f2ad06 100644
--- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java
+++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java
@@ -11,7 +11,7 @@ import org.hibernate.cfg.Configuration;
import org.junit.BeforeClass;
import org.junit.Test;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils;
import at.gv.egovernment.moa.id.commons.db.dao.session.InterfederationSessionStore;
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
@@ -53,13 +53,13 @@ public class ProcessEngineTest {
props.load(in);
try {
- ConfigurationDBUtils.initHibernate(props);
+ //ConfigurationDBUtils.initHibernate(props);
Configuration config = new Configuration();
config.addProperties(props);
config.addAnnotatedClass(ProcessInstanceStore.class);
config.addAnnotatedClass(InterfederationSessionStore.class);
MOASessionDBUtils.initHibernate(config, props);
- } catch (MOADatabaseException e) {
+ } catch (Exception e) {
e.printStackTrace();
}
}
diff --git a/id/server/moa-id-commons/pom.xml b/id/server/moa-id-commons/pom.xml
index 66e42e850..f4adb1368 100644
--- a/id/server/moa-id-commons/pom.xml
+++ b/id/server/moa-id-commons/pom.xml
@@ -127,6 +127,7 @@
<artifactId>hyperjaxb3-ejb-runtime</artifactId>
<version>0.5.6</version>
</dependency>
+
<!-- <dependency>
<groupId>org.jvnet.hyperjaxb3</groupId>
<artifactId>maven-hyperjaxb3-plugin</artifactId>
@@ -218,7 +219,7 @@
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
+<!-- <plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
@@ -241,13 +242,13 @@
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
- </plugin>
+ </plugin> -->
</plugins>
</pluginManagement>
<plugins>
- <plugin>
+<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
@@ -265,7 +266,7 @@
</configuration>
</execution>
</executions>
- </plugin>
+ </plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -295,7 +296,7 @@
</executions>
</plugin>
- <plugin>
+<!-- <plugin>
<groupId>org.jvnet.hyperjaxb3</groupId>
<artifactId>maven-hyperjaxb3-plugin</artifactId>
<version>0.5.6</version>
@@ -312,9 +313,9 @@
<schemaDirectory>src/main/resources</schemaDirectory>
<bindingDirectory>src/main/resources</bindingDirectory>
<persistenceXml>src/main/resources/persistence_template.xml</persistenceXml>
- <generatePackage>at.gv.egovernment.moa.id.commons.db.dao.config</generatePackage>
+ <generatePackage>at.gv.egovernment.moa.id.commons.db.dao.config.deprecated</generatePackage>
</configuration>
- </plugin>
+ </plugin> -->
<plugin>
<inherited>true</inherited>
<artifactId>maven-compiler-plugin</artifactId>
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java
index 4f47efb78..ae481578a 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java
@@ -34,55 +34,55 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin;
-import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral;
-import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA;
-import at.gv.egovernment.moa.id.commons.db.dao.config.BKUSelectionCustomizationType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.BKUURLS;
-import at.gv.egovernment.moa.id.commons.db.dao.config.BPKDecryption;
-import at.gv.egovernment.moa.id.commons.db.dao.config.CPEPS;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModeType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ConnectionParameterClientAuthType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.Contact;
-import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs;
-import at.gv.egovernment.moa.id.commons.db.dao.config.EncBPKInformation;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ForeignIdentities;
-import at.gv.egovernment.moa.id.commons.db.dao.config.GeneralConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber;
-import at.gv.egovernment.moa.id.commons.db.dao.config.IdentityLinkSigners;
-import at.gv.egovernment.moa.id.commons.db.dao.config.InterfederationGatewayType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.InterfederationIDPType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.LegacyAllowed;
-import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.MOAKeyBoxSelector;
-import at.gv.egovernment.moa.id.commons.db.dao.config.MOASP;
-import at.gv.egovernment.moa.id.commons.db.dao.config.Mandates;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OAOAUTH20;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OAPVP2;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OASAML1;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OASSO;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OASTORK;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OAStorkAttribute;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OAuth;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineMandates;
-import at.gv.egovernment.moa.id.commons.db.dao.config.Organization;
-import at.gv.egovernment.moa.id.commons.db.dao.config.PVP2;
-import at.gv.egovernment.moa.id.commons.db.dao.config.Protocols;
-import at.gv.egovernment.moa.id.commons.db.dao.config.SAML1;
-import at.gv.egovernment.moa.id.commons.db.dao.config.SLRequestTemplates;
-import at.gv.egovernment.moa.id.commons.db.dao.config.SSO;
-import at.gv.egovernment.moa.id.commons.db.dao.config.STORK;
-import at.gv.egovernment.moa.id.commons.db.dao.config.SecurityLayer;
-import at.gv.egovernment.moa.id.commons.db.dao.config.StorkAttribute;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TemplateType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TestCredentials;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TimeOuts;
-import at.gv.egovernment.moa.id.commons.db.dao.config.TransformsInfoType;
-import at.gv.egovernment.moa.id.commons.db.dao.config.VerifyAuthBlock;
-import at.gv.egovernment.moa.id.commons.db.dao.config.VerifyIdentityLink;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AttributeProviderPlugin;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AuthComponentGeneral;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AuthComponentOA;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.BKUSelectionCustomizationType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.BKUURLS;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.BPKDecryption;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.CPEPS;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.ChainingModeType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.ChainingModes;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.ConnectionParameterClientAuthType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.Contact;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.DefaultBKUs;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.EncBPKInformation;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.ForeignIdentities;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.GeneralConfiguration;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.IdentificationNumber;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.IdentityLinkSigners;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.InterfederationGatewayType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.InterfederationIDPType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.LegacyAllowed;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.MOAIDConfiguration;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.MOAKeyBoxSelector;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.MOASP;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.Mandates;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OAOAUTH20;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OAPVP2;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OASAML1;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OASSO;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OASTORK;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OAStorkAttribute;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OAuth;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OnlineApplication;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OnlineMandates;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.Organization;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.PVP2;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.Protocols;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.SAML1;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.SLRequestTemplates;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.SSO;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.STORK;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.SecurityLayer;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.StorkAttribute;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.TemplateType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.TemplatesType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.TestCredentials;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.TimeOuts;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.TransformsInfoType;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.VerifyAuthBlock;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.VerifyIdentityLink;
import at.gv.egovernment.moa.id.commons.utils.KeyValueUtils;
import at.gv.egovernment.moa.id.commons.validation.TargetValidator;
import at.gv.egovernment.moa.logging.Logger;
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationUtil.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationUtil.java
index 399533d3f..762ae44a0 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationUtil.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationUtil.java
@@ -21,9 +21,9 @@ import org.springframework.transaction.annotation.Transactional;
import at.gv.egiz.components.configuration.api.Configuration;
import at.gv.egiz.components.configuration.api.ConfigurationException;
-import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
-import at.gv.egovernment.moa.id.commons.db.dao.config.STORK;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.MOAIDConfiguration;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OnlineApplication;
+import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.STORK;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.MiscUtil;
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
index 5c14df671..3836d5a1e 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java
@@ -1,403 +1,403 @@
-/*******************************************************************************
- * Copyright 2014 Federal Chancellery Austria
- * MOA-ID has been developed in a cooperation between BRZ, the Federal
- * Chancellery Austria - ICT staff unit, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://www.osor.eu/eupl/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- *
- * This product combines work with different licenses. See the "NOTICE" text
- * file for details on the various modules and licenses.
- * The "NOTICE" text file is part of the distribution. Any derivative works
- * that you distribute must include a readable copy of the "NOTICE" text file.
- *******************************************************************************/
-package at.gv.egovernment.moa.id.commons.db;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.persistence.EntityManager;
-
-import org.apache.commons.lang3.StringEscapeUtils;
-
-import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
-import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
-import at.gv.egovernment.moa.logging.Logger;
-import at.gv.egovernment.moa.util.MiscUtil;
-//import org.apache.commons.lang.StringEscapeUtils;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- *
- * @author tlenz
- *
- * @deprecated
- */
-
-@SuppressWarnings("rawtypes")
-public class ConfigurationDBRead {
-
- private static Map<String, String> QUERIES = new HashMap<String, String>();
-
- static {
- QUERIES.put("getActiveOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) and onlineapplication.isActive = '1'");
- QUERIES.put("getOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix))");
- QUERIES.put("getOnlineApplicationWithDBID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.hjid = :id");
- QUERIES.put("getAllOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication");
- QUERIES.put("getAllActiveOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '1'");
- QUERIES.put("getAllNewOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '0' and onlineapplication.isAdminRequired = '1'");
- QUERIES.put("getMOAIDConfiguration", "select moaidconfiguration from MOAIDConfiguration moaidconfiguration");
- QUERIES.put("getUserWithUserID", "select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id");
- QUERIES.put("getNewUserWithUserTokken", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken = :tokken");
- QUERIES.put("getAllNewUsers", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is null and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '1'");
- QUERIES.put("getAllOpenUsersRequests", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is not null and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '0'");
- QUERIES.put("getUserWithUserBPKWBPK", "select userdatabase from UserDatabase userdatabase where userdatabase.bpk = :bpk");
- QUERIES.put("getUserWithUserUsername", "select userdatabase from UserDatabase userdatabase where userdatabase.username = :username");
- QUERIES.put("getAllUsers", "select userdatabase from UserDatabase userdatabase");
- QUERIES.put("getUsersWithOADBID", "select userdatabase from UserDatabase userdatabase inner join userdatabase.onlineApplication oa where oa.hjid = :id");
- QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id");
- }
-
-// public static OnlineApplication getActiveOnlineApplication(String id) {
-// MiscUtil.assertNotNull(id, "OnlineApplictionID");
-// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
-//
-// List result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getActiveOnlineApplicationWithID"));
-// //query.setParameter("id", id+"%");
-// query.setParameter("id", StringEscapeUtils.escapeHtml4(id));
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.debug("No entries found.");
-// return null;
-// }
-//
-// if (result.size() > 1) {
-// Logger.warn("OAIdentifier match to more then one DB-entry!");
-// return null;
-// }
-//
-// return (OnlineApplication) result.get(0);
-// }
-//
-// public static OnlineApplication getOnlineApplication(String id) {
-// MiscUtil.assertNotNull(id, "OnlineApplictionID");
-// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
-//
-// List result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getOnlineApplicationWithID"));
-// //query.setParameter("id", id+"%");
-// query.setParameter("id", id);
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-//
-// if (result.size() > 1) {
-// Logger.warn("OAIdentifier match to more then one DB-entry!");
-// return null;
-// }
-//
-// return (OnlineApplication) result.get(0);
-// }
-//
-// public static OnlineApplication getOnlineApplication(long dbid) {
-// MiscUtil.assertNotNull(dbid, "OnlineApplictionID");
-// Logger.trace("Getting OnlineApplication with DBID " + dbid + " from database.");
-//
-// List result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getOnlineApplicationWithDBID"));
-// //query.setParameter("id", id+"%");
-// query.setParameter("id", dbid);
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-//
-// return (OnlineApplication) result.get(0);
-// }
-//
-// @JsonProperty("getMOAIDConfiguration")
-// public static MOAIDConfiguration getMOAIDConfiguration() {
-// Logger.trace("Load MOAID Configuration from database.");
-//
-// List<MOAIDConfiguration> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getMOAIDConfiguration"));
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found. Create fresh instance.");
-// return null;
-// }
-//
-// return (MOAIDConfiguration) result.get(0);
-// }
-//
-// @JsonProperty("getAllOnlineApplications")
-// public static List<OnlineApplication> getAllOnlineApplications() {
-// Logger.trace("Get All OnlineApplications from database.");
-//
-// List<OnlineApplication> result = null;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllOnlineApplications"));
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return result;
-// }
-//
-// public static List<OnlineApplication> getAllNewOnlineApplications() {
-// Logger.trace("Get All OnlineApplications from database.");
-//
-// List<OnlineApplication> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllNewOnlineApplications"));
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return result;
-// }
-//
-// @JsonProperty("getAllUsers")
-// public static List<UserDatabase> getAllUsers() {
-// Logger.trace("Get All OnlineApplications from database.");
-//
-// List<UserDatabase> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllUsers"));
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return result;
-// }
-//
-// public static List<OnlineApplication> getAllActiveOnlineApplications() {
-// Logger.trace("Get All active OnlineApplications from database.");
-//
-// List<OnlineApplication> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllActiveOnlineApplications"));
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// result = new ArrayList<OnlineApplication>();
-//
-// }
-// return result;
-// }
-//
-// @SuppressWarnings("rawtypes")
-// public static List<OnlineApplication> searchOnlineApplications(String id) {
-// MiscUtil.assertNotNull(id, "OnlineApplictionID");
-// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
-//
-// List<OnlineApplication> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("searchOnlineApplicationsWithID"));
-// query.setParameter("id", "%" + id + "%");
-//
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-//
-// return result;
-// }
-//
-// public static UserDatabase getUserWithID(long id) {
-// MiscUtil.assertNotNull(id, "UserID");
-// Logger.trace("Getting Userinformation with ID " + id + " from database.");
-//
-// List<UserDatabase> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserID"));
-// query.setParameter("id", id);
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return (UserDatabase) result.get(0);
-// }
-//
-// public static UserDatabase getUsersWithOADBID(long id) {
-// MiscUtil.assertNotNull(id, "OADBID");
-// Logger.trace("Getting Userinformation with OADBID " + id + " from database.");
-//
-// List<UserDatabase> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getUsersWithOADBID"));
-// query.setParameter("id", id);
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return (UserDatabase) result.get(0);
-// }
-//
-// public static UserDatabase getUserWithUserName(String username) {
-// MiscUtil.assertNotNull(username, "UserName");
-// Logger.trace("Getting Userinformation with ID " + username + " from database.");
-//
-// List<UserDatabase> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserUsername"));
-// query.setParameter("username", username);
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return (UserDatabase) result.get(0);
+///*******************************************************************************
+// * Copyright 2014 Federal Chancellery Austria
+// * MOA-ID has been developed in a cooperation between BRZ, the Federal
+// * Chancellery Austria - ICT staff unit, and Graz University of Technology.
+// *
+// * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+// * the European Commission - subsequent versions of the EUPL (the "Licence");
+// * You may not use this work except in compliance with the Licence.
+// * You may obtain a copy of the Licence at:
+// * http://www.osor.eu/eupl/
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the Licence is distributed on an "AS IS" basis,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the Licence for the specific language governing permissions and
+// * limitations under the Licence.
+// *
+// * This product combines work with different licenses. See the "NOTICE" text
+// * file for details on the various modules and licenses.
+// * The "NOTICE" text file is part of the distribution. Any derivative works
+// * that you distribute must include a readable copy of the "NOTICE" text file.
+// *******************************************************************************/
+//package at.gv.egovernment.moa.id.commons.db;
+//
+//import java.util.ArrayList;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//import javax.persistence.EntityManager;
+//
+//import org.apache.commons.lang3.StringEscapeUtils;
+//
+//import at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
+//import at.gv.egovernment.moa.logging.Logger;
+//import at.gv.egovernment.moa.util.MiscUtil;
+////import org.apache.commons.lang.StringEscapeUtils;
+//
+//import com.fasterxml.jackson.annotation.JsonProperty;
+//
+///**
+// *
+// * @author tlenz
+// *
+// * @deprecated
+// */
+//
+//@SuppressWarnings("rawtypes")
+//public class ConfigurationDBRead {
+//
+// private static Map<String, String> QUERIES = new HashMap<String, String>();
+//
+// static {
+// QUERIES.put("getActiveOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) and onlineapplication.isActive = '1'");
+// QUERIES.put("getOnlineApplicationWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix))");
+// QUERIES.put("getOnlineApplicationWithDBID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.hjid = :id");
+// QUERIES.put("getAllOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication");
+// QUERIES.put("getAllActiveOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '1'");
+// QUERIES.put("getAllNewOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.isActive = '0' and onlineapplication.isAdminRequired = '1'");
+// QUERIES.put("getMOAIDConfiguration", "select moaidconfiguration from MOAIDConfiguration moaidconfiguration");
+// QUERIES.put("getUserWithUserID", "select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id");
+// QUERIES.put("getNewUserWithUserTokken", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken = :tokken");
+// QUERIES.put("getAllNewUsers", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is null and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '1'");
+// QUERIES.put("getAllOpenUsersRequests", "select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken is not null and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '0'");
+// QUERIES.put("getUserWithUserBPKWBPK", "select userdatabase from UserDatabase userdatabase where userdatabase.bpk = :bpk");
+// QUERIES.put("getUserWithUserUsername", "select userdatabase from UserDatabase userdatabase where userdatabase.username = :username");
+// QUERIES.put("getAllUsers", "select userdatabase from UserDatabase userdatabase");
+// QUERIES.put("getUsersWithOADBID", "select userdatabase from UserDatabase userdatabase inner join userdatabase.onlineApplication oa where oa.hjid = :id");
+// QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id");
// }
//
-// public static UserDatabase getUserWithUserBPKWBPK(String bpkwbpk) {
-// MiscUtil.assertNotNull(bpkwbpk, "bpk/wbpk");
-// Logger.trace("Getting Userinformation with ID " + bpkwbpk + " from database.");
-//
-// List<UserDatabase> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserBPKWBPK"));
-// query.setParameter("bpk", bpkwbpk);
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return (UserDatabase) result.get(0);
-// }
-//
-// public static UserDatabase getNewUserWithTokken(String tokken) {
-// MiscUtil.assertNotNull(tokken, "bpk/wbpk");
-// Logger.trace("Getting Userinformation with Tokken " + tokken + " from database.");
-//
-// List<UserDatabase> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getNewUserWithUserTokken"));
-// query.setParameter("tokken", tokken);
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return (UserDatabase) result.get(0);
-// }
-//
-// public static List<UserDatabase> getAllNewUsers() {
-// Logger.trace("Get all new Users from Database");
-//
-// List<UserDatabase> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllNewUsers"));
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return result;
-// }
-//
-// public static List<UserDatabase> getAllOpenUsersRequests() {
-// Logger.trace("Get all new Users from Database");
-//
-// List<UserDatabase> result;
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-//
-// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllOpenUsersRequests"));
-// result = query.getResultList();
-//
-// Logger.trace("Found entries: " + result.size());
-//
-// if (result.size() == 0) {
-// Logger.trace("No entries found.");
-// return null;
-// }
-// return result;
-// }
-}
+//// public static OnlineApplication getActiveOnlineApplication(String id) {
+//// MiscUtil.assertNotNull(id, "OnlineApplictionID");
+//// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
+////
+//// List result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getActiveOnlineApplicationWithID"));
+//// //query.setParameter("id", id+"%");
+//// query.setParameter("id", StringEscapeUtils.escapeHtml4(id));
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.debug("No entries found.");
+//// return null;
+//// }
+////
+//// if (result.size() > 1) {
+//// Logger.warn("OAIdentifier match to more then one DB-entry!");
+//// return null;
+//// }
+////
+//// return (OnlineApplication) result.get(0);
+//// }
+////
+//// public static OnlineApplication getOnlineApplication(String id) {
+//// MiscUtil.assertNotNull(id, "OnlineApplictionID");
+//// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
+////
+//// List result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getOnlineApplicationWithID"));
+//// //query.setParameter("id", id+"%");
+//// query.setParameter("id", id);
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+////
+//// if (result.size() > 1) {
+//// Logger.warn("OAIdentifier match to more then one DB-entry!");
+//// return null;
+//// }
+////
+//// return (OnlineApplication) result.get(0);
+//// }
+////
+//// public static OnlineApplication getOnlineApplication(long dbid) {
+//// MiscUtil.assertNotNull(dbid, "OnlineApplictionID");
+//// Logger.trace("Getting OnlineApplication with DBID " + dbid + " from database.");
+////
+//// List result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getOnlineApplicationWithDBID"));
+//// //query.setParameter("id", id+"%");
+//// query.setParameter("id", dbid);
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+////
+//// return (OnlineApplication) result.get(0);
+//// }
+////
+//// @JsonProperty("getMOAIDConfiguration")
+//// public static MOAIDConfiguration getMOAIDConfiguration() {
+//// Logger.trace("Load MOAID Configuration from database.");
+////
+//// List<MOAIDConfiguration> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getMOAIDConfiguration"));
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found. Create fresh instance.");
+//// return null;
+//// }
+////
+//// return (MOAIDConfiguration) result.get(0);
+//// }
+////
+//// @JsonProperty("getAllOnlineApplications")
+//// public static List<OnlineApplication> getAllOnlineApplications() {
+//// Logger.trace("Get All OnlineApplications from database.");
+////
+//// List<OnlineApplication> result = null;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllOnlineApplications"));
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return result;
+//// }
+////
+//// public static List<OnlineApplication> getAllNewOnlineApplications() {
+//// Logger.trace("Get All OnlineApplications from database.");
+////
+//// List<OnlineApplication> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllNewOnlineApplications"));
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return result;
+//// }
+////
+//// @JsonProperty("getAllUsers")
+//// public static List<UserDatabase> getAllUsers() {
+//// Logger.trace("Get All OnlineApplications from database.");
+////
+//// List<UserDatabase> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllUsers"));
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return result;
+//// }
+////
+//// public static List<OnlineApplication> getAllActiveOnlineApplications() {
+//// Logger.trace("Get All active OnlineApplications from database.");
+////
+//// List<OnlineApplication> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllActiveOnlineApplications"));
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// result = new ArrayList<OnlineApplication>();
+////
+//// }
+//// return result;
+//// }
+////
+//// @SuppressWarnings("rawtypes")
+//// public static List<OnlineApplication> searchOnlineApplications(String id) {
+//// MiscUtil.assertNotNull(id, "OnlineApplictionID");
+//// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
+////
+//// List<OnlineApplication> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("searchOnlineApplicationsWithID"));
+//// query.setParameter("id", "%" + id + "%");
+////
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+////
+//// return result;
+//// }
+////
+//// public static UserDatabase getUserWithID(long id) {
+//// MiscUtil.assertNotNull(id, "UserID");
+//// Logger.trace("Getting Userinformation with ID " + id + " from database.");
+////
+//// List<UserDatabase> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserID"));
+//// query.setParameter("id", id);
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return (UserDatabase) result.get(0);
+//// }
+////
+//// public static UserDatabase getUsersWithOADBID(long id) {
+//// MiscUtil.assertNotNull(id, "OADBID");
+//// Logger.trace("Getting Userinformation with OADBID " + id + " from database.");
+////
+//// List<UserDatabase> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getUsersWithOADBID"));
+//// query.setParameter("id", id);
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return (UserDatabase) result.get(0);
+//// }
+////
+//// public static UserDatabase getUserWithUserName(String username) {
+//// MiscUtil.assertNotNull(username, "UserName");
+//// Logger.trace("Getting Userinformation with ID " + username + " from database.");
+////
+//// List<UserDatabase> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserUsername"));
+//// query.setParameter("username", username);
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return (UserDatabase) result.get(0);
+//// }
+////
+//// public static UserDatabase getUserWithUserBPKWBPK(String bpkwbpk) {
+//// MiscUtil.assertNotNull(bpkwbpk, "bpk/wbpk");
+//// Logger.trace("Getting Userinformation with ID " + bpkwbpk + " from database.");
+////
+//// List<UserDatabase> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getUserWithUserBPKWBPK"));
+//// query.setParameter("bpk", bpkwbpk);
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return (UserDatabase) result.get(0);
+//// }
+////
+//// public static UserDatabase getNewUserWithTokken(String tokken) {
+//// MiscUtil.assertNotNull(tokken, "bpk/wbpk");
+//// Logger.trace("Getting Userinformation with Tokken " + tokken + " from database.");
+////
+//// List<UserDatabase> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getNewUserWithUserTokken"));
+//// query.setParameter("tokken", tokken);
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return (UserDatabase) result.get(0);
+//// }
+////
+//// public static List<UserDatabase> getAllNewUsers() {
+//// Logger.trace("Get all new Users from Database");
+////
+//// List<UserDatabase> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllNewUsers"));
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return result;
+//// }
+////
+//// public static List<UserDatabase> getAllOpenUsersRequests() {
+//// Logger.trace("Get all new Users from Database");
+////
+//// List<UserDatabase> result;
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+////
+//// javax.persistence.Query query = session.createQuery(QUERIES.get("getAllOpenUsersRequests"));
+//// result = query.getResultList();
+////
+//// Logger.trace("Found entries: " + result.size());
+////
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+//// return result;
+//// }
+//}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
index d9f0267df..7f996cca7 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBUtils.java
@@ -1,233 +1,233 @@
-/*******************************************************************************
- * Copyright 2014 Federal Chancellery Austria
- * MOA-ID has been developed in a cooperation between BRZ, the Federal
- * Chancellery Austria - ICT staff unit, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://www.osor.eu/eupl/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- *
- * This product combines work with different licenses. See the "NOTICE" text
- * file for details on the various modules and licenses.
- * The "NOTICE" text file is part of the distribution. Any derivative works
- * that you distribute must include a readable copy of the "NOTICE" text file.
- *******************************************************************************/
-package at.gv.egovernment.moa.id.commons.db;
-
-import java.util.Properties;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.EntityTransaction;
-import javax.persistence.Persistence;
-
-import org.hibernate.HibernateException;
-
-import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
-import at.gv.egovernment.moa.logging.Logger;
-
-public final class ConfigurationDBUtils {
-
- private static EntityManagerFactory entitymanagerfactory;
-
- @SuppressWarnings("rawtypes")
- private static final ThreadLocal THREAD_LOCAL_CONFIG = new ThreadLocal();
- private static boolean automaticSessionHandling = false;
-
- protected ConfigurationDBUtils() { }
-
- public static void initHibernate(Properties props) throws MOADatabaseException {
-
- try {
-
- Logger.debug("Creating initial session factory...");
-
- entitymanagerfactory =
- Persistence.createEntityManagerFactory("at.gv.egovernment.moa.id.commons.db.dao.config",
- props);
-
- Logger.debug("Initial ConfigDB session factory successfully created.");
-
-
- } catch (Throwable ex) {
- Logger.error("Initial session factory creation failed: " + ex.getMessage());
- throw new MOADatabaseException("Initialization of Configuration Hibernate session factory failed.",ex);
- }
- }
-
-
-// /**
-// * Checks if a session factory is currently available. If necessary a new
-// * session factory is created.
-// *
-// * @return current (or new) session factory
-// * @throws HibernateException
-// * thrown if a hibernate error occurs
-// */
-// public static EntityManager getCurrentSession() {
-// if (automaticSessionHandling) {
-//
-// return entitymanagerfactory.createEntityManager();
-// }
-//
-// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
-//
-// if (session != null && session.isOpen()) {
+///*******************************************************************************
+// * Copyright 2014 Federal Chancellery Austria
+// * MOA-ID has been developed in a cooperation between BRZ, the Federal
+// * Chancellery Austria - ICT staff unit, and Graz University of Technology.
+// *
+// * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+// * the European Commission - subsequent versions of the EUPL (the "Licence");
+// * You may not use this work except in compliance with the Licence.
+// * You may obtain a copy of the Licence at:
+// * http://www.osor.eu/eupl/
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the Licence is distributed on an "AS IS" basis,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the Licence for the specific language governing permissions and
+// * limitations under the Licence.
+// *
+// * This product combines work with different licenses. See the "NOTICE" text
+// * file for details on the various modules and licenses.
+// * The "NOTICE" text file is part of the distribution. Any derivative works
+// * that you distribute must include a readable copy of the "NOTICE" text file.
+// *******************************************************************************/
+//package at.gv.egovernment.moa.id.commons.db;
//
-// //maybe a hack, but sometimes we do not know if the session is closed (session already closed but isOpen()=true)
-// try {
-// javax.persistence.Query query = session.createQuery("select userdatabase from UserDatabase userdatabase");
-// query.getResultList();
-//
-// } catch (Throwable e) {
-// Logger.warn("JPA Session Handling Warning!!!! - This error should not occur.");
-// session = getNewSession();
-// }
-//
-// } else
-// session = getNewSession();
-//
-// return session;
-// }
+//import java.util.Properties;
//
-// @SuppressWarnings("unchecked")
-// public static EntityManager getNewSession() {
-// if (automaticSessionHandling) {
-// Logger.warn("Session is being automatically handled by hibernate. Therefore this session maybe not being newly created. Use HibernateUtil.getCurrentSession() instead.");
-// return entitymanagerfactory.createEntityManager();
-// }
-// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
-// if (session != null ) {
-// Logger.warn("Previous session has not been closed; closing ConfigDB session now.");
-// closeSession();
-// }
-// Logger.debug("Opening new ConfigDB hibernate session...");
-// try {
-// session = entitymanagerfactory.createEntityManager();
-// THREAD_LOCAL_CONFIG.set(session);
-// } catch (HibernateException hex) {
-// Logger.error(hex.getMessage());
-// }
-// return session;
-// }
-
- /**
- * Closes the current session.
- *
- * @throws HibernateException
- * thrown if session is already closed or a hibernate error
- * occurs.
- *
- * @deprecated
- */
-@SuppressWarnings("unchecked")
-public static void closeSession() {
-
-}
-
-// /**
-// * Closes the current session.
-// *
-// * @throws HibernateException
-// * thrown if session is already closed or a hibernate error
-// * occurs.
-// */
-// @SuppressWarnings("unchecked")
-// public static void closeSession() {
-// if (automaticSessionHandling) {
-// Logger.warn("Session is being automatically handled by hibernate. Therefore the current session cannot be closed on demand.");
-// return;
-// }
-// Logger.debug("Closing current ConfigDB hibernate session...");
-// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
-// THREAD_LOCAL_CONFIG.set(null);
-// if (session != null) {
-// try {
-// session.close();
-//
-// } catch (HibernateException hex) {
-// Logger.error(hex.getMessage());
-// }
-// }
+//import javax.persistence.EntityManager;
+//import javax.persistence.EntityManagerFactory;
+//import javax.persistence.EntityTransaction;
+//import javax.persistence.Persistence;
+//
+//import org.hibernate.HibernateException;
+//
+//import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
+//import at.gv.egovernment.moa.logging.Logger;
+//
+//public final class ConfigurationDBUtils {
+//
+// private static EntityManagerFactory entitymanagerfactory;
+//
+// @SuppressWarnings("rawtypes")
+// private static final ThreadLocal THREAD_LOCAL_CONFIG = new ThreadLocal();
+// private static boolean automaticSessionHandling = false;
+//
+// protected ConfigurationDBUtils() { }
+//
+// public static void initHibernate(Properties props) throws MOADatabaseException {
+//
+//// try {
+////
+//// Logger.debug("Creating initial session factory...");
+////
+//// entitymanagerfactory =
+//// Persistence.createEntityManagerFactory("at.gv.egovernment.moa.id.commons.db.dao.config",
+//// props);
+////
+//// Logger.debug("Initial ConfigDB session factory successfully created.");
+////
+////
+//// } catch (Throwable ex) {
+//// Logger.error("Initial session factory creation failed: " + ex.getMessage());
+//// throw new MOADatabaseException("Initialization of Configuration Hibernate session factory failed.",ex);
+//// }
// }
//
-// public static boolean save(Object dbo) throws MOADatabaseException {
-// EntityTransaction tx = null;
-//
-// try {
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-// tx = session.getTransaction();
-//
-// synchronized (session) {
-// tx.begin();
-// session.merge(dbo);
-// tx.commit();
-//
-// session.clear();
-// }
-// return true;
-//
-// } catch(HibernateException e) {
-// Logger.warn("Error during Config database saveOrUpdate. Rollback.", e);
-// tx.rollback();
-// throw new MOADatabaseException(e);
-// }
-// }
//
+//// /**
+//// * Checks if a session factory is currently available. If necessary a new
+//// * session factory is created.
+//// *
+//// * @return current (or new) session factory
+//// * @throws HibernateException
+//// * thrown if a hibernate error occurs
+//// */
+//// public static EntityManager getCurrentSession() {
+//// if (automaticSessionHandling) {
+////
+//// return entitymanagerfactory.createEntityManager();
+//// }
+////
+//// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
+////
+//// if (session != null && session.isOpen()) {
+////
+//// //maybe a hack, but sometimes we do not know if the session is closed (session already closed but isOpen()=true)
+//// try {
+//// javax.persistence.Query query = session.createQuery("select userdatabase from UserDatabase userdatabase");
+//// query.getResultList();
+////
+//// } catch (Throwable e) {
+//// Logger.warn("JPA Session Handling Warning!!!! - This error should not occur.");
+//// session = getNewSession();
+//// }
+////
+//// } else
+//// session = getNewSession();
+////
+//// return session;
+//// }
+////
+//// @SuppressWarnings("unchecked")
+//// public static EntityManager getNewSession() {
+//// if (automaticSessionHandling) {
+//// Logger.warn("Session is being automatically handled by hibernate. Therefore this session maybe not being newly created. Use HibernateUtil.getCurrentSession() instead.");
+//// return entitymanagerfactory.createEntityManager();
+//// }
+//// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
+//// if (session != null ) {
+//// Logger.warn("Previous session has not been closed; closing ConfigDB session now.");
+//// closeSession();
+//// }
+//// Logger.debug("Opening new ConfigDB hibernate session...");
+//// try {
+//// session = entitymanagerfactory.createEntityManager();
+//// THREAD_LOCAL_CONFIG.set(session);
+//// } catch (HibernateException hex) {
+//// Logger.error(hex.getMessage());
+//// }
+//// return session;
+//// }
+//
+// /**
+// * Closes the current session.
+// *
+// * @throws HibernateException
+// * thrown if session is already closed or a hibernate error
+// * occurs.
+// *
+// * @deprecated
+// */
+//@SuppressWarnings("unchecked")
+//public static void closeSession() {
+//
+//}
+//
+//// /**
+//// * Closes the current session.
+//// *
+//// * @throws HibernateException
+//// * thrown if session is already closed or a hibernate error
+//// * occurs.
+//// */
+//// @SuppressWarnings("unchecked")
+//// public static void closeSession() {
+//// if (automaticSessionHandling) {
+//// Logger.warn("Session is being automatically handled by hibernate. Therefore the current session cannot be closed on demand.");
+//// return;
+//// }
+//// Logger.debug("Closing current ConfigDB hibernate session...");
+//// EntityManager session = (EntityManager) THREAD_LOCAL_CONFIG.get();
+//// THREAD_LOCAL_CONFIG.set(null);
+//// if (session != null) {
+//// try {
+//// session.close();
+////
+//// } catch (HibernateException hex) {
+//// Logger.error(hex.getMessage());
+//// }
+//// }
+//// }
+////
+//// public static boolean save(Object dbo) throws MOADatabaseException {
+//// EntityTransaction tx = null;
+////
+//// try {
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+//// tx = session.getTransaction();
+////
+//// synchronized (session) {
+//// tx.begin();
+//// session.merge(dbo);
+//// tx.commit();
+////
+//// session.clear();
+//// }
+//// return true;
+////
+//// } catch(HibernateException e) {
+//// Logger.warn("Error during Config database saveOrUpdate. Rollback.", e);
+//// tx.rollback();
+//// throw new MOADatabaseException(e);
+//// }
+//// }
+////
+////
+//// public static boolean saveOrUpdate(Object dbo) throws MOADatabaseException {
+//// EntityTransaction tx = null;
+////
+//// try {
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+//// tx = session.getTransaction();
+////
+//// synchronized (session) {
+//// tx.begin();
+////
+//// session.merge(dbo);
+//// session.flush();
+////
+//// tx.commit();
+////
+//// //session.clear();
+//// }
+//// return true;
+////
+//// } catch(HibernateException e) {
+//// Logger.warn("Error during Config database saveOrUpdate. Rollback.", e);
+//// tx.rollback();
+//// throw new MOADatabaseException(e);
+//// }
+//// }
+////
+//// public static boolean delete(Object dbo) {
+//// EntityTransaction tx = null;
+//// try {
+//// EntityManager session = ConfigurationDBUtils.getCurrentSession();
+//// tx = session.getTransaction();
+////
+//// synchronized (session) {
+//// tx.begin();
+//// session.remove(session.contains(dbo) ? dbo : session.merge(dbo));
+//// tx.commit();
+//// }
+////
+//// return true;
+////
+//// } catch(HibernateException e) {
+//// Logger.warn("Error during Config database delete. Rollback.", e);
+//// tx.rollback();
+//// return false;
+//// }
+//// }
//
-// public static boolean saveOrUpdate(Object dbo) throws MOADatabaseException {
-// EntityTransaction tx = null;
-//
-// try {
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-// tx = session.getTransaction();
-//
-// synchronized (session) {
-// tx.begin();
-//
-// session.merge(dbo);
-// session.flush();
-//
-// tx.commit();
-//
-// //session.clear();
-// }
-// return true;
-//
-// } catch(HibernateException e) {
-// Logger.warn("Error during Config database saveOrUpdate. Rollback.", e);
-// tx.rollback();
-// throw new MOADatabaseException(e);
-// }
-// }
-//
-// public static boolean delete(Object dbo) {
-// EntityTransaction tx = null;
-// try {
-// EntityManager session = ConfigurationDBUtils.getCurrentSession();
-// tx = session.getTransaction();
-//
-// synchronized (session) {
-// tx.begin();
-// session.remove(session.contains(dbo) ? dbo : session.merge(dbo));
-// tx.commit();
-// }
-//
-// return true;
-//
-// } catch(HibernateException e) {
-// Logger.warn("Error during Config database delete. Rollback.", e);
-// tx.rollback();
-// return false;
-// }
-// }
-
-}
+//}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java
index 8f6100f84..41c7008e9 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java
@@ -1,450 +1,450 @@
-package at.gv.egovernment.moa.id.commons.db;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-
-import at.gv.egiz.components.configuration.api.ConfigurationException;
-import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants;
-import at.gv.egovernment.moa.id.commons.config.persistence.MOAIDConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral;
-import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes;
-import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs;
-import at.gv.egovernment.moa.id.commons.db.dao.config.GenericConfiguration;
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
-
-import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
-import at.gv.egovernment.moa.logging.Logger;
-
-/**
- *
- *
- */
-public class NewConfigurationDBRead {
-
- private static MOAIDConfiguration conf;
-
- @Autowired(required = true)
- public void setConfiguration(MOAIDConfiguration conf) {
- // https://jira.spring.io/browse/SPR-3845
- NewConfigurationDBRead.conf = conf;
- }
-
- @SuppressWarnings("unchecked")
- public static <T extends Iterable<?>> T nullGuard(T item) {
- if (item == null) {
- return (T) Collections.emptyList();
- } else {
- return item;
- }
-
- }
-
- public static Map<String, String> getOnlineApplicationKeyValueWithId(String id) {
- try {
- return conf.getOnlineApplication(id);
-
- } catch (ConfigurationException e) {
- Logger.warn("OnlineApplication with Id: " + id + " not found.", e);
- return null;
-
- }
- }
-
-
-
- /**
- *
- * @return
- */
- public static List<UserDatabase> getAllUsers() {
- Logger.trace("Get All Users from database.");
-
+//package at.gv.egovernment.moa.id.commons.db;
+//
+//import java.util.ArrayList;
+//import java.util.Collections;
+//import java.util.Date;
+//import java.util.List;
+//import java.util.Map;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//
+//import at.gv.egiz.components.configuration.api.ConfigurationException;
+//import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants;
+//import at.gv.egovernment.moa.id.commons.config.persistence.MOAIDConfiguration;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.ChainingModes;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.DefaultBKUs;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.GenericConfiguration;
+//import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
+//
+//import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
+//import at.gv.egovernment.moa.logging.Logger;
+//
+///**
+// *
+// *
+// */
+//public class NewConfigurationDBRead {
+//
+// private static MOAIDConfiguration conf;
+//
+// @Autowired(required = true)
+// public void setConfiguration(MOAIDConfiguration conf) {
+// // https://jira.spring.io/browse/SPR-3845
+// NewConfigurationDBRead.conf = conf;
+// }
+//
+// @SuppressWarnings("unchecked")
+// public static <T extends Iterable<?>> T nullGuard(T item) {
+// if (item == null) {
+// return (T) Collections.emptyList();
+// } else {
+// return item;
+// }
+//
+// }
+//
+// public static Map<String, String> getOnlineApplicationKeyValueWithId(String id) {
+// try {
+// return conf.getOnlineApplication(id);
+//
+// } catch (ConfigurationException e) {
+// Logger.warn("OnlineApplication with Id: " + id + " not found.", e);
+// return null;
+//
+// }
+// }
+//
+//
+//
+// /**
+// *
+// * @return
+// */
+// public static List<UserDatabase> getAllUsers() {
+// Logger.trace("Get All Users from database.");
+//
+//// // select userdatabase from UserDatabase userdatabase
+//// List<UserDatabase> result = conf.getList("getAllUsers", UserDatabase.class);
+//// if (result.size() == 0) {
+//// Logger.trace("No entries found.");
+//// return null;
+//// }
+////
+//// return result;
+//
+// //TODO!!!
+// return null;
+// }
+//
+// /**
+// *
+// * @return
+// */
+// public static List<OnlineApplication> getAllOnlineApplications() {
+// Logger.trace("Get All OnlineApplications from database.");
+//
+// // select onlineapplication from OnlineApplication onlineapplication
+//// return conf.getList(MOAIDConfigurationConstants.ONLINE_APPLICATIONS_KEY, OnlineApplication.class);
+//
+// //TODO!!!
+// return null;
+//
+// }
+//
+// /**
+// *
+// * @return
+// */
+// public static List<OnlineApplication> getAllNewOnlineApplications() {
+// Logger.trace("Get All New OnlineApplications from database.");
+//
+// // select onlineapplication from OnlineApplication onlineapplication
+// // where onlineapplication.isActive = '0' and onlineapplication.isAdminRequired = '1'
+// List<OnlineApplication> result = new ArrayList<OnlineApplication>();
+// List<OnlineApplication> allOAs = getAllOnlineApplications();
+//
+// for (OnlineApplication oa : nullGuard(allOAs)) {
+// if (!oa.isIsActive() && oa.isIsAdminRequired()) {
+// result.add(oa);
+// }
+// }
+//
+// if (result.size() == 0) {
+// Logger.trace("No entries found.");
+// return null;
+// }
+//
+// return result;
+// }
+//
+//// /**
+//// *
+//// * @return
+//// */
+//// public static at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration getMOAIDConfiguration() {
+//// Logger.trace("Load MOAID Configuration from database.");
+////
+//// AuthComponentGeneral authComponent = (AuthComponentGeneral) conf.get(MOAIDConfigurationConstants.AUTH_COMPONENT_GENERAL_KEY,
+//// AuthComponentGeneral.class);
+////
+//// ChainingModes chainingModes = (ChainingModes) conf.get(MOAIDConfigurationConstants.CHAINING_MODES_KEY, ChainingModes.class);
+//// List<GenericConfiguration> genericConfigurations = (List<GenericConfiguration>) conf.getList(
+//// MOAIDConfigurationConstants.GENERIC_CONFIGURATION_KEY, GenericConfiguration.class);
+//// String trustedCaCertificates = (String) conf.get(MOAIDConfigurationConstants.TRUSTED_CERTIFICATES_KEY, String.class);
+//// DefaultBKUs defaultBKUs = (DefaultBKUs) conf.get(MOAIDConfigurationConstants.DEFAULT_BKUS_KEY, DefaultBKUs.class);
+//// SLRequestTemplates slrRequestRemplates = (SLRequestTemplates) conf.get(MOAIDConfigurationConstants.SLREQUEST_TEMPLATES_KEY,
+//// SLRequestTemplates.class);
+//// Date timeStamp = (Date) conf.get(MOAIDConfigurationConstants.TIMESTAMP_ITEM_KEY, Date.class);
+//// Date pvp2Refresh = (Date) conf.get(MOAIDConfigurationConstants.PVP2REFRESH_ITEM_KEY, Date.class);
+////
+//// // if (authComponent == null || chainingModes == null || trustedCaCertificates == null || defaultBKUs == null
+//// // || slrRequestRemplates == null || timeStamp == null || pvp2Refresh == null
+//// //
+//// // ) {
+//// // // TODO: is there a better approach in case of error?
+//// // Logger.trace("Not all necessary data available. Create fresh instance.");
+//// // return new MOAIDConfiguration();
+//// // }
+////
+//// // select moaidconfiguration from MOAIDConfiguration moaidconfiguration
+//// at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration result = new at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration();
+//// result.setAuthComponentGeneral(authComponent);
+//// result.setChainingModes(chainingModes);
+//// result.setGenericConfiguration(genericConfigurations);
+//// result.setTrustedCACertificates(trustedCaCertificates);
+//// result.setDefaultBKUs(defaultBKUs);
+//// result.setSLRequestTemplates(slrRequestRemplates);
+//// result.setTimestampItem(timeStamp);
+//// result.setPvp2RefreshItem(pvp2Refresh);
+////
+//// return result;
+//// }
+//
+// /**
+// *
+// * @return
+// */
+// public static List<OnlineApplication> getAllActiveOnlineApplications() {
+// Logger.trace("Get All New OnlineApplications from database.");
+//
+// // select onlineapplication from OnlineApplication onlineapplication
+// // where onlineapplication.isActive = '1'
+// List<OnlineApplication> result = new ArrayList<OnlineApplication>();
+// List<OnlineApplication> allOAs = getAllOnlineApplications();
+//
+// for (OnlineApplication oa : nullGuard(allOAs)) {
+// if (oa.isIsActive()) {
+// result.add(oa);
+// }
+// }
+//
+// if (result.size() == 0) {
+// Logger.trace("No entries found.");
+// return null;
+// }
+//
+// return result;
+// }
+//
+// /**
+// *
+// * @param id
+// * @return
+// */
+// public static OnlineApplication getActiveOnlineApplication(String id) {
+// Logger.trace("Getting Active OnlineApplication with ID " + id + " from database.");
+//
+// // select onlineapplication from OnlineApplication onlineapplication
+// // where onlineapplication.publicURLPrefix =
+// // SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) and onlineapplication.isActive = '1'
+// OnlineApplication result = null;
+// List<OnlineApplication> allActiveOAs = getAllActiveOnlineApplications();
+//
+// for (OnlineApplication oa : nullGuard(allActiveOAs)) {
+// String publicUrlPrefix = oa.getPublicURLPrefix();
+// if (publicUrlPrefix != null && publicUrlPrefix.length() <= id.length()) {
+// if ((id.substring(1, publicUrlPrefix.length()).equals(publicUrlPrefix))) {
+// if (result != null) {
+// Logger.warn("OAIdentifier match to more then one DB-entry!");
+// return null;
+// } else {
+// result = oa;
+// }
+// }
+// }
+// }
+//
+// return result;
+// }
+//
+// /**
+// *
+// * @param dbid
+// * @return
+// */
+// public static OnlineApplication getOnlineApplication(long dbid) {
+// Logger.trace("Getting OnlineApplication with DBID " + dbid + " from database.");
+//
+// // select onlineapplication from OnlineApplication onlineapplication where onlineapplication.hjid = :id
+// OnlineApplication result = null;
+// List<OnlineApplication> allOAs = getAllOnlineApplications();
+//
+// for (OnlineApplication oa : nullGuard(allOAs)) {
+// if (oa.getHjid() == dbid) {
+// result = oa;
+// break;
+// }
+// }
+//
+// return result;
+// }
+//
+// /**
+// *
+// * @param id
+// * @return
+// */
+// public static OnlineApplication getOnlineApplication(String id) {
+// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
+//
+// // select onlineapplication from OnlineApplication onlineapplication
+// // where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix))
+// OnlineApplication result = null;
+// List<OnlineApplication> allOAs = getAllOnlineApplications();
+//
+// for (OnlineApplication oa : nullGuard(allOAs)) {
+// String publicUrlPrefix = oa.getPublicURLPrefix();
+// if (publicUrlPrefix != null && publicUrlPrefix.length() <= id.length()) {
+// if (id.substring(1, publicUrlPrefix.length()).equals(publicUrlPrefix)) {
+// if (result != null) {
+// Logger.warn("OAIdentifier match to more then one DB-entry!");
+// return null;
+// } else {
+// result = oa;
+// }
+// }
+// }
+// }
+//
+// return result;
+// }
+//
+// /**
+// *
+// * @param id
+// * @return
+// */
+// public static List<OnlineApplication> searchOnlineApplications(String id) {
+// Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
+//
+// // select onlineapplication from OnlineApplication onlineapplication
+// // where onlineapplication.friendlyName like :id
+// List<OnlineApplication> result = new ArrayList<OnlineApplication>();
+// List<OnlineApplication> allOAs = getAllOnlineApplications();
+//
+// for (OnlineApplication oa : nullGuard(allOAs)) {
+// if (id.equals(oa.getFriendlyName())) {
+// result.add(oa);
+// }
+// }
+//
+// if (result.size() == 0) {
+// Logger.trace("No entries found.");
+// return null;
+// }
+//
+// return result;
+// }
+//
+// /**
+// *
+// * @return
+// */
+// public static List<UserDatabase> getAllOpenUsersRequests() {
+// Logger.trace("Get all new Users from Database");
+//
// // select userdatabase from UserDatabase userdatabase
-// List<UserDatabase> result = conf.getList("getAllUsers", UserDatabase.class);
+// // where userdatabase.userRequestTokken is not null
+// // and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '0'
+// List<UserDatabase> result = new ArrayList<UserDatabase>();
+// List<UserDatabase> allUsers = getAllUsers();
+//
+// for (UserDatabase user : nullGuard(allUsers)) {
+// // TODO check result of query "... userdatabase.userRequestTokken is not null" if Tokken is null -> (null, "NULL", "", ... ?)
+// if ((user.getUserRequestTokken() != null && !user.getUserRequestTokken().isEmpty() && !user.getUserRequestTokken().equals("NULL"))
+// && (user.isIsAdminRequest()) && (!user.isIsMailAddressVerified())) {
+// result.add(user);
+// }
+// }
+//
// if (result.size() == 0) {
// Logger.trace("No entries found.");
// return null;
// }
//
// return result;
-
- //TODO!!!
- return null;
- }
-
- /**
- *
- * @return
- */
- public static List<OnlineApplication> getAllOnlineApplications() {
- Logger.trace("Get All OnlineApplications from database.");
-
- // select onlineapplication from OnlineApplication onlineapplication
-// return conf.getList(MOAIDConfigurationConstants.ONLINE_APPLICATIONS_KEY, OnlineApplication.class);
-
- //TODO!!!
- return null;
-
- }
-
- /**
- *
- * @return
- */
- public static List<OnlineApplication> getAllNewOnlineApplications() {
- Logger.trace("Get All New OnlineApplications from database.");
-
- // select onlineapplication from OnlineApplication onlineapplication
- // where onlineapplication.isActive = '0' and onlineapplication.isAdminRequired = '1'
- List<OnlineApplication> result = new ArrayList<OnlineApplication>();
- List<OnlineApplication> allOAs = getAllOnlineApplications();
-
- for (OnlineApplication oa : nullGuard(allOAs)) {
- if (!oa.isIsActive() && oa.isIsAdminRequired()) {
- result.add(oa);
- }
- }
-
- if (result.size() == 0) {
- Logger.trace("No entries found.");
- return null;
- }
-
- return result;
- }
-
+// }
+//
+// /**
+// *
+// * @param tokken
+// * @return
+// */
+// public static UserDatabase getNewUserWithTokken(String tokken) {
+// Logger.trace("Getting Userinformation with Tokken " + tokken + " from database.");
+//
+// // select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken = :tokken
+// UserDatabase result = null;
+// List<UserDatabase> allUsers = getAllUsers();
+//
+// for (UserDatabase user : nullGuard(allUsers)) {
+// if (user.getUserRequestTokken().equals(tokken)) {
+// result = user;
+// break;
+// }
+// }
+//
+// return result;
+// }
+//
+// /**
+// *
+// * @param id
+// * @return
+// */
+// public static UserDatabase getUsersWithOADBID(long id) {
+// Logger.trace("Getting Userinformation with OADBID " + id + " from database.");
+//
+// // select userdatabase from UserDatabase userdatabase
+// // inner join userdatabase.onlineApplication oa where oa.hjid = :id
+// UserDatabase result = null;
+// List<UserDatabase> allUsers = getAllUsers();
+//
+// boolean quit = false;
+// for (UserDatabase user : nullGuard(allUsers)) {
+//
+// for (OnlineApplication oa : user.getOnlineApplication()) {
+//
+// if (oa.getHjid() == id) {
+// result = user;
+// quit = true;
+// break;
+// }
+// }
+//
+// if (quit) {
+// break;
+// }
+// }
+//
+// return result;
+// }
+//
// /**
// *
+// * @param id
// * @return
// */
-// public static at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration getMOAIDConfiguration() {
-// Logger.trace("Load MOAID Configuration from database.");
-//
-// AuthComponentGeneral authComponent = (AuthComponentGeneral) conf.get(MOAIDConfigurationConstants.AUTH_COMPONENT_GENERAL_KEY,
-// AuthComponentGeneral.class);
-//
-// ChainingModes chainingModes = (ChainingModes) conf.get(MOAIDConfigurationConstants.CHAINING_MODES_KEY, ChainingModes.class);
-// List<GenericConfiguration> genericConfigurations = (List<GenericConfiguration>) conf.getList(
-// MOAIDConfigurationConstants.GENERIC_CONFIGURATION_KEY, GenericConfiguration.class);
-// String trustedCaCertificates = (String) conf.get(MOAIDConfigurationConstants.TRUSTED_CERTIFICATES_KEY, String.class);
-// DefaultBKUs defaultBKUs = (DefaultBKUs) conf.get(MOAIDConfigurationConstants.DEFAULT_BKUS_KEY, DefaultBKUs.class);
-// SLRequestTemplates slrRequestRemplates = (SLRequestTemplates) conf.get(MOAIDConfigurationConstants.SLREQUEST_TEMPLATES_KEY,
-// SLRequestTemplates.class);
-// Date timeStamp = (Date) conf.get(MOAIDConfigurationConstants.TIMESTAMP_ITEM_KEY, Date.class);
-// Date pvp2Refresh = (Date) conf.get(MOAIDConfigurationConstants.PVP2REFRESH_ITEM_KEY, Date.class);
-//
-// // if (authComponent == null || chainingModes == null || trustedCaCertificates == null || defaultBKUs == null
-// // || slrRequestRemplates == null || timeStamp == null || pvp2Refresh == null
-// //
-// // ) {
-// // // TODO: is there a better approach in case of error?
-// // Logger.trace("Not all necessary data available. Create fresh instance.");
-// // return new MOAIDConfiguration();
-// // }
-//
-// // select moaidconfiguration from MOAIDConfiguration moaidconfiguration
-// at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration result = new at.gv.egovernment.moa.id.commons.db.dao.config.MOAIDConfiguration();
-// result.setAuthComponentGeneral(authComponent);
-// result.setChainingModes(chainingModes);
-// result.setGenericConfiguration(genericConfigurations);
-// result.setTrustedCACertificates(trustedCaCertificates);
-// result.setDefaultBKUs(defaultBKUs);
-// result.setSLRequestTemplates(slrRequestRemplates);
-// result.setTimestampItem(timeStamp);
-// result.setPvp2RefreshItem(pvp2Refresh);
+// public static UserDatabase getUserWithID(long id) {
+// Logger.trace("Getting Userinformation with ID " + id + " from database.");
+//
+// // select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id
+// UserDatabase result = null;
+// List<UserDatabase> allUsers = getAllUsers();
+//
+// for (UserDatabase user : nullGuard(allUsers)) {
+// if (user.getHjid() == id) {
+// result = user;
+// break;
+// }
+// }
//
// return result;
// }
-
- /**
- *
- * @return
- */
- public static List<OnlineApplication> getAllActiveOnlineApplications() {
- Logger.trace("Get All New OnlineApplications from database.");
-
- // select onlineapplication from OnlineApplication onlineapplication
- // where onlineapplication.isActive = '1'
- List<OnlineApplication> result = new ArrayList<OnlineApplication>();
- List<OnlineApplication> allOAs = getAllOnlineApplications();
-
- for (OnlineApplication oa : nullGuard(allOAs)) {
- if (oa.isIsActive()) {
- result.add(oa);
- }
- }
-
- if (result.size() == 0) {
- Logger.trace("No entries found.");
- return null;
- }
-
- return result;
- }
-
- /**
- *
- * @param id
- * @return
- */
- public static OnlineApplication getActiveOnlineApplication(String id) {
- Logger.trace("Getting Active OnlineApplication with ID " + id + " from database.");
-
- // select onlineapplication from OnlineApplication onlineapplication
- // where onlineapplication.publicURLPrefix =
- // SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) and onlineapplication.isActive = '1'
- OnlineApplication result = null;
- List<OnlineApplication> allActiveOAs = getAllActiveOnlineApplications();
-
- for (OnlineApplication oa : nullGuard(allActiveOAs)) {
- String publicUrlPrefix = oa.getPublicURLPrefix();
- if (publicUrlPrefix != null && publicUrlPrefix.length() <= id.length()) {
- if ((id.substring(1, publicUrlPrefix.length()).equals(publicUrlPrefix))) {
- if (result != null) {
- Logger.warn("OAIdentifier match to more then one DB-entry!");
- return null;
- } else {
- result = oa;
- }
- }
- }
- }
-
- return result;
- }
-
- /**
- *
- * @param dbid
- * @return
- */
- public static OnlineApplication getOnlineApplication(long dbid) {
- Logger.trace("Getting OnlineApplication with DBID " + dbid + " from database.");
-
- // select onlineapplication from OnlineApplication onlineapplication where onlineapplication.hjid = :id
- OnlineApplication result = null;
- List<OnlineApplication> allOAs = getAllOnlineApplications();
-
- for (OnlineApplication oa : nullGuard(allOAs)) {
- if (oa.getHjid() == dbid) {
- result = oa;
- break;
- }
- }
-
- return result;
- }
-
- /**
- *
- * @param id
- * @return
- */
- public static OnlineApplication getOnlineApplication(String id) {
- Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
-
- // select onlineapplication from OnlineApplication onlineapplication
- // where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix))
- OnlineApplication result = null;
- List<OnlineApplication> allOAs = getAllOnlineApplications();
-
- for (OnlineApplication oa : nullGuard(allOAs)) {
- String publicUrlPrefix = oa.getPublicURLPrefix();
- if (publicUrlPrefix != null && publicUrlPrefix.length() <= id.length()) {
- if (id.substring(1, publicUrlPrefix.length()).equals(publicUrlPrefix)) {
- if (result != null) {
- Logger.warn("OAIdentifier match to more then one DB-entry!");
- return null;
- } else {
- result = oa;
- }
- }
- }
- }
-
- return result;
- }
-
- /**
- *
- * @param id
- * @return
- */
- public static List<OnlineApplication> searchOnlineApplications(String id) {
- Logger.trace("Getting OnlineApplication with ID " + id + " from database.");
-
- // select onlineapplication from OnlineApplication onlineapplication
- // where onlineapplication.friendlyName like :id
- List<OnlineApplication> result = new ArrayList<OnlineApplication>();
- List<OnlineApplication> allOAs = getAllOnlineApplications();
-
- for (OnlineApplication oa : nullGuard(allOAs)) {
- if (id.equals(oa.getFriendlyName())) {
- result.add(oa);
- }
- }
-
- if (result.size() == 0) {
- Logger.trace("No entries found.");
- return null;
- }
-
- return result;
- }
-
- /**
- *
- * @return
- */
- public static List<UserDatabase> getAllOpenUsersRequests() {
- Logger.trace("Get all new Users from Database");
-
- // select userdatabase from UserDatabase userdatabase
- // where userdatabase.userRequestTokken is not null
- // and userdatabase.isAdminRequest = '1' and userdatabase.isMailAddressVerified = '0'
- List<UserDatabase> result = new ArrayList<UserDatabase>();
- List<UserDatabase> allUsers = getAllUsers();
-
- for (UserDatabase user : nullGuard(allUsers)) {
- // TODO check result of query "... userdatabase.userRequestTokken is not null" if Tokken is null -> (null, "NULL", "", ... ?)
- if ((user.getUserRequestTokken() != null && !user.getUserRequestTokken().isEmpty() && !user.getUserRequestTokken().equals("NULL"))
- && (user.isIsAdminRequest()) && (!user.isIsMailAddressVerified())) {
- result.add(user);
- }
- }
-
- if (result.size() == 0) {
- Logger.trace("No entries found.");
- return null;
- }
-
- return result;
- }
-
- /**
- *
- * @param tokken
- * @return
- */
- public static UserDatabase getNewUserWithTokken(String tokken) {
- Logger.trace("Getting Userinformation with Tokken " + tokken + " from database.");
-
- // select userdatabase from UserDatabase userdatabase where userdatabase.userRequestTokken = :tokken
- UserDatabase result = null;
- List<UserDatabase> allUsers = getAllUsers();
-
- for (UserDatabase user : nullGuard(allUsers)) {
- if (user.getUserRequestTokken().equals(tokken)) {
- result = user;
- break;
- }
- }
-
- return result;
- }
-
- /**
- *
- * @param id
- * @return
- */
- public static UserDatabase getUsersWithOADBID(long id) {
- Logger.trace("Getting Userinformation with OADBID " + id + " from database.");
-
- // select userdatabase from UserDatabase userdatabase
- // inner join userdatabase.onlineApplication oa where oa.hjid = :id
- UserDatabase result = null;
- List<UserDatabase> allUsers = getAllUsers();
-
- boolean quit = false;
- for (UserDatabase user : nullGuard(allUsers)) {
-
- for (OnlineApplication oa : user.getOnlineApplication()) {
-
- if (oa.getHjid() == id) {
- result = user;
- quit = true;
- break;
- }
- }
-
- if (quit) {
- break;
- }
- }
-
- return result;
- }
-
- /**
- *
- * @param id
- * @return
- */
- public static UserDatabase getUserWithID(long id) {
- Logger.trace("Getting Userinformation with ID " + id + " from database.");
-
- // select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id
- UserDatabase result = null;
- List<UserDatabase> allUsers = getAllUsers();
-
- for (UserDatabase user : nullGuard(allUsers)) {
- if (user.getHjid() == id) {
- result = user;
- break;
- }
- }
-
- return result;
- }
-
- /**
- *
- * @param username
- * @return
- */
- public static UserDatabase getUserWithUserName(String username) {
- Logger.trace("Getting Userinformation with ID " + username + " from database.");
-
- // select userdatabase from UserDatabase userdatabase where userdatabase.username = :username
- UserDatabase result = null;
- List<UserDatabase> allUsers = getAllUsers();
-
- for (UserDatabase user : nullGuard(allUsers)) {
- if (user.getUsername().equals(username)) {
- result = user;
- break;
- }
- }
-
- return result;
- }
-
- /**
- *
- * @param bpkwbpk
- * @return
- */
- public static UserDatabase getUserWithUserBPKWBPK(String bpkwbpk) {
- Logger.trace("Getting Userinformation with ID " + bpkwbpk + " from database.");
-
- // select userdatabase from UserDatabase userdatabase where userdatabase.bpk = :bpk
- UserDatabase result = null;
- List<UserDatabase> allUsers = getAllUsers();
-
- for (UserDatabase user : nullGuard(allUsers)) {
- if (user.getBpk().equals(bpkwbpk)) {
- result = user;
- break;
- }
- }
-
- return result;
- }
-
-}
+//
+// /**
+// *
+// * @param username
+// * @return
+// */
+// public static UserDatabase getUserWithUserName(String username) {
+// Logger.trace("Getting Userinformation with ID " + username + " from database.");
+//
+// // select userdatabase from UserDatabase userdatabase where userdatabase.username = :username
+// UserDatabase result = null;
+// List<UserDatabase> allUsers = getAllUsers();
+//
+// for (UserDatabase user : nullGuard(allUsers)) {
+// if (user.getUsername().equals(username)) {
+// result = user;
+// break;
+// }
+// }
+//
+// return result;
+// }
+//
+// /**
+// *
+// * @param bpkwbpk
+// * @return
+// */
+// public static UserDatabase getUserWithUserBPKWBPK(String bpkwbpk) {
+// Logger.trace("Getting Userinformation with ID " + bpkwbpk + " from database.");
+//
+// // select userdatabase from UserDatabase userdatabase where userdatabase.bpk = :bpk
+// UserDatabase result = null;
+// List<UserDatabase> allUsers = getAllUsers();
+//
+// for (UserDatabase user : nullGuard(allUsers)) {
+// if (user.getBpk().equals(bpkwbpk)) {
+// result = user;
+// break;
+// }
+// }
+//
+// return result;
+// }
+//
+//}
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/DatabaseConfigPropertyImpl.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/DatabaseConfigPropertyImpl.java
index f47b0c9e2..f62d2514f 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/DatabaseConfigPropertyImpl.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/DatabaseConfigPropertyImpl.java
@@ -165,7 +165,7 @@ public class DatabaseConfigPropertyImpl extends AbstractConfigurationImpl {
log.debug("Looking for configuration property for key '{}'.", key);
ConfigProperty result = em.find(ConfigProperty.class, key);
if (result != null) {
- log.debug("Found configuration property {}.", result);
+ log.trace("Found configuration property {}.", result);
} else {
log.debug("Unable to find configuration property for key '{}'.", key);
}
diff --git a/id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml b/id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml
index 6325ada5f..1f7efd589 100644
--- a/id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml
+++ b/id/server/moa-id-commons/src/main/resources/META-INF/persistence.xml
@@ -5,11 +5,6 @@
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
- <persistence-unit name="at.gv.egovernment.moa.id.commons.db.dao.config" transaction-type="RESOURCE_LOCAL">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
- <class>at.gv.egovernment.moa.id.commons.config.persistence.dal.SOME_CLASS</class>
- </persistence-unit>
-
<persistence-unit name="config" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>at.gv.egovernment.moa.id.commons.db.dao.config.ConfigProperty</class>
diff --git a/id/server/moa-id-commons/src/main/resources/bindings.xjb b/id/server/moa-id-commons/src/main/resources/bindings.xjb
index 21714849b..9d017d02e 100644
--- a/id/server/moa-id-commons/src/main/resources/bindings.xjb
+++ b/id/server/moa-id-commons/src/main/resources/bindings.xjb
@@ -1,4 +1,4 @@
-<jaxb:bindings version="2.1"
+<!-- <jaxb:bindings version="2.1"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
@@ -32,4 +32,4 @@
</hj:many-to-many>
</jaxb:bindings>
-</jaxb:bindings> \ No newline at end of file
+</jaxb:bindings> --> \ No newline at end of file
diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_3.0.xsd b/id/server/moa-id-commons/src/main/resources/config/moaid_config_3.0.xsd
deleted file mode 100644
index d4686bd5e..000000000
--- a/id/server/moa-id-commons/src/main/resources/config/moaid_config_3.0.xsd
+++ /dev/null
@@ -1,1057 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Mit XMLSpy v2013 sp1 (http://www.altova.com) von Thomas Lenz (Graz University of Technology IAIK) bearbeitet -->
-<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:hj="http://hyperjaxb3.jvnet.org/ejb/schemas/customizations" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0.0" jaxb:extensionBindingPrefixes="xjc hj" jaxb:version="2.0">
- <xsd:complexType name="OnlineApplication">
- <xsd:complexContent>
- <xsd:extension base="OnlineApplicationType">
- <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
- <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
- <xsd:attribute name="type" use="optional" default="publicService">
- <xsd:simpleType>
- <xsd:restriction base="xsd:NMTOKEN">
- <xsd:enumeration value="businessService"/>
- <xsd:enumeration value="publicService"/>
- <xsd:enumeration value="storkService"/>
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- <xsd:attribute name="calculateHPI" type="xsd:boolean" use="optional" default="false"/>
- <xsd:attribute name="friendlyName" type="xsd:string" use="optional"/>
- <xsd:attribute name="target" type="xsd:string" use="optional"/>
- <xsd:attribute name="targetFriendlyName" type="xsd:string" use="optional"/>
- <xsd:attribute name="storkSPTargetCountry" type="xsd:string" use="optional"/>
- <xsd:attribute name="removeBPKFromAuthBlock" type="xsd:boolean" use="optional" default="false"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:element name="Configuration">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="LoginType" type="LoginType" default="stateful"/>
- <xsd:element name="Binding" minOccurs="0">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="full"/>
- <xsd:enumeration value="userName"/>
- <xsd:enumeration value="none"/>
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:element>
- <xsd:choice>
- <xsd:element ref="ParamAuth"/>
- <xsd:element ref="BasicAuth"/>
- <xsd:element ref="HeaderAuth"/>
- </xsd:choice>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <!-- ### Identification elements ### -->
- <xsd:complexType name="AbstractSimpleIdentificationType">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
- <xsd:element name="AbstractSimpleIdentification" type="AttributeProviderPlugin">
- <xsd:annotation>
- <xsd:documentation>possibility to include common austrian primary
- keys in human readable way, english translation not available
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <!-- ### DSIG imports ### -->
- <xsd:complexType name="X509IssuerSerialType">
- <xsd:sequence>
- <xsd:element name="X509IssuerName" type="xsd:string"/>
- <xsd:element name="X509SerialNumber" type="xsd:integer"/>
- </xsd:sequence>
- </xsd:complexType>
- <!-- ### Imported STORK resources ### -->
- <xsd:simpleType name="QualityAuthenticationAssuranceLevelType">
- <xsd:restriction base="xsd:integer">
- <xsd:minInclusive value="1"/>
- <xsd:maxInclusive value="4"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:element name="QualityAuthenticationAssuranceLevel" type="QualityAuthenticationAssuranceLevelType"/>
- <xsd:element name="AttributeValue" type="xsd:anyType"/>
- <xsd:simpleType name="CountryCodeType">
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="[A-Z]{2}"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:complexType name="StorkAttribute">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="mandatory" type="xsd:boolean"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:simpleType name="LoginType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="stateless"/>
- <xsd:enumeration value="stateful"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:element name="ParamAuth">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="Parameter" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="Parameter">
- <xsd:complexType>
- <xsd:attribute name="Name" type="xsd:token" use="required"/>
- <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="BasicAuth">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="UserID" type="MOAAuthDataType"/>
- <xsd:element name="Password" type="MOAAuthDataType"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="HeaderAuth">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="Header" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="Header">
- <xsd:complexType>
- <xsd:attribute name="Name" type="xsd:token" use="required"/>
- <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:simpleType name="MOAAuthDataType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="MOAGivenName"/>
- <xsd:enumeration value="MOAFamilyName"/>
- <xsd:enumeration value="MOADateOfBirth"/>
- <xsd:enumeration value="MOABPK"/>
- <xsd:enumeration value="MOAWBPK"/>
- <xsd:enumeration value="MOAPublicAuthority"/>
- <xsd:enumeration value="MOABKZ"/>
- <xsd:enumeration value="MOAQualifiedCertificate"/>
- <xsd:enumeration value="MOAStammzahl"/>
- <xsd:enumeration value="MOAIdentificationValueType"/>
- <xsd:enumeration value="MOAIPAddress"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:simpleType name="MOAKeyBoxSelector">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="SecureSignatureKeypair"/>
- <xsd:enumeration value="CertifiedKeypair"/>
- </xsd:restriction>
- </xsd:simpleType>
- <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation -->
- <xsd:element name="MOA-IDConfiguration">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="AuthComponent_General" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>enthält Parameter der
- Authentisierungs-Komponente
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="AuthComponentType"/>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="OnlineApplication" type="OnlineApplication" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>enthält Parameter für die OA
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ChainingModes" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>spezifiziert den Algorithmus ("pkix" oder
- "chaining") für die Zertifikatspfadvalidierung
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="TrustAnchor">
- <xsd:annotation>
- <xsd:documentation>ein vom SystemDefaultMode abweichender
- ChiningMode kann für jeden TrustAnchor gesetzt werden
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:complexContent>
- <xsd:extension base="X509IssuerSerialType">
- <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>verweist auf ein Verzeichnis, das
- vertrauenswürdige CA (Zwischen-CA, Wurzel-CA) Zertifikate
- enthält.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
- <xsd:complexType>
- <xsd:attribute name="name" use="required">
- <xsd:simpleType>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
- <xsd:enumeration value="AuthenticationSession.TimeOut"/>
- <xsd:enumeration value="AuthenticationData.TimeOut"/>
- <xsd:enumeration value="TrustManager.RevocationChecking"/>
- <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
- <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
- <xsd:enumeration value="AuthenticationServer.KeepAssertion"/>
- <xsd:enumeration value="AuthenticationServer.WriteAssertionToFile"/>
- <xsd:enumeration value="AuthenticationServer.SourceID"/>
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:attribute>
- <xsd:attribute name="value" type="xsd:string" use="required"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="DefaultBKUs">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="OnlineBKU" type="xsd:anyURI" minOccurs="0"/>
- <xsd:element name="HandyBKU" type="xsd:anyURI"/>
- <xsd:element name="LocalBKU" type="xsd:anyURI"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="SLRequestTemplates">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="OnlineBKU" type="xsd:anyURI"/>
- <xsd:element name="HandyBKU" type="xsd:anyURI"/>
- <xsd:element name="LocalBKU" type="xsd:anyURI"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="timestamp" type="xsd:dateTime"/>
- <xsd:attribute name="pvp2refresh" type="xsd:dateTime"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:complexType name="AuthComponentType">
- <xsd:sequence>
- <xsd:element ref="GeneralConfiguration"/>
- <xsd:element name="Protocols">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="SAML1" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="SourceID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- <xsd:attribute name="isActive" type="xsd:boolean" default="false"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="PVP2" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="PublicURLPrefix" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="IssuerName" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="Organization">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="DisplayName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="URL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element ref="Contact" minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="isActive" type="xsd:boolean" default="true"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="OAuth" minOccurs="0">
- <xsd:complexType>
- <xsd:attribute name="isActive" type="xsd:boolean" default="true"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="LegacyAllowed">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="ProtocolName" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="SSO">
- <xsd:complexType>
- <xsd:choice>
- <xsd:element name="target" type="xsd:string"/>
- <xsd:element ref="IdentificationNumber" minOccurs="1"/>
- </xsd:choice>
- <xsd:attribute name="PublicURL" type="xsd:string"/>
- <xsd:attribute name="FriendlyName" type="xsd:string"/>
- <xsd:attribute name="SpecialText" type="xsd:string"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="SecurityLayer">
- <xsd:annotation>
- <xsd:documentation>enthält Parameter für die Kommunikation mit dem
- Security-Layer
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="MOA-SP">
- <xsd:annotation>
- <xsd:documentation>enthaelt Konfiguratiosnparameter für die
- Kommunikation mit dem MOA SP Modul
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>enthält Parameter für die SOAP-Verbindung von
- der AUTH-Komponente zu MOA-SP; das Attribut URL enthält den
- Endpunkt des Server; wird das Schema "https" verwendet müssen
- die Kind-Elemente angegeben werden; wird das Schema "http"
- verwendet dürfen keine Kind-Elemente angegeben werden; wird das
- Element nicht verwendet dann wird MOA-SP über das API
- aufgerufen
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="VerifyIdentityLink">
- <xsd:annotation>
- <xsd:documentation>enthält Parameter für die Überprüfung der
- Personenbindung
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="TrustProfileID"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="VerifyAuthBlock">
- <xsd:annotation>
- <xsd:documentation>enthält Parameter für die Überprüfung des
- AUTH-Blocks
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="TrustProfileID"/>
- <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="IdentityLinkSigners" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>enthält Informationen über akzeptierte Signers
- des IdentityLinks
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>akzeptierte Signer des IdentityLinks werden
- per X509SubjectName (Kodierung nach RFC 2253) identifiziert
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="ForeignIdentities" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
- <xsd:annotation>
- <xsd:documentation>Verbindungsparameter zum SZR-Gateway
- (GetIdentityLink)
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element ref="STORK" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Verbindungsparameter zu den Country-PEPS
- (C-PEPS)
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="OnlineMandates" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
- <xsd:annotation>
- <xsd:documentation>Verbindungsparameter zum
- Online-Vollmachten-Service
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="TransformsInfoType">
- <xsd:annotation>
- <xsd:documentation>das Attribut filename verweist auf eine Datei mit
- globalem Element TransformsInfo vom Typ sl10:TransformsInfo; diese
- TransformsInfo werden in den CreateXMLSignatureRequest fuer die
- Signatur des AUTH-Blocks inkludiert
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="transformation" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
- </xsd:complexType>
- <xsd:complexType name="TemplatesType">
- <xsd:sequence>
- <xsd:element name="Template" type="TemplateType" minOccurs="0" maxOccurs="3"/>
- <xsd:element name="AditionalAuthBlockText" type="xsd:string" minOccurs="0"/>
- <xsd:element name="BKUSelectionCustomization" type="BKUSelectionCustomizationType" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="BKUSelectionTemplate" type="TransformsInfoType" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="SendAssertionTemplate" type="TransformsInfoType" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="TemplateType">
- <xsd:annotation>
- <xsd:documentation>das Attribut URL spezifiziert die Lage des
- Templates
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
- </xsd:complexType>
- <xsd:complexType name="VerifyInfoboxesType">
- <xsd:annotation>
- <xsd:documentation>Verifikation zusaetzlicher Infoboxen
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="DefaultTrustProfile" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Optionales DefaultTrustprofil für die
- Überprüfung aller weiteren Infoboxen
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element ref="TrustProfileID"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="SchemaLocationType">
- <xsd:annotation>
- <xsd:documentation>Spezifiziert die Lage von XML Schemas
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="Schema" maxOccurs="unbounded">
- <xsd:complexType>
- <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
- <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="InterfederationGatewayType">
- <xsd:sequence>
- <xsd:element name="forwardIDPIdentifier" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="forwardProtocolIdentifer" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="InterfederationIDPType">
- <xsd:sequence>
- <xsd:element name="attributeQueryURL" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="storeSSOSession" type="xsd:boolean" default="true" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="performPassivRequest" type="xsd:boolean" default="true" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="performLocalAuthenticationOnError" type="xsd:boolean" default="true" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- <xsd:attribute name="inboundSSO" type="xsd:boolean" default="true"/>
- <xsd:attribute name="outboundSSO" type="xsd:boolean" default="true"/>
- </xsd:complexType>
- <xsd:complexType name="OnlineApplicationType">
- <xsd:sequence>
- <xsd:element name="isNew" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:appinfo>
- <hj:ignored/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="isActive" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="isAdminRequired" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="isInterfederationIDP" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="InterfederationIDP" type="InterfederationIDPType" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="isInterfederationGateway" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="InterfederationGateway" type="InterfederationGatewayType" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="AuthComponent_OA" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>enthält Parameter über die OA, die die
- Authentisierungs-Komponente betreffen
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="BKUURLS">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="OnlineBKU" type="xsd:anyURI" minOccurs="1"/>
- <xsd:element name="HandyBKU" type="xsd:anyURI" minOccurs="1"/>
- <xsd:element name="LocalBKU" type="xsd:anyURI" minOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element ref="IdentificationNumber" minOccurs="0"/>
- <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
- <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="Mandates" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="Profiles" type="xsd:string"/>
- <xsd:element name="ProfileName" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="testCredentials" minOccurs="0" maxOccurs="1">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="credentialOID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="enableTestCredentials" type="xsd:boolean" default="false"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element ref="OA_STORK" minOccurs="0"/>
- <xsd:element name="OA_SSO" minOccurs="0">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="UseSSO" type="xsd:boolean"/>
- <xsd:element name="AuthDataFrame" type="xsd:boolean" default="true"/>
- <xsd:element name="SingleLogOutURL" type="xsd:anyURI"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element ref="OA_SAML1" minOccurs="0"/>
- <xsd:element ref="OA_PVP2" minOccurs="0"/>
- <xsd:element ref="OA_OAUTH20" minOccurs="0"/>
- <xsd:element ref="EncBPKInformation" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0"
- maxOccurs="1"/ -->
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="EncBPKInformation">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="bPKDecryption" minOccurs="0" maxOccurs="1">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="keyInformation" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="iv" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="keyStoreFileName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="keyAlias" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="bPKEncryption" minOccurs="0" maxOccurs="unbounded">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="publicKey" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="target" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="vkz" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:complexType name="ConnectionParameterServerAuthType">
- <xsd:sequence>
- <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte
- Server-Zertifikate der TLS-Verbindung enthält (keine
- CA-Zertifikate)
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
- </xsd:complexType>
- <xsd:complexType name="ConnectionParameterClientAuthType">
- <xsd:complexContent>
- <xsd:extension base="ConnectionParameterServerAuthType">
- <xsd:sequence>
- <xsd:element name="ClientKeyStore" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>URL zu einem KeyStore, der den privaten
- Schlüssel, der für die TLS-Client-Authentisierung verwendet
- wird, enthält
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:simpleContent>
- <xsd:extension base="xsd:anyURI">
- <xsd:attribute name="password" type="xsd:string" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- </xsd:element>
- </xsd:sequence>
- </xsd:extension>
- </xsd:complexContent>
- </xsd:complexType>
- <xsd:element name="TrustProfileID" type="xsd:string"/>
- <xsd:simpleType name="ChainingModeType">
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="chaining"/>
- <xsd:enumeration value="pkix"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:simpleType name="BKUSelectionType">
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="HTMLComplete"/>
- <xsd:enumeration value="HTMLSelect"/>
- </xsd:restriction>
- </xsd:simpleType>
- <xsd:element name="CompatibilityMode" default="false">
- <xsd:simpleType>
- <xsd:restriction base="xsd:boolean"/>
- </xsd:simpleType>
- </xsd:element>
- <xsd:element name="EnableInfoboxValidator" default="true">
- <xsd:simpleType>
- <xsd:restriction base="xsd:boolean"/>
- </xsd:simpleType>
- </xsd:element>
- <xsd:element name="AlwaysShowForm" default="false">
- <xsd:annotation>
- <xsd:documentation>Soll nicht nur bei leerer oder standardisierter
- Vollmacht mit unvollständigen Daten, sondern beispielsweise zu
- Kontrollzwecken das Eingabeformular immer angezeigt werden, wenn ein
- Einschreiten durch berufliche Parteienvertretung geschieht so kann
- dies mittels dieses Schalters veranlasst werden
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleType>
- <xsd:restriction base="xsd:boolean"/>
- </xsd:simpleType>
- </xsd:element>
- <xsd:complexType name="InputProcessorType">
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="template" type="xsd:anyURI" use="optional">
- <xsd:annotation>
- <xsd:documentation>Das Attribut spezifiziert die Lage des
- Templates, welches der InputProcessor zur Darstellung des
- Eingabeformulars nutzen soll
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- <xsd:complexType name="PartyRepresentationType">
- <xsd:sequence>
- <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Default InputProcessor. Konfiguration eines vom
- Standardprozess abweichenden Verarbeitungsvorgangs bei der
- beruflichen Parteienvertretung. Der Wert dieses Elements ist der
- vollständige Klassenname des InputProzessors
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element ref="AlwaysShowForm" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Default Wert fuer Formularanzeige. Soll nicht nur
- bei leerer oder standardisierter Vollmacht mit unvollstaendigen
- Daten, sondern beispielsweise zu Kontrollzwecken das
- Eingabeformular zur vervollstaendigung der Vertretenendaten immer
- angezeigt werden, wenn ein Einschreiten durch berufliche
- Parteienvertretung geschieht so kann dies mittels dieses Schalters
- veranlasst werden
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Default Verbindungsparameter zum SZR-Gateway
- (für den EGIZ-Demonstrator im internen Netzwerk:
- https://129.27.142.5:8443/szr-gateway/services/MandateCreation)
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="PartyRepresentative" type="PartyRepresentativeType" minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>Falls keine speziellen beruflichen
- ParteienvertreterInnen definiert sind (Element kommt nicht vor),
- werden ausschließlich standardisierte Vollmachten mit einer
- MandateID="*" akzeptiert
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="PartyRepresentativeType">
- <xsd:sequence>
- <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Konfiguration eines vom Standardprozess
- abweichenden Verarbeitungsvorgangs bei der beruflichen
- Parteienvertretung. Der Wert dieses Elements ist der vollständige
- Klassenname des InputProzessors
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element ref="AlwaysShowForm" minOccurs="0"/>
- <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>Optionale Verbindungsparameter zu speziellem
- (SZR-)Gateway
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="oid" use="required">
- <xsd:annotation>
- <xsd:documentation>OID der Parteienvertretung lt. "Object Identifier
- der öffentlichen Verwaltung" - Konvention, Empfehlung. Diese ID
- muss mit der MandateID der übermittelten standardisierten Vollmacht
- übereinstimmen. Eine Parteienvertretung für standardisierte
- Vollmachten mit der MandateID "*" muss nicht definiert werden und
- erlaubt eine allgemeine berufliche Parteienvertretung mit
- Standardtexten. In anderen Fällen ist eine erlaubte OID mitttels
- dieses Attributs zu definieren
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="representPhysicalParty" use="optional" default="false">
- <xsd:annotation>
- <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für
- natürliche Personen erlaubt ist
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleType>
- <xsd:restriction base="xsd:boolean"/>
- </xsd:simpleType>
- </xsd:attribute>
- <xsd:attribute name="representCorporateParty" use="optional" default="false">
- <xsd:annotation>
- <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für
- juristische Personen erlaubt ist (welche z.B. ein Organwalter nicht
- vertreten darf und dieser Wert aus diesem Grund dort false sein
- muss)
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleType>
- <xsd:restriction base="xsd:boolean"/>
- </xsd:simpleType>
- </xsd:attribute>
- <xsd:attribute name="representationText" use="optional">
- <xsd:annotation>
- <xsd:documentation>Beschreibender Text, der an Stelle des
- Standardtexts bei der Signatur der Anmeldedaten im Falle einer
- vorliegenden beruflichen Parteienvertretung zur Signatur vorgelegt
- wird
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- </xsd:complexType>
- <xsd:complexType name="SignatureCreationParameterType">
- <xsd:annotation>
- <xsd:documentation>Enthaelt Informationen zu einem KeyStore bzw. Key
- zur STORK SAML AuthnRequest Signaturerstellung
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element ref="KeyStore"/>
- <xsd:element ref="KeyName"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="SignatureVerificationParameterType">
- <xsd:annotation>
- <xsd:documentation>Enthaelt Informationen zur Verfikation von
- Signaturen einer STORK SAML Response
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element ref="TrustProfileID"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="SAMLSigningParameter">
- <xsd:annotation>
- <xsd:documentation>Enthält Informationen zur Erstellung und
- Verifikation von STORK SAML Messages
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="SignatureCreationParameter" type="SignatureCreationParameterType"/>
- <xsd:element name="SignatureVerificationParameter" type="SignatureVerificationParameterType"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="KeyStore">
- <xsd:annotation>
- <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel
- zum Erstellen einer Signatur enthält
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:simpleContent>
- <xsd:extension base="xsd:anyURI">
- <xsd:attribute name="password" type="xsd:string" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="KeyName">
- <xsd:annotation>
- <xsd:documentation>Name zum Key eines KeyStores, der den privaten
- Schlüssel zum Erstellen einer Signatur darstellt
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="password" type="xsd:string" use="optional"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="C-PEPS">
- <xsd:annotation>
- <xsd:documentation>Enthält Informationen zu einem Citizen Country
- PEPS (C-PEPS)
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="AttributeValue" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element ref="OA_STORK" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="countryCode" type="CountryCodeType" use="required"/>
- <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
- <xsd:attribute name="supportsXMLSignature" type="xsd:boolean" default="true"/>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="STORK">
- <xsd:annotation>
- <xsd:documentation>Contains STORK related information
- </xsd:documentation>
- </xsd:annotation>
- <xsd:complexType>
- <xsd:choice>
- <xsd:sequence>
- <xsd:element ref="C-PEPS" maxOccurs="unbounded"/>
- <xsd:element ref="SAMLSigningParameter"/>
- </xsd:sequence>
- <xsd:sequence>
- <xsd:element ref="QualityAuthenticationAssuranceLevel" minOccurs="0"/>
- </xsd:sequence>
- <xsd:sequence>
- <xsd:element ref="Attributes" minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="OA_SAML1">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="isActive" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="provideStammzahl" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="provideAUTHBlock" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="provideIdentityLink" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="provideCertificate" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="provideFullMandatorData" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="useCondition" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="conditionLength" type="xsd:integer" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="sourceID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="provideAllErrors" type="xsd:boolean" default="true" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="OA_PVP2">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="metadataURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="certificate" type="xsd:base64Binary" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="updateRequired" type="xsd:dateTime" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="GeneralConfiguration">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="TimeOuts">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="Assertion" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="MOASessionCreated" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="MOASessionUpdated" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="AlternativeSourceID" type="xsd:string"/>
- <xsd:element name="CertStoreDirectory" type="xsd:anyURI"/>
- <xsd:element name="TrustManagerRevocationChecking" type="xsd:boolean" default="true"/>
- <xsd:element name="PublicURLPreFix" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="OA_OAUTH20">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="oAuthClientId" type="xsd:string"/>
- <xsd:element name="oAuthClientSecret" type="xsd:string"/>
- <xsd:element name="oAuthRedirectUri" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="IdentificationNumber">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="Type" type="xsd:string"/>
- <xsd:element name="Value" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="OA_STORK">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="StorkLogonEnabled" type="xsd:boolean" default="true"/>
- <xsd:element ref="Qaa" minOccurs="0" maxOccurs="1"/>
- <xsd:element ref="OAAttributes" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="VidpEnabled" type="xsd:boolean" default="false"/>
- <xsd:element ref="AttributeProviders" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="requireConsent" type="xsd:boolean" default="true"/>
- <xsd:element ref="C-PEPS" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="Contact">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="SurName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="GivenName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="Mail" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
- <xsd:element name="Type" minOccurs="1" maxOccurs="1">
- <xsd:simpleType>
- <xsd:restriction base="xsd:token">
- <xsd:enumeration value="technical"/>
- <xsd:enumeration value="support"/>
- <xsd:enumeration value="administrative"/>
- <xsd:enumeration value="billing"/>
- <xsd:enumeration value="other"/>
- </xsd:restriction>
- </xsd:simpleType>
- </xsd:element>
- <xsd:element name="Company" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="Phone" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
- <xsd:complexType name="UserDatabase">
- <xsd:sequence>
- <xsd:element name="bpk" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="familyname" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="givenname" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="institut" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="mail" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="phone" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="username" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="password" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="password_salt" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="userRequestTokken" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="isActive" type="xsd:boolean" default="true" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="isAdmin" type="xsd:boolean" default="true" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="isUsernamePasswordAllowed" type="xsd:boolean" default="true" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="isMandateUser" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="isMailAddressVerified" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="isAdminRequest" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="isPVP2Generated" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="lastLogin" type="xsd:string" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="OnlineApplication" type="OnlineApplication" minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="onlyBusinessService" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1">
- <xsd:annotation>
- <xsd:appinfo>
- <hj:ignored/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="businessServiceType" type="xsd:string" minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:appinfo>
- <hj:ignored/>
- </xsd:appinfo>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="BKUSelectionCustomizationType">
- <xsd:sequence>
- <xsd:element name="FontType" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="BackGroundColor" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="FrontColor" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="HeaderBackGroundColor" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="HeaderFrontColor" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="HeaderText" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="ButtonBackGroundColor" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="ButtonBackGroundColorFocus" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="ButtonFontColor" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="AppletRedirectTarget" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="AppletHeight" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="AppletWidth" type="xsd:string" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="MandateLoginButton" type="xsd:boolean" default="true" minOccurs="0" maxOccurs="1"/>
- <xsd:element name="OnlyMandateLoginAllowed" type="xsd:boolean" default="false" minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:complexType name="AttributeProviderPlugin">
- <xsd:sequence>
- <xsd:element name="name" type="xsd:string"/>
- <xsd:element name="url" type="xsd:anyURI"/>
- <xsd:element name="attributes" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="AttributeProviders" type="AttributeProviderPlugin"/>
- <xsd:element name="Attributes" type="StorkAttribute"/>
- <xsd:element name="Qaa" type="QualityAuthenticationAssuranceLevelType"/>
- <xsd:complexType name="OAStorkAttribute">
- <xsd:sequence>
- <xsd:element name="mandatory" type="xsd:boolean"/>
- <xsd:element name="name" type="xsd:string"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="OAAttributes" type="OAStorkAttribute"/>
-</xsd:schema>
diff --git a/id/server/moa-id-commons/src/main/resources/configuration.beans.xml_old b/id/server/moa-id-commons/src/main/resources/configuration.beans.xml_old
deleted file mode 100644
index b3e7526d0..000000000
--- a/id/server/moa-id-commons/src/main/resources/configuration.beans.xml_old
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:aop="http://www.springframework.org/schema/aop"
- xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
-
- <tx:annotation-driven />
- <context:annotation-config />
-
- <context:property-placeholder location="${location}"/>
-
-
- <bean id="configPropertyDao"
- class="at.gv.egovernment.moa.id.commons.db.dao.config.DatabaseConfigPropertyImpl" />
-
- <bean id="config" class="at.gv.egovernment.moa.id.commons.config.persistence.MOAIDConfigurationImpl">
- <property name="configPropertyDao" ref="configPropertyDao" />
- </bean>
-
- <bean id="configRead" class="at.gv.egovernment.moa.id.commons.db.NewConfigurationDBRead"/>
-
- <bean id="configWrite" class="at.gv.egovernment.moa.id.commons.db.NewConfigurationDBWrite"/>
-
- <bean id="moaidauthconfig" class="at.gv.egovernment.moa.id.config.auth.PropertyBasedAuthConfigurationProvider"
-
- <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" lazy-init="true" destroy-method="close">
- <aop:scoped-proxy/>
- <property name="driverClassName" value="${dataSource.driverClassName}" />
- <property name="url" value="${dataSource.url}"/>
- <property name="username" value="${dataSource.username}" />
- <property name="password" value="${dataSource.password}" />
- <property name="testOnBorrow" value="true" />
- <property name="validationQuery" value="SELECT 1" />
- </bean>
-
-
- <bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
- <property name="showSql" value="true" />
- <property name="generateDdl" value="${jpaVendorAdapter.generateDdl}" />
- <property name="databasePlatform" value="${jpaVendorAdapter.databasePlatform}" />
- </bean>
-
-
- <bean name="moaidconf" id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
- <property name="dataSource" ref="dataSource" />
- <property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
- <property name="persistenceUnitName" value="config" />
- </bean>
-
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
- <property name="entityManagerFactory" ref="entityManagerFactory" />
- </bean>
-
-</beans> \ No newline at end of file
diff --git a/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml b/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml
index a2961b0f6..a0923c03f 100644
--- a/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml
+++ b/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml
@@ -29,11 +29,6 @@
<bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="${jpaVendorAdapter.generateDdl}" />
-<!-- <property name="generateDdl">
- <bean class="java.lang.Boolean">
- <constructor-arg value="${jpaVendorAdapter.generateDdl}"/>
- </bean>
- </property> -->
<property name="databasePlatform" value="${hibernate.dialect}" />
</bean>
diff --git a/id/server/moa-id-commons/src/main/resources/persistence_template.xml b/id/server/moa-id-commons/src/main/resources/persistence_template.xml
deleted file mode 100644
index d9adc4394..000000000
--- a/id/server/moa-id-commons/src/main/resources/persistence_template.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
-http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <!-- <persistence-unit name="##generated"> -->
-
- <persistence-unit name="config" transaction-type="RESOURCE_LOCAL">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
- <class>at.gv.egovernment.moa.id.commons.db.dao.config.ConfigProperty</class>
- <properties>
- </properties>
- </persistence-unit>
- <!-- <class>at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase</class> -->
-
-<!-- <properties>
- C3p0 connection pooling configuration
- <property name="hibernate.connection.provider_class" value="org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider"/>
- <property name="hibernate.connection.provider_class" value="org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider"/>
- <property name="acquireRetryDelay" value="5000"/>
- <property name="breakAfterAcquireFailure" value="true"/>
- <property name="checkoutTimeout" value="1"/>
- <property name="testConnectionOnCheckin" value="1" />
- </properties> -->
- <!-- </persistence-unit> -->
-</persistence>
diff --git a/id/server/moa-id-commons/src/test/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBReadTest.java b/id/server/moa-id-commons/src/test/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBReadTest.java
index 896a26064..563959582 100644
--- a/id/server/moa-id-commons/src/test/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBReadTest.java
+++ b/id/server/moa-id-commons/src/test/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBReadTest.java
@@ -83,7 +83,7 @@
// migrateDatabase(methodNames);
//
// // close the session with the old database
-// ConfigurationDBUtils.closeSession();
+//
// }
//
// @Test
diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java
index 849ce72fe..32915f5e6 100644
--- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java
+++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/CreateStorkAuthRequestFormTask.java
@@ -52,7 +52,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.exception.WrongParametersException;
import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
@@ -152,7 +152,7 @@ public class CreateStorkAuthRequestFormTask extends AbstractAuthServletTask {
}
finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleLocalSignResponseTask.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleLocalSignResponseTask.java
index 1ae66f24e..10eeea97a 100644
--- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleLocalSignResponseTask.java
+++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleLocalSignResponseTask.java
@@ -24,13 +24,14 @@ import at.gv.egovernment.moa.id.auth.exception.AuthenticationException;
import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
import at.gv.egovernment.moa.id.auth.stork.STORKException;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.moduls.ModulUtils;
import at.gv.egovernment.moa.id.process.api.ExecutionContext;
import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage;
import at.gv.egovernment.moa.id.util.VelocityProvider;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.util.Base64Utils;
import eu.stork.oasisdss.api.ApiUtils;
import eu.stork.oasisdss.profile.SignResponse;
import eu.stork.peps.auth.commons.IPersonalAttributeList;
@@ -113,7 +114,7 @@ public class PepsConnectorHandleLocalSignResponseTask extends AbstractPepsConnec
pendingRequestID = AuthenticationSessionStoreage.getPendingRequestID(moaSessionID);
Logger.info("pendingRequestID:" + pendingRequestID);
- String signResponseString = new String(Base64.decodeBase64(signResponse), "UTF8");
+ String signResponseString = new String(Base64Utils.decode(signResponse, false), "UTF8");
Logger.info("RECEIVED signresponse:" + signResponseString);
// create SignResponse object
Source response1 = new StreamSource(new java.io.StringReader(signResponseString));
@@ -211,7 +212,7 @@ public class PepsConnectorHandleLocalSignResponseTask extends AbstractPepsConnec
}
finally {
- ConfigurationDBUtils.closeSession();
+
}
}
diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleResponseWithoutSignatureTask.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleResponseWithoutSignatureTask.java
index 7a98abaff..d16719b3b 100644
--- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleResponseWithoutSignatureTask.java
+++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorHandleResponseWithoutSignatureTask.java
@@ -29,7 +29,7 @@ import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
import at.gv.egovernment.moa.id.auth.stork.STORKException;
import at.gv.egovernment.moa.id.auth.stork.STORKResponseProcessor;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.config.stork.StorkAttributeProviderPlugin;
import at.gv.egovernment.moa.id.moduls.ModulUtils;
@@ -38,6 +38,7 @@ import at.gv.egovernment.moa.id.storage.AuthenticationSessionStoreage;
import at.gv.egovernment.moa.id.util.HTTPUtils;
import at.gv.egovernment.moa.id.util.VelocityProvider;
import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Base64Utils;
import at.gv.egovernment.moa.util.StringUtils;
import eu.stork.oasisdss.api.ApiUtils;
import eu.stork.oasisdss.profile.SignRequest;
@@ -411,7 +412,7 @@ public class PepsConnectorHandleResponseWithoutSignatureTask extends AbstractPep
}
finally {
- ConfigurationDBUtils.closeSession();
+
}
}
@@ -431,7 +432,7 @@ public class PepsConnectorHandleResponseWithoutSignatureTask extends AbstractPep
SignRequest signRequest = ApiUtils.unmarshal(signDoc, SignRequest.class);
signRequest.setReturnURL("TODO");
signRequestString = IOUtils.toString(ApiUtils.marshalToInputStream(signRequest));
- context.put("signrequest", Base64.encodeBase64String(signRequestString.getBytes("UTF8")));
+ context.put("signrequest", Base64Utils.encode(signRequestString.getBytes("UTF8")));
context.put("clienturl", url);
context.put("action", oasisDssWebFormURL);
diff --git a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java
index 9bbd7e46f..fa1b0472c 100644
--- a/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java
+++ b/id/server/modules/module-stork/src/main/java/at/gv/egovernment/moa/id/auth/modules/stork/tasks/PepsConnectorTask.java
@@ -44,7 +44,7 @@ import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException;
import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser;
import at.gv.egovernment.moa.id.auth.stork.STORKException;
import at.gv.egovernment.moa.id.auth.stork.STORKResponseProcessor;
-import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+
import at.gv.egovernment.moa.id.config.auth.AuthConfiguration;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
@@ -630,7 +630,7 @@ public class PepsConnectorTask extends AbstractAuthServletTask {
}
finally {
- ConfigurationDBUtils.closeSession();
+
}
}