aboutsummaryrefslogtreecommitdiff
path: root/id/moa-id-webgui/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'id/moa-id-webgui/src/main')
-rw-r--r--id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java72
-rw-r--r--id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolSTORKTask.java27
2 files changed, 71 insertions, 28 deletions
diff --git a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java
index 9fb349e5a..616d9f0f4 100644
--- a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java
+++ b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/GeneralMOAIDConfigurationTask.java
@@ -194,12 +194,12 @@ public class GeneralMOAIDConfigurationTask extends AbstractTaskValidator impleme
"Default BKUs - Handy",
LanguageHelper.getErrorString("validation.general.bku.handy.valid")));
}
- } else {
- log.info("Empty Handy-BKU URL");
- errors.add(new ValidationObjectIdentifier(
- MOAIDConfigurationConstants.GENERAL_DEFAULTS_BKU_HANDY,
- "Default BKUs - Handy",
- LanguageHelper.getErrorString("validation.general.bku.handy.empty")));
+// } else {
+// log.info("Empty Handy-BKU URL");
+// errors.add(new ValidationObjectIdentifier(
+// MOAIDConfigurationConstants.GENERAL_DEFAULTS_BKU_HANDY,
+// "Default BKUs - Handy",
+// LanguageHelper.getErrorString("validation.general.bku.handy.empty")));
}
check = input.get(KeyValueUtils.removePrefixFromKey(MOAIDConfigurationConstants.GENERAL_DEFAULTS_BKU_LOCAL, getKeyPrefix()));
@@ -211,12 +211,12 @@ public class GeneralMOAIDConfigurationTask extends AbstractTaskValidator impleme
"Default BKUs - Local",
LanguageHelper.getErrorString("validation.general.bku.local.valid")));
}
- } else {
- log.info("Empty Online-BKU URL");
- errors.add(new ValidationObjectIdentifier(
- MOAIDConfigurationConstants.GENERAL_DEFAULTS_BKU_LOCAL,
- "Default BKUs - Local",
- LanguageHelper.getErrorString("validation.general.bku.local.empty")));
+// } else {
+// log.info("Empty Online-BKU URL");
+// errors.add(new ValidationObjectIdentifier(
+// MOAIDConfigurationConstants.GENERAL_DEFAULTS_BKU_LOCAL,
+// "Default BKUs - Local",
+// LanguageHelper.getErrorString("validation.general.bku.local.empty")));
}
@@ -229,12 +229,12 @@ public class GeneralMOAIDConfigurationTask extends AbstractTaskValidator impleme
"Default BKUs - Online",
LanguageHelper.getErrorString("validation.general.bku.online.valid")));
}
- } else {
- log.info("Empty Online-BKU URL");
- errors.add(new ValidationObjectIdentifier(
- MOAIDConfigurationConstants.GENERAL_DEFAULTS_BKU_ONLINE,
- "Default BKUs - Online",
- LanguageHelper.getErrorString("validation.general.bku.online.empty")));
+// } else {
+// log.info("Empty Online-BKU URL");
+// errors.add(new ValidationObjectIdentifier(
+// MOAIDConfigurationConstants.GENERAL_DEFAULTS_BKU_ONLINE,
+// "Default BKUs - Online",
+// LanguageHelper.getErrorString("validation.general.bku.online.empty")));
}
@@ -304,6 +304,42 @@ public class GeneralMOAIDConfigurationTask extends AbstractTaskValidator impleme
}
}
+ check = input.get(KeyValueUtils.removePrefixFromKey(MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_AUTHBLOCK_TEST, getKeyPrefix()));
+ if (MiscUtil.isEmpty(check)) {
+ log.info("Empty MOA-SP/SS Test-Authblock TrustProfile");
+ errors.add(new ValidationObjectIdentifier(
+ MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_AUTHBLOCK_PROD,
+ "MOA-SP - Test-TrustProfile AuthBlock",
+ LanguageHelper.getErrorString("validation.general.moasp.auth.trustprofile.test.empty")));
+ } else {
+ if (ValidationHelper.containsPotentialCSSCharacter(check, false)) {
+ log.info("Authblock Test-TrustProfile is not valid: " +check);
+ errors.add(new ValidationObjectIdentifier(
+ MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_AUTHBLOCK_PROD,
+ "MOA-SP - Test-TrustProfile AuthBlock",
+ LanguageHelper.getErrorString("validation.general.moasp.auth.trustprofile.test.valid",
+ new Object[] {ValidationHelper.getPotentialCSSCharacter(false)}) ));
+ }
+ }
+
+ check = input.get(KeyValueUtils.removePrefixFromKey(MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_IDL_TEST, getKeyPrefix()));
+ if (MiscUtil.isEmpty(check)) {
+ log.info("Empty MOA-SP/SS Test-IdentityLink TrustProfile");
+ errors.add(new ValidationObjectIdentifier(
+ MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_IDL_PROD,
+ "MOA-SP - Test-TrustProfile IdL",
+ LanguageHelper.getErrorString("validation.general.moasp.idl.trustprofile.test.empty")));
+ } else {
+ if (ValidationHelper.containsPotentialCSSCharacter(check, false)) {
+ log.info("IdentityLink Test-TrustProfile is not valid: " +check);
+ errors.add(new ValidationObjectIdentifier(
+ MOAIDConfigurationConstants.GENERAL_AUTH_MOASP_TRUSTPROFILE_IDL_PROD,
+ "MOA-SP - Test-TrustProfile IdL",
+ LanguageHelper.getErrorString("validation.general.moasp.idl.trustprofile.test.valid",
+ new Object[] {ValidationHelper.getPotentialCSSCharacter(false)}) ));
+ }
+ }
+
check = input.get(KeyValueUtils.removePrefixFromKey(MOAIDConfigurationConstants.GENERAL_DEFAULTS_TEMPLATES_HANDY, getKeyPrefix()));
if (MiscUtil.isEmpty(check)) {
diff --git a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolSTORKTask.java b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolSTORKTask.java
index d4e80bed9..c7a74d1a1 100644
--- a/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolSTORKTask.java
+++ b/id/moa-id-webgui/src/main/java/at/gv/egovernment/moa/id/config/webgui/validation/task/impl/ServicesProtocolSTORKTask.java
@@ -171,18 +171,25 @@ public class ServicesProtocolSTORKTask extends AbstractTaskValidator implements
throws ConfigurationTaskValidationException {
List<ValidationObjectIdentifier> errors = new ArrayList<ValidationObjectIdentifier>();
- //check V-IDP specific Target configurations
- String isBusinessService = input.get(MOAIDConfigurationConstants.SERVICE_BUSINESSSERVICE);
- if (!Boolean.parseBoolean(isBusinessService)) {
- log.info("STORK V-IDP only allowed as business Service.");
- errors.add(new ValidationObjectIdentifier(
- MOAIDConfigurationConstants.SERVICE_BUSINESSSERVICE,
- "BusinessService",
- "STORK V-IDP only allowed as business Service."));
- }
+ //TODO: add in further version
+ //STORK MIS attribute provider requires PublicService Target and therefore VIDP config is actually used.
+
+// //check V-IDP specific Target configurations
+// String isBusinessService = input.get(MOAIDConfigurationConstants.SERVICE_BUSINESSSERVICE);
+// if (!Boolean.parseBoolean(isBusinessService)) {
+// log.info("STORK V-IDP only allowed as business Service.");
+// errors.add(new ValidationObjectIdentifier(
+// MOAIDConfigurationConstants.SERVICE_BUSINESSSERVICE,
+// "BusinessService",
+// "STORK V-IDP only allowed as business Service."));
+// }
String identificationType = input.get(MOAIDConfigurationConstants.SERVICE_AUTH_TARGET_BUSINESS_TYPE);
- if (MiscUtil.isEmpty(identificationType) ||
+ //TODO: add in further version
+ //STORK MIS attribute provider requires PublicService Target and therefore VIDP config is actually used.
+// if (MiscUtil.isEmpty(identificationType) ||
+// !MOAIDConfigurationConstants.IDENIFICATIONTYPE_STORK.equals(identificationType)) {
+ if (MiscUtil.isNotEmpty(identificationType) &&
!MOAIDConfigurationConstants.IDENIFICATIONTYPE_STORK.equals(identificationType)) {
log.info("STORK V-IDP only allowes identification numbers with STORK prefix.");
errors.add(new ValidationObjectIdentifier(