source: TI12-security/trunk/python/ndg.security.common/ndg/security/common/AttAuthority/AttAuthority_services.py @ 2085

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

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

python/www/html/attAuthority.wsdl,
python/ndg.security.server/ndg/security/server/AttAuthority/AttAuthority_services_server.py,
python/ndg.security.common/ndg/security/common/AttAuthority/AttAuthority_services_types.py,
python/ndg.security.common/ndg/security/common/AttAuthority/AttAuthority_services.py:
Include request denied message in getAttCertResponse.

python/ndg.security.server/ndg/security/server/AttAuthority/init.py:
fix to AttAuthorityAccessDenied? doc message.

python/ndg.security.server/ndg/security/server/SessionMgr/server-config.tac:
Exlpicitly convert AttCert? in response to string type.

python/ndg.security.server/ndg/security/server/SessionMgr/init.py:

  • make explicit imports from ndg.security.common.CredWallet?
  • make X509CertParse import
  • updated exception handling for getAttCert call to CredWallet?.

python/www/html/sessionMgr.wsdl,
python/ndg.security.server/ndg/security/server/SessionMgr/SessionMgr_services_server.py,
python/ndg.security.common/ndg/security/common/SessionMgr/SessionMgr_services.py,
python/ndg.security.common/ndg/security/common/SessionMgr/SessionMgr_services_types.py:
Remove statusCode from getAttCertResponse - not needed.

python/ndg.security.test/ndg/security/test/AttAuthority/AttAuthorityClientTest.py:
minor updates to getAttCert tests.

python/ndg.security.test/ndg/security/test/MyProxy/myProxyClientTest.cfg:
fix to test1Store settings

python/ndg.security.test/ndg/security/test/MyProxy/Makefile:
makefile copies proxy obtained from MyProxy? ready for use in AttAuthority? client tests.

python/ndg.security.test/ndg/security/test/SessionMgr/SessionMgrClientTest.py:

  • add AttributeRequestDenied? import from SessionMgr?.
  • fix test4CookieDisconnect signing PKI settings
  • revised output tuple for getAttCert calls.
  • Added test6aCookieGetAttCertRefused to demonstrate attribute request denied exception
  • test3ProxyCertConnect signature verification failing at server!

python/ndg.security.test/ndg/security/test/SessionMgr/sessionMgrClientTest.cfg:
added more getAttCert test params.

python/ndg.security.common/ndg/security/common/AttAuthority/init.py:

python/ndg.security.common/ndg/security/common/wsSecurity.py:
comment out all print statements - only 'print decryptedData' affected in decrypt method
of EncryptionHandler?. This is not in use.

python/ndg.security.common/ndg/security/common/SessionMgr/init.py:

  • Added AttributeRequestDenied? exception for handling getAttCert calls.
  • msg now included in output tuple for getAttCert call.

python/ndg.security.common/ndg/security/common/AttCert.py:
Override XMLSecDoc parent class toString and str calls so that output is returned even
if the signature DOM object has not been initialised.

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

Line 
1##################################################
2# AttAuthority_services.py
3# generated by ZSI.generate.wsdl2python
4##################################################
5
6
7from AttAuthority_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 AttAuthorityServiceLocator:
16    AttAuthority_address = "http://localhost:5700"
17    def getAttAuthorityAddress(self):
18        return AttAuthorityServiceLocator.AttAuthority_address
19    def getAttAuthority(self, url=None, **kw):
20        return AttAuthorityBindingSOAP(url or AttAuthorityServiceLocator.AttAuthority_address, **kw)
21
22# Methods
23class AttAuthorityBindingSOAP:
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 0xb6cf458c>
32    def getAttCert(self, userCert,userAttCert):
33
34        request = getAttCertInputMsg()
35        request._userCert = userCert
36        request._userAttCert = userAttCert
37
38        kw = {}
39        # no input wsaction
40        self.binding.Send(None, None, request, soapaction="getAttCert", **kw)
41        # no output wsaction
42        response = self.binding.Receive(getAttCertOutputMsg.typecode)
43        attCert = response._attCert
44        msg = response._msg
45        return attCert,msg
46
47    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cf48ac>
48    def getHostInfo(self):
49
50        request = getHostInfoInputMsg()
51
52        kw = {}
53        # no input wsaction
54        self.binding.Send(None, None, request, soapaction="getHostInfo", **kw)
55        # no output wsaction
56        response = self.binding.Receive(getHostInfoOutputMsg.typecode)
57        hostname = response._hostname
58        aaURI = response._aaURI
59        loginURI = response._loginURI
60        return hostname,aaURI,loginURI
61
62    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d0022c>
63    def getTrustedHostInfo(self, role):
64
65        request = getTrustedHostInfoInputMsg()
66        request._role = role
67
68        kw = {}
69        # no input wsaction
70        self.binding.Send(None, None, request, soapaction="getTrustedHostInfo", **kw)
71        # no output wsaction
72        response = self.binding.Receive(getTrustedHostInfoOutputMsg.typecode)
73        trustedHosts = response._trustedHosts
74        return trustedHosts
75
76    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6d003ac>
77    def getX509Cert(self):
78
79        request = getX509CertInputMsg()
80
81        kw = {}
82        # no input wsaction
83        self.binding.Send(None, None, request, soapaction="getX509Cert", **kw)
84        # no output wsaction
85        response = self.binding.Receive(getX509CertOutputMsg.typecode)
86        x509Cert = response._x509Cert
87        return x509Cert
88
89getAttCertInputMsg = ns0.getAttCert_Dec().pyclass
90
91getAttCertOutputMsg = ns0.getAttCertResponse_Dec().pyclass
92
93getHostInfoInputMsg = ns0.getHostInfo_Dec().pyclass
94
95getHostInfoOutputMsg = ns0.getHostInfoResponse_Dec().pyclass
96
97getTrustedHostInfoInputMsg = ns0.getTrustedHostInfo_Dec().pyclass
98
99getTrustedHostInfoOutputMsg = ns0.getTrustedHostInfoResponse_Dec().pyclass
100
101getX509CertInputMsg = ns0.getX509Cert_Dec().pyclass
102
103getX509CertOutputMsg = ns0.getX509CertResponse_Dec().pyclass
Note: See TracBrowser for help on using the repository browser.