aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
Diffstat (limited to 'id')
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java15
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java8
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java2
3 files changed, 24 insertions, 1 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
index 45674a283..e092d9e13 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/BasicOAAction.java
@@ -489,6 +489,21 @@ public class BasicOAAction extends BasicAction {
log.debug("Find new hjID: " + hjID + " for service: " + oa.getPublicURLPrefix());
oa.setHjid(Long.valueOf(hjID));
+ } else {
+ //TODO: work-around for old config tool and new key/value configuration
+ //see: NewConfigurationDBRead.java Line 81
+ if (oa.getHjid() > 1000000) {
+ if (serviceIdentifier.equals(MOAIDConfigurationConstants.PREFIX_GATEWAY))
+ oa.setHjid(oa.getHjid() - 1000000);
+ else if (serviceIdentifier.equals(MOAIDConfigurationConstants.PREFIX_IIDP))
+ oa.setHjid(oa.getHjid() - 2000000);
+ else if (serviceIdentifier.equals(MOAIDConfigurationConstants.PREFIX_VIDP))
+ oa.setHjid(oa.getHjid() - 3000000);
+ else
+ log.warn("Inconsistent state found! Service Identifier for OA found but Hjid is > 1000000.");
+
+ }
+
}
Map<String, String> absolutKeyValue = KeyValueUtils.makeKeysAbsolut(
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 38a111707..d99f826b6 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
@@ -358,10 +358,16 @@ public class ConfigurationMigrationUtils {
if (config.isRequireConsent() != null)
result.put(MOAIDConfigurationConstants.SERVICE_AUTH_STORK_REQUIRECONSENT,
config.isRequireConsent().toString());
- else
+ else {
result.put(MOAIDConfigurationConstants.SERVICE_AUTH_STORK_REQUIRECONSENT,
Boolean.FALSE.toString());
+ result.put(MOAIDConfigurationConstants.PREFIX_SERVICES, MOAIDConfigurationConstants.PREFIX_VIDP);
+
+ }
+ if (config.isVidpEnabled() != null && config.isVidpEnabled())
+ result.put(MOAIDConfigurationConstants.PREFIX_SERVICES, MOAIDConfigurationConstants.PREFIX_VIDP);
+
List<AttributeProviderPlugin> attributeProviderPlugins = config.getAttributeProviders();
if (attributeProviderPlugins != null) {
for(int i=0; i<attributeProviderPlugins.size(); i++) {
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 4a90d1bce..0f157f109 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
@@ -78,6 +78,8 @@ public class NewConfigurationDBRead {
OnlineApplication jaxBOA = ConfigurationMigrationUtils.convertKeyValueToHyberJaxBOnlineApplication(oaKeyValuePairs);
String hjID = KeyValueUtils.getFirstChildAfterPrefix(oaKeyId, KeyValueUtils.getParentKey(oaKeyId));
+ //TODO: work-around for old configTool and new key/value configuration
+ //see BasicOAAction.java line 493
if (serviceType.equals(MOAIDConfigurationConstants.PREFIX_GATEWAY))
jaxBOA.setHjid(Long.valueOf(hjID) + 1000000);
else if (serviceType.equals(MOAIDConfigurationConstants.PREFIX_IIDP))