diff options
Diffstat (limited to 'id/ConfigWebTool')
9 files changed, 321 insertions, 5 deletions
diff --git a/id/ConfigWebTool/ConfigurationInterface.iml b/id/ConfigWebTool/ConfigurationInterface.iml new file mode 100644 index 000000000..bb7e047b2 --- /dev/null +++ b/id/ConfigWebTool/ConfigurationInterface.iml @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> + <component name="FacetManager"> + <facet type="web" name="Web"> + <configuration> + <descriptors> + <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" /> + </descriptors> + <webroots> + <root url="file://$MODULE_DIR$/src/main/webapp" relative="/" /> + </webroots> + </configuration> + <facet type="Struts2" name="Struts 2"> + <configuration> + <propertiesKeys disabled="false" /> + </configuration> + </facet> + </facet> + <facet type="javaeeApplication" name="javaEEApplication"> + <configuration> + <descriptors> + <deploymentDescriptor name="application.xml" url="file://$MODULE_DIR$/src/main/webapp/jsp/importexport.jsp" /> + </descriptors> + </configuration> + </facet> + </component> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/target/classes" /> + <output-test url="file://$MODULE_DIR$/target/test-classes" /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <excludeFolder url="file://$MODULE_DIR$/target" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.6.6" level="project" /> + <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:jstl:1.2" level="project" /> + <orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.4" level="project" /> + <orderEntry type="library" name="Maven: log4j:log4j:1.2.14" level="project" /> + <orderEntry type="module" module-name="moa-id-commons" /> + <orderEntry type="library" name="Maven: org.hibernate:hibernate-core:4.2.1.Final" level="project" /> + <orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" /> + <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.1.0.GA" level="project" /> + <orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" /> + <orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:1.0.1.Final" level="project" /> + <orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final" level="project" /> + <orderEntry type="library" name="Maven: org.javassist:javassist:3.15.0-GA" level="project" /> + <orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:4.0.1.Final" level="project" /> + <orderEntry type="library" name="Maven: org.hibernate:hibernate-c3p0:4.2.1.Final" level="project" /> + <orderEntry type="library" name="Maven: c3p0:c3p0:0.9.1" level="project" /> + <orderEntry type="library" name="Maven: org.hibernate:hibernate-entitymanager:4.2.1.Final" level="project" /> + <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.1" level="project" /> + <orderEntry type="module" module-name="moa-common" /> + <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_jce_full:5.101" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_moa:1.5" level="project" /> + <orderEntry type="library" name="Maven: jaxen:jaxen:1.0-FCS" level="project" /> + <orderEntry type="library" name="Maven: saxpath:saxpath:1.0-FCS" level="project" /> + <orderEntry type="library" name="Maven: joda-time:joda-time:1.6.2" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.hyperjaxb3:hyperjaxb3-ejb-runtime:0.5.6" level="project" /> + <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.jaxb2_commons:jaxb2-basics-runtime:0.6.2" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.hyperjaxb3:maven-hyperjaxb3-plugin:0.5.6" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.hyperjaxb3:hyperjaxb3-ejb-plugin:0.5.6" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.annox:annox:0.5.0" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.jaxb2_commons:jaxb2-basics-annotate:0.6.2" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.jaxb2_commons:jaxb2-basics-tools:0.6.2" level="project" /> + <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.7.0" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.jaxb2_commons:jaxb2-basics:0.6.2" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.hyperjaxb3:hyperjaxb3-ejb-roundtrip:0.5.6" level="project" /> + <orderEntry type="library" scope="TEST" name="Maven: junit:junit:3.8.1" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.jaxb2_commons:jaxb2-basics-testing:0.6.2" level="project" /> + <orderEntry type="library" name="Maven: xmlunit:xmlunit:1.0" level="project" /> + <orderEntry type="library" name="Maven: commons-io:commons-io:2.0.1" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.6.1" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.1" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.hyperjaxb3:hyperjaxb3-ejb-schemas-persistence:0.5.6" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.hyperjaxb3:hyperjaxb3-ejb-schemas-customizations:0.5.6" level="project" /> + <orderEntry type="library" name="Maven: org.springframework:spring:2.0.7" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-core:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: com.sun.org.apache.xml.internal:resolver:20050927" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-plugin-api:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-project:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-settings:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-model:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-utils:1.5.15" level="project" /> + <orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-interpolation:1.11" level="project" /> + <orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-container-default:1.0-alpha-9-stable-1" level="project" /> + <orderEntry type="library" name="Maven: classworlds:classworlds:1.1-alpha-2" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-profile:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-artifact-manager:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-repository-metadata:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-artifact:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven.wagon:wagon-provider-api:1.0-beta-6" level="project" /> + <orderEntry type="library" name="Maven: backport-util-concurrent:backport-util-concurrent:3.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.maven:maven-plugin-registry:2.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.jfrog.maven.annomojo:maven-plugin-anno:1.3.1" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.jaxb2.maven2:maven-jaxb22-plugin:0.8.0" level="project" /> + <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.5" level="project" /> + <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-xjc:2.2.4-1" level="project" /> + <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.25" level="project" /> + <orderEntry type="module" module-name="moa-id-lib" /> + <orderEntry type="module" module-name="SamlEngine" /> + <orderEntry type="library" name="Maven: eu.stork:Commons:1.2.0" level="project" /> + <orderEntry type="library" name="Maven: org.opensaml:opensaml:2.6.0" level="project" /> + <orderEntry type="library" name="Maven: org.opensaml:openws:1.5.0" level="project" /> + <orderEntry type="library" name="Maven: org.opensaml:xmltooling:1.4.0" level="project" /> + <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15:1.46" level="project" /> + <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.8" level="project" /> + <orderEntry type="library" name="Maven: ca.juliusdavies:not-yet-commons-ssl:0.3.9" level="project" /> + <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.santuario:xmlsec:1.5.4" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.xerces:xml-apis:2.10.0" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.xerces:xercesImpl:2.10.0" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.xerces:serializer:2.10.0" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: xml-resolver:xml-resolver:1.2" level="project" /> + <orderEntry type="library" name="Maven: xalan:xalan:2.7.1" level="project" /> + <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" /> + <orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" /> + <orderEntry type="library" name="Maven: org.owasp.esapi:esapi:2.0.1" level="project" /> + <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk16:1.46" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.5" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.5" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:log4j-over-slf4j:1.7.5" level="project" /> + <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.5" level="project" /> + <orderEntry type="library" name="Maven: eu.stork:oasis-dss-api:1.0.0-SNAPSHOT" level="project" /> + <orderEntry type="library" name="Maven: com.sun.xml.ws:jaxws-rt:2.1.7" level="project" /> + <orderEntry type="library" name="Maven: javax.xml.ws:jaxws-api:2.1" level="project" /> + <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.2.6" level="project" /> + <orderEntry type="library" name="Maven: com.sun.xml.messaging.saaj:saaj-impl:1.3.3" level="project" /> + <orderEntry type="library" name="Maven: javax.xml.soap:saaj-api:1.3" level="project" /> + <orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" /> + <orderEntry type="library" name="Maven: com.sun.xml.stream.buffer:streambuffer:0.9" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.2" level="project" /> + <orderEntry type="library" name="Maven: javax.xml.stream:stax-api:1.0" level="project" /> + <orderEntry type="library" name="Maven: org.codehaus.woodstox:wstx-asl:3.2.3" level="project" /> + <orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" /> + <orderEntry type="library" name="Maven: org.jvnet:mimepull:1.3" level="project" /> + <orderEntry type="module" module-name="moa-spss-lib" /> + <orderEntry type="library" name="Maven: axis:axis:1.0_IAIK" level="project" /> + <orderEntry type="library" name="Maven: org.apache.axis:axis-jaxrpc:1.4" level="project" /> + <orderEntry type="library" name="Maven: org.apache.axis:axis-saaj:1.4" level="project" /> + <orderEntry type="library" name="Maven: axis:axis-wsdl4j:1.5.1" level="project" /> + <orderEntry type="library" name="Maven: commons-discovery:commons-discovery:0.2" level="project" /> + <orderEntry type="library" name="Maven: javax.mail:mail:1.4" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: postgresql:postgresql:7.2" level="project" /> + <orderEntry type="library" name="Maven: xalan-bin-dist:xalan:2.7.1" level="project" /> + <orderEntry type="library" name="Maven: xalan:serializer:2.7.1" level="project" /> + <orderEntry type="library" name="Maven: xml-apis:xml-apis:1.3.04" level="project" /> + <orderEntry type="library" name="Maven: xerces:xercesImpl:2.9.0" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: xalan-bin-dist:xml-apis:2.7.1" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: xalan-bin-dist:serializer:2.7.1" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_ixsil:1.2.2.5" level="project" /> + <orderEntry type="library" scope="PROVIDED" name="Maven: iaik.prod:iaik_ecc:2.19" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_cms:4.1_MOA" level="project" /> + <orderEntry type="library" scope="RUNTIME" name="Maven: iaik.prod:iaik_Pkcs11Provider:1.2.4" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_Pkcs11Wrapper:1.2.17" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_tsl:1.0" level="project" /> + <orderEntry type="library" name="Maven: iaik:iaik_xsect_eval:1.1709142" level="project" /> + <orderEntry type="library" name="Maven: iaik:iaik_ecc_signed:2.19" level="project" /> + <orderEntry type="library" name="Maven: iaik:iaik_jce_eval_signed:3.181" level="project" /> + <orderEntry type="library" name="Maven: iaik:iaik_pki_module:1.0" level="project" /> + <orderEntry type="library" name="Maven: iaik:iaik_javax_crypto:1.0" level="project" /> + <orderEntry type="library" name="Maven: iaik:iaik_util:0.23" level="project" /> + <orderEntry type="library" name="Maven: iaik:iaik_jsse:4.4" level="project" /> + <orderEntry type="library" name="Maven: iaik:iaik_ssl:4.4" level="project" /> + <orderEntry type="library" name="Maven: iaik:w3c_http:1.0" level="project" /> + <orderEntry type="library" name="Maven: org.xerial:sqlite-jdbc:3.7.8-SNAPSHOT" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_util:0.23" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_xsect:1.1709142" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_jsse:4.4" level="project" /> + <orderEntry type="library" name="Maven: com.sun:webservices-tools:2.0.1" level="project" /> + <orderEntry type="library" name="Maven: com.sun:webservices-rt:2.0.1" level="project" /> + <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.1.1" level="project" /> + <orderEntry type="library" name="Maven: dav4j:dav4j:0.1" level="project" /> + <orderEntry type="library" name="Maven: httpsclient:httpsclient:JSSE-1.0" level="project" /> + <orderEntry type="library" name="Maven: iaik.prod:iaik_X509TrustManager:0.3" level="project" /> + <orderEntry type="library" name="Maven: regexp:regexp:1.3" level="project" /> + <orderEntry type="library" name="Maven: com.googlecode.jsontoken:jsontoken:1.0" level="project" /> + <orderEntry type="library" name="Maven: com.google.code.gson:gson:1.4" level="project" /> + <orderEntry type="library" name="Maven: com.google.collections:google-collections:1.0" level="project" /> + <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.0.1" level="project" /> + <orderEntry type="library" name="Maven: at.gv.util:egovutils:1.0.4" level="project" /> + <orderEntry type="library" name="Maven: commons-validator:commons-validator:1.3.1" level="project" /> + <orderEntry type="library" name="Maven: commons-digester:commons-digester:1.6" level="project" /> + <orderEntry type="library" name="Maven: bouncycastle:bcprov-jdk16:140" level="project" /> + <orderEntry type="library" name="Maven: org.apache.struts:struts2-core:2.3.14.3" level="project" /> + <orderEntry type="library" name="Maven: org.apache.struts.xwork:xwork-core:2.3.14.3" level="project" /> + <orderEntry type="library" name="Maven: ognl:ognl:3.0.6" level="project" /> + <orderEntry type="library" name="Maven: javassist:javassist:3.11.0.GA" level="project" /> + <orderEntry type="library" name="Maven: asm:asm:3.3" level="project" /> + <orderEntry type="library" name="Maven: asm:asm-commons:3.3" level="project" /> + <orderEntry type="library" name="Maven: asm:asm-tree:3.3" level="project" /> + <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.19" level="project" /> + <orderEntry type="library" name="Maven: org.apache.struts:struts2-json-plugin:2.3.14.3" level="project" /> + <orderEntry type="library" name="Maven: iaik:commons-iaik:0.7.1" level="project" /> + </component> +</module> + 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 7a9d91a5d..b963890af 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 @@ -71,7 +71,9 @@ 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"; - + public static final String MOA_CONFIG_PROTOCOL_STORK2 = "id_stork2"; + + public static final String DEFAULT_LOCALBKU_URL = "https://127.0.0.1:3496/https-security-layer-request"; public static final String DEFAULT_HANDYBKU_URL = "https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx"; 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 0c4823f43..fdd566888 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 @@ -92,7 +92,7 @@ public class ConfigurationProvider { configFileName = System.getProperty(SYSTEM_PROP_CONFIG); if (configFileName == null) { - throw new ConfigurationException("config.01"); + throw new ConfigurationException("config.05"); } // determine the directory of the root config file diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java index da07b10b0..430bafbf5 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/data/oa/OASTORKConfig.java @@ -24,13 +24,14 @@ package at.gv.egovernment.moa.id.configuration.data.oa; import java.util.ArrayList; import java.util.List; - import at.gv.egovernment.moa.id.commons.db.ConfigurationDBRead; +import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin; import at.gv.egovernment.moa.id.commons.db.dao.config.AuthComponentOA; import at.gv.egovernment.moa.id.commons.db.dao.config.OASTORK; import at.gv.egovernment.moa.id.commons.db.dao.config.OAStorkAttribute; import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; import at.gv.egovernment.moa.id.commons.db.dao.config.StorkAttribute; +import at.gv.egovernment.moa.id.protocols.stork2.AttributeProviderFactory; public class OASTORKConfig { @@ -77,6 +78,17 @@ public class OASTORKConfig { attributes.add(tmp); } + + // fetch vidp config + setVidpEnabled(config.isVidpEnabled()); + + attributeProviderPlugins = config.getAttributeProviders(); + // - if no attribute providers are configured, add a dummy + // TODO this is a dirty hack since we have to have one entry to + // clone from in the web form. Happens when time is short. + // Sorry. + if (attributeProviderPlugins.isEmpty()) + attributeProviderPlugins.add(new AttributeProviderPlugin()); } } } @@ -126,4 +138,30 @@ public class OASTORKConfig { public void setHelperAttributes(List<AttributeHelper> attributes) { this.attributes = attributes; } + + /* + * VIDP settings below + */ + private boolean vidpEnabled = false; + private List<AttributeProviderPlugin> attributeProviderPlugins; + + public List<String> getAvailableAttributeProviderPlugins() { + return AttributeProviderFactory.getAvailablePlugins(); + } + + public List<AttributeProviderPlugin> getAttributeProviderPlugins() { + return attributeProviderPlugins; + } + + public void setAttributeProviderPlugins(List<AttributeProviderPlugin> update) { + attributeProviderPlugins = update; + } + + public boolean isVidpEnabled() { + return vidpEnabled; + } + + public void setVidpEnabled(boolean update) { + vidpEnabled = update; + } } 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 fd4030937..99bdfdc9c 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 @@ -1070,6 +1070,8 @@ public class EditOAAction extends ActionSupport implements ServletRequestAware, stork.setStorkLogonEnabled(storkOA.isStorkLogonEnabled()); stork.setQaa(storkOA.getQaa()); stork.setOAAttributes(storkOA.getAttributes()); + stork.setVidpEnabled(storkOA.isVidpEnabled()); + stork.setAttributeProviders(storkOA.getAttributeProviderPlugins()); try { if (newentry) { diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java index f72999020..25e0d751c 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/validation/oa/OASTORKConfigValidation.java @@ -27,8 +27,11 @@ import java.util.List; import org.apache.log4j.Logger; +import at.gv.egovernment.moa.id.commons.db.dao.config.AttributeProviderPlugin; import at.gv.egovernment.moa.id.configuration.data.oa.OASTORKConfig; 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 OASTORKConfigValidation { @@ -45,6 +48,17 @@ public class OASTORKConfigValidation { errors.add(LanguageHelper.getErrorString("validation.stork.qaa.outofrange", new Object[] {qaa} )); } + + for(AttributeProviderPlugin current : oageneral.getAttributeProviderPlugins()) { + if (MiscUtil.isEmpty(current.getUrl()) || !ValidationHelper.validateURL(current.getUrl())) { + log.info("AttributeProviderPlugin URL has no valid form."); + errors.add(LanguageHelper.getErrorString("validation.stork.ap.url.valid")); + } + if (MiscUtil.isEmpty(current.getName())) { + log.info("AttributeProviderPlugin Name is empty."); + errors.add(LanguageHelper.getErrorString("validation.stork.ap.name.valid")); + } + } return errors; } diff --git a/id/ConfigWebTool/src/main/resources/applicationResources.properties b/id/ConfigWebTool/src/main/resources/applicationResources.properties index 914c4cd62..a033205ed 100644 --- a/id/ConfigWebTool/src/main/resources/applicationResources.properties +++ b/id/ConfigWebTool/src/main/resources/applicationResources.properties @@ -5,6 +5,7 @@ config.01=Configfile is not found. config.02=Configfile is not readable. config.03=Hibernate Database connector can not be initialized config.04=OpenSAML (PVP2 Login) can not be initialized +config.05=Configuration file not defined error.title=Fehler: error.general.text=W\u00E4hrend der Verarbeitung ist ein interner Fehler auftetreten. Bitte Versuchen Sie es nocheinmal oder kontaktieren Sie den Administrator. @@ -209,7 +210,8 @@ webpages.oaconfig.menu.pvp2.show=PVP2 Konfiguration einblenden webpages.oaconfig.menu.pvp2.hidden=PVP2 Konfiguration ausblenden webpages.oaconfig.menu.oauth20.show=OAuth 2.0 Konfiguration einblenden webpages.oaconfig.menu.oauth20.hidden=OAuth 2.0 Konfiguration ausblenden - +webpages.oaconfig.menu.vidp.show=VIDP Konfiguration einblenden +webpages.oaconfig.menu.vidp.hidden=VIDP Konfiguration ausblenden webpages.oaconfig.menu.stork=STORK Konfiguration @@ -272,6 +274,11 @@ webpages.oaconfig.oauth20.clientId=Client ID webpages.oaconfig.oauth20.clientSecret=Client Passwort webpages.oaconfig.oauth20.redirectUri=Redirect Uri +webpages.oaconfig.vidp.enabled=VIDP interface aktiv +webpages.oaconfig.vidp.ap.new=Neuen Attribut Provider erstellen +webpages.oaconfig.vidp.ap.remove=Entfernen +webpages.oaconfig.vidp.ap.list=Liste der konfigurierten Attribut Provider + message.title=Meldung: webpages.oaconfig.success=Die Online-Applikation {0} konnte erfolgreich gespeichert werden. @@ -410,6 +417,8 @@ validation.stork.cpeps.url=CPEPS URL ist ung\u00FCltig validation.stork.requestedattributes=STORK Attribute sind fehlerhaft. Bsp.: attr1, attr2 validation.stork.qaa.outofrange=G\u00FCltige QAA Werte sind 1, 2, 3, und 4 validation.stork.attributes.empty=Es muss mindestens ein Attribut definiert sein +validation.stork.ap.url.valid=Ung\u00FCltige AttributProvider Url +validation.stork.ap.name.valid=Ung\u00FCltiger AttributProvider Name validation.pvp2.metadataurl.empty=Keine Metadaten URL angegeben. validation.pvp2.metadataurl.valid=Die Metadaten URL wei\u00DFt kein g\u00FCltiges URL Format auf. @@ -436,4 +445,4 @@ validation.general.form.button.color.front=Die Vordergrundfarbe der BKU-Auswahlb validation.general.form.appletredirecttarget=Der RedirectTarget beinhaltet einen ung\\u00FCltiten Wert. validation.general.form.fonttype=Der BKU-Auswahl Schrifttyp enth\u00E4lt nicht erlaubte Zeichen. Folgende Zeichen sind nicht erlaubt\: {0} validation.general.form.applet.width=Die Appleth\u00F6he ist keine g\\u00FCltige Zahl. -validation.general.form.applet.height=Die Appletbreite ist keine g\\u00FCltige Zahl.
\ No newline at end of file +validation.general.form.applet.height=Die Appletbreite ist keine g\\u00FCltige Zahl. diff --git a/id/ConfigWebTool/src/main/webapp/js/common.js b/id/ConfigWebTool/src/main/webapp/js/common.js index 384e40509..45f40f5b8 100644 --- a/id/ConfigWebTool/src/main/webapp/js/common.js +++ b/id/ConfigWebTool/src/main/webapp/js/common.js @@ -51,6 +51,17 @@ function oaStork() { $('#stork_block').css('display', "none"); } } +function oaVIDP() { + if ($('#oa_vidp_area').css('display') == "block") { + $('#oa_vidp_area').css('display', "none"); + $('#button_vidp_show').css('display', "block"); + $('#button_vidp_hidden').css('display', "none"); + } else { + $('#oa_vidp_area').css('display', "block"); + $('#button_vidp_show').css('display', "none"); + $('#button_vidp_hidden').css('display', "block"); + } +} function oaSAML1() { if ($('#oa_saml1_area').css('display') == "block") { $('#oa_saml1_area').css('display', "none"); @@ -224,4 +235,13 @@ function newStorkAttribute() { clone.innerHTML = clone.innerHTML.replace(/name="storkconfig.attributes\[\d/g, 'name="storkconfig.attributes[' + nextindex); clone.innerHTML = clone.innerHTML.replace(/(.*" value=").*?(".*)/g, '$1$2'); target.parentNode.appendChild(clone); +} +function newAp() { + var target = $(document.getElementById("stork_aplist").getElementsByTagName("tr")).last()[0]; + var clone = target.cloneNode(true); + var lastindex = parseInt(clone.innerHTML.match(/name="storkOA.attributeProviderPlugins\[(\d)/)[1]); + var nextindex = lastindex + 1; + clone.innerHTML = clone.innerHTML.replace(/name="storkOA.attributeProviderPlugins\[\d/g, 'name="storkOA.attributeProviderPlugins[' + nextindex); + clone.innerHTML = clone.innerHTML.replace(/(.*" value=").*?(".*)/g, '$1$2'); + target.parentNode.appendChild(clone); }
\ No newline at end of file diff --git a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp index e182fd805..7887d9d62 100644 --- a/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp +++ b/id/ConfigWebTool/src/main/webapp/jsp/editOAGeneral.jsp @@ -384,6 +384,13 @@ <button type="button" class="oa_buttons" onclick="oaSAML1();" id="button_saml1_hidden"> <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.saml1.hidden", request) %> </button> + + <button type="button" class="oa_buttons" onclick="oaVIDP();" id="button_vidp_show"> + <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.vidp.show", request) %> + </button> + <button type="button" style="display:none" class="oa_buttons" onclick="oaVIDP();" id="button_vidp_hidden"> + <%=LanguageHelper.getGUIString("webpages.oaconfig.menu.vidp.hidden", request) %> + </button> </s:if> <button type="button" class="oa_buttons" onclick="oaPVP2();" id="button_pvp2_show"> @@ -496,6 +503,29 @@ cssClass="textfield_long"> </s:textfield> </div> + + + <div id="oa_vidp_area" class="oa_protocol_area"> + <h4><%=LanguageHelper.getGUIString("webpages.oaconfig.stork.header", request) %></h4> + + <p><s:checkbox name="storkOA.vidpEnabled" + value="%{storkOA.vidpEnabled}" + labelposition="left" + key="webpages.oaconfig.vidp.enabled" + cssClass="checkbox" + id="OAuseVidp" /></p> + <h5><%=LanguageHelper.getGUIString("webpages.oaconfig.vidp.ap.list", request) %></h5> + <table id="stork_aplist"> + <tr><th>AP Plugin</th><th>URL</th> + <s:iterator value="storkOA.attributeProviderPlugins" status="stat"> + <tr><td><s:select name="storkOA.attributeProviderPlugins[%{#stat.index}].plugin" value="%{plugin}" list="%{storkOA.availableAttributeProviderPlugins}"/></td> + <td><s:textfield name="storkOA.attributeProviderPlugins[%{#stat.index}].url" value="%{url}" cssClass="textfield"/></td> + <td><input type="button" value="<%=LanguageHelper.getGUIString("webpages.oaconfig.vidp.ap.remove", request) %>" onclick='this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);'/></td></tr> + </s:iterator> + </table> + <input type="button" value="<%=LanguageHelper.getGUIString("webpages.oaconfig.vidp.ap.new", request) %>" onclick='newAp();' /> + + </div> </div> |