source: TI12-security/trunk/python/Tests/SessionMgrIOtest.py @ 1636

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/Tests/SessionMgrIOtest.py@1636
Revision 1636, 16.9 KB checked in by pjkersha, 13 years ago (diff)

Change to new package structure. All refs to NDG package changed to ndg.security

Line 
1#!/bin/env python
2
3import unittest
4from ndg.security.SessionMgrIO import *
5
6
7class sessionMgrIOtestCase(unittest.TestCase):
8   
9    def setUp(self):
10        pass
11   
12    def tearDown(self):
13        pass
14                                       
15    def testConnectReq1(self):
16        # Client side - Set up input for SessionMgr WSDL connect()
17        cr = ConnectReq(userName="WileECoyote", 
18                        pPhrase="ACME Road Runner catcher", 
19                        encrPubKeyFilePath="../certs/badc-aa-cert.pem")
20
21    def testConnectReq2(self):
22        # Server side - decrypt connectReq from connect() request
23        cr = ConnectReq(\
24                  encrXMLtxt=open("../Tests/xmlsec/connectReq.xml").read(),
25                  encrPriKeyFilePath="../certs/badc-aa-key.pem",
26                  encrPriKeyPwd="    ")
27
28    def testConnectResp1(self):
29        # Server side - make a connect response message
30        cr1 = ConnectResp(sessCookie="A proxy certificate")
31
32    def testConnectResp2(self):
33        cr2 = ConnectResp(sessCookie="A session cookie", 
34                          encrPubKeyFilePath="../certs/badc-aa-cert.pem")
35
36   
37    def testAuthorisationReq1(self):
38   
39        extAttCertList = [\
40"""<attributeCertificate>
41    <acInfo>
42        <version>1.0</version>
43        <holder>/CN=pjkersha/O=NDG/OU=BADC</holder>
44        <issuer>/CN=AttributeAuthority/O=NDG/OU=BADC</issuer>
45        <issuerName>BADC</issuerName>
46        <issuerSerialNumber>4</issuerSerialNumber>
47        <validity>
48            <notBefore>2006 04 03 09 09 26</notBefore>
49            <notAfter>2006 04 03 17 08 25</notAfter>
50        </validity>
51        <attributes>
52            <roleSet>
53                <role>
54                    <name>government</name>
55                </role>
56            </roleSet>
57        </attributes>
58        <provenance>original</provenance>
59    </acInfo>
60<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
61<SignedInfo>
62<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
63<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
64<Reference>
65<Transforms>
66<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
67</Transforms>
68<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
69<DigestValue>As4JwG1ABH5sA0vO7cOvGJK/PgQ=</DigestValue>
70</Reference>
71</SignedInfo>
72<SignatureValue>ECtPnRoQJFmWi91xaksaRxhrEweCdEc0+LOkdDlhCzfjRy8QxNogvc3spRKEn817
73GVa3YLNLE3/UUZAxa4o+F4nI5WkGDFpnVyhfgA7dhhDL3khL1WKumGA303bqn0Ti
74oK+T+rZ23VjFLtrvQjkwbh8gzyAgIFQL29ifIlu3hLk=</SignatureValue>
75<KeyInfo>
76<X509Data>
77
78
79
80<X509Certificate>MIIB9TCCAV6gAwIBAgIBBDANBgkqhkiG9w0BAQQFADAwMQwwCgYDVQQKEwNOREcx
81DTALBgNVBAsTBEJBREMxETAPBgNVBAMTCFNpbXBsZUNBMB4XDTA1MTEwMTE0Mjc1
82OVoXDTA2MTEwMTE0Mjc1OVowOjEMMAoGA1UEChMDTkRHMQ0wCwYDVQQLEwRCQURD
83MRswGQYDVQQDExJBdHRyaWJ1dGVBdXRob3JpdHkwgZ8wDQYJKoZIhvcNAQEBBQAD
84gY0AMIGJAoGBAJylt3cBDPDpFXfho8UM3WDEMm+yWDKeotwEj4oyWdP1ZeU0CQHz
85fovJO/hFcqp6LeQKPir+WcDJoZhlX3rp4QQhRGL4ldATDJg/EXacu5wPnCkVnt3W
86tlL930W97tY7JmyPO4uKNc5DAxt2XFOmU0hnHOGZon1rHpmo+HCf+aanAgMBAAGj
87FTATMBEGCWCGSAGG+EIBAQQEAwIE8DANBgkqhkiG9w0BAQQFAAOBgQAELYlxWcSb
88Ifad6cVtXF2VCw+qoK7qSvqAHISPKTu5IxJoHVMlkQH7IJs73iIvXoKWuaP9zLY0
89w5PaGn7077gPLIcSZhlI7wRb0JigmnJk/WTDjQUYQgDyPdJTGQQ1UqqjE4hYRFs4
90brRl7KmdlZ4XFZqBgO2o2UTea3ZCcHSpsA==</X509Certificate>
91<X509SubjectName>CN=AttributeAuthority,OU=BADC,O=NDG</X509SubjectName>
92<X509IssuerSerial>
93<X509IssuerName>CN=SimpleCA,OU=BADC,O=NDG</X509IssuerName>
94<X509SerialNumber>4</X509SerialNumber>
95</X509IssuerSerial>
96</X509Data>
97</KeyInfo>
98</Signature></attributeCertificate>""",
99"""<?xml version="1.0"?>
100<attributeCertificate>
101    <acInfo>
102        <version>1.0</version>
103        <holder>/CN=pjkersha/O=NDG/OU=BADC</holder>
104        <issuer>/CN=Attribute Authority/O=NDG/OU=BADC</issuer>
105        <issuerName>BADC</issuerName>
106        <issuerSerialNumber>6578</issuerSerialNumber>
107    <validity>
108          <notBefore>2005 09 16 11 53 36</notBefore>
109        <notAfter>2005 09 16 19 53 29</notAfter>
110    </validity>
111    <attributes>
112        <roleSet>
113                <role>
114                <name>government</name>
115        </role>
116        </roleSet>
117    </attributes>
118    <provenance>original</provenance>
119    </acInfo>
120<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
121<SignedInfo>
122<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
123<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
124<Reference>
125<Transforms>
126<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
127</Transforms>
128<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
129<DigestValue>i1q2jwEDy0Sxc+ChxW9p4KCBynU=</DigestValue>
130</Reference>
131</SignedInfo>
132<SignatureValue>aXmExRkD4mZ9OdSlUcVUPIZ/r5v31Dq6IwU7Ox2/evd6maZeECVH4kGvGGez2VA5
133lKhghRqgmAPsgEfZlZ3XwFxxo8tQuY6pi19OqwLV51R5klysX6fKkyK2JVoUG8Y3
1347fACirNGZrZyf93X8sTvd02xN1DOTp7zt1afDsu3qGE=</SignatureValue>
135<KeyInfo>
136<X509Data>
137
138
139
140<X509Certificate>MIICKDCCAZGgAwIBAgICGbIwDQYJKoZIhvcNAQEEBQAwYTEMMAoGA1UEChMDTkRH
141MQ0wCwYDVQQLEwRCQURDMScwJQYDVQQLFB5uZGdwdXJzZWNhQGZvZWhuLmJhZGMu
142cmwuYWMudWsxGTAXBgNVBAMTEEdsb2J1cyBTaW1wbGUgQ0EwHhcNMDUwODExMTQ1
143NjM4WhcNMDYwODExMTQ1NjM4WjA7MQwwCgYDVQQKEwNOREcxDTALBgNVBAsTBEJB
144REMxHDAaBgNVBAMTE0F0dHJpYnV0ZSBBdXRob3JpdHkwgZ8wDQYJKoZIhvcNAQEB
145BQADgY0AMIGJAoGBALgmuDF/jKxKlCMqhF835Yge6rHxZFLby9BbXGsa2pa/1BAY
146xJUiou8sIXO7yaWaRP7M9FwW64Vdk+HQI5zluG2Gtx4MgKYElUDCgPYXsvAXg0QG
147bo0KSPr+X489j07HegXGjekNejLwwvB7qTSqxHjAaKAKL7vBfWf5mn0mlIwbAgMB
148AAGjFTATMBEGCWCGSAGG+EIBAQQEAwIE8DANBgkqhkiG9w0BAQQFAAOBgQAmmqnd
149rj6mgbaruLepn5pyh8sQ+Qd7fwotW00rEBRYzJNUUObmIry5ZM5zuVMcaPSY57qY
150vWqnavydIPdu6N97/Tf/RLk8crLVOrqj2Mo0bwgnEnjmrQicIDsWj6bFNsX1kr6V
151MtUg6T1zo/Yz1aYgGcW4A/ws5tmcEHS0PUGIGA==</X509Certificate>
152<X509SubjectName>CN=Attribute Authority,OU=BADC,O=NDG</X509SubjectName>
153<X509IssuerSerial>
154<X509IssuerName>CN=Globus Simple CA,OU=ndgpurseca@foehn.badc.rl.ac.uk,OU=BADC,O=NDG</X509IssuerName>
155<X509SerialNumber>6578</X509SerialNumber>
156</X509IssuerSerial>
157</X509Data>
158</KeyInfo>
159</Signature></attributeCertificate>"""]
160
161        ar1 = AuthorisationReq(proxyCert="A proxy cert",
162                               aaWSDL="http://AttributeAuthority.wsdl",
163                               extAttCertList=extAttCertList)
164                           
165        import pdb
166        pdb.set_trace()
167        ar2 = AuthorisationReq(xmlTxt=str(ar1))
168
169                               
170    def testAuthorisationResp1(self):
171
172        try:
173            attCert = \
174"""<attributeCertificate>
175    <acInfo>
176        <version>1.0</version>
177        <holder>/CN=pjkersha/O=NDG/OU=BADC</holder>
178        <issuer>/CN=AttributeAuthority/O=NDG/OU=BADC</issuer>
179        <issuerName>BADC</issuerName>
180        <issuerSerialNumber>4</issuerSerialNumber>
181        <validity>
182            <notBefore>2006 04 03 09 09 26</notBefore>
183            <notAfter>2006 04 03 17 08 25</notAfter>
184        </validity>
185        <attributes>
186            <roleSet>
187                <role>
188                    <name>government</name>
189                </role>
190            </roleSet>
191        </attributes>
192        <provenance>original</provenance>
193    </acInfo>
194<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
195<SignedInfo>
196<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
197<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
198<Reference>
199<Transforms>
200<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
201</Transforms>
202<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
203<DigestValue>As4JwG1ABH5sA0vO7cOvGJK/PgQ=</DigestValue>
204</Reference>
205</SignedInfo>
206<SignatureValue>ECtPnRoQJFmWi91xaksaRxhrEweCdEc0+LOkdDlhCzfjRy8QxNogvc3spRKEn817
207GVa3YLNLE3/UUZAxa4o+F4nI5WkGDFpnVyhfgA7dhhDL3khL1WKumGA303bqn0Ti
208oK+T+rZ23VjFLtrvQjkwbh8gzyAgIFQL29ifIlu3hLk=</SignatureValue>
209<KeyInfo>
210<X509Data>
211
212
213
214<X509Certificate>MIIB9TCCAV6gAwIBAgIBBDANBgkqhkiG9w0BAQQFADAwMQwwCgYDVQQKEwNOREcx
215DTALBgNVBAsTBEJBREMxETAPBgNVBAMTCFNpbXBsZUNBMB4XDTA1MTEwMTE0Mjc1
216OVoXDTA2MTEwMTE0Mjc1OVowOjEMMAoGA1UEChMDTkRHMQ0wCwYDVQQLEwRCQURD
217MRswGQYDVQQDExJBdHRyaWJ1dGVBdXRob3JpdHkwgZ8wDQYJKoZIhvcNAQEBBQAD
218gY0AMIGJAoGBAJylt3cBDPDpFXfho8UM3WDEMm+yWDKeotwEj4oyWdP1ZeU0CQHz
219fovJO/hFcqp6LeQKPir+WcDJoZhlX3rp4QQhRGL4ldATDJg/EXacu5wPnCkVnt3W
220tlL930W97tY7JmyPO4uKNc5DAxt2XFOmU0hnHOGZon1rHpmo+HCf+aanAgMBAAGj
221FTATMBEGCWCGSAGG+EIBAQQEAwIE8DANBgkqhkiG9w0BAQQFAAOBgQAELYlxWcSb
222Ifad6cVtXF2VCw+qoK7qSvqAHISPKTu5IxJoHVMlkQH7IJs73iIvXoKWuaP9zLY0
223w5PaGn7077gPLIcSZhlI7wRb0JigmnJk/WTDjQUYQgDyPdJTGQQ1UqqjE4hYRFs4
224brRl7KmdlZ4XFZqBgO2o2UTea3ZCcHSpsA==</X509Certificate>
225<X509SubjectName>CN=AttributeAuthority,OU=BADC,O=NDG</X509SubjectName>
226<X509IssuerSerial>
227<X509IssuerName>CN=SimpleCA,OU=BADC,O=NDG</X509IssuerName>
228<X509SerialNumber>4</X509SerialNumber>
229</X509IssuerSerial>
230</X509Data>
231</KeyInfo>
232</Signature></attributeCertificate>"""
233                           
234            extAttCertList = [\
235"""<?xml version="1.0"?>
236<attributeCertificate>
237    <acInfo>
238        <version>1.0</version>
239        <holder>/CN=pjkersha/O=NDG/OU=BADC</holder>
240        <issuer>/CN=Attribute Authority/O=NDG/OU=BADC</issuer>
241        <issuerName>BADC</issuerName>
242        <issuerSerialNumber>6578</issuerSerialNumber>
243    <validity>
244          <notBefore>2005 09 16 11 53 36</notBefore>
245        <notAfter>2005 09 16 19 53 29</notAfter>
246    </validity>
247    <attributes>
248        <roleSet>
249                <role>
250                <name>government</name>
251        </role>
252        </roleSet>
253    </attributes>
254    <provenance>original</provenance>
255    </acInfo>
256<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
257<SignedInfo>
258<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
259<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
260<Reference>
261<Transforms>
262<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
263</Transforms>
264<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
265<DigestValue>i1q2jwEDy0Sxc+ChxW9p4KCBynU=</DigestValue>
266</Reference>
267</SignedInfo>
268<SignatureValue>aXmExRkD4mZ9OdSlUcVUPIZ/r5v31Dq6IwU7Ox2/evd6maZeECVH4kGvGGez2VA5
269lKhghRqgmAPsgEfZlZ3XwFxxo8tQuY6pi19OqwLV51R5klysX6fKkyK2JVoUG8Y3
2707fACirNGZrZyf93X8sTvd02xN1DOTp7zt1afDsu3qGE=</SignatureValue>
271<KeyInfo>
272<X509Data>
273
274
275
276<X509Certificate>MIICKDCCAZGgAwIBAgICGbIwDQYJKoZIhvcNAQEEBQAwYTEMMAoGA1UEChMDTkRH
277MQ0wCwYDVQQLEwRCQURDMScwJQYDVQQLFB5uZGdwdXJzZWNhQGZvZWhuLmJhZGMu
278cmwuYWMudWsxGTAXBgNVBAMTEEdsb2J1cyBTaW1wbGUgQ0EwHhcNMDUwODExMTQ1
279NjM4WhcNMDYwODExMTQ1NjM4WjA7MQwwCgYDVQQKEwNOREcxDTALBgNVBAsTBEJB
280REMxHDAaBgNVBAMTE0F0dHJpYnV0ZSBBdXRob3JpdHkwgZ8wDQYJKoZIhvcNAQEB
281BQADgY0AMIGJAoGBALgmuDF/jKxKlCMqhF835Yge6rHxZFLby9BbXGsa2pa/1BAY
282xJUiou8sIXO7yaWaRP7M9FwW64Vdk+HQI5zluG2Gtx4MgKYElUDCgPYXsvAXg0QG
283bo0KSPr+X489j07HegXGjekNejLwwvB7qTSqxHjAaKAKL7vBfWf5mn0mlIwbAgMB
284AAGjFTATMBEGCWCGSAGG+EIBAQQEAwIE8DANBgkqhkiG9w0BAQQFAAOBgQAmmqnd
285rj6mgbaruLepn5pyh8sQ+Qd7fwotW00rEBRYzJNUUObmIry5ZM5zuVMcaPSY57qY
286vWqnavydIPdu6N97/Tf/RLk8crLVOrqj2Mo0bwgnEnjmrQicIDsWj6bFNsX1kr6V
287MtUg6T1zo/Yz1aYgGcW4A/ws5tmcEHS0PUGIGA==</X509Certificate>
288<X509SubjectName>CN=Attribute Authority,OU=BADC,O=NDG</X509SubjectName>
289<X509IssuerSerial>
290<X509IssuerName>CN=Globus Simple CA,OU=ndgpurseca@foehn.badc.rl.ac.uk,OU=BADC,O=NDG</X509IssuerName>
291<X509SerialNumber>6578</X509SerialNumber>
292</X509IssuerSerial>
293</X509Data>
294</KeyInfo>
295</Signature></attributeCertificate>""",
296"""<?xml version="1.0"?>
297<attributeCertificate>
298    <acInfo>
299        <version>1.0</version>
300        <holder>/CN=pjkersha/O=NDG/OU=BADC</holder>
301        <issuer>/CN=Attribute Authority/O=NDG/OU=BADC</issuer>
302        <issuerName>BADC</issuerName>
303        <issuerSerialNumber>6578</issuerSerialNumber>
304    <validity>
305          <notBefore>2005 09 29 15 45 49</notBefore>
306        <notAfter>2005 09 29 23 45 49</notAfter>
307    </validity>
308    <attributes>
309        <roleSet>
310                <role>
311                <name>government</name>
312        </role>
313        </roleSet>
314    </attributes>
315    <provenance>original</provenance>
316    </acInfo>
317<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
318<SignedInfo>
319<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
320<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
321<Reference>
322<Transforms>
323<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
324</Transforms>
325<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
326<DigestValue>/Kw9IbBQuQAdNYAgvp2m01l663k=</DigestValue>
327</Reference>
328</SignedInfo>
329<SignatureValue>Q7lhq/jt+m2trRPyWrZ6BQcIibXrstVS/xKTAhR4puv7kVngIm64r45MJ2GQpQan
330QaVdVuOl8QPX8ila0j8sIz47FtriRWZ8fCssFYWR/7n3AKjNd22ChAshxHfZCJY4
331fzJSXgEN+FN0ArOWT49FbhDVf7LEGO+MR+TP+ZKt6uY=</SignatureValue>
332<KeyInfo>
333<X509Data>
334
335
336
337<X509Certificate>MIICKDCCAZGgAwIBAgICGbIwDQYJKoZIhvcNAQEEBQAwYTEMMAoGA1UEChMDTkRH
338MQ0wCwYDVQQLEwRCQURDMScwJQYDVQQLFB5uZGdwdXJzZWNhQGZvZWhuLmJhZGMu
339cmwuYWMudWsxGTAXBgNVBAMTEEdsb2J1cyBTaW1wbGUgQ0EwHhcNMDUwODExMTQ1
340NjM4WhcNMDYwODExMTQ1NjM4WjA7MQwwCgYDVQQKEwNOREcxDTALBgNVBAsTBEJB
341REMxHDAaBgNVBAMTE0F0dHJpYnV0ZSBBdXRob3JpdHkwgZ8wDQYJKoZIhvcNAQEB
342BQADgY0AMIGJAoGBALgmuDF/jKxKlCMqhF835Yge6rHxZFLby9BbXGsa2pa/1BAY
343xJUiou8sIXO7yaWaRP7M9FwW64Vdk+HQI5zluG2Gtx4MgKYElUDCgPYXsvAXg0QG
344bo0KSPr+X489j07HegXGjekNejLwwvB7qTSqxHjAaKAKL7vBfWf5mn0mlIwbAgMB
345AAGjFTATMBEGCWCGSAGG+EIBAQQEAwIE8DANBgkqhkiG9w0BAQQFAAOBgQAmmqnd
346rj6mgbaruLepn5pyh8sQ+Qd7fwotW00rEBRYzJNUUObmIry5ZM5zuVMcaPSY57qY
347vWqnavydIPdu6N97/Tf/RLk8crLVOrqj2Mo0bwgnEnjmrQicIDsWj6bFNsX1kr6V
348MtUg6T1zo/Yz1aYgGcW4A/ws5tmcEHS0PUGIGA==</X509Certificate>
349<X509SubjectName>CN=Attribute Authority,OU=BADC,O=NDG</X509SubjectName>
350<X509IssuerSerial>
351<X509IssuerName>CN=Globus Simple CA,OU=ndgpurseca@foehn.badc.rl.ac.uk,OU=BADC,O=NDG</X509IssuerName>
352<X509SerialNumber>6578</X509SerialNumber>
353</X509IssuerSerial>
354</X509Data>
355</KeyInfo>
356</Signature></attributeCertificate>""",
357"""<?xml version="1.0"?>
358<attributeCertificate>
359    <acInfo>
360        <version>1.0</version>
361        <holder>/CN=pjkersha/O=NDG/OU=BADC</holder>
362        <issuer>/CN=Attribute Authority/O=NDG/OU=BADC</issuer>
363        <issuerName>BADC</issuerName>
364        <issuerSerialNumber>6578</issuerSerialNumber>
365    <validity>
366          <notBefore>2005 09 16 10 19 32</notBefore>
367        <notAfter>2005 09 16 18 19 14</notAfter>
368    </validity>
369    <attributes>
370        <roleSet>
371                <role>
372                <name>government</name>
373        </role>
374        </roleSet>
375    </attributes>
376    <provenance>original</provenance>
377    </acInfo>
378<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
379<SignedInfo>
380<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
381<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
382<Reference>
383<Transforms>
384<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
385</Transforms>
386<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
387<DigestValue>tvftcf7fevu4PQqK2PhGFVzZlFo=</DigestValue>
388</Reference>
389</SignedInfo>
390<SignatureValue>cga7gcRSeKkI8+k5HiRdfxDz0wRA741lRaI0FCZ0e7rJH3IwxEv6C3fNB0a8Slgv
391R2/1b+xCHtNX0jaMLDnAv/AvtC8DfcV8yiDZOAQ/qXDkASB2OHDo6qM+Zlkf97U+
392dbjIuZ6bgXa2c9OlT9PUiCcDZt6uLmiu//28ZnFy7Pw=</SignatureValue>
393<KeyInfo>
394<X509Data>
395
396
397
398<X509Certificate>MIICKDCCAZGgAwIBAgICGbIwDQYJKoZIhvcNAQEEBQAwYTEMMAoGA1UEChMDTkRH
399MQ0wCwYDVQQLEwRCQURDMScwJQYDVQQLFB5uZGdwdXJzZWNhQGZvZWhuLmJhZGMu
400cmwuYWMudWsxGTAXBgNVBAMTEEdsb2J1cyBTaW1wbGUgQ0EwHhcNMDUwODExMTQ1
401NjM4WhcNMDYwODExMTQ1NjM4WjA7MQwwCgYDVQQKEwNOREcxDTALBgNVBAsTBEJB
402REMxHDAaBgNVBAMTE0F0dHJpYnV0ZSBBdXRob3JpdHkwgZ8wDQYJKoZIhvcNAQEB
403BQADgY0AMIGJAoGBALgmuDF/jKxKlCMqhF835Yge6rHxZFLby9BbXGsa2pa/1BAY
404xJUiou8sIXO7yaWaRP7M9FwW64Vdk+HQI5zluG2Gtx4MgKYElUDCgPYXsvAXg0QG
405bo0KSPr+X489j07HegXGjekNejLwwvB7qTSqxHjAaKAKL7vBfWf5mn0mlIwbAgMB
406AAGjFTATMBEGCWCGSAGG+EIBAQQEAwIE8DANBgkqhkiG9w0BAQQFAAOBgQAmmqnd
407rj6mgbaruLepn5pyh8sQ+Qd7fwotW00rEBRYzJNUUObmIry5ZM5zuVMcaPSY57qY
408vWqnavydIPdu6N97/Tf/RLk8crLVOrqj2Mo0bwgnEnjmrQicIDsWj6bFNsX1kr6V
409MtUg6T1zo/Yz1aYgGcW4A/ws5tmcEHS0PUGIGA==</X509Certificate>
410<X509SubjectName>CN=Attribute Authority,OU=BADC,O=NDG</X509SubjectName>
411<X509IssuerSerial>
412<X509IssuerName>CN=Globus Simple CA,OU=ndgpurseca@foehn.badc.rl.ac.uk,OU=BADC,O=NDG</X509IssuerName>
413<X509SerialNumber>6578</X509SerialNumber>
414</X509IssuerSerial>
415</X509Data>
416</KeyInfo>
417</Signature></attributeCertificate>"""]
418
419            import pdb
420            pdb.set_trace()                         
421   
422            ar1 = AuthorisationResp(attCert=attCert,
423                            extAttCertList=extAttCertList,
424                            statCode=AuthorisationResp.accessDenied,
425                            errMsg="User is not registered at data centre")
426       
427            ar2 = AuthorisationResp(xmlTxt=str(ar1))
428           
429        except Exception, e:
430            self.fail(str(e))
431                               
432class sessionMgrIOtestSuite(unittest.TestSuite):
433    def __init__(self):
434        map = map(sessionMgrIOtestCase,
435                  (
436                    "testConnectReq1",
437                    "testConnectReq2",
438                    "testConnectResp1",
439                    "testConnectResp2",
440                    "testAuthorisationReq1",
441                    "testAuthorisationResp1"
442                  ))
443        unittest.TestSuite.__init__(self, map)
444                                       
445if __name__ == "__main__":
446    unittest.main()
Note: See TracBrowser for help on using the repository browser.