Ignore:
Timestamp:
31/01/07 17:16:51 (14 years ago)
Author:
pjkersha
Message:

python/ndg.security.server/ndg/security/server/SessionMgr/server-config.tac:
leave out debug statements

python/ndg.security.test/ndg/security/test/AttAuthority/siteBMapConfig.xml:
give a sensible setting to Site A's AA URI so that mapped AC generatino can be tested.

python/ndg.security.test/ndg/security/test/AttAuthority/attAuthorityClientTest.cfg:
included note to the effect that the URI for setUp section must agree with
siteBMapConfig.xml's Site A setting.

python/ndg.security.test/ndg/security/test/SessionMgr/SessionMgrClientTest.py:
fixed output tuples for getAttCert tests.

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

  • convert extAttCert to string before call AttAuthorityClient? web service.
  • fixed block in getAttCert method to get an AC from a trusted host
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/CredWallet.py

    r2085 r2086  
    621621        be used to making a mapping should the user not be registered with the 
    622622        Attribute Authority""" 
    623              
     623           
     624        if extAttCert is not None: 
     625            extAttCert = extAttCert.toString() 
     626               
    624627        if self.__aaClnt is not None: 
    625628            try: 
     
    630633             
    631634            except Exception, e: 
    632                 raise CredWalletError, \ 
    633                         "Attribute Certificate request denied: %s" % str(e) 
     635                raise CredWalletError, str(e) 
    634636                             
    635637        elif aaPropFilePath is not None: 
     
    649651                 
    650652            except AttAuthorityAccessDenied, e: 
    651                 raise CredWalletAttributeRequestDenied, \ 
    652                                 "Attribute Certificate request denied: %s" % e             
     653                raise CredWalletAttributeRequestDenied, str(e)             
    653654            except Exception, e: 
    654655                raise CredWalletError,"Requesting attribute certificate: %s"%e 
     
    935936                                                     
    936937                 
    937             # Request Authorisation from Attribute Authority 
     938            # Request Attribute Certificate from Attribute Authority 
    938939            try: 
    939940                attCert = self.__getAttCert(extAttCert=extAttCert)                 
     
    10071008                    # Try each host in turn in order to get a certificate with 
    10081009                    # the required credentials in order to do a mapping 
    1009                     for key, val in trustedHostInfo.items(): 
    1010  
     1010                    for host, info in trustedHostInfo.items(): 
    10111011                        try: 
    1012                             extAttCert=self.__getAttCert(aaURI=val['aaURI']) 
     1012                            # Try request to trusted host 
     1013                            self.aaURI = info['aaURI'] 
     1014                            extAttCert=self.__getAttCert() 
    10131015 
    10141016                            # Check the certificate contains at least one of 
    10151017                            # the required roles 
    10161018                            roles = extAttCert.getRoles() 
    1017                             if [True for r in roles if r in val['role']]: 
     1019                            if [True for r in roles if r in info['role']]: 
    10181020                               extAttCertList.append(extAttCert) 
    10191021 
Note: See TracChangeset for help on using the changeset viewer.