Changeset 4576 for TI12-security/trunk/python
- Timestamp:
- 09/12/08 14:08:49 (12 years ago)
- Location:
- TI12-security/trunk/python
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/attributeauthority/__init__.py
r4573 r4576 58 58 59 59 60 def soap_getAttCert(self, ps , **kw):60 def soap_getAttCert(self, ps): 61 61 '''Retrieve an Attribute Certificate 62 62 … … 103 103 104 104 105 def soap_getHostInfo(self, ps , **kw):105 def soap_getHostInfo(self, ps): 106 106 '''Get information about this host 107 107 … … 128 128 129 129 130 def soap_getAllHostsInfo(self, ps , **kw):130 def soap_getAllHostsInfo(self, ps): 131 131 '''Get information about all hosts 132 132 … … 182 182 183 183 184 def soap_getTrustedHostInfo(self, ps , **kw):184 def soap_getTrustedHostInfo(self, ps): 185 185 '''Get information about other trusted hosts 186 186 -
TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/sessionmanager/__init__.py
r4573 r4576 66 66 67 67 68 def soap_connect(self, ps , **kw):68 def soap_connect(self, ps): 69 69 '''Connect to Session Manager and create a user session 70 70 … … 91 91 92 92 93 def soap_disconnect(self, ps , **kw):93 def soap_disconnect(self, ps): 94 94 '''Disconnect and remove user's session 95 95 … … 132 132 133 133 134 def soap_getSessionStatus(self, ps , **kw):134 def soap_getSessionStatus(self, ps): 135 135 '''Check for existence of a session with given session ID or user 136 136 Distinguished Name … … 154 154 155 155 156 def soap_getAttCert(self, ps , **kw):156 def soap_getAttCert(self, ps): 157 157 '''Get Attribute Certificate from a given Attribute Authority 158 158 and cache it in user's Credential Wallet -
TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager/test_sessionmanager.py
r4573 r4576 21 21 22 22 from ndg.security.common.utils.configfileparsers import \ 23 23 CaseSensitiveConfigParser 24 24 from ndg.security.common.X509 import X509CertParse 25 from ndg.security.server.sessionmanager import SessionManager 25 from ndg.security.server.sessionmanager import SessionManager, \ 26 CredentialWalletAttributeRequestDenied 26 27 from ndg.security.server.attributeauthority import AttributeAuthority 27 28 … … 275 276 section = 'test07GetAttCertWithSessID' 276 277 aaURI = self.cfg.get(section, 'aaURI') 277 attCert, errMsg, extAttCertList=self.sm.getAttCert(sessID=self.sessID, 278 attributeAuthorityURI=aaURI) 279 if errMsg: 280 self.fail(errMsg) 281 278 attCert = self.sm.getAttCert(sessID=self.sessID, 279 attributeAuthorityURI=aaURI) 282 280 print("Attribute Certificate:\n%s" % attCert) 283 281 attCert.filePath = xpdVars(self.cfg.get(section, 'acOutputFilePath')) … … 294 292 aaURI = self.cfg.get('test08GetAttCertRefusedWithSessID', 'aaURI') 295 293 296 attCert, errMsg, extAttCertList=self.sm.getAttCert(sessID=self.sessID, 297 attributeAuthorityURI=aaURI, 298 mapFromTrustedHosts=False) 299 if errMsg: 300 print("SUCCESS - obtained expected result: %s" % errMsg) 294 try: 295 attCert = self.sm.getAttCert(sessID=self.sessID, 296 attributeAuthorityURI=aaURI, 297 mapFromTrustedHosts=False) 298 except CredentialWalletAttributeRequestDenied, e: 299 print("SUCCESS - obtained expected result: %s" % e) 301 300 return 302 301 … … 316 315 aaURI = self.cfg.get('test09GetMappedAttCertWithSessID', 'aaURI') 317 316 318 attCert, errMsg, extAttCertList=self.sm.getAttCert(sessID=self.sessID, 319 attributeAuthorityURI=aaURI, 320 mapFromTrustedHosts=True) 321 if errMsg: 322 self.fail(errMsg) 317 attCert = self.sm.getAttCert(sessID=self.sessID, 318 attributeAuthorityURI=aaURI, 319 mapFromTrustedHosts=True) 323 320 324 321 print("Attribute Certificate:\n%s" % attCert) … … 337 334 extAttCert = open(extACFilePath).read() 338 335 339 attCert, errMsg, extAttCertList = self.sm.getAttCert( 340 sessID=self.sessID, 341 attributeAuthorityURI=aaURI, 342 extAttCertList=[extAttCert]) 343 if errMsg: 344 self.fail(errMsg) 345 336 attCert = self.sm.getAttCert(sessID=self.sessID, 337 attributeAuthorityURI=aaURI, 338 extAttCertList=[extAttCert]) 346 339 print("Attribute Certificate:\n%s" % attCert) 347 340 … … 356 349 357 350 aaURI = self.cfg.get('test11GetAttCertWithUserX509Cert', 'aaURI') 358 attCert, errMsg, extAttCertList = self.sm.getAttCert( 359 userX509Cert=self.userX509Cert, 351 attCert = self.sm.getAttCert(userX509Cert=self.userX509Cert, 360 352 attributeAuthorityURI=aaURI) 361 if errMsg:362 self.fail(errMsg)363 364 353 print("Attribute Certificate:\n%s" % attCert) 365 354 … … 376 365 propPrefix='attributeAuthority') 377 366 378 attCert, errMsg, extAttCertList=self.sm.getAttCert(sessID=self.sessID, 379 attributeAuthority=attributeAuthority) 380 if errMsg: 381 self.fail(errMsg) 382 367 attCert = self.sm.getAttCert(sessID=self.sessID, 368 attributeAuthority=attributeAuthority) 383 369 print("Attribute Certificate:\n%s" % attCert) 384 370 attCert.filePath = xpdVars(self.cfg.get(section, 'acOutputFilePath'))
Note: See TracChangeset
for help on using the changeset viewer.