source: TI12-security/trunk/python/ndg.security.common/ndg/security/common/ca/CertificateAuthority_services.py @ 2136

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.common/ndg/security/common/ca/CertificateAuthority_services.py@2136
Revision 2136, 2.6 KB checked in by pjkersha, 12 years ago (diff)

python/ndg.security.server/setup.py:

  • comment out Twisted from install - won't do egg install
  • updated long description

python/ndg.security.server/ndg/security/server/AttAuthority/server-config.tac:

  • added verifyingCertFilePath keyword to SignatureHandler? initialisation
  • added SSL capability

python/conf/attAuthorityProperties.xml,
python/ndg.security.test/ndg/security/test/AttAuthority/siteAAttAuthorityProperties.xml,
python/ndg.security.test/ndg/security/test/AttAuthority/siteBAttAuthorityProperties.xml,
python/ndg.security.server/ndg/security/server/AttAuthority/init.py:
added element names for reading SSL settings from properties file.

python/ndg.security.server/ndg/security/server/SessionMgr/server-config.tac:
added verifyingCertFilePath keyword to SignatureHandler? initialisation

python/conf/sessionMgrProperties.xml,
python/ndg.security.test/ndg/security/test/SessionMgr/sessionMgrProperties.xml,
python/ndg.security.server/ndg/security/server/SessionMgr/init.py:
added clntCertFile properties file element name for setting certificate for
verifying incoming SOAP messages.

python/ndg.security.server/ndg/security/server/SessionMgr/Makefile:
corrected typo.

python/ndg.security.server/ndg/security/server/MyProxy.py:
Put OpenSSLConfig and OpenSSLConfigError classes into their own package
'openssl' so that they can also be used by the Certificate Authority client.

python/www/html/certificateAuthority.wsdl,
python/ndg.security.server/ndg/security/server/ca/CertificateAuthority_services_server.py,
python/ndg.security.common/ndg/security/common/ca/CertificateAuthority_services_types.py,
python/ndg.security.common/ndg/security/common/ca/CertificateAuthority_services.py: updated operations to issueCert, revokeCert and getCRL.

python/ndg.security.test/ndg/security/test/AttAuthority/attAuthorityClientTest.cfg: changed address of service to connect to.

python/ndg.security.test/ndg/security/test/SessionMgr/sessionMgrClientTest.cfg:
alternative username connection settings

python/ndg.security.common/ndg/security/common/AttAuthority/init.py:
fixed typos in error message and comments.

ython/ndg.security.common/ndg/security/common/XMLSec.py: changed call to
getAttributeNodeNS to getAttributeNode for retrieving reference element URI
attribute.

python/ndg.security.common/ndg/security/common/ca/init.py: code for
Certificate Authority client

python/ndg.security.common/ndg/security/common/wsSecurity.py:

  • tidied up imports
  • added properties for setting keywords to reference and SignedInfo? C14N
  • changed sign method so that it is truely configurable allow use of inclusive or exclusive C14N based on the keywords set for reference and SignedInfo? C14N calls.
  • swapped calls to getAttributeNodeNS with getAttributeNode where appropriate.

java/DEWS/AttAuthority/appClientModule/META-INF/ibm-webservicesclient-bnd.xmi,
java/DEWS/AttAuthority/build/classes/META-INF/ibm-webservicesclient-bnd.xmi:
updated to that request generator correctly places X.509 cert in
BinarySecurityToken? element.

java/DEWS/AttAuthority/appClientModule/Main.java,
java/DEWS/AttAuthority/appClientjava/DEWS/AttAuthority/appClientModule/META-INF/ibm-webservicesclient-bnd.xmiModule/Main.java:
include calls to getX509Cert and getAttCert methods.

java/DEWS/SessionMgr/build/classes/META-INF/ibm-webservicesclient-bnd.xmi,
java/DEWS/SessionMgr/appClientModule/META-INF/ibm-webservicesclient-bnd.xmi:
updates for testing Session MAnager client

java/DEWS/SessionMgr/appClientModule/Main.java: switched username setting.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1##################################################
2# CertificateAuthority_services.py
3# generated by ZSI.generate.wsdl2python
4##################################################
5
6
7from CertificateAuthority_services_types import *
8import urlparse, types
9from ZSI.TCcompound import ComplexType, Struct
10from ZSI import client
11import ZSI
12from ZSI.generate.pyclass import pyclass_type
13
14# Locator
15class CertificateAuthorityServiceLocator:
16    CertificateAuthority_address = "http://localhost:5001"
17    def getCertificateAuthorityAddress(self):
18        return CertificateAuthorityServiceLocator.CertificateAuthority_address
19    def getCertificateAuthority(self, url=None, **kw):
20        return CertificateAuthorityBindingSOAP(url or CertificateAuthorityServiceLocator.CertificateAuthority_address, **kw)
21
22# Methods
23class CertificateAuthorityBindingSOAP:
24    def __init__(self, url, **kw):
25        kw.setdefault("readerclass", None)
26        kw.setdefault("writerclass", None)
27        # no resource properties
28        self.binding = client.Binding(url=url, **kw)
29        # no ws-addressing
30
31    # op: <ZSI.wstools.WSDLTools.Message instance at 0x406a3f8c>
32    def issueCert(self, x509CertReq):
33
34        request = issueCertInputMsg()
35        request._x509CertReq = x509CertReq
36
37        kw = {}
38        # no input wsaction
39        self.binding.Send(None, None, request, soapaction="issueCert", **kw)
40        # no output wsaction
41        response = self.binding.Receive(issueCertOutputMsg.typecode)
42        x509Cert = response._x509Cert
43        return x509Cert
44
45    # op: <ZSI.wstools.WSDLTools.Message instance at 0x406ab2cc>
46    def revokeCert(self, x509Cert):
47
48        request = revokeCertInputMsg()
49        request._x509Cert = x509Cert
50
51        kw = {}
52        # no input wsaction
53        self.binding.Send(None, None, request, soapaction="revokeCert", **kw)
54        # no output wsaction
55        response = self.binding.Receive(revokeCertOutputMsg.typecode)
56        return 
57
58    # op: <ZSI.wstools.WSDLTools.Message instance at 0x406ab7ec>
59    def getCRL(self):
60
61        request = getCRLInputMsg()
62
63        kw = {}
64        # no input wsaction
65        self.binding.Send(None, None, request, soapaction="getCRL", **kw)
66        # no output wsaction
67        response = self.binding.Receive(getCRLOutputMsg.typecode)
68        crl = response._crl
69        return crl
70
71issueCertInputMsg = ns0.issueCert_Dec().pyclass
72
73issueCertOutputMsg = ns0.issueCertResponse_Dec().pyclass
74
75revokeCertInputMsg = ns0.revokeCert_Dec().pyclass
76
77revokeCertOutputMsg = ns0.revokeCertResponse_Dec().pyclass
78
79getCRLInputMsg = ns0.getCRL_Dec().pyclass
80
81getCRLOutputMsg = ns0.getCRLResponse_Dec().pyclass
Note: See TracBrowser for help on using the repository browser.