From 53c6beba7017b74955818f4768b76133f08e784e Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 29 Oct 2014 12:06:22 +0100 Subject: Update third-party libs - some implementation updates was required --- id/server/auth/pom.xml | 4 + id/server/idserverlib/pom.xml | 39 ++- .../gv/egovernment/moa/id/client/SZRGWClient.java | 26 +- .../stork2/CorporateBodyMandateContainer.java | 7 - .../moa/id/protocols/stork2/MandateContainer.java | 2 +- .../stork2/PhyPersonMandateContainer.java | 4 - .../protocols/stork2/SimpleNamespaceContext.java | 83 +++++++ .../properties/pvp-stork_role_mapping.properties | 2 + .../resources/resources/wsdl/szrgw/W3C-XMLDSig.xsd | 265 +++++++++++++++++++++ .../wsdl/szrgw/cs-sstc-schema-assertion-01.xsd | 194 +++++++++++++++ .../wsdl/szrgw/cs-sstc-schema-protocol-01.xsd | 127 ++++++++++ .../resources/wsdl/szrgw/mis/mis-1.0.3.xsd | 98 ++++++++ .../resources/wsdl/szrgw/szr-gw-0.0.3.xsd | 4 - id/server/moa-id-commons/pom.xml | 4 +- .../moa/id/commons/db/ConfigurationDBRead.java | 6 +- pom.xml | 10 +- spss/server/serverlib/pom.xml | 6 + 17 files changed, 849 insertions(+), 32 deletions(-) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/SimpleNamespaceContext.java create mode 100644 id/server/idserverlib/src/main/resources/resources/properties/pvp-stork_role_mapping.properties create mode 100644 id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/W3C-XMLDSig.xsd create mode 100644 id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/cs-sstc-schema-assertion-01.xsd create mode 100644 id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/cs-sstc-schema-protocol-01.xsd create mode 100644 id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/mis/mis-1.0.3.xsd diff --git a/id/server/auth/pom.xml b/id/server/auth/pom.xml index b43a0e736..dd75ee6aa 100644 --- a/id/server/auth/pom.xml +++ b/id/server/auth/pom.xml @@ -108,6 +108,10 @@ iaik_pki_module iaik + + axis-wsdl4j + axis + diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index 833f869e5..32c8f5705 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -71,6 +71,10 @@ javax.servlet servlet-api + + axis-wsdl4j + axis + @@ -92,7 +96,8 @@ at.gv.util egovutils - 1.0.7 + + 2.0.0 com.sun @@ -102,6 +107,14 @@ org.slf4j * + + xalan + * + + + bcprov-jdk16 + bouncycastle + @@ -247,6 +260,14 @@ org.slf4j log4j-over-slf4j + + org.apache.xerces + * + + + xalan + * + @@ -257,6 +278,22 @@ org.slf4j log4j-over-slf4j + + org.slf4j + log4j-over-slf4j + + + org.apache.xerces + * + + + xalan + * + + + bcprov-jdk15on + org.bouncycastle + diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java index c675885c9..9e4f3fa36 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/SZRGWClient.java @@ -38,9 +38,14 @@ import at.gv.util.wsdl.szrgw.SZRGWType; import at.gv.util.xsd.srzgw.CreateIdentityLinkRequest; import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse; -import com.sun.xml.ws.developer.JAXWSProperties; import javax.xml.ws.BindingProvider; +import org.apache.cxf.configuration.jsse.TLSClientParameters; +import org.apache.cxf.endpoint.Client; +import org.apache.cxf.frontend.ClientProxy; +import org.apache.cxf.transport.http.HTTPConduit; +import org.apache.cxf.transports.http.configuration.HTTPClientPolicy; + public class SZRGWClient { private SSLSocketFactory sslContext = null; @@ -57,9 +62,6 @@ public class SZRGWClient { SZRGWService service = new SZRGWService(url, new QName("http://reference.e-government.gv.at/namespace/szrgw/20070807/wsdl", "SZRGWService")); SZRGWType port = service.getSZRGWPort(); - - - BindingProvider bindingProvider = (BindingProvider) port; Map requestContext = bindingProvider.getRequestContext(); requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceUrl); @@ -72,12 +74,24 @@ public class SZRGWClient { throw new SZRGWClientException(); } - requestContext.put(JAXWSProperties.SSL_SOCKET_FACTORY, sslContext); + Client client = ClientProxy.getClient(port); + HTTPConduit http = (HTTPConduit) client.getConduit(); + HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy(); + + httpClientPolicy.setConnectionTimeout(36000); + httpClientPolicy.setReceiveTimeout(32000); + + http.setClient(httpClientPolicy); + TLSClientParameters tlsParams = new TLSClientParameters(); + tlsParams.setSSLSocketFactory(sslContext); + + http.setTlsClientParameters(tlsParams ); + // check for lax hostname if (true) { Logger.trace("LaxHostnameVerifier enabled. This setting is not recommended to use."); - requestContext.put(JAXWSProperties.HOSTNAME_VERIFIER, new LaxHostNameVerifier()); + tlsParams.setHostnameVerifier(new LaxHostNameVerifier()); } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/CorporateBodyMandateContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/CorporateBodyMandateContainer.java index b358436ae..3e16db7d2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/CorporateBodyMandateContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/CorporateBodyMandateContainer.java @@ -24,17 +24,10 @@ package at.gv.egovernment.moa.id.protocols.stork2; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.logging.Logger; -import javanet.staxutils.SimpleNamespaceContext; import org.xml.sax.InputSource; -import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; import java.io.StringReader; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.HashMap; - /** * Physical person representing corporate body * diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java index 25350e686..e6c58b503 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateContainer.java @@ -24,11 +24,11 @@ package at.gv.egovernment.moa.id.protocols.stork2; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.logging.Logger; -import javanet.staxutils.SimpleNamespaceContext; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java index 853d17318..ba89663ab 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/PhyPersonMandateContainer.java @@ -24,14 +24,10 @@ package at.gv.egovernment.moa.id.protocols.stork2; import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.logging.Logger; -import javanet.staxutils.SimpleNamespaceContext; import org.xml.sax.InputSource; -import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; import java.io.StringReader; -import java.util.HashMap; /** * Physical person representing physical person diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/SimpleNamespaceContext.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/SimpleNamespaceContext.java new file mode 100644 index 000000000..2c2df3e54 --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/SimpleNamespaceContext.java @@ -0,0 +1,83 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.protocols.stork2; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map.Entry; +import java.util.Set; + +import javax.xml.namespace.NamespaceContext; + +/** + * @author tlenz + * + */ +public class SimpleNamespaceContext implements NamespaceContext { + + HashMap prefMap = null; + /** + * @param prefMap + */ + SimpleNamespaceContext(HashMap prefMap) { + this.prefMap = prefMap; + } + + /* (non-Javadoc) + * @see javax.xml.namespace.NamespaceContext#getNamespaceURI(java.lang.String) + */ + @Override + public String getNamespaceURI(String prefix) { + if (prefMap.containsKey(prefix)) + return prefMap.get(prefix); + else + return null; + } + + /* (non-Javadoc) + * @see javax.xml.namespace.NamespaceContext#getPrefix(java.lang.String) + */ + @Override + public String getPrefix(String namespaceURI) { + if (prefMap.containsValue(namespaceURI)) { + Set> set = prefMap.entrySet(); + for (Entry el : set) { + if (el.getValue().equals(namespaceURI)) + return el.getKey(); + + } + } + + return null; + } + + /* (non-Javadoc) + * @see javax.xml.namespace.NamespaceContext#getPrefixes(java.lang.String) + */ + @Override + public Iterator getPrefixes(String namespaceURI) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/id/server/idserverlib/src/main/resources/resources/properties/pvp-stork_role_mapping.properties b/id/server/idserverlib/src/main/resources/resources/properties/pvp-stork_role_mapping.properties new file mode 100644 index 000000000..5bcfc7bd2 --- /dev/null +++ b/id/server/idserverlib/src/main/resources/resources/properties/pvp-stork_role_mapping.properties @@ -0,0 +1,2 @@ +xxpvprole=CIRCABC/viewer +yypvprole=CIRCABC/admin \ No newline at end of file diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/W3C-XMLDSig.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/W3C-XMLDSig.xsd new file mode 100644 index 000000000..522cae082 --- /dev/null +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/W3C-XMLDSig.xsd @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/cs-sstc-schema-assertion-01.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/cs-sstc-schema-assertion-01.xsd new file mode 100644 index 000000000..8ef08727d --- /dev/null +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/cs-sstc-schema-assertion-01.xsd @@ -0,0 +1,194 @@ + + + + + + + Document identifier: cs-sstc-schema-assertion-01 + Location: http://www.oasis-open.org/committees/security/docs/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/cs-sstc-schema-protocol-01.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/cs-sstc-schema-protocol-01.xsd new file mode 100644 index 000000000..eeb9bef9f --- /dev/null +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/cs-sstc-schema-protocol-01.xsd @@ -0,0 +1,127 @@ + + + + + + + + Document identifier: cs-sstc-schema-protocol-01 + Location: http://www.oasis-open.org/committees/security/docs/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/mis/mis-1.0.3.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/mis/mis-1.0.3.xsd new file mode 100644 index 000000000..48ef60187 --- /dev/null +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/mis/mis-1.0.3.xsd @@ -0,0 +1,98 @@ + + + + + + + Request to MIS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Response from MIS + + + + + + + + + + + + + + + + + + Organwalter oder berufsm. Parteienvertreter + + + + + bPK des Organwalters + + + + + + + + + + + + + + + + + + + + diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd index c97822427..211e59d53 100644 --- a/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd +++ b/id/server/idserverlib/src/main/resources/resources/wsdl/szrgw/szr-gw-0.0.3.xsd @@ -1,9 +1,5 @@ - - - - diff --git a/id/server/moa-id-commons/pom.xml b/id/server/moa-id-commons/pom.xml index e6d708eca..ebda03801 100644 --- a/id/server/moa-id-commons/pom.xml +++ b/id/server/moa-id-commons/pom.xml @@ -82,7 +82,7 @@ com.sun.xml.bind jaxb-xjc - 2.2.7 + 2.2.11 @@ -118,7 +118,7 @@ mysql mysql-connector-java - 5.1.32 + 5.1.33 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 46d3ca558..a3f445fcf 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 @@ -27,11 +27,13 @@ import at.gv.egovernment.moa.id.commons.db.dao.config.OnlineApplication; import at.gv.egovernment.moa.id.commons.db.dao.config.UserDatabase; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; -import org.apache.commons.lang.StringEscapeUtils; +//import org.apache.commons.lang.StringEscapeUtils; import javax.persistence.EntityManager; import javax.persistence.PersistenceException; +import org.apache.commons.lang3.StringEscapeUtils; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -70,7 +72,7 @@ public class ConfigurationDBRead { javax.persistence.Query query = session.createQuery(QUERIES.get("getActiveOnlineApplicationWithID")); //query.setParameter("id", id+"%"); - query.setParameter("id", StringEscapeUtils.escapeHtml(id)); + query.setParameter("id", StringEscapeUtils.escapeHtml4(id)); result = query.getResultList(); Logger.trace("Found entries: " + result.size()); diff --git a/pom.xml b/pom.xml index bed1565c6..89f710a4c 100644 --- a/pom.xml +++ b/pom.xml @@ -406,7 +406,7 @@ javax.xml.bind jaxb-api - 2.2.11 + 2.2.12 @@ -445,7 +445,7 @@ xerces xercesImpl - 2.9.1 + 2.11.0 compile + 2.11.0 runtime xalan-bin-dist serializer - 2.7.1 + 2.7.2 runtime diff --git a/spss/server/serverlib/pom.xml b/spss/server/serverlib/pom.xml index 3cf8d0bd7..7c11659e1 100644 --- a/spss/server/serverlib/pom.xml +++ b/spss/server/serverlib/pom.xml @@ -161,6 +161,12 @@ + + com.sun.xml.bind + jaxb-impl + 2.2.11 + +