diff options
Diffstat (limited to 'id/ConfigWebTool')
13 files changed, 388 insertions, 33 deletions
| diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java index ab6c22858..b8f9cff0f 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java @@ -580,7 +580,8 @@ public class ConfigurationProvider {  							ConfigurationProvider.getInstance().getTrustStoreDirectory(),  							null,  							"pkix",  -							true); +							true, +							new String[]{"crl"});  					httpClient.setCustomSSLTrustStore(metadataurl, protoSocketFactory); diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java index ebd2d6283..86ac6f779 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java @@ -68,7 +68,6 @@ public class GeneralMOAIDConfig {  	public static final String LINE_DELIMITER = ";";  -	private String szrgwURL = null;  	private String alternativeSourceID = null;  	private String certStoreDirectory = null;   	private boolean trustmanagerrevocationcheck = true; @@ -87,6 +86,8 @@ public class GeneralMOAIDConfig {  	private String moaspssAuthTrustProfileTest = null;  	private String mandateURL = null; +	private String szrgwURL = null; +	private String elgaMandateServiceURL = null;  	private boolean protocolActiveSAML1 = false;  	private boolean protocolActivePVP21 = true; @@ -163,13 +164,47 @@ public class GeneralMOAIDConfig {  		if (config != null) {  			AuthComponentGeneral auth = config.getAuthComponentGeneral(); +			//get ELGA mandate service URLs from configuration +			if (MiscUtil.isNotEmpty(config.getElgaMandateServiceURLs())) { +				if (KeyValueUtils.isCSVValueString(config.getElgaMandateServiceURLs())) +					elgaMandateServiceURL = KeyValueUtils.normalizeCSVValueString(config.getElgaMandateServiceURLs()); +				 +				else { +					if (config.getElgaMandateServiceURLs().contains(KeyValueUtils.CSV_DELIMITER)) { +						//remove trailing comma if exist +						elgaMandateServiceURL = config.getElgaMandateServiceURLs().substring(0,  +								config.getElgaMandateServiceURLs().indexOf(KeyValueUtils.CSV_DELIMITER)); +													 +					} else							 +						elgaMandateServiceURL = config.getElgaMandateServiceURLs(); +					 +				}			 +			} +			 +			 +			  			if (auth != null) {  				ForeignIdentities foreign = auth.getForeignIdentities();  				if (foreign != null) {  					ConnectionParameterClientAuthType connect_foreign = foreign.getConnectionParameter();  					if (connect_foreign != null) { -						szrgwURL = connect_foreign.getURL(); +						if (MiscUtil.isNotEmpty(connect_foreign.getURL())) { +							if (KeyValueUtils.isCSVValueString(connect_foreign.getURL())) +								szrgwURL = KeyValueUtils.normalizeCSVValueString(connect_foreign.getURL()); +							 +							else { +								if (connect_foreign.getURL().contains(KeyValueUtils.CSV_DELIMITER)) { +									//remove trailing comma if exist +									szrgwURL = connect_foreign.getURL().substring(0,  +											connect_foreign.getURL().indexOf(KeyValueUtils.CSV_DELIMITER)); +																 +								} else							 +									szrgwURL = connect_foreign.getURL(); +								 +							} +						 +						}  					}  					STORK stork = foreign.getSTORK(); @@ -251,7 +286,23 @@ public class GeneralMOAIDConfig {  				if (mandates != null)  {  					ConnectionParameterClientAuthType con = mandates.getConnectionParameter();  					if (con != null) { -						mandateURL = con.getURL(); +						if (MiscUtil.isNotEmpty(con.getURL())) { +							if (KeyValueUtils.isCSVValueString(con.getURL())) +								mandateURL = KeyValueUtils.normalizeCSVValueString(con.getURL()); +							 +							else { +								if (con.getURL().contains(KeyValueUtils.CSV_DELIMITER)) { +									//remove trailing comma if exist +									mandateURL = con.getURL().substring(0,  +											con.getURL().indexOf(KeyValueUtils.CSV_DELIMITER)); +																 +								} else							 +									mandateURL = con.getURL(); +								 +							} +						 +						} +																		  					}  				} @@ -392,7 +443,10 @@ public class GeneralMOAIDConfig {  	 * @param szrgwURL the szrgwURL to set  	 */  	public void setSzrgwURL(String szrgwURL) { -		this.szrgwURL = szrgwURL; +		if (MiscUtil.isNotEmpty(szrgwURL)) +			this.szrgwURL = KeyValueUtils.removeAllNewlineFromString(szrgwURL); +		else +			this.szrgwURL = szrgwURL;  	}  	/** @@ -518,7 +572,10 @@ public class GeneralMOAIDConfig {  	 * @param mandateURL the mandateURL to set  	 */  	public void setMandateURL(String mandateURL) { -		this.mandateURL = mandateURL; +		if (MiscUtil.isNotEmpty(mandateURL)) +			this.mandateURL = KeyValueUtils.removeAllNewlineFromString(mandateURL); +		else +			this.mandateURL = mandateURL;  	}  	/** @@ -1024,6 +1081,23 @@ public class GeneralMOAIDConfig {  			boolean virtualPublicURLPrefixEnabled) {  		this.virtualPublicURLPrefixEnabled = virtualPublicURLPrefixEnabled;  	} + +	/** +	 * @return the elgaMandateServiceURL +	 */ +	public String getElgaMandateServiceURL() { +		return elgaMandateServiceURL; +	} + +	/** +	 * @param elgaMandateServiceURL the elgaMandateServiceURL to set +	 */ +	public void setElgaMandateServiceURL(String elgaMandateServiceURL) { +		if (MiscUtil.isNotEmpty(elgaMandateServiceURL)) +			this.elgaMandateServiceURL = KeyValueUtils.removeAllNewlineFromString(elgaMandateServiceURL); +		else +			this.elgaMandateServiceURL = elgaMandateServiceURL; +	} diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAAuthenticationData.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAAuthenticationData.java index d0232e86a..225f85462 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAAuthenticationData.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAAuthenticationData.java @@ -29,8 +29,11 @@ import java.util.Map;  import javax.servlet.http.HttpServletRequest; +import org.apache.log4j.Logger; +  import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.AuthComponentOA;  import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.BKUURLS; +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.Mandates;  import at.gv.egovernment.moa.id.commons.db.dao.config.deprecated.OnlineApplication; @@ -38,7 +41,10 @@ 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.TransformsInfoType; +import at.gv.egovernment.moa.id.commons.utils.KeyValueUtils; +import at.gv.egovernment.moa.id.config.webgui.exception.ConfigurationException;  import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser; +import at.gv.egovernment.moa.id.configuration.config.ConfigurationProvider;  import at.gv.egovernment.moa.id.configuration.validation.oa.OAAuthenticationDataValidation;  import at.gv.egovernment.moa.util.MiscUtil; @@ -48,6 +54,8 @@ import at.gv.egovernment.moa.util.MiscUtil;   */  public class OAAuthenticationData implements IOnlineApplicationData { +	private static final Logger log = Logger.getLogger(OAAuthenticationData.class); +	  	private String bkuOnlineURL = null;  	private String bkuHandyURL = null;  	private String bkuLocalURL = null; @@ -55,6 +63,13 @@ public class OAAuthenticationData implements IOnlineApplicationData {  	private String mandateProfiles = null;  	private boolean useMandates = false; +	private List<String> misServicesList = null; +	private List<String> elgaServicesList = null; +	private List<String> szrgwServicesList = null; +	private String misServiceSelected = null; +	private String elgaServiceSelected = null;	 +	private String szrgwServiceSelected = null; +	  	private boolean calculateHPI = false;  	private String keyBoxIdentifier = null; @@ -82,6 +97,26 @@ public class OAAuthenticationData implements IOnlineApplicationData {  		 keyBoxIdentifier = MOAKeyBoxSelector.SECURE_SIGNATURE_KEYPAIR.value(); +		  +		 try {				 +			 MOAIDConfiguration dbconfig = ConfigurationProvider.getInstance().getDbRead().getMOAIDConfiguration(); +			 elgaServicesList = KeyValueUtils.getListOfCSVValues(dbconfig.getElgaMandateServiceURLs()); +			  +			 try { +				 misServicesList = KeyValueUtils.getListOfCSVValues( +						 dbconfig.getAuthComponentGeneral().getOnlineMandates().getConnectionParameter().getURL()); +			 } catch (NullPointerException e) {} +								 +			 try { +				 szrgwServicesList = KeyValueUtils.getListOfCSVValues( +						 dbconfig.getAuthComponentGeneral().getForeignIdentities().getConnectionParameter().getURL()); +			 } catch (NullPointerException e) {} +			  +		} catch (ConfigurationException e) { +			log.error("MOA-ID-Configuration initialization FAILED.", e); +				 +		} +		   //		 bkuLocalURL = Constants.DEFAULT_LOCALBKU_URL;  //		 bkuHandyURL = Constants.DEFAULT_HANDYBKU_URL;  //		  @@ -111,6 +146,8 @@ public class OAAuthenticationData implements IOnlineApplicationData {  	public List<String> parse(OnlineApplication dbOA, AuthenticatedUser authUser, HttpServletRequest request) {  		keyBoxIdentifier = dbOA.getKeyBoxIdentifier().value(); +		szrgwServiceSelected = dbOA.getSelectedSZRGWServiceURL(); +		          AuthComponentOA oaauth = dbOA.getAuthComponentOA();  		if (oaauth != null) {  			BKUURLS bkuurls = oaauth.getBKUURLS(); @@ -177,6 +214,9 @@ public class OAAuthenticationData implements IOnlineApplicationData {  				else  					useMandates = false; +				misServiceSelected = mandates.getSelectedMISServiceURL(); +				elgaServiceSelected = mandates.getSelecteELGAServiceURL(); +							  			}  			TemplatesType templates = oaauth.getTemplates(); @@ -231,6 +271,9 @@ public class OAAuthenticationData implements IOnlineApplicationData {          dbOA.setCalculateHPI(isCalculateHPI()); +        if (MiscUtil.isNotEmpty(getSzrgwServiceSelected())) +        	dbOA.setSelectedSZRGWServiceURL(getSzrgwServiceSelected()); +                  if (authUser.isAdmin()) {              //store BKU-URLs @@ -301,9 +344,16 @@ public class OAAuthenticationData implements IOnlineApplicationData {              mandates.setProfiles(null); +            if (MiscUtil.isNotEmpty(getMisServiceSelected())) +            	mandates.setSelectedMISServiceURL(getMisServiceSelected()); +             +            if (MiscUtil.isNotEmpty(getElgaServiceSelected())) +            	mandates.setSelecteELGAServiceURL(getElgaServiceSelected()); +                      } else {              mandates.setProfiles(null);              mandates.getProfileName().clear(); +                      }          authoa.setMandates(mandates); @@ -655,6 +705,69 @@ public class OAAuthenticationData implements IOnlineApplicationData {  			boolean useTestAuthblockValidationTrustStore) {  		this.useTestAuthblockValidationTrustStore = useTestAuthblockValidationTrustStore;  	} + +	/** +	 * @return the misServiceSelected +	 */ +	public String getMisServiceSelected() { +		return misServiceSelected; +	} + +	/** +	 * @param misServiceSelected the misServiceSelected to set +	 */ +	public void setMisServiceSelected(String misServiceSelected) { +		this.misServiceSelected = misServiceSelected; +	} + +	/** +	 * @return the elgaServiceSelected +	 */ +	public String getElgaServiceSelected() { +		return elgaServiceSelected; +	} + +	/** +	 * @param elgaServiceSelected the elgaServiceSelected to set +	 */ +	public void setElgaServiceSelected(String elgaServiceSelected) { +		this.elgaServiceSelected = elgaServiceSelected; +	} + +	/** +	 * @return the szrgwServiceSelected +	 */ +	public String getSzrgwServiceSelected() { +		return szrgwServiceSelected; +	} + +	/** +	 * @param szrgwServiceSelected the szrgwServiceSelected to set +	 */ +	public void setSzrgwServiceSelected(String szrgwServiceSelected) { +		this.szrgwServiceSelected = szrgwServiceSelected; +	} + +	/** +	 * @return the misServicesList +	 */ +	public List<String> getMisServicesList() { +		return misServicesList; +	} + +	/** +	 * @return the elgaServicesList +	 */ +	public List<String> getElgaServicesList() { +		return elgaServicesList; +	} + +	/** +	 * @return the szrgwServicesList +	 */ +	public List<String> getSzrgwServicesList() { +		return szrgwServicesList; +	}  } diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java index 40e9b1a90..27a3dcdf3 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditGeneralConfigAction.java @@ -539,7 +539,22 @@ public class EditGeneralConfigAction extends BasicAction {  				forcon = new ConnectionParameterClientAuthType();  				dbforeign.setConnectionParameter(forcon);  			} -			forcon.setURL(moaconfig.getSzrgwURL()); +			 +			if (KeyValueUtils.isCSVValueString(moaconfig.getSzrgwURL())) +				forcon.setURL(KeyValueUtils.normalizeCSVValueString(moaconfig.getSzrgwURL())); +				 +			else { +				if (moaconfig.getSzrgwURL().contains(KeyValueUtils.CSV_DELIMITER)) +					forcon.setURL( +							moaconfig.getSzrgwURL().trim().substring(0,  +									moaconfig.getSzrgwURL().indexOf(KeyValueUtils.CSV_DELIMITER))); +					 +				else +					forcon.setURL( +							StringUtils.chomp(moaconfig.getSzrgwURL().trim())); +				 +			} +		  		}          ForeignIdentities foreign = dbauth.getForeignIdentities(); @@ -608,6 +623,7 @@ public class EditGeneralConfigAction extends BasicAction {              }  		} +		//write MIS Mandate-Service URLs  		if (MiscUtil.isNotEmpty(moaconfig.getMandateURL())) {  			OnlineMandates dbmandate = dbauth.getOnlineMandates();  			if (dbmandate == null) { @@ -620,9 +636,43 @@ public class EditGeneralConfigAction extends BasicAction {  				dbmandateconnection = new ConnectionParameterClientAuthType();  				dbmandate.setConnectionParameter(dbmandateconnection);  			} -			dbmandateconnection.setURL(moaconfig.getMandateURL()); +			 +			if (KeyValueUtils.isCSVValueString(moaconfig.getMandateURL())) +				dbmandateconnection.setURL(KeyValueUtils.normalizeCSVValueString(moaconfig.getMandateURL())); +				 +			else { +				if (moaconfig.getMandateURL().contains(KeyValueUtils.CSV_DELIMITER)) +					dbmandateconnection.setURL( +							moaconfig.getMandateURL().trim().substring(0,  +									moaconfig.getMandateURL().indexOf(KeyValueUtils.CSV_DELIMITER))); +					 +				else +					dbmandateconnection.setURL( +							StringUtils.chomp(moaconfig.getMandateURL().trim())); +				 +			}						 +		} +		 +		//write ELGA Mandate-Service URLs +		if (MiscUtil.isNotEmpty(moaconfig.getElgaMandateServiceURL())) {			 +			if (KeyValueUtils.isCSVValueString(moaconfig.getElgaMandateServiceURL())) +				dbconfig.setElgaMandateServiceURLs(KeyValueUtils.normalizeCSVValueString(moaconfig.getElgaMandateServiceURL())); +				 +			else { +				if (moaconfig.getElgaMandateServiceURL().contains(KeyValueUtils.CSV_DELIMITER)) +					dbconfig.setElgaMandateServiceURLs( +							moaconfig.getElgaMandateServiceURL().trim().substring(0,  +									moaconfig.getElgaMandateServiceURL().indexOf(KeyValueUtils.CSV_DELIMITER))); +					 +				else +					dbconfig.setElgaMandateServiceURLs( +							StringUtils.chomp(moaconfig.getElgaMandateServiceURL().trim())); +				 +			}						  		} +		 +		  		MOASP dbmoasp = dbauth.getMOASP();  		if (dbmoasp == null) {  			dbmoasp = new MOASP(); diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java index 617e9cf51..cb546c5a8 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java @@ -162,10 +162,26 @@ public class MOAConfigValidator {  //		}  		check = form.getMandateURL(); -		if (MiscUtil.isNotEmpty(check)) { -			if (!ValidationHelper.validateURL(check)) { -				log.info("Not valid Online-Mandate Service URL"); -				errors.add(LanguageHelper.getErrorString("validation.general.mandateservice.valid", request)); +		if (MiscUtil.isNotEmpty(check)) {			 +			String[] misURLs = check.split(","); +			for (String el : misURLs) {			 +				if (MiscUtil.isNotEmpty(el) && !ValidationHelper.validateURL(StringUtils.chomp(el.trim()))) { +					log.info("Not valid Online-Mandate Service URL"); +					errors.add(LanguageHelper.getErrorString("validation.general.mandateservice.valid",  +							new Object[]{el}, request)); +				} +			} +		} +		 +		check = form.getElgaMandateServiceURL(); +		if (MiscUtil.isNotEmpty(check)) {			 +			String[] elgaServiceURLs = check.split(","); +			for (String el : elgaServiceURLs) {			 +				if (MiscUtil.isNotEmpty(el) && !ValidationHelper.validateURL(StringUtils.chomp(el.trim()))) { +					log.info("Not valid Online-Mandate Service URL"); +					errors.add(LanguageHelper.getErrorString("validation.general.elga.mandateservice.valid",  +							new Object[]{el}, request)); +				}  			}  		} @@ -392,13 +408,17 @@ public class MOAConfigValidator {  		}  		check = form.getSzrgwURL(); -		if (MiscUtil.isNotEmpty(check)) { -			if (!ValidationHelper.validateURL(check)) { -				log.info("SZRGW URL is not valid"); -				errors.add(LanguageHelper.getErrorString("validation.general.szrgw.url.valid", request)); +		if (MiscUtil.isNotEmpty(check)) {			 +			String[] szrGWServiceURLs = check.split(","); +			for (String el : szrGWServiceURLs) {			 +				if (MiscUtil.isNotEmpty(el) && !ValidationHelper.validateURL(StringUtils.chomp(el.trim()))) { +					log.info("Not valid Online-Mandate Service URL"); +					errors.add(LanguageHelper.getErrorString("validation.general.szrgw.url.valid",  +							new Object[]{el}, request)); +				}  			}  		} -		 +			  		check = form.getTrustedCACerts();  		if (MiscUtil.isEmpty(check)) {  			log.info("Empty TrustCACerts Directory"); diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAAuthenticationDataValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAAuthenticationDataValidation.java index 47c8f23b4..7e6396b75 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAAuthenticationDataValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAAuthenticationDataValidation.java @@ -147,6 +147,34 @@ public class OAAuthenticationDataValidation {  			}  		} +		check =form.getMisServiceSelected(); +		if (MiscUtil.isNotEmpty(check)) { +			if (!ValidationHelper.validateURL(check)) { +				log.info("Not valid MIS Service URL"); +				errors.add(LanguageHelper.getErrorString("validation.general.mandateservice.valid",  +						new Object[]{check}, request)); +			} +		} +		 +		check =form.getElgaServiceSelected(); +		if (MiscUtil.isNotEmpty(check)) { +			if (!ValidationHelper.validateURL(check)) { +				log.info("Not valid ELGA Service URL"); +				errors.add(LanguageHelper.getErrorString("validation.general.elga.mandateservice.valid",  +						new Object[]{check}, request)); +			} +		} +		 +		check =form.getSzrgwServiceSelected(); +		if (MiscUtil.isNotEmpty(check)) { +			if (!ValidationHelper.validateURL(check)) { +				log.info("Not valid SZR-GW Service URL"); +				errors.add(LanguageHelper.getErrorString("validation.general.szrgw.url.valid",  +						new Object[]{check}, request)); +			} +		} +		 +		  		if (form.isEnableTestCredentials()   				&& form.getTestCredialOIDList() != null && !form.getTestCredialOIDList().isEmpty()) {  			for (String el : form.getTestCredialOIDList()) { diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java index 6476ea1f1..970785bdb 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OAPVP2ConfigValidation.java @@ -22,8 +22,6 @@   *******************************************************************************/  package at.gv.egovernment.moa.id.configuration.validation.oa; -import iaik.x509.X509Certificate; -  import java.io.IOException;  import java.security.cert.CertificateException;  import java.util.ArrayList; @@ -58,6 +56,7 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.filter.SignatureValid  import at.gv.egovernment.moa.id.protocols.pvp2x.verification.metadata.SchemaValidationFilter;  import at.gv.egovernment.moa.util.Base64Utils;  import at.gv.egovernment.moa.util.MiscUtil; +import iaik.x509.X509Certificate;  public class OAPVP2ConfigValidation { @@ -135,7 +134,8 @@ public class OAPVP2ConfigValidation {  										ConfigurationProvider.getInstance().getTrustStoreDirectory(),  										null,  										"pkix",  -										true); +										true, +										new String[]{"crl"});  									httpClient.setCustomSSLTrustStore(  											form.getMetaDataURL(),  diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties index b77097e70..b488acd63 100644 --- a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties +++ b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties @@ -151,8 +151,9 @@ webpages.moaconfig.moasp.authblocktransform=Authentfizierungsblock Transformatio  webpages.moaconfig.moasp.url=URL zum MOA-SP Service  webpages.moaconfig.identitylinksigners=IdentityLinkSigners  webpages.moaconfig.services.header=Externe Services -webpages.moaconfig.services.mandates=Online-Vollmachten Service URL -webpages.moaconfig.services.szrgw=SZR Gateway Service URL +webpages.moaconfig.services.mandates=Online-Vollmachten Service URLs (CSV) +webpages.moaconfig.services.szrgw=SZR Gateway Service URLs (CSV) +webpages.moaconfig.services.elgamandateservice=ELGA Mandate Service EntityIDs (CSV)  webpages.moaconfig.sso.header=Single Sign-On  webpages.moaconfig.sso.PublicUrl=SSO Service URL-Prefix  webpages.moaconfig.sso.FriendlyName=SSO Service Name @@ -231,6 +232,8 @@ webpages.oaconfig.general.identification=Eindeutiger Identifikatior (PublicURLPr  webpages.oaconfig.general.mandate.header=Vollmachten  webpages.oaconfig.general.mandate.profiles=Profile  webpages.oaconfig.general.mandate.usemandate=Vollmachten (ja/nein) +webpages.oaconfig.general.mandate.misservice.selected=MIS Vollmachten Service URL +webpages.oaconfig.general.mandate.elgaservice.selected=ELGA Vollmachten Service EntityID  webpages.oaconfig.general.friendlyname=Name der Online-Applikation  webpages.oaconfig.general.isbusinessservice=Privatwirtschaftliche Applikation  webpages.oaconfig.general.isstorkservice=Stork Applikation @@ -255,6 +258,9 @@ webpages.oaconfig.general.aditional.useUTC=UTC Zeit verwenden  webpages.oaconfig.general.aditional.calculateHPI="TODO!"  webpages.oaconfig.general.isHideBPKAuthBlock=bPK/wbPK im AuthBlock ausblenden +webpages.oaconfig.general.szrgw.header=SZR-Gateway Service +webpages.oaconfig.general.szrgw.selected=SZR-Gateway Service URL +  webpages.oaconfig.menu.saml1.show=SAML1 Konfiguration einblenden  webpages.oaconfig.menu.saml1.hidden=SAML1 Konfiguration ausblenden  webpages.oaconfig.menu.pvp2.show=PVP2 Konfiguration einblenden @@ -396,7 +402,9 @@ validation.general.Defaultchainigmode.empty=Es wurde kein DefaultChainingMode ge  validation.general.Defaultchainigmode.valid=Der DefaultChainingMode enth\u00E4lt einen ung\u00F6ltigen Wert.  validation.general.IdentityLinkSigners.empty=Es wurde kein IdentityLinkSigner angegeben  validation.general.IdentityLinkSigners.valid=Der IdentityLinkSigner in der Zeile {0} enth\u00E4lt ein ung\u00FCltiges Zeichen. Folgende Zeichen sind nicht erlaubt\: {1} -validation.general.mandateservice.valid=Die URL zum Online-Vollmachten Service hat kein g\u00F6ltiges Format. +validation.general.mandateservice.valid=Die URL {0} zum Online-Vollmachten Service hat kein g\u00F6ltiges Format. +validation.general.elga.mandateservice.valid=Die EntityID {0} zum ELGA Vertretungsservice hat kein g\u00F6ltiges Format. +validation.general.szrgw.url.valid=Die URL {0} des SZR Gateways hat kein g\u00F6ltiges Format.  validation.general.moasp.auth.transformation.empty=Die Transformation f\u00F6r den Authentfizierungsblock ist leer.  validation.general.moasp.auth.transformation.valid=Die Transformation f\u00F6r den Authentfizierungsblock  in der Zeile {0} enth\u00E4lt ein ung\u00FCltiges Zeichen. Folgende Zeichen sind nicht erlaubt\: {1}  validation.general.moasp.auth.trustprofile.empty=Das TrustProfile zur Pr\u00F6fung des Authentfizierungsblock ist leer. @@ -437,7 +445,6 @@ validation.general.sso.publicurl.valid=Der SSO Service URL-Prefix hat kein g\u00  validation.general.sso.specialauthtext.valid=Der SSO AuthBlockText enth\u00E4lt ein ung\u00FCltiges Zeichen. Folgende Zeichen sind nicht erlaubt\: {0}  validation.general.sso.target.empty=Das SSO Target Feld ist leer.  validation.general.sso.target.valid=Das SSO Target Feld enth\u00E4lt ein ung\u00FCltiges Target. -validation.general.szrgw.url.valid=Die URL des SZR Gateways hat kein g\u00F6ltiges Format.  validation.general.trustedcacerts.empty=Das Feld TrustedCACertificates ist leer.  validation.general.trustedcacerts.valid=Das Feld TrustedCACertificates enth\u00E4lt ein ung\u00FCltiges Zeichen. Folgende Zeichen sind nicht erlaubt\: {0}  validation.general.slrequest.filename.valid=Der Dateiname der angegebenen SecurtityLayer Transformation enth\u00E4lt ein ung\u00FCltiges Zeichen. Folgende Zeichen sind nicht erlaubt\: {0} diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties index d62ce3807..a3edd1b8c 100644 --- a/id/ConfigWebTool/src/main/resources/applicationResources_en.properties +++ b/id/ConfigWebTool/src/main/resources/applicationResources_en.properties @@ -150,8 +150,9 @@ webpages.moaconfig.moasp.authblocktransform=Transformations for authentication b  webpages.moaconfig.moasp.url=URL for MOA-SP Service  webpages.moaconfig.identitylinksigners=IdentityLinkSigners  webpages.moaconfig.services.header=External Services -webpages.moaconfig.services.mandates=Online-Mandate Service URL -webpages.moaconfig.services.szrgw=SZR Gateway Service URL +webpages.moaconfig.services.mandates=Online-Mandate Service URLs (CSV) +webpages.moaconfig.services.szrgw=SZR Gateway Service URLs (CSV) +webpages.moaconfig.services.elgamandateservice=ELGA Mandate Service EntityIDs (CSV)  webpages.moaconfig.sso.header=Single Sign-On  webpages.moaconfig.sso.PublicUrl=SSO Service URL-Prefix  webpages.moaconfig.sso.FriendlyName=SSO Service Name @@ -235,7 +236,9 @@ webpages.oaconfig.bPKEncDec.keyPassword=Key password  webpages.oaconfig.general.identification=Unique identifier (PublicURLPrefix)  webpages.oaconfig.general.mandate.header=Mandates  webpages.oaconfig.general.mandate.profiles=Profile -webpages.oaconfig.general.mandate.usemandate=Mandates (ja/nein) +webpages.oaconfig.general.mandate.usemandate=Mandates (yes/no) +webpages.oaconfig.general.mandate.misservice.selected=MIS Mandate-Service URL +webpages.oaconfig.general.mandate.elgaservice.selected=ELGA Mandate-Service EntityID  webpages.oaconfig.general.friendlyname=Name of the Online-Application  webpages.oaconfig.general.isbusinessservice=Private sector application  webpages.oaconfig.general.isstorkservice=Stork application @@ -260,6 +263,9 @@ webpages.oaconfig.general.aditional.useUTC=Use UTC time  webpages.oaconfig.general.aditional.calculateHPI="TODO!"  webpages.oaconfig.general.isHideBPKAuthBlock=Hide bPK/wbPK from AuthBlock +webpages.oaconfig.general.szrgw.header=SZR-Gateway Service +webpages.oaconfig.general.szrgw.selected=SZR-Gateway Service URL +  webpages.oaconfig.menu.saml1.show=Show SAML1 configuration  webpages.oaconfig.menu.saml1.hidden=Hide SAML1 configuration  webpages.oaconfig.menu.pvp2.show=Show PVP2 configuration @@ -394,7 +400,9 @@ validation.general.Defaultchainigmode.empty=There is no DefaultChainingMode sele  validation.general.Defaultchainigmode.valid=DefaultChainingMode contains invalid value.  validation.general.IdentityLinkSigners.empty=There is no IdentityLinkSigner given  validation.general.IdentityLinkSigners.valid=IdentityLinkSigner in the line {0} contains forbidden characters. The following characters are not allowed\: {1} -validation.general.mandateservice.valid=URL for Online-Mandating Service has invalid format. +validation.general.mandateservice.valid=URL {0} for Online-Mandating Service has invalid format. +validation.general.elga.mandateservice.valid=EntityID {0} for ELGA Mandate-Service has invalid format. +validation.general.szrgw.url.valid=URL {0} for SZR Gateway has invalid format.  validation.general.moasp.auth.transformation.empty=Transformation for authentication block is blank.  validation.general.moasp.auth.transformation.valid=Transformation for authentication block in the line {0} contians forbidden characters. The following characters are not allowed\: {1}  validation.general.moasp.auth.trustprofile.empty=TrustProfile for checking of authentication block is blank. @@ -435,7 +443,6 @@ validation.general.sso.publicurl.valid=SSO Service URL-Prefix has invalid format  validation.general.sso.specialauthtext.valid=SSO AuthBlockText contains forbidden characters. The following characters are not allowed\: {0}  validation.general.sso.target.empty=SSO Target field is blank.  validation.general.sso.target.valid=SSO Target field contains invalid target. -validation.general.szrgw.url.valid=URL for SZR Gateway has invalid format.  validation.general.trustedcacerts.empty=Field TrustedCACertificates is blank.  validation.general.trustedcacerts.valid=Das Feld TrustedCACertificates contains forbidden characters. The following characters are not allowed\: {0}  validation.general.slrequest.filename.valid=File name of provided SecurityLayer Transformation contains forbidden characters. The following characters are not allowed\: {0} diff --git a/id/ConfigWebTool/src/main/webapp/css/index.css b/id/ConfigWebTool/src/main/webapp/css/index.css index 6b4d310ef..80ccf93be 100644 --- a/id/ConfigWebTool/src/main/webapp/css/index.css +++ b/id/ConfigWebTool/src/main/webapp/css/index.css @@ -408,6 +408,16 @@ div .wwgrp br {     text-decoration:none;  } +.selectfield_long { +	width: 600px; +	float: left; +	margin-right: 5px; +	background: transparent; +   overflow: hidden; +   border: 1px solid #ccc; +   text-decoration:none; +} +  .checkbox{  	margin-top: 7px;  	margin-left:0px; diff --git a/id/ConfigWebTool/src/main/webapp/js/common.js b/id/ConfigWebTool/src/main/webapp/js/common.js index f17ee3623..3d5528ad5 100644 --- a/id/ConfigWebTool/src/main/webapp/js/common.js +++ b/id/ConfigWebTool/src/main/webapp/js/common.js @@ -292,5 +292,15 @@ function setPublicURLPrefixTestBox(checkbox) {  function generalConfigLoadEvent() {  	var value = $("#loadGeneralConfig_moaconfig_publicURLPrefix").val();  	$("#loadGeneralConfig_moaconfig_publicURLPrefix").val(value.replace(/,/g,",\n")); +	 +	var elga = $("#loadGeneralConfig_moaconfig_elgaMandateServiceURL").val(); +	$("#loadGeneralConfig_moaconfig_elgaMandateServiceURL").val(elga.replace(/,/g,",\n")); +	 +	var mis = $("#loadGeneralConfig_moaconfig_mandateURL").val(); +	$("#loadGeneralConfig_moaconfig_mandateURL").val(mis.replace(/,/g,",\n")); +	 +	var szrgw = $("#loadGeneralConfig_moaconfig_szrgwURL").val(); +	$("#loadGeneralConfig_moaconfig_szrgwURL").val(szrgw.replace(/,/g,",\n")); +	  	return true;	  } diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp index 45ea159e4..cf9fc19e1 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp @@ -233,18 +233,24 @@  						<div class="oa_config_block">  							<h3><%=LanguageHelper.getGUIString("webpages.moaconfig.services.header", request) %></h3> -							<s:textfield name="moaconfig.mandateURL"  +							<s:textarea name="moaconfig.mandateURL"   								value="%{moaconfig.mandateURL}"   								labelposition="left"  								key="webpages.moaconfig.services.mandates"  								cssClass="textfield_long"> -							</s:textfield> -							<s:textfield name="moaconfig.szrgwURL"  +							</s:textarea> +							<s:textarea name="moaconfig.szrgwURL"   								value="%{moaconfig.szrgwURL}"   								labelposition="left"  								key="webpages.moaconfig.services.szrgw"  								cssClass="textfield_long"> -							</s:textfield> +							</s:textarea> +							<s:textarea name="moaconfig.elgaMandateServiceURL"  +								value="%{moaconfig.elgaMandateServiceURL}"  +								labelposition="left" +								key="webpages.moaconfig.services.elgamandateservice" +								cssClass="textfield_long"> +							</s:textarea>  						</div>  						<div class="oa_config_block" > diff --git a/id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/authentication.jsp b/id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/authentication.jsp index f0b5c816a..ff2b091c6 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/authentication.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/snippets/OA/authentication.jsp @@ -127,6 +127,35 @@  									cssClass="checkbox">  						</s:checkbox> +					  <s:select list="authOA.misServicesList" +											key="webpages.oaconfig.general.mandate.misservice.selected" +											labelposition="left" +											cssClass="selectfield_long" +											value="%{authOA.misServiceSelected}" +											name="authOA.misServiceSelected"> +						</s:select> +						 +						<s:select list="authOA.elgaServicesList" +											key="webpages.oaconfig.general.mandate.elgaservice.selected" +											labelposition="left" +											cssClass="selectfield_long" +											value="%{authOA.elgaServiceSelected}" +											name="authOA.elgaServiceSelected"> +						</s:select> +						  					</div>						 +					<div class="oa_config_block"> +						<h3><%=LanguageHelper.getGUIString("webpages.oaconfig.general.szrgw.header", request) %></h3> +						 +						<s:select list="authOA.szrgwServicesList" +											key="webpages.oaconfig.general.szrgw.selected" +											labelposition="left" +											cssClass="selectfield_long" +											value="%{authOA.szrgwServiceSelected}" +											name="authOA.szrgwServiceSelected"> +						</s:select> +						 +					</div>	 +				  </html>
\ No newline at end of file | 
