aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2013-08-06 18:53:14 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2013-08-06 18:53:14 +0200
commit328f850d0b5775bc8aed8f5ced1a6ef6269cb831 (patch)
tree8b1cd2f0cf4e6e303af7fcd4f53f74d53db1b855
parent845d7241c2556d36cfd91cdca8ddeb11f0395e6e (diff)
downloadmoa-id-spss-328f850d0b5775bc8aed8f5ced1a6ef6269cb831.tar.gz
moa-id-spss-328f850d0b5775bc8aed8f5ced1a6ef6269cb831.tar.bz2
moa-id-spss-328f850d0b5775bc8aed8f5ced1a6ef6269cb831.zip
- Change UserBase implementation
- starts with general MOAID Config
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java3
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/GeneralMOAIDConfig.java761
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java37
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/pvp2/ContactForm.java114
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java3
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java17
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java29
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/UserManagementAction.java62
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java24
-rw-r--r--id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java94
-rw-r--r--id/ConfigWebTool/src/main/resources/applicationResources_de.properties60
-rw-r--r--id/ConfigWebTool/src/main/resources/struts.xml11
-rw-r--r--id/ConfigWebTool/src/main/webapp/css/index.css13
-rw-r--r--id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp354
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java6
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/legacy/BuildFromLegacyConfig.java10
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/ConfigurationDBRead.java35
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/UserDatabase.java263
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java1
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd69
-rw-r--r--id/server/moa-id-commons/src/main/resources/config/persistence_template.xml2
21 files changed, 1617 insertions, 351 deletions
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java
index 19af2876d..8ef3ec2f0 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/Constants.java
@@ -20,4 +20,7 @@ public class Constants {
public static final String MOA_CONFIG_BUSINESSSERVICE = "businessService";
+
+ public static final String MOA_CONFIG_PROTOCOL_SAML1 = "id_saml1";
+ public static final String MOA_CONFIG_PROTOCOL_PVP2 = "id_pvp2x";
}
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 f0c4e3314..f03b1c057 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
@@ -1,18 +1,103 @@
package at.gv.egovernment.moa.id.configuration.data;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentGeneral;
+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.IdentityLinkSignersX509SubjectNameItem;
+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.MOASP;
+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.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.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.configuration.Constants;
+import at.gv.egovernment.moa.id.configuration.data.pvp2.ContactForm;
public class GeneralMOAIDConfig {
+ public static final String LINE_DELIMITER = ";\n";
+
private String szrgwURL = null;
private String alternativeSourceID = null;
private String certStoreDirectory = null;
+ private boolean trustmanagerrevocationcheck = false;
+
+ private long timeoutAssertion = 120; //sec
+ private long timeoutMOASessionCreated = 1200; //sec
+ private long timeoutMOASessionUpdated = 2700; //sec
+
+ private String identityLinkSigners = "";
+
+ private String moaspssURL = null;
+ private String moaspssAuthTrustProfile = null;
+ private String moaspssAuthTransformations = "";
+ private String moaspssIdlTrustProfile = null;
+
+ private String mandateURL = null;
+
+ private boolean legacy_saml1 = false;
+ private boolean legacy_pvp2 = false;
+
+ private String pvp2PublicUrlPrefix = null;
+ private String pvp2IssuerName = null;
+ private String pvp2OrgName = null;
+ private String pvp2OrgDisplayName = null;
+ private String pvp2OrgURL = null;
+ private ContactForm pvp2Contact = null;
+
+ private List<File> fileUpload = null;
+ private List<String> fileUploadContentType;
+ private List<String> fileUploadFileName;
+
+ private String ssoTarget = null;
+ private String ssoFriendlyName = null;
+ private String ssoPublicUrl = null;
+ private String ssoSpecialText = null;
+ private String ssoIdentificationNumber = null;
+
+ private String defaultchainigmode = null;
+ private static Map<String, String> chainigmodelist;
+
+ private String trustedCACerts = null;
+
+ private String defaultBKUOnline = "";
+ private String defaultBKULocal = "https://127.0.0.1:3496/https-security-layer-request";
+ private String defaultBKUHandy = "https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx";
+
+ private String SLRequestTemplateOnline = "";
+ private String SLRequestTemplateLocal = "";
+ private String SLRequestTemplateHandy = "";
+ public GeneralMOAIDConfig() {
+ chainigmodelist = new HashMap<String, String>();
+ ChainingModeType[] values = ChainingModeType.values();
+ for (int i=0; i<values.length; i++) {
+ chainigmodelist.put(values[i].value(), values[i].value());
+ }
+ }
public void parse(MOAIDConfiguration config) {
@@ -39,10 +124,682 @@ public class GeneralMOAIDConfig {
if (authgen != null) {
alternativeSourceID = authgen.getAlternativeSourceID();
certStoreDirectory = authgen.getCertStoreDirectory();
+ trustmanagerrevocationcheck = authgen.isTrustManagerRevocationChecking();
+
+ TimeOuts timeouts = authgen.getTimeOuts();
+ if (timeouts != null) {
+
+ if(timeouts.getAssertion() != null)
+ timeoutAssertion = timeouts.getAssertion().longValue();
+ if(timeouts.getMOASessionCreated() != null)
+ timeoutMOASessionCreated = timeouts.getMOASessionCreated().longValue();
+ if(timeouts.getMOASessionUpdated() != null)
+ timeoutMOASessionUpdated = timeouts.getMOASessionUpdated().longValue();
+
+ }
+ }
+
+ IdentityLinkSigners idlsign = auth.getIdentityLinkSigners();
+ if (idlsign != null) {
+ List<IdentityLinkSignersX509SubjectNameItem> idem = idlsign.getX509SubjectNameItems();
+
+ for (IdentityLinkSignersX509SubjectNameItem el : idem) {
+ identityLinkSigners += el.getItem() + LINE_DELIMITER;
+ }
+
+ }
+
+ MOASP moaspss = auth.getMOASP();
+ if (moaspss != null) {
+ ConnectionParameterClientAuthType con = moaspss.getConnectionParameter();
+ if (con != null)
+ moaspssURL = con.getURL();
+
+ VerifyAuthBlock authblock = moaspss.getVerifyAuthBlock();
+ if (authblock != null) {
+ moaspssAuthTrustProfile = authblock.getTrustProfileID();
+
+ List<String> list = authblock.getVerifyTransformsInfoProfileID();
+ for (String el : list)
+ moaspssAuthTransformations += el + LINE_DELIMITER;
+ }
+
+ VerifyIdentityLink idl = moaspss.getVerifyIdentityLink();
+ if (idl != null) {
+ moaspssIdlTrustProfile = idl.getTrustProfileID();
+ }
+ }
+
+ OnlineMandates mandates = auth.getOnlineMandates();
+ if (mandates != null) {
+ ConnectionParameterClientAuthType con = mandates.getConnectionParameter();
+ if (con != null) {
+ mandateURL = con.getURL();
+ }
+ }
+
+ Protocols protocols = auth.getProtocols();
+ if (protocols != null) {
+ LegacyAllowed legacy = protocols.getLegacyAllowed();
+
+ if (legacy != null) {
+ List<String> list = legacy.getProtocolName();
+ if (list.contains(Constants.MOA_CONFIG_PROTOCOL_SAML1))
+ legacy_saml1 = true;
+
+ if (list.contains(Constants.MOA_CONFIG_PROTOCOL_PVP2))
+ legacy_pvp2 = true;
+ }
+
+ PVP2 pvp2 = protocols.getPVP2();
+ if (pvp2 != null) {
+ pvp2PublicUrlPrefix = pvp2.getPublicURLPrefix();
+ pvp2IssuerName = pvp2.getIssuerName();
+
+ List<Contact> con = pvp2.getContact();
+
+ //TODO: change to support more contacts
+ if (con != null && con.size() > 0) {
+ pvp2Contact = new ContactForm(con.get(0));
+
+ }
+
+ Organization org = pvp2.getOrganization();
+ if (org != null) {
+ pvp2OrgDisplayName = org.getDisplayName();
+ pvp2OrgName = org.getName();
+ pvp2OrgURL = org.getURL();
+ }
+ }
+ }
+
+ SecurityLayer seclayer = auth.getSecurityLayer();
+ if (seclayer != null) {
+ List<TransformsInfoType> list = seclayer.getTransformsInfo();
+
+ fileUploadFileName = new ArrayList<String>();
+
+ for (TransformsInfoType el : list)
+ fileUploadFileName.add(el.getFilename());
+ }
+
+ SSO sso = auth.getSSO();
+ if (sso != null) {
+ ssoFriendlyName = sso.getFriendlyName();
+
+ IdentificationNumber idl = sso.getIdentificationNumber();
+ if (idl != null)
+ ssoIdentificationNumber = idl.getValue();
+
+ ssoPublicUrl = sso.getPublicURL();
+ ssoSpecialText = sso.getSpecialText();
+ ssoTarget = sso.getTarget();
}
}
- }
-
+ ChainingModes modes = config.getChainingModes();
+ if (modes != null) {
+ ChainingModeType defaultmode = modes.getSystemDefaultMode();
+ if (defaultmode != null) {
+ defaultchainigmode = defaultmode.value();
+
+ }
+
+ List<TrustAnchor> trustanchor = modes.getTrustAnchor();
+ if (trustanchor != null) {
+ //TODO: set addional trust anchors!!!!
+ }
+ }
+
+ trustedCACerts = config.getTrustedCACertificates();
+
+ DefaultBKUs defaultbkus = config.getDefaultBKUs();
+ if (defaultbkus != null) {
+ defaultBKUHandy = defaultbkus.getHandyBKU();
+ defaultBKULocal = defaultbkus.getLocalBKU();
+ defaultBKUOnline = defaultbkus.getOnlineBKU();
+ }
+
+ SLRequestTemplates slreq = config.getSLRequestTemplates();
+ if (slreq != null) {
+ SLRequestTemplateHandy = slreq.getHandyBKU();
+ SLRequestTemplateLocal = slreq.getLocalBKU();
+ SLRequestTemplateOnline = slreq.getOnlineBKU();
+ }
+ }
+ }
+
+ /**
+ * @return the szrgwURL
+ */
+ public String getSzrgwURL() {
+ return szrgwURL;
+ }
+
+ /**
+ * @param szrgwURL the szrgwURL to set
+ */
+ public void setSzrgwURL(String szrgwURL) {
+ this.szrgwURL = szrgwURL;
+ }
+
+ /**
+ * @return the alternativeSourceID
+ */
+ public String getAlternativeSourceID() {
+ return alternativeSourceID;
+ }
+
+ /**
+ * @param alternativeSourceID the alternativeSourceID to set
+ */
+ public void setAlternativeSourceID(String alternativeSourceID) {
+ this.alternativeSourceID = alternativeSourceID;
+ }
+
+ /**
+ * @return the certStoreDirectory
+ */
+ public String getCertStoreDirectory() {
+ return certStoreDirectory;
+ }
+
+ /**
+ * @param certStoreDirectory the certStoreDirectory to set
+ */
+ public void setCertStoreDirectory(String certStoreDirectory) {
+ this.certStoreDirectory = certStoreDirectory;
+ }
+
+ /**
+ * @return the timeoutAssertion
+ */
+ public long getTimeoutAssertion() {
+ return timeoutAssertion;
+ }
+
+ /**
+ * @param timeoutAssertion the timeoutAssertion to set
+ */
+ public void setTimeoutAssertion(long timeoutAssertion) {
+ this.timeoutAssertion = timeoutAssertion;
+ }
+
+ /**
+ * @return the timeoutMOASessionCreated
+ */
+ public long getTimeoutMOASessionCreated() {
+ return timeoutMOASessionCreated;
+ }
+
+ /**
+ * @param timeoutMOASessionCreated the timeoutMOASessionCreated to set
+ */
+ public void setTimeoutMOASessionCreated(long timeoutMOASessionCreated) {
+ this.timeoutMOASessionCreated = timeoutMOASessionCreated;
+ }
+
+ /**
+ * @return the timeoutMOASessionUpdated
+ */
+ public long getTimeoutMOASessionUpdated() {
+ return timeoutMOASessionUpdated;
+ }
+
+ /**
+ * @param timeoutMOASessionUpdated the timeoutMOASessionUpdated to set
+ */
+ public void setTimeoutMOASessionUpdated(long timeoutMOASessionUpdated) {
+ this.timeoutMOASessionUpdated = timeoutMOASessionUpdated;
+ }
+
+ /**
+ * @return the identityLinkSigners
+ */
+ public String getIdentityLinkSigners() {
+ return identityLinkSigners;
+ }
+
+ /**
+ * @param identityLinkSigners the identityLinkSigners to set
+ */
+ public void setIdentityLinkSigners(String identityLinkSigners) {
+ this.identityLinkSigners = identityLinkSigners;
+ }
+
+ /**
+ * @return the moaspssURL
+ */
+ public String getMoaspssURL() {
+ return moaspssURL;
+ }
+
+ /**
+ * @param moaspssURL the moaspssURL to set
+ */
+ public void setMoaspssURL(String moaspssURL) {
+ this.moaspssURL = moaspssURL;
+ }
+
+ /**
+ * @return the moaspssAuthTrustProfile
+ */
+ public String getMoaspssAuthTrustProfile() {
+ return moaspssAuthTrustProfile;
+ }
+
+ /**
+ * @param moaspssAuthTrustProfile the moaspssAuthTrustProfile to set
+ */
+ public void setMoaspssAuthTrustProfile(String moaspssAuthTrustProfile) {
+ this.moaspssAuthTrustProfile = moaspssAuthTrustProfile;
+ }
+
+ /**
+ * @return the moaspssAuthTransformations
+ */
+ public String getMoaspssAuthTransformations() {
+ return moaspssAuthTransformations;
+ }
+
+ /**
+ * @param moaspssAuthTransformations the moaspssAuthTransformations to set
+ */
+ public void setMoaspssAuthTransformations(String moaspssAuthTransformations) {
+ this.moaspssAuthTransformations = moaspssAuthTransformations;
+ }
+
+ /**
+ * @return the moaspssIdlTrustProfile
+ */
+ public String getMoaspssIdlTrustProfile() {
+ return moaspssIdlTrustProfile;
+ }
+
+ /**
+ * @param moaspssIdlTrustProfile the moaspssIdlTrustProfile to set
+ */
+ public void setMoaspssIdlTrustProfile(String moaspssIdlTrustProfile) {
+ this.moaspssIdlTrustProfile = moaspssIdlTrustProfile;
+ }
+
+ /**
+ * @return the mandateURL
+ */
+ public String getMandateURL() {
+ return mandateURL;
}
+
+ /**
+ * @param mandateURL the mandateURL to set
+ */
+ public void setMandateURL(String mandateURL) {
+ this.mandateURL = mandateURL;
+ }
+
+ /**
+ * @return the legacy_saml1
+ */
+ public boolean isLegacy_saml1() {
+ return legacy_saml1;
+ }
+
+ /**
+ * @param legacy_saml1 the legacy_saml1 to set
+ */
+ public void setLegacy_saml1(boolean legacy_saml1) {
+ this.legacy_saml1 = legacy_saml1;
+ }
+
+ /**
+ * @return the legacy_pvp2
+ */
+ public boolean isLegacy_pvp2() {
+ return legacy_pvp2;
+ }
+
+ /**
+ * @param legacy_pvp2 the legacy_pvp2 to set
+ */
+ public void setLegacy_pvp2(boolean legacy_pvp2) {
+ this.legacy_pvp2 = legacy_pvp2;
+ }
+
+ /**
+ * @return the pvp2PublicUrlPrefix
+ */
+ public String getPvp2PublicUrlPrefix() {
+ return pvp2PublicUrlPrefix;
+ }
+
+ /**
+ * @param pvp2PublicUrlPrefix the pvp2PublicUrlPrefix to set
+ */
+ public void setPvp2PublicUrlPrefix(String pvp2PublicUrlPrefix) {
+ this.pvp2PublicUrlPrefix = pvp2PublicUrlPrefix;
+ }
+
+ /**
+ * @return the pvp2IssuerName
+ */
+ public String getPvp2IssuerName() {
+ return pvp2IssuerName;
+ }
+
+ /**
+ * @param pvp2IssuerName the pvp2IssuerName to set
+ */
+ public void setPvp2IssuerName(String pvp2IssuerName) {
+ this.pvp2IssuerName = pvp2IssuerName;
+ }
+
+ /**
+ * @return the pvp2OrgName
+ */
+ public String getPvp2OrgName() {
+ return pvp2OrgName;
+ }
+
+ /**
+ * @param pvp2OrgName the pvp2OrgName to set
+ */
+ public void setPvp2OrgName(String pvp2OrgName) {
+ this.pvp2OrgName = pvp2OrgName;
+ }
+
+ /**
+ * @return the pvp2OrgDisplayName
+ */
+ public String getPvp2OrgDisplayName() {
+ return pvp2OrgDisplayName;
+ }
+
+ /**
+ * @param pvp2OrgDisplayName the pvp2OrgDisplayName to set
+ */
+ public void setPvp2OrgDisplayName(String pvp2OrgDisplayName) {
+ this.pvp2OrgDisplayName = pvp2OrgDisplayName;
+ }
+
+ /**
+ * @return the pvp2OrgURL
+ */
+ public String getPvp2OrgURL() {
+ return pvp2OrgURL;
+ }
+
+ /**
+ * @param pvp2OrgURL the pvp2OrgURL to set
+ */
+ public void setPvp2OrgURL(String pvp2OrgURL) {
+ this.pvp2OrgURL = pvp2OrgURL;
+ }
+
+ /**
+ * @return the pvp2Contact
+ */
+ public ContactForm getPvp2Contact() {
+ return pvp2Contact;
+ }
+
+ /**
+ * @param pvp2Contact the pvp2Contact to set
+ */
+ public void setPvp2Contact(ContactForm pvp2Contact) {
+ this.pvp2Contact = pvp2Contact;
+ }
+
+ /**
+ * @return the fileUpload
+ */
+ public List<File> getFileUpload() {
+ return fileUpload;
+ }
+
+ /**
+ * @param fileUpload the fileUpload to set
+ */
+ public void setFileUpload(List<File> fileUpload) {
+ this.fileUpload = fileUpload;
+ }
+
+ /**
+ * @return the fileUploadContentType
+ */
+ public List<String> getFileUploadContentType() {
+ return fileUploadContentType;
+ }
+
+ /**
+ * @param fileUploadContentType the fileUploadContentType to set
+ */
+ public void setFileUploadContentType(List<String> fileUploadContentType) {
+ this.fileUploadContentType = fileUploadContentType;
+ }
+
+ /**
+ * @return the fileUploadFileName
+ */
+ public List<String> getFileUploadFileName() {
+ return fileUploadFileName;
+ }
+
+ /**
+ * @param fileUploadFileName the fileUploadFileName to set
+ */
+ public void setFileUploadFileName(List<String> fileUploadFileName) {
+ this.fileUploadFileName = fileUploadFileName;
+ }
+
+ /**
+ * @return the ssoTarget
+ */
+ public String getSsoTarget() {
+ return ssoTarget;
+ }
+
+ /**
+ * @param ssoTarget the ssoTarget to set
+ */
+ public void setSsoTarget(String ssoTarget) {
+ this.ssoTarget = ssoTarget;
+ }
+
+ /**
+ * @return the ssoFriendlyName
+ */
+ public String getSsoFriendlyName() {
+ return ssoFriendlyName;
+ }
+
+ /**
+ * @param ssoFriendlyName the ssoFriendlyName to set
+ */
+ public void setSsoFriendlyName(String ssoFriendlyName) {
+ this.ssoFriendlyName = ssoFriendlyName;
+ }
+
+ /**
+ * @return the ssoPublicUrl
+ */
+ public String getSsoPublicUrl() {
+ return ssoPublicUrl;
+ }
+
+ /**
+ * @param ssoPublicUrl the ssoPublicUrl to set
+ */
+ public void setSsoPublicUrl(String ssoPublicUrl) {
+ this.ssoPublicUrl = ssoPublicUrl;
+ }
+
+ /**
+ * @return the ssoSpecialText
+ */
+ public String getSsoSpecialText() {
+ return ssoSpecialText;
+ }
+
+ /**
+ * @param ssoSpecialText the ssoSpecialText to set
+ */
+ public void setSsoSpecialText(String ssoSpecialText) {
+ this.ssoSpecialText = ssoSpecialText;
+ }
+
+ /**
+ * @return the ssoIdentificationNumber
+ */
+ public String getSsoIdentificationNumber() {
+ return ssoIdentificationNumber;
+ }
+
+ /**
+ * @param ssoIdentificationNumber the ssoIdentificationNumber to set
+ */
+ public void setSsoIdentificationNumber(String ssoIdentificationNumber) {
+ this.ssoIdentificationNumber = ssoIdentificationNumber;
+ }
+
+ /**
+ * @return the defaultchainigmode
+ */
+ public String getDefaultchainigmode() {
+ return defaultchainigmode;
+ }
+
+ /**
+ * @param defaultchainigmode the defaultchainigmode to set
+ */
+ public void setDefaultchainigmode(String defaultchainigmode) {
+ this.defaultchainigmode = defaultchainigmode;
+ }
+
+ /**
+ * @return the defaultBKUOnline
+ */
+ public String getDefaultBKUOnline() {
+ return defaultBKUOnline;
+ }
+
+ /**
+ * @param defaultBKUOnline the defaultBKUOnline to set
+ */
+ public void setDefaultBKUOnline(String defaultBKUOnline) {
+ this.defaultBKUOnline = defaultBKUOnline;
+ }
+
+ /**
+ * @return the defaultBKULocal
+ */
+ public String getDefaultBKULocal() {
+ return defaultBKULocal;
+ }
+
+ /**
+ * @param defaultBKULocal the defaultBKULocal to set
+ */
+ public void setDefaultBKULocal(String defaultBKULocal) {
+ this.defaultBKULocal = defaultBKULocal;
+ }
+
+ /**
+ * @return the defaultBKUHandy
+ */
+ public String getDefaultBKUHandy() {
+ return defaultBKUHandy;
+ }
+
+ /**
+ * @param defaultBKUHandy the defaultBKUHandy to set
+ */
+ public void setDefaultBKUHandy(String defaultBKUHandy) {
+ this.defaultBKUHandy = defaultBKUHandy;
+ }
+
+ /**
+ * @return the sLRequestTemplateOnline
+ */
+ public String getSLRequestTemplateOnline() {
+ return SLRequestTemplateOnline;
+ }
+
+ /**
+ * @param sLRequestTemplateOnline the sLRequestTemplateOnline to set
+ */
+ public void setSLRequestTemplateOnline(String sLRequestTemplateOnline) {
+ SLRequestTemplateOnline = sLRequestTemplateOnline;
+ }
+
+ /**
+ * @return the sLRequestTemplateLocal
+ */
+ public String getSLRequestTemplateLocal() {
+ return SLRequestTemplateLocal;
+ }
+
+ /**
+ * @param sLRequestTemplateLocal the sLRequestTemplateLocal to set
+ */
+ public void setSLRequestTemplateLocal(String sLRequestTemplateLocal) {
+ SLRequestTemplateLocal = sLRequestTemplateLocal;
+ }
+
+ /**
+ * @return the sLRequestTemplateHandy
+ */
+ public String getSLRequestTemplateHandy() {
+ return SLRequestTemplateHandy;
+ }
+
+ /**
+ * @param sLRequestTemplateHandy the sLRequestTemplateHandy to set
+ */
+ public void setSLRequestTemplateHandy(String sLRequestTemplateHandy) {
+ SLRequestTemplateHandy = sLRequestTemplateHandy;
+ }
+
+ /**
+ * @return the trustmanagerrevocationcheck
+ */
+ public boolean isTrustmanagerrevocationcheck() {
+ return trustmanagerrevocationcheck;
+ }
+
+ /**
+ * @param trustmanagerrevocationcheck the trustmanagerrevocationcheck to set
+ */
+ public void setTrustmanagerrevocationcheck(boolean trustmanagerrevocationcheck) {
+ this.trustmanagerrevocationcheck = trustmanagerrevocationcheck;
+ }
+
+ /**
+ * @return the trustedCACerts
+ */
+ public String getTrustedCACerts() {
+ return trustedCACerts;
+ }
+
+ /**
+ * @param trustedCACerts the trustedCACerts to set
+ */
+ public void setTrustedCACerts(String trustedCACerts) {
+ this.trustedCACerts = trustedCACerts;
+ }
+
+ /**
+ * @return the chainigmodelist
+ */
+ public Map<String, String> getChainigmodelist() {
+ return chainigmodelist;
+ }
+
+ /**
+ * @param chainigmodelist the chainigmodelist to set
+ */
+ public void setChainigmodelist(Map<String, String> chainigmodelist) {
+ GeneralMOAIDConfig.chainigmodelist = chainigmodelist;
+ }
+
+
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
index ebd1b3862..f3b513019 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OAGeneralConfig.java
@@ -5,9 +5,12 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead;
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.DefaultBKUs;
import at.gv.egovernment.moa.id.commons.db.dao.config.IdentificationNumber;
+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.Mandates;
import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
@@ -15,6 +18,7 @@ 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.TransformsInfoType;
import at.gv.egovernment.moa.id.configuration.Constants;
+import at.gv.egovernment.moa.util.MiscUtil;
public class OAGeneralConfig {
@@ -86,10 +90,37 @@ public class OAGeneralConfig {
AuthComponentOA oaauth = dbOAConfig.getAuthComponentOA();
if (oaauth != null) {
BKUURLS bkuurls = oaauth.getBKUURLS();
+
+ String defaulthandy = "";
+ String defaultlocal = "";
+ String defaultonline = "";
+
+ MOAIDConfiguration dbconfig = ConfigurationDBRead.getMOAIDConfiguration();
+ if (dbconfig != null) {
+ DefaultBKUs defaultbkus = dbconfig.getDefaultBKUs();
+ if (defaultbkus != null) {
+ defaulthandy = defaultbkus.getHandyBKU();
+ defaultlocal = defaultbkus.getLocalBKU();
+ defaultonline = defaultbkus.getOnlineBKU();
+ }
+ }
+
if (bkuurls != null) {
- bkuHandyURL = bkuurls.getHandyBKU();
- bkuLocalURL = bkuurls.getLocalBKU();
- bkuOnlineURL = bkuurls.getOnlineBKU();
+
+ if (MiscUtil.isEmpty(bkuurls.getHandyBKU()))
+ bkuHandyURL = defaulthandy;
+ else
+ bkuHandyURL = bkuurls.getHandyBKU();
+
+ if (MiscUtil.isEmpty(bkuurls.getLocalBKU()))
+ bkuLocalURL = defaultlocal;
+ else
+ bkuLocalURL = bkuurls.getLocalBKU();
+
+ if (MiscUtil.isEmpty(bkuurls.getOnlineBKU()))
+ bkuOnlineURL = defaultonline;
+ else
+ bkuOnlineURL = bkuurls.getOnlineBKU();
}
IdentificationNumber idnumber = oaauth.getIdentificationNumber();
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/pvp2/ContactForm.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/pvp2/ContactForm.java
new file mode 100644
index 000000000..fe685e6d0
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/pvp2/ContactForm.java
@@ -0,0 +1,114 @@
+package at.gv.egovernment.moa.id.configuration.data.pvp2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import at.gv.egovernment.moa.id.commons.db.dao.config.Contact;
+
+public class ContactForm {
+
+ private String surname;
+ private String givenname;
+ private List<String> mail;
+ private String type;
+ private String company;
+ private List<String> phone;
+
+ public ContactForm() {
+
+ }
+
+ public ContactForm(Contact dbcont) {
+ this.surname = dbcont.getSurName();
+ this.givenname = dbcont.getGivenName();
+ this.mail =dbcont.getMail();
+ this.phone = dbcont.getPhone();
+ this.company = dbcont.getCompany();
+ this.type = dbcont.getType();
+ }
+
+ /**
+ * @return the surname
+ */
+ public String getSurname() {
+ return surname;
+ }
+ /**
+ * @param surname the surname to set
+ */
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+ /**
+ * @return the givenname
+ */
+ public String getGivenname() {
+ return givenname;
+ }
+ /**
+ * @param givenname the givenname to set
+ */
+ public void setGivenname(String givenname) {
+ this.givenname = givenname;
+ }
+ /**
+ * @return the mail
+ */
+ public String getMail() {
+ if (mail.size() > 0)
+ return mail.get(0);
+ else
+ return null;
+ }
+ /**
+ * @param mail the mail to set
+ */
+ public void setMail(String mail) {
+ if (this.mail == null)
+ this.mail = new ArrayList<String>();
+ this.mail.add(mail);
+ }
+ /**
+ * @return the type
+ */
+ public String getType() {
+ return type;
+ }
+ /**
+ * @param type the type to set
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+ /**
+ * @return the company
+ */
+ public String getCompany() {
+ return company;
+ }
+ /**
+ * @param company the company to set
+ */
+ public void setCompany(String company) {
+ this.company = company;
+ }
+ /**
+ * @return the phone
+ */
+ public String getPhone() {
+ if (phone.size() > 0)
+ return phone.get(0);
+ else
+ return null;
+ }
+ /**
+ * @param phone the phone to set
+ */
+ public void setPhone(String phone) {
+ if (this.phone == null)
+ this.phone = new ArrayList<String>();
+ this.phone.add(phone);
+ }
+
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java
index 517786d11..4eccfdf5d 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/filter/AuthenticationFilter.java
@@ -128,7 +128,8 @@ public class AuthenticationFilter implements Filter{
if (authuser == null) {
- authuser = new AuthenticatedUser(0000000, "Max", "TestUser", true, true);
+ authuser = new AuthenticatedUser(1, "Max", "TestUser", true, true);
+ //authuser = new AuthenticatedUser(1, "Max", "TestUser", true, false);
httpServletRequest.getSession().setAttribute(Constants.SESSION_AUTH, authuser);
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
index 1c498ecc2..a9210ad27 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/EditOAAction.java
@@ -24,6 +24,7 @@ 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.OnlineApplication;
+import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplicationType;
import at.gv.egovernment.moa.id.commons.db.dao.config.STORK;
import at.gv.egovernment.moa.id.commons.db.dao.config.TemplateType;
import at.gv.egovernment.moa.id.commons.db.dao.config.TemplatesType;
@@ -240,6 +241,13 @@ ServletResponseAware {
public String deleteOA() {
+ Object authUserObj = request.getSession().getAttribute(Constants.SESSION_AUTH);
+
+ if (authUserObj != null && authUserObj instanceof AuthenticatedUser) {
+ authUser = (AuthenticatedUser) authUserObj;
+ } else
+ return Constants.STRUTS_REAUTHENTICATE;
+
String oaidentifier = generalOA.getIdentifier();
if (MiscUtil.isEmpty(oaidentifier)) {
log.info("Empty OA identifier");
@@ -262,9 +270,9 @@ ServletResponseAware {
if (!authUser.isAdmin()) {
UserDatabase user = ConfigurationDBRead.getUserWithID(authUser.getUserID());
- List<OnlineApplication> useroas = user.getRegistratedOAs();
+ List<OnlineApplication> useroas = user.getOnlineApplication();
- for (OnlineApplication oa : useroas) {
+ for (OnlineApplicationType oa : useroas) {
if (oa.getHjid().equals(onlineapplication.getHjid())) {
useroas.remove(oa);
}
@@ -430,12 +438,13 @@ ServletResponseAware {
if (!authUser.isAdmin()) {
UserDatabase user = ConfigurationDBRead.getUserWithID(authUser.getUserID());
- List<OnlineApplication> useroas = user.getRegistratedOAs();
+
+ List<OnlineApplication> useroas = user.getOnlineApplication();
if (useroas == null)
useroas = new ArrayList<OnlineApplication>();
useroas.add(dboa);
- ConfigurationDBUtils.save(user);
+ ConfigurationDBUtils.saveOrUpdate(user);
}
}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java
index 9e6e04644..deb48111d 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/ListOAsAction.java
@@ -15,6 +15,7 @@ import com.opensymphony.xwork2.ActionSupport;
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.dao.config.OnlineApplication;
+import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplicationType;
import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
import at.gv.egovernment.moa.id.configuration.Constants;
import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser;
@@ -57,14 +58,18 @@ public class ListOAsAction extends ActionSupport implements ServletRequestAware,
if (authUser.isAdmin()) {
dbOAs = ConfigurationDBRead.getAllOnlineApplications();
-
+
} else {
UserDatabase authUserDB = ConfigurationDBRead.getUserWithID(authUser.getUserID());
- dbOAs = authUserDB.getRegistratedOAs();
+
+ if (authUserDB != null)
+ dbOAs = authUserDB.getOnlineApplication();
}
- addFormOAs(dbOAs);
+ addFormOAs(dbOAs);
+ ConfigurationDBUtils.closeSession();
+
return Constants.STRUTS_SUCCESS;
}
@@ -116,12 +121,24 @@ public class ListOAsAction extends ActionSupport implements ServletRequestAware,
dbOAs = ConfigurationDBRead.searchOnlineApplications(friendlyname);
} else {
- dbOAs = ConfigurationDBRead.searchOnlineApplicationsFromUser(authUser.getUserID(), friendlyname);
-
+ UserDatabase authUserDB = ConfigurationDBRead.getUserWithID(authUser.getUserID());
+ if (authUserDB != null) {
+ List<OnlineApplication> alldbOAs = authUserDB.getOnlineApplication();
+
+ dbOAs = new ArrayList<OnlineApplication>();
+
+ for (OnlineApplication el : alldbOAs) {
+ if (el.getPublicURLPrefix()
+ .toLowerCase().indexOf(friendlyname.toLowerCase()) > -1)
+ dbOAs.add(el);
+ }
+ }
}
addFormOAs(dbOAs);
+ ConfigurationDBUtils.closeSession();
+
return Constants.STRUTS_SUCCESS;
}
@@ -131,7 +148,7 @@ public class ListOAsAction extends ActionSupport implements ServletRequestAware,
private void addFormOAs(List<OnlineApplication> dbOAs) {
formOAs = new ArrayList<OAListElement>();
- if (dbOAs == null) {
+ if (dbOAs == null || dbOAs.size() == 0) {
addActionError(LanguageHelper.getErrorString("errors.listOAs.noOA", request));
} else {
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/UserManagementAction.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/UserManagementAction.java
new file mode 100644
index 000000000..3f4b21fdd
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/struts/action/UserManagementAction.java
@@ -0,0 +1,62 @@
+package at.gv.egovernment.moa.id.configuration.struts.action;
+
+import java.util.Date;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.struts2.interceptor.ServletRequestAware;
+import org.apache.struts2.interceptor.ServletResponseAware;
+
+import at.gv.egovernment.moa.id.commons.db.ConfigurationDBUtils;
+import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase;
+import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException;
+import at.gv.egovernment.moa.id.configuration.Constants;
+import at.gv.egovernment.moa.id.configuration.auth.AuthenticatedUser;
+
+import com.opensymphony.xwork2.ActionSupport;
+
+public class UserManagementAction extends ActionSupport
+ implements ServletRequestAware, ServletResponseAware {
+
+ private static final long serialVersionUID = 1L;
+
+ private HttpServletRequest request;
+ private HttpServletResponse response;
+
+ private AuthenticatedUser authUser;
+
+
+ public String createTestUser() throws MOADatabaseException {
+
+ UserDatabase user = new UserDatabase();
+ user.setBpk("");
+ user.setFamilyname("Max");
+ user.setGivenname("Mustermann");
+ user.setIsActive(true);
+ user.setIsAdmin(false);
+ user.setInstitut("EGIZ");
+ user.setLastLoginItem(new Date());
+ user.setMail("masdf@amfasdf.com");
+ user.setPhone("00660011542");
+ user.setUsername("testuser");
+
+ ConfigurationDBUtils.save(user);
+
+ return Constants.STRUTS_SUCCESS;
+ }
+
+
+ public void setServletResponse(HttpServletResponse response) {
+ this.response = response;
+
+ }
+
+ public void setServletRequest(HttpServletRequest request) {
+ this.request = request;
+
+ }
+
+
+
+}
diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java
index a1bb23008..6da106b85 100644
--- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/ValidationHelper.java
@@ -161,5 +161,27 @@ public class ValidationHelper {
return "; % \" ' ` < > \\ /";
else
return "; % \" ' ` , < > \\ /";
- }
+ }
+
+ public static boolean isValidIdentityLinkSigner(String param) {
+ if (param == null) {
+ return false;
+ }
+ return param.indexOf(";") != -1 ||
+ param.indexOf("%") != -1 ||
+ param.indexOf("\"") != -1 ||
+ param.indexOf("'") != -1 ||
+ param.indexOf("?") != -1 ||
+ param.indexOf("`") != -1 ||
+ param.indexOf(",") != -1 ||
+ param.indexOf("<") != -1 ||
+ param.indexOf(">") != -1 ||
+ param.indexOf("\\") != -1;
+
+ }
+
+ public static String getNotValidIdentityLinkSignerCharacters() {
+
+ return "; % \" ' ` , < > \\";
+ }
}
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
new file mode 100644
index 000000000..cdd1d2c60
--- /dev/null
+++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/moaconfig/MOAConfigValidator.java
@@ -0,0 +1,94 @@
+package at.gv.egovernment.moa.id.configuration.validation.moaconfig;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+
+import at.gv.egovernment.moa.id.configuration.data.GeneralMOAIDConfig;
+import at.gv.egovernment.moa.id.configuration.helper.LanguageHelper;
+import at.gv.egovernment.moa.id.configuration.validation.ValidationHelper;
+import at.gv.egovernment.moa.util.MiscUtil;
+
+public class MOAConfigValidator {
+
+ private static final Logger log = Logger.getLogger(MOAConfigValidator.class);
+
+ public List<String> validate(GeneralMOAIDConfig form) {
+
+ List<String> errors = new ArrayList<String>();
+
+ log.debug("Validate general MOA configuration");
+
+ String check = form.getAlternativeSourceID();
+ if (MiscUtil.isNotEmpty(check)) {
+ if (ValidationHelper.containsPotentialCSSCharacter(check, false)) {
+ log.warn("AlternativeSourceID contains potentail XSS characters: " + check);
+ errors.add(LanguageHelper.getErrorString("validation.general.AlternativeSourceID",
+ new Object[] {ValidationHelper.getPotentialCSSCharacter(false)} ));
+ }
+ }
+
+ check = form.getCertStoreDirectory();
+ if (MiscUtil.isNotEmpty(check)) {
+ if (ValidationHelper.isValidOAIdentifier(check)) {
+ log.warn("CertStoreDirectory contains potentail XSS characters: " + check);
+ errors.add(LanguageHelper.getErrorString("validation.general.certStoreDirectory.valid",
+ new Object[] {ValidationHelper.getNotValidOAIdentifierCharacters()} ));
+ }
+ } else {
+ log.info("CertStoreDirectory is empty.");
+ errors.add(LanguageHelper.getErrorString("validation.general.certStoreDirectory.empty"));
+ }
+
+ check = form.getDefaultBKUHandy();
+ if (MiscUtil.isNotEmpty(check)) {
+ if (!ValidationHelper.validateURL(check)) {
+ log.info("Not valid Handy-BKU URL");
+ errors.add(LanguageHelper.getErrorString("validation.general.bku.handy.valid"));
+ }
+ }
+
+ check = form.getDefaultBKULocal();
+ if (MiscUtil.isNotEmpty(check)) {
+ if (!ValidationHelper.validateURL(check)) {
+ log.info("Not valid Online-BKU URL");
+ errors.add(LanguageHelper.getErrorString("validation.general.bku.local.valid"));
+ }
+ }
+
+ check = form.getDefaultBKUOnline();
+ if (MiscUtil.isNotEmpty(check)) {
+ if (!ValidationHelper.validateURL(check)) {
+ log.info("Not valid Online-BKU URL");
+ errors.add(LanguageHelper.getErrorString("validation.general.bku.online.valid"));
+ }
+ }
+
+ check = form.getDefaultchainigmode();
+ if (MiscUtil.isEmpty(check)) {
+ log.info("Empty Defaultchainigmode");
+ errors.add(LanguageHelper.getErrorString("validation.general.Defaultchainigmode.empty"));
+ } else {
+ Map<String, String> list = form.getChainigmodelist();
+ if (!list.containsKey(check)) {
+ log.info("Not valid Defaultchainigmode " + check);
+ errors.add(LanguageHelper.getErrorString("validation.general.Defaultchainigmode.valid"));
+ }
+ }
+
+ check = form.getIdentityLinkSigners();
+ if (MiscUtil.isEmpty(check)) {
+ log.info("Empty IdentityLinkSigners");
+ errors.add(LanguageHelper.getErrorString("validation.general.IdentityLinkSigners.empty"));
+ } else {
+ String[] list = check.split(GeneralMOAIDConfig.LINE_DELIMITER);
+ for(String el : list) {
+
+ }
+ }
+
+ return errors;
+ }
+}
diff --git a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
index 3aab1acc2..d0b6b6058 100644
--- a/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
+++ b/id/ConfigWebTool/src/main/resources/applicationResources_de.properties
@@ -24,6 +24,57 @@ webpages.mainpage.menu.general.importexport=Importieren/Exportieren
webpages.mainpage.menu.general.config.moaid=Allgemeine Konfiguration
webpages.mainpage.menu.general.usermanagement=Benutzerverwaltung
+webpages.moaconfig.header=Allgemeine Konfiguration
+webpages.moaconfig.defaultbkus.header=Default BKUs
+webpages.moaconfig.slrequesttemplates.header=SecurtiyLayer Request Templates
+webpages.moaconfig.slrequesttemplates.local=Locale BKU
+webpages.moaconfig.slrequesttemplates.handy=Handy BKU
+webpages.moaconfig.slrequesttemplates.online=Online BKU
+webpages.moaconfig.certificates.header=Zertifikatspr\u00fcfung
+webpages.moaconfig.certificates.certstore=CertStoreDirecorty
+webpages.moaconfig.certificates.trustmanagerrev=TrustManagerRevocationChecking
+webpages.moaconfig.certificates.trustCACerts=TrustedCACertificates
+webpages.moaconfig.certificates.chainingmode=ChainingMode
+webpages.moaconfig.timeout.header=Session TimeOuts
+webpages.moaconfig.timeout.assertion=Assertion [sec]
+webpages.moaconfig.timeout.MOASessionCreated=SSO Session authentifiziert [sec]
+webpages.moaconfig.timeout.MOASessionUpdated=SSO Session letzer Zugriff [sec]
+webpages.moaconfig.moasp.header=MOA-SP Konfiguration
+webpages.moaconfig.moasp.idltrustprofile=Personenbindung Trustprofil
+webpages.moaconfig.moasp.authtrustprofile=Authentfizierungsblock Trustprofil
+webpages.moaconfig.moasp.authblocktransform=Authentfizierungsblock Transformationen
+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.sso.header=Single Sign-On
+webpages.moaconfig.sso.PublicUrl=SSO Service URL-Prefix
+webpages.moaconfig.sso.FriendlyName=SSO Service Name
+webpages.moaconfig.services.sso.Target=SSO Service Target
+webpages.moaconfig.services.sso.SpecialText=SSO AuthBlockText
+webpages.moaconfig.protocols.header=Protokolle
+webpages.moaconfig.protocols.legacy.header=Legacy Modus aktivieren
+webpages.moaconfig.protocols.legacy.saml1=SAML1
+webpages.moaconfig.protocols.legacy.pvp2=PVP2.1
+webpages.moaconfig.protocols.pvp2.header=PVP2 Konfiguration
+webpages.moaconfig.protocols.pvp2.PublicUrlPrefix=PVP2 Service URL-Prefix
+webpages.moaconfig.protocols.pvp2.IssuerName=PVP Service Name
+webpages.moaconfig.protocols.pvp2.org.header=Organisation
+webpages.moaconfig.protocols.pvp2.org.name=Kurzbezeichnung
+webpages.moaconfig.protocols.pvp2.org.displayname=Vollständiger Name
+webpages.moaconfig.protocols.pvp2.org.url=URL der Organisation
+webpages.moaconfig.protocols.pvp2.contact.header=Kontaktdaten
+webpages.moaconfig.protocols.pvp2.contact.surename=Familienname
+webpages.moaconfig.protocols.pvp2.contact.givenname=Vorname
+webpages.moaconfig.protocols.pvp2.contact.email=Mailadresse
+webpages.moaconfig.protocols.pvp2.contact.company=Unternehmen
+webpages.moaconfig.protocols.pvp2.contact.phone=Telefonnummer
+webpages.moaconfig.protocols.pvp2.contact.type=Type des Kontakts
+webpages.moaconfig.sl.transormations.header=SecurityLayer Transformationen
+webpages.moaconfig.sl.transormations.filename=Dateiname
+webpages.moaconfig.sl.transormations.upload=Neue Transformation hochladen
+
webpages.listOAs.list.first=Eindeutige Kennung
webpages.listOAs.list.second=Name der Online-Applikation
@@ -97,7 +148,14 @@ webpages.edit.delete=Online-Applikation l\u00f6schen
webpages.header.info=Sie sind angemeldet als:
webpages.header.lastlogin=Letzte Anmeldung am:
-validation.general.aditionalauthblocktext=Der Zusatztext f\u00fcr enth\u00e4lt nicht erlaubte Zeichen. Folgende Zeichen sind nicht erlaubt: {0}
+validation.general.AlternativeSourceID=Die alternatice SourceID enth\u00e4lt nicht erlaubte Zeichen. Folgende Zeichen sind nicht erlaubt: {0}
+validation.general.certStoreDirectory.empty=CertStoreDirectory Feld ist leer.
+validation.general.certStoreDirectory.valid=Das ertStoreDirectory Feld enth\u00e4lt nicht erlaubte Zeichen. Folgende Zeichen sind nicht erlaubt: {0}
+validation.general.Defaultchainigmode.empty=Es wurde kein DefaultChainingMode gewählt.
+validation.general.Defaultchainigmode.valid=Der DefaultChainingMode enthält einen ungültigen Wert.
+
+
+validation.general.aditionalauthblocktext=Der Zusatztext f\u00fcr den AuthBlock enth\u00e4lt nicht erlaubte Zeichen. Folgende Zeichen sind nicht erlaubt: {0}
validation.general.bku.handy.empty=Die URL f\u00fcr die Handy-BKU ist leer.
validation.general.bku.handy.valid=Die URL f\u00fcr die Handy-BKU hat kein g\u00fcltiges Format.
validation.general.bku.local.empty=Die URL f\u00fcr die lokale BKU ist leer.
diff --git a/id/ConfigWebTool/src/main/resources/struts.xml b/id/ConfigWebTool/src/main/resources/struts.xml
index 652df73d8..83234ba3c 100644
--- a/id/ConfigWebTool/src/main/resources/struts.xml
+++ b/id/ConfigWebTool/src/main/resources/struts.xml
@@ -89,7 +89,7 @@
</action>
<action name="loadGeneralConfig" method="loadConfig" class="at.gv.egovernment.moa.id.configuration.struts.action.EditGeneralConfigAction">
- <result name="success">/jsp/editGeneralConfig.jsp</result>
+ <result name="success">/jsp/editMOAConfig.jsp</result>
<result name="error">/error.jsp</result>
<result name="reauthentication">/index.jsp</result>
<result name="notallowed" type="chain">main</result>
@@ -98,7 +98,7 @@
<action name="saveGeneralConfig" method="saveConfig" class="at.gv.egovernment.moa.id.configuration.struts.action.EditGeneralConfigAction">
<result name="success" type="chain">main</result>
- <result name="error_validation">/jsp/editGeneralConfig.jsp</result>
+ <result name="error_validation">/jsp/editMOAConfig.jsp</result>
<result name="error">/error.jsp</result>
<result name="reauthentication">/index.jsp</result>
<result name="notallowed" type="chain">main</result>
@@ -112,6 +112,13 @@
<interceptor-ref name="defaultStack"/>
</action>
+ <action name="addTestUser" method="createTestUser" class="at.gv.egovernment.moa.id.configuration.struts.action.UserManagementAction">
+ <result name="success" type="chain">main</result>
+ <result name="error">/error.jsp</result>
+ <result name="reauthentication">/index.jsp</result>
+ <interceptor-ref name="defaultStack"/>
+ </action>
+
</package>
</struts> \ No newline at end of file
diff --git a/id/ConfigWebTool/src/main/webapp/css/index.css b/id/ConfigWebTool/src/main/webapp/css/index.css
index c0b95abba..5edddd506 100644
--- a/id/ConfigWebTool/src/main/webapp/css/index.css
+++ b/id/ConfigWebTool/src/main/webapp/css/index.css
@@ -142,6 +142,19 @@
width: 100%;
}
+.moageneral_protocol_area {
+ clear: both;
+ margin-left: 25px;
+}
+
+.moageneral_protocol_area>h4 {
+ margin-left: 10px;
+}
+
+#moageneral_legacy_protocol>.wwgrp {
+ clear: none;
+}
+
.wwlbl {
float: left;
padding-right: 10px;
diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp
new file mode 100644
index 000000000..b902e438d
--- /dev/null
+++ b/id/ConfigWebTool/src/main/webapp/jsp/editMOAConfig.jsp
@@ -0,0 +1,354 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@page import="at.gv.egovernment.moa.id.configuration.helper.LanguageHelper"%>
+<%@ taglib prefix="s" uri="/struts-tags" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+ <link rel="stylesheet" type="text/css" href="../css/index.css">
+ <title><%=LanguageHelper.getGUIString("title", request) %></title>
+ <script type="text/javascript" src="../js/common.js"></script>
+ <script src="../js/jquery.js"></script>
+
+ </head>
+
+ <body>
+
+ <jsp:include page="snippets/header_userinfos.jsp"></jsp:include>
+
+ <jsp:include page="snippets/main_menu.jsp"></jsp:include>
+
+ <div id="information_area">
+ <s:if test="hasActionErrors()">
+ <div id="error_area">
+ <label><%=LanguageHelper.getGUIString("error.title", request) %></label>
+ <s:actionerror/>
+ </div>
+ </s:if>
+
+ <div id="list_area">
+ <h2><%=LanguageHelper.getGUIString("webpages.moaconfig.header", request) %></h2>
+
+ <s:if test="authUser.isAdmin()">
+
+ <s:form namespace="/secure" method="POST" enctype="multipart/form-data">
+
+ <div class="oa_config_block">
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.defaultbkus.header", request) %></h3>
+
+ <s:textfield name="moaconfig.defaultBKUOnline"
+ value="%{moaconfig.defaultBKUOnline}"
+ labelposition="left"
+ key="webpages.oaconfig.general.bku.online"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <s:textfield name="moaconfig.defaultBKUHandy"
+ value="%{moaconfig.defaultBKUHandy}"
+ labelposition="left"
+ key="webpages.oaconfig.general.bku.handy"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <s:textfield name="moaconfig.defaultBKULocal"
+ value="%{moaconfig.defaultBKULocal}"
+ labelposition="left"
+ key="webpages.oaconfig.general.bku.local"
+ cssClass="textfield_long">
+ </s:textfield>
+ </div>
+
+ <div class="oa_config_block">
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.slrequesttemplates.header", request) %></h3>
+
+ <s:textfield name="moaconfig.SLRequestTemplateOnline"
+ value="%{moaconfig.SLRequestTemplateOnline}"
+ labelposition="left"
+ key="webpages.moaconfig.slrequesttemplates.online"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <s:textfield name="moaconfig.SLRequestTemplateHandy"
+ value="%{moaconfig.SLRequestTemplateHandy}"
+ labelposition="left"
+ key="webpages.moaconfig.slrequesttemplates.handy"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <s:textfield name="moaconfig.SLRequestTemplateLocal"
+ value="%{moaconfig.SLRequestTemplateLocal}"
+ labelposition="left"
+ key="webpages.moaconfig.slrequesttemplates.local"
+ cssClass="textfield_long">
+ </s:textfield>
+ </div>
+
+ <div class="oa_config_block">
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.certificates.header", request) %></h3>
+
+ <s:textfield name="moaconfig.certStoreDirectory"
+ value="%{moaconfig.certStoreDirectory}"
+ labelposition="left"
+ key="webpages.moaconfig.certificates.certstore"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <s:checkbox name="moaconfig.trustmanagerrevocationcheck"
+ value="%{moaconfig.trustmanagerrevocationcheck}"
+ labelposition="left"
+ key="webpages.moaconfig.certificates.trustmanagerrev"
+ cssClass="checkbox">
+ </s:checkbox>
+
+ <s:textfield name="moaconfig.trustedCACerts"
+ value="%{moaconfig.trustedCACerts}"
+ labelposition="left"
+ key="webpages.moaconfig.certificates.trustCACerts"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <s:radio list="moaconfig.chainigmodelist"
+ name="moaconfig.defaultchainigmode"
+ value="%{moaconfig.defaultchainigmode}"
+ labelposition="left"
+ key="webpages.moaconfig.certificates.chainingmode"
+ cssClass="radio">
+ </s:radio>
+
+ </div>
+
+ <div class="oa_config_block">
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.timeout.header", request) %></h3>
+
+ <s:textfield name="moaconfig.timeoutAssertion"
+ value="%{moaconfig.timeoutAssertion}"
+ labelposition="left"
+ key="webpages.moaconfig.timeout.assertion"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.timeoutMOASessionCreated"
+ value="%{moaconfig.timeoutMOASessionCreated}"
+ labelposition="left"
+ key="webpages.moaconfig.timeout.MOASessionCreated"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.timeoutMOASessionUpdated"
+ value="%{moaconfig.timeoutMOASessionUpdated}"
+ labelposition="left"
+ key="webpages.moaconfig.timeout.MOASessionUpdated"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ </div>
+
+ <div class="oa_config_block">
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.moasp.header", request) %></h3>
+
+ <s:textfield name="moaconfig.moaspssIdlTrustProfile"
+ value="%{moaconfig.moaspssIdlTrustProfile}"
+ labelposition="left"
+ key="webpages.moaconfig.moasp.idltrustprofile"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <s:textarea name="moaconfig.identityLinkSigners"
+ value="%{moaconfig.identityLinkSigners}"
+ labelposition="left"
+ key="webpages.moaconfig.identitylinksigners"
+ cssClass="textfield_large">
+ </s:textarea>
+
+ <s:textfield name="moaconfig.moaspssAuthTrustProfile"
+ value="%{moaconfig.moaspssAuthTrustProfile}"
+ labelposition="left"
+ key="webpages.moaconfig.moasp.authtrustprofile"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <s:textarea name="moaconfig.moaspssAuthTransformations"
+ value="%{moaconfig.moaspssAuthTransformations}"
+ labelposition="left"
+ key="webpages.moaconfig.moasp.authblocktransform"
+ cssClass="textfield_large">
+ </s:textarea>
+
+ <s:textfield name="moaconfig.moaspssURL"
+ value="%{moaconfig.moaspssURL}"
+ labelposition="left"
+ key="webpages.moaconfig.moasp.url"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ </div>
+
+ <div class="oa_config_block">
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.services.header", request) %></h3>
+ <s:textfield name="moaconfig.mandateURL"
+ value="%{moaconfig.mandateURL}"
+ labelposition="left"
+ key="webpages.moaconfig.services.mandates"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.szrgwURL"
+ value="%{moaconfig.szrgwURL}"
+ labelposition="left"
+ key="webpages.moaconfig.services.szrgw"
+ cssClass="textfield_long">
+ </s:textfield>
+ </div>
+
+ <div class="oa_config_block" >
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.sso.header", request) %></h3>
+ <s:textfield name="moaconfig.ssoPublicUrl"
+ value="%{moaconfig.ssoPublicUrl}"
+ labelposition="left"
+ key="webpages.moaconfig.sso.PublicUrl"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.ssoFriendlyName"
+ value="%{moaconfig.ssoFriendlyName}"
+ labelposition="left"
+ key="webpages.moaconfig.sso.FriendlyName"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.ssoTarget "
+ value="%{moaconfig.ssoTarget }"
+ labelposition="left"
+ key="webpages.moaconfig.services.sso.Target"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textarea name="moaconfig.ssoSpecialText"
+ value="%{moaconfig.ssoSpecialText}"
+ labelposition="left"
+ key="webpages.moaconfig.services.sso.SpecialText"
+ cssClass="textfield_large">
+ </s:textarea>
+ </div>
+
+ <div class="oa_config_block">
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.protocols.header", request) %></h3>
+
+ <div id="moageneral_legacy_protocol" class="moageneral_protocol_area">
+ <h4><%=LanguageHelper.getGUIString("webpages.moaconfig.protocols.legacy.header", request) %></h4>
+ <s:checkbox name="moaconfig.legacy_saml1"
+ value="%{moaconfig.legacy_saml1}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.legacy.saml1"
+ cssClass="checkbox">
+ </s:checkbox>
+ <s:checkbox name="moaconfig.legacy_pvp2"
+ value="%{moaconfig.legacy_pvp2}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.legacy.pvp2"
+ cssClass="checkbox">
+ </s:checkbox>
+ </div>
+
+ <div class="moageneral_protocol_area">
+ <h4><%=LanguageHelper.getGUIString("webpages.moaconfig.protocols.pvp2.header", request) %></h4>
+
+ <s:textfield name="moaconfig.pvp2PublicUrlPrefix "
+ value="%{moaconfig.pvp2PublicUrlPrefix}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.PublicUrlPrefix"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.pvp2IssuerName"
+ value="%{moaconfig.pvp2IssuerName}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.IssuerName"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <h5><%=LanguageHelper.getGUIString("webpages.moaconfig.protocols.pvp2.org.header", request) %></h5>
+ <s:textfield name="moaconfig.pvp2OrgName"
+ value="%{moaconfig.pvp2OrgName}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.org.name"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.pvp2OrgDisplayName"
+ value="%{moaconfig.pvp2OrgDisplayName}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.org.displayname"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.pvp2OrgURL "
+ value="%{moaconfig.pvp2OrgURL}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.org.url"
+ cssClass="textfield_long">
+ </s:textfield>
+
+ <h5><%=LanguageHelper.getGUIString("webpages.moaconfig.protocols.pvp2.contact.header", request) %></h5>
+ <s:textfield name="moaconfig.pvp2Contact.surname"
+ value="%{moaconfig.pvp2Contact.surname}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.contact.surename"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.pvp2Contact.givenname"
+ value="%{moaconfig.pvp2Contact.givenname}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.contact.givenname"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.pvp2Contact.mail"
+ value="%{moaconfig.pvp2Contact.mail}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.contact.email"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.pvp2Contact.phone"
+ value="%{moaconfig.pvp2Contact.phone}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.contact.phone"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.pvp2Contact.company"
+ value="%{moaconfig.pvp2Contact.company}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.contact.company"
+ cssClass="textfield_long">
+ </s:textfield>
+ <s:textfield name="moaconfig.pvp2Contact.type"
+ value="%{moaconfig.pvp2Contact.type}"
+ labelposition="left"
+ key="webpages.moaconfig.protocols.pvp2.contact.type"
+ cssClass="textfield_long">
+ </s:textfield>
+ </div>
+ </div>
+
+ <div class="oa_config_block">
+ <h3><%=LanguageHelper.getGUIString("webpages.moaconfig.sl.transormations.header", request) %></h3>
+
+ <s:iterator value="%{moaconfig.fileUploadFileName}" var="fileName">
+ <s:label key="webpages.moaconfig.sl.transormations.filename" value="%{fileName}"/>
+
+ <div id="pvp2_certificate_upload">
+ <s:file name="fileUpload" key="webpages.moaconfig.sl.transormations.upload" cssClass="textfield_long"></s:file>
+ </div>
+ </s:iterator>
+ </div>
+
+ <br>
+ <br>
+
+ <div id="button_area">
+ <s:submit key="webpages.edit.back" action="backGeneralConfig"/>
+ <s:submit key="webpages.edit.save" action="saveGeneralConfig"/>
+ </div>
+
+ </s:form>
+
+ </s:if>
+ </div>
+
+ </div>
+
+ <jsp:include page="snippets/footer.jsp"></jsp:include>
+
+ </body>
+</html> \ No newline at end of file
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 d4736efbb..ff8c562a7 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
@@ -304,6 +304,12 @@ public class AuthConfigurationProvider extends ConfigurationProvider {
moaidconfig = ConfigurationDBRead.getMOAIDConfiguration();
if (moaidconfig != null)
ConfigurationDBUtils.delete(moaidconfig);
+
+ List<OnlineApplication> oas = ConfigurationDBRead.getAllOnlineApplications();
+ if (oas != null && oas.size() > 0) {
+ for (OnlineApplication oa : oas)
+ ConfigurationDBUtils.delete(oa);
+ }
}
//load legacy config if it is configured
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 61f0f7e90..7ec8c823e 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
@@ -127,6 +127,7 @@ public class BuildFromLegacyConfig {
//Load generic Config
Map genericConfiguration = builder.buildGenericConfiguration();
GeneralConfiguration authGeneral = new GeneralConfiguration();
+
if (genericConfiguration.containsKey(GENERIC_CONFIG_PARAM_SOURCEID))
authGeneral.setAlternativeSourceID(
(String)genericConfiguration.get(GENERIC_CONFIG_PARAM_SOURCEID));
@@ -210,12 +211,14 @@ public class BuildFromLegacyConfig {
String[] transformsInfos = builder.loadTransformsInfos(transformsInfoFileNames);
List<TransformsInfoType> auth_transformInfos = new ArrayList<TransformsInfoType>();
- for (String transformInfo : transformsInfos) {
+
+ for (int i=0; i<transformsInfos.length; i++) {
+// for (String transformInfo : transformsInfos) {
TransformsInfoType transforminfotype = new TransformsInfoType();
- transforminfotype.setFilename("");
+ transforminfotype.setFilename(transformsInfoFileNames[i]);
//TODO: Transformation is stored in BASE64
- transforminfotype.setTransformation(Base64Utils.encode(transformInfo.getBytes("UTF-8")).getBytes("UTF-8"));
+ transforminfotype.setTransformation(Base64Utils.encode(transformsInfos[i].getBytes("UTF-8")).getBytes("UTF-8"));
auth_transformInfos.add(transforminfotype);
}
SecurityLayer auth_securityLayer = new SecurityLayer();
@@ -355,6 +358,7 @@ public class BuildFromLegacyConfig {
moa_oa.setTarget(oa.getTarget());
moa_oa.setTargetFriendlyName(oa.getTargetFriendlyName());
moa_oa.setType(oa.getOaType());
+ moa_oa.setIsActive(true);
AuthComponentOA oa_auth = new AuthComponentOA();
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 e815f2a69..67bc2b918 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
@@ -22,10 +22,8 @@ public class ConfigurationDBRead {
QUERIES.put("getOnlineApplicationWithDBID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.hjid = :id");
QUERIES.put("getAllOnlineApplications", "select onlineapplication from OnlineApplication onlineapplication");
QUERIES.put("getMOAIDConfiguration", "select moaidconfiguration from MOAIDConfiguration moaidconfiguration");
- QUERIES.put("getUserWithUserID", "select userdatabase from UserDatabase userdatabase where userdatabase.id = :id");
- QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id");
- QUERIES.put("searchOnlineApplicationsFormUserWithID", "select onlineapplication from UserDatabase userdatabase, OnlineApplication onlineapplication where userdatabase.id = :userid and userdatabase.registratedOAs.friendlyName like :oaid");
- }
+ QUERIES.put("getUserWithUserID", "select userdatabase from UserDatabase userdatabase where userdatabase.hjid = :id");
+ QUERIES.put("searchOnlineApplicationsWithID", "select onlineapplication from OnlineApplication onlineapplication where onlineapplication.friendlyName like :id"); }
@SuppressWarnings("rawtypes")
public static OnlineApplication getActiveOnlineApplication(String id) {
@@ -156,34 +154,7 @@ public class ConfigurationDBRead {
return result;
}
-
- @SuppressWarnings("rawtypes")
- public static List<OnlineApplication> searchOnlineApplicationsFromUser(long userid, String oaid) {
- MiscUtil.assertNotNull(oaid, "OnlineApplictionID");
- MiscUtil.assertNotNull(userid, "UserID");
-
- Logger.trace("Getting OnlineApplication with ID " + oaid
- + " from user with UserID " + userid + " database.");
-
- List<OnlineApplication> result;
- EntityManager session = ConfigurationDBUtils.getCurrentSession();
-
- javax.persistence.Query query = session.createQuery(QUERIES.get("searchOnlineApplicationsFormUserWithID"));
- query.setParameter("userid", userid);
- query.setParameter("oaid", "%"+oaid+"%");
-
- 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.");
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/UserDatabase.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/UserDatabase.java
deleted file mode 100644
index d1887bfa6..000000000
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/config/UserDatabase.java
+++ /dev/null
@@ -1,263 +0,0 @@
-package at.gv.egovernment.moa.id.commons.db.dao.config;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.hibernate.annotations.DynamicUpdate;
-
-import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication;
-
-
-@Entity
-@DynamicUpdate(value=true)
-@Table(name = "userdatabase")
-public class UserDatabase implements Serializable{
-
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id", unique=true, nullable=false)
- private long id;
-
- @Column(name = "givenname", nullable=false)
- private String givenname;
-
- @Column(name = "familyname", nullable=false)
- private String familyname;
-
- @Column(name = "institut", nullable=false)
- private String institut;
-
- @Column(name = "mail", nullable=false)
- private String mail;
-
- @Column(name = "phone", nullable=false)
- private String phone;
-
- @Column(name = "username", unique=true, nullable=false)
- private String username;
-
- @Column(name = "password", nullable=false)
- private String password;
-
- @Column(name = "bpk", unique=true, nullable=false)
- private String bpk;
-
- @Column(name = "isadmin", nullable=false)
- private boolean isadmin;
-
- @Column(name = "isactive", nullable=false)
- private boolean isactive;
-
- @OneToMany(mappedBy="hjid", cascade=CascadeType.REFRESH)
- private List<OnlineApplication> registratedOAs = null;
-
- @Column(name = "lastlogin")
- @Temporal(TemporalType.TIMESTAMP)
- private Date lastlogin;
-
- @PreUpdate
- protected void lastUpdate() {
- this.lastlogin = new Date();
- }
-
- /**
- * @return the id
- */
- public long getId() {
- return id;
- }
-
- /**
- * @param id the id to set
- */
- public void setId(long id) {
- this.id = id;
- }
-
- /**
- * @return the givenname
- */
- public String getGivenname() {
- return givenname;
- }
-
- /**
- * @param givenname the givenname to set
- */
- public void setGivenname(String givenname) {
- this.givenname = givenname;
- }
-
- /**
- * @return the familyname
- */
- public String getFamilyname() {
- return familyname;
- }
-
- /**
- * @param familyname the familyname to set
- */
- public void setFamilyname(String familyname) {
- this.familyname = familyname;
- }
-
- /**
- * @return the institut
- */
- public String getInstitut() {
- return institut;
- }
-
- /**
- * @param institut the institut to set
- */
- public void setInstitut(String institut) {
- this.institut = institut;
- }
-
- /**
- * @return the mail
- */
- public String getMail() {
- return mail;
- }
-
- /**
- * @param mail the mail to set
- */
- public void setMail(String mail) {
- this.mail = mail;
- }
-
- /**
- * @return the phone
- */
- public String getPhone() {
- return phone;
- }
-
- /**
- * @param phone the phone to set
- */
- public void setPhone(String phone) {
- this.phone = phone;
- }
-
- /**
- * @return the username
- */
- public String getUsername() {
- return username;
- }
-
- /**
- * @param username the username to set
- */
- public void setUsername(String username) {
- this.username = username;
- }
-
- /**
- * @return the password
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * @param password the password to set
- */
- public void setPassword(String password) {
- this.password = password;
- }
-
- /**
- * @return the bpk
- */
- public String getBpk() {
- return bpk;
- }
-
- /**
- * @param bpk the bpk to set
- */
- public void setBpk(String bpk) {
- this.bpk = bpk;
- }
-
- /**
- * @return the isadmin
- */
- public boolean isIsadmin() {
- return isadmin;
- }
-
- /**
- * @param isadmin the isadmin to set
- */
- public void setIsadmin(boolean isadmin) {
- this.isadmin = isadmin;
- }
-
- /**
- * @return the isactive
- */
- public boolean isIsactive() {
- return isactive;
- }
-
- /**
- * @param isactive the isactive to set
- */
- public void setIsactive(boolean isactive) {
- this.isactive = isactive;
- }
-
- /**
- * @return the registratedOAs
- */
- public List<OnlineApplication> getRegistratedOAs() {
- return registratedOAs;
- }
-
- /**
- * @param registratedOAs the registratedOAs to set
- */
- public void setRegistratedOAs(List<OnlineApplication> registratedOAs) {
- this.registratedOAs = registratedOAs;
- }
-
- /**
- * @return the lastlogin
- */
- public Date getLastlogin() {
- return lastlogin;
- }
-
- /**
- * @param lastlogin the lastlogin to set
- */
- public void setLastlogin(Date lastlogin) {
- this.lastlogin = lastlogin;
- }
-
-
-}
-
-
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java
index c7672f9ba..6e0f47805 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java
@@ -45,7 +45,6 @@ public class OASessionStore implements Serializable{
// this.created = new Date();
// }
- //@ManyToOne(fetch=FetchType.LAZY)
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name = "moasession")
private AuthenticatedSessionStore moasession;
diff --git a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
index a90205260..ac8aa3b40 100644
--- a/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
+++ b/id/server/moa-id-commons/src/main/resources/config/moaid_config_2.0.xsd
@@ -1,6 +1,26 @@
<?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" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0.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: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:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
<xsd:element name="Configuration">
<xsd:complexType>
<xsd:sequence>
@@ -171,31 +191,11 @@
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:element name="OnlineApplication" type="OnlineApplication" maxOccurs="unbounded">
<xsd:annotation>
<xsd:documentation>enthält Parameter für die OA
</xsd:documentation>
</xsd:annotation>
- <xsd:complexType>
- <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: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:extension>
- </xsd:complexContent>
- </xsd:complexType>
</xsd:element>
<xsd:element name="ChainingModes" minOccurs="0">
<xsd:annotation>
@@ -429,15 +429,6 @@
</xsd:sequence>
</xsd:complexType>
</xsd:element>
- <xsd:element name="Templates">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="OnlineBKU" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="HandyBKU" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
- <xsd:element name="LocalBKU" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
- </xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="TransformsInfoType">
@@ -504,7 +495,7 @@
<xsd:complexType name="ProxyComponentType"/>
<xsd:complexType name="OnlineApplicationType">
<xsd:sequence>
- <xsd:element name="isActive" type="xsd:boolean" minOccurs="1" maxOccurs="1" default="false"/>
+ <xsd:element name="isActive" type="xsd:boolean" default="false" minOccurs="1" maxOccurs="1"/>
<xsd:element name="AuthComponent_OA" minOccurs="0">
<xsd:annotation>
<xsd:documentation>enthält Parameter über die OA, die die
@@ -941,4 +932,20 @@
</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="1" maxOccurs="1"/>
+ <xsd:element name="givenname" type="xsd:string" minOccurs="1" 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="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="lastLogin" type="xsd:date" minOccurs="1" maxOccurs="1"/>
+ <xsd:element name="OnlineApplication" type="OnlineApplication" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
</xsd:schema>
diff --git a/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml b/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml
index bd60f5a46..25092ff58 100644
--- a/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml
+++ b/id/server/moa-id-commons/src/main/resources/config/persistence_template.xml
@@ -2,7 +2,7 @@
<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">
- <class>at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase</class>
+ <!-- <class>at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase</class> -->
<!-- <properties>
C3p0 connection pooling configuration