From bb1b12ac5b240629e16ea1c7a50891e99f4adc14 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 27 Aug 2015 11:32:05 +0200 Subject: Use test- and productive TrustStore configurations in one IDP instance - every service configuration could select its preferred TrustStore --- .../task/impl/GeneralMOAIDConfigurationTask.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'id/moa-id-webgui/src/main/java/at/gv') 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 b8836b90c..ed02f8186 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 @@ -301,6 +301,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)) { -- cgit v1.2.3