aboutsummaryrefslogtreecommitdiff
path: root/id/server
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2016-03-10 16:07:58 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2016-03-10 16:07:58 +0100
commit0fe2bed17c674587a60e63fac211a0354ab4ef03 (patch)
tree74b8942af743c2fb4c4fa66be9bb8a5325f14e8a /id/server
parente8773689b175e5617fe116ac0e3d9978351ac4a8 (diff)
downloadmoa-id-spss-0fe2bed17c674587a60e63fac211a0354ab4ef03.tar.gz
moa-id-spss-0fe2bed17c674587a60e63fac211a0354ab4ef03.tar.bz2
moa-id-spss-0fe2bed17c674587a60e63fac211a0354ab4ef03.zip
remove axis 1 implementation completely
Diffstat (limited to 'id/server')
-rw-r--r--id/server/auth-edu/pom.xml14
-rw-r--r--id/server/auth-final/pom.xml14
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java77
-rw-r--r--id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java5
5 files changed, 81 insertions, 31 deletions
diff --git a/id/server/auth-edu/pom.xml b/id/server/auth-edu/pom.xml
index 0812745b6..404b7c354 100644
--- a/id/server/auth-edu/pom.xml
+++ b/id/server/auth-edu/pom.xml
@@ -106,7 +106,19 @@
<artifactId>axis-wsdl4j</artifactId>
<groupId>axis</groupId>
</exclusion>
- </exclusions>
+ <exclusion>
+ <artifactId>axis</artifactId>
+ <groupId>axis</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>axis-jaxrpc</artifactId>
+ <groupId>org.apache.axis</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>axis-saaj</artifactId>
+ <groupId>org.apache.axis</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
diff --git a/id/server/auth-final/pom.xml b/id/server/auth-final/pom.xml
index a0f20ba1f..776ec00d3 100644
--- a/id/server/auth-final/pom.xml
+++ b/id/server/auth-final/pom.xml
@@ -90,7 +90,19 @@
<artifactId>axis-wsdl4j</artifactId>
<groupId>axis</groupId>
</exclusion>
- </exclusions>
+ <exclusion>
+ <artifactId>axis</artifactId>
+ <groupId>axis</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>axis-jaxrpc</artifactId>
+ <groupId>org.apache.axis</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>axis-saaj</artifactId>
+ <groupId>org.apache.axis</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java
index e321c9d05..f2e4da818 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java
@@ -81,7 +81,7 @@ public class SignatureVerificationUtils {
Element domVerifyXMLSignatureRequest = build(signature, trustProfileID);
//send signature-verification to MOA-SP
- Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker()
+ Element domVerifyXMLSignatureResponse = SignatureVerificationInvoker.getInstance()
.verifyXMLSignature(domVerifyXMLSignatureRequest);
// parses the <VerifyXMLSignatureResponse>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
index 72a7d3ba1..5c96f6ad2 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
@@ -46,22 +46,16 @@
package at.gv.egovernment.moa.id.auth.invoke;
-import java.util.Vector;
-
import javax.xml.namespace.QName;
-import javax.xml.rpc.Call;
-import javax.xml.rpc.Service;
-import javax.xml.rpc.ServiceFactory;
-import org.apache.axis.message.SOAPBodyElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import at.gv.egovernment.moa.id.auth.exception.ServiceException;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.ConnectionParameter;
import at.gv.egovernment.moa.id.config.auth.AuthConfiguration;
import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
-import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.spss.api.SignatureVerificationService;
import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder;
@@ -77,9 +71,43 @@ import at.gv.egovernment.moa.util.MiscUtil;
* @version $Id$
*/
public class SignatureVerificationInvoker {
- /** This QName Object identifies the SignatureVerification endpoint of the web service */
+
+ private static SignatureVerificationInvoker instance = null;
+ private SignatureVerificationService svs = null;
+
+ /** This QName Object identifies the SignatureVerification endpoint of the web service */
private static final QName SERVICE_QNAME = new QName("SignatureVerification");
+
+ public static SignatureVerificationInvoker getInstance() {
+ if (instance == null) {
+ instance = new SignatureVerificationInvoker();
+
+ }
+
+ return instance;
+ }
+
+ private SignatureVerificationInvoker() {
+ try {
+ AuthConfiguration authConfigProvider = AuthConfigurationProviderFactory.getInstance();
+ ConnectionParameter authConnParam = authConfigProvider.getMoaSpConnectionParameter();
+
+ if (authConnParam != null && MiscUtil.isNotEmpty(authConnParam.getUrl())) {
+
+
+ } else {
+ svs = SignatureVerificationService.getInstance();
+
+ }
+
+ } catch (ConfigurationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ }
+
/**
* Method verifyXMLSignature.
* @param request to be sent
@@ -99,29 +127,28 @@ public class SignatureVerificationInvoker {
*/
protected Element doCall(QName serviceName, Element request) throws ServiceException {
ConnectionParameter authConnParam = null;
- try {
- Service service = ServiceFactory.newInstance().createService(serviceName);
- Call call = service.createCall();
- SOAPBodyElement body = new SOAPBodyElement(request);
- SOAPBodyElement[] params = new SOAPBodyElement[] { body };
- Vector responses;
- SOAPBodyElement response;
-
- String endPoint;
+ try {
AuthConfiguration authConfigProvider = AuthConfigurationProviderFactory.getInstance();
authConnParam = authConfigProvider.getMoaSpConnectionParameter();
//If the ConnectionParameter do NOT exist, we try to get the api to work....
if (authConnParam != null && MiscUtil.isNotEmpty(authConnParam.getUrl())) {
- Logger.debug("Connecting using auth url: " + authConnParam.getUrl() + ", service " + serviceName.getNamespaceURI() + " : " + serviceName.getLocalPart() + " : "+ serviceName.getPrefix());
- endPoint = authConnParam.getUrl();
- call.setTargetEndpointAddress(endPoint);
- responses = (Vector) call.invoke(serviceName, params);
- Logger.debug("Got responses: " + responses.size()); // TODO handle axis 302 response when incorrect service url is used
- response = (SOAPBodyElement) responses.get(0);
- return response.getAsDOM();
+
+ throw new ServiceException("service.00", new Object[]{"MOA-SP connection via Web-Service is not allowed any more!!!!!!"});
+// Service service = ServiceFactory.newInstance().createService(serviceName);
+// Call call = service.createCall();
+// SOAPBodyElement body = new SOAPBodyElement(request);
+// SOAPBodyElement[] params = new SOAPBodyElement[] { body };
+// Vector responses;
+// SOAPBodyElement response;
+//
+// Logger.debug("Connecting using auth url: " + authConnParam.getUrl() + ", service " + serviceName.getNamespaceURI() + " : " + serviceName.getLocalPart() + " : "+ serviceName.getPrefix());
+// call.setTargetEndpointAddress(authConnParam.getUrl());
+// responses = (Vector) call.invoke(serviceName, params);
+// Logger.debug("Got responses: " + responses.size()); // TODO handle axis 302 response when incorrect service url is used
+// response = (SOAPBodyElement) responses.get(0);
+// return response.getAsDOM();
}
else {
- SignatureVerificationService svs = SignatureVerificationService.getInstance();
VerifyXMLSignatureRequest vsrequest = new VerifyXMLSignatureRequestParser().parse(request);
VerifyXMLSignatureResponse vsresponse = svs.verifyXMLSignature(vsrequest);
diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
index 21e7f2027..ea4dd868b 100644
--- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
+++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -292,7 +292,7 @@ public class AuthenticationServer extends BaseAuthenticationServer {
.getMoaSpIdentityLinkTrustProfileID(pendingReq.getOnlineApplicationConfiguration().isUseIDLTestTrustStore()));
// invokes the call
- Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker()
+ Element domVerifyXMLSignatureResponse = SignatureVerificationInvoker.getInstance()
.verifyXMLSignature(domVerifyXMLSignatureRequest);
// parses the <VerifyXMLSignatureResponse>
VerifyXMLSignatureResponse verifyXMLSignatureResponse = new VerifyXMLSignatureResponseParser(
@@ -952,8 +952,7 @@ public class AuthenticationServer extends BaseAuthenticationServer {
// try {
// invokes the call
- domVsresp = new SignatureVerificationInvoker()
- .verifyXMLSignature(domVsreq);
+ domVsresp = SignatureVerificationInvoker.getInstance().verifyXMLSignature(domVsreq);
// parses the <VerifyXMLSignatureResponse>
VerifyXMLSignatureResponse vsresp = new VerifyXMLSignatureResponseParser(