Changeset 4381 for TI12-security


Ignore:
Timestamp:
29/10/08 10:36:14 (11 years ago)
Author:
pjkersha
Message:

Renamed CredWallet? -> CredentialWallet?

Location:
TI12-security/trunk/python
Files:
5 edited

Legend:

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

    r4279 r4381  
    2525    import cElementTree as ElementTree 
    2626 
    27 from CredWallet import CredentialRepository as CredentialRepositoryBase 
    28 from CredWallet import CredentialRepositoryError 
     27from CredentialWallet import CredentialRepository as CredentialRepositoryBase 
     28from CredentialWallet import CredentialRepositoryError 
    2929 
    3030 
     
    3333    """Interface to Credential Repository Database 
    3434     
    35     Nb. inherits from CredWallet.CredentialRepository to ensure correct interface 
     35    Nb. inherits from CredentialWallet.CredentialRepository to ensure correct interface 
    3636    to the wallet""" 
    3737 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/__init__.py

    r4331 r4381  
    2121    'AttAuthority', 
    2222    'AttCert', 
    23     'CredWallet', 
     23    'CredentialWallet', 
    2424    'm2CryptoSSLUtility', 
    2525    'openssl', 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/attributeauthority.py

    r4377 r4381  
    44unusual place of being required by both client and server 
    55NDG security packages.  For the server side they are required 
    6 as the CredWallet invoked by the Session Manager acts as a 
     6as the CredentialWallet invoked by the Session Manager acts as a 
    77client to Attribute Authorities when negotiating the required 
    88Attribute Certificate. 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sessionmanager.py

    r4368 r4381  
    3737 
    3838# Credential Wallet 
    39 from ndg.security.common.CredWallet import CredWallet, CredentialRepository, \ 
    40     CredWalletError, CredWalletAttributeRequestDenied 
     39from ndg.security.common.credentialwallet import CredentialWallet, CredentialRepository, \ 
     40    CredentialWalletError, CredentialWalletAttributeRequestDenied 
    4141     
    4242from ndg.security.common.wssecurity import WSSecurityConfig 
     
    8484     
    8585    def __init__(self, **credWalletKeys): 
    86         """Initialise UserSession with keywords to CredWallet""" 
     86        """Initialise UserSession with keywords to CredentialWallet""" 
    8787                 
    8888        log.debug("UserSession.__init__ ...") 
     
    9292        self.__sessIdList = [] 
    9393        self.addNewSessID() 
    94         self.__credWallet = CredWallet(**credWalletKeys) 
     94        self.__credWallet = CredentialWallet(**credWalletKeys) 
    9595 
    9696        log.info("Created a session with ID = %s" % self.__sessIdList[-1]) 
    9797 
    98     def __getCredWallet(self): 
     98    def __getCredentialWallet(self): 
    9999        """Get Credential Wallet instance""" 
    100100        return self.__credWallet 
    101101     
    102     credWallet = property(fget=__getCredWallet, 
    103                           doc="Read-only access to CredWallet instance") 
     102    credWallet = property(fget=__getCredentialWallet, 
     103                          doc="Read-only access to CredentialWallet instance") 
    104104 
    105105    def __getSessIdList(self): 
     
    259259        'sslCACertDir':           None, 
    260260        AUTHN_KEYNAME:            authNServicePropertyDefaults,  
    261         CREDWALLET_KEYNAME:       CredWallet.propertyDefaults, 
     261        CREDWALLET_KEYNAME:       CredentialWallet.propertyDefaults, 
    262262        CREDREPOS_KEYNAME:        credentialRepositoryPropertyDefaults 
    263263    } 
     
    556556                                      sections=(section,)) 
    557557         
    558         # Keep a copy of the config file for the CredWallet to reference so  
     558        # Keep a copy of the config file for the CredentialWallet to reference so  
    559559        # that it can retrieve WS-Security settings 
    560560        self._cfg = readPropertiesFile.cfg 
     
    10141014         
    10151015        @type credWalletKw: dict 
    1016         @param **credWalletKw: keywords to CredWallet.getAttCert 
     1016        @param **credWalletKw: keywords to CredentialWallet.getAttCert 
    10171017        """ 
    10181018         
     
    10301030            return attCert, None, [] 
    10311031             
    1032         except CredWalletAttributeRequestDenied, e: 
     1032        except CredentialWalletAttributeRequestDenied, e: 
    10331033            # Exception object contains a list of attribute certificates 
    10341034            # which could be used to re-try to get authorisation via a mapped 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/credentialwallet/test_credentialwallet.py

    r4380 r4381  
    2020                                                    CaseSensitiveConfigParser 
    2121from ndg.security.common.X509 import X509CertParse 
    22 from ndg.security.common.CredWallet import CredWallet, \ 
    23                                             CredWalletAttributeRequestDenied 
     22from ndg.security.common.credentialwallet import CredentialWallet, \ 
     23                                            CredentialWalletAttributeRequestDenied 
    2424 
    2525from os.path import expandvars as xpdVars 
     
    3131 
    3232 
    33 class CredWalletTestCase(unittest.TestCase): 
    34     """Unit test case for ndg.security.common.CredWallet.CredWallet class. 
     33class CredentialWalletTestCase(unittest.TestCase): 
     34    """Unit test case for ndg.security.common.credentialwallet.CredentialWallet class. 
    3535     
    3636    """ 
     
    5555         
    5656        try: 
    57             CredWallet.accessDenied = 'yes' 
     57            CredentialWallet.accessDenied = 'yes' 
    5858            self.fail("accessDenied class variable should be read-only") 
    5959        except Exception, e: 
     
    6161 
    6262        try: 
    63             CredWallet.accessGranted = False 
     63            CredentialWallet.accessGranted = False 
    6464            self.fail("accessGranted class variable should be read-only") 
    6565        except Exception, e: 
    6666            print("PASS - accessGranted class variable is read-only") 
    6767             
    68         assert(not CredWallet.accessDenied) 
    69         assert(CredWallet.accessGranted) 
     68        assert(not CredentialWallet.accessDenied) 
     69        assert(CredentialWallet.accessGranted) 
    7070         
    7171         
    7272    def test2SetAttributes(self): 
    7373         
    74         credWallet = CredWallet() 
     74        credWallet = CredentialWallet() 
    7575        credWallet.userX509Cert = \ 
    7676'''-----BEGIN CERTIFICATE----- 
     
    113113    def test3GetAttCertWithUserId(self): 
    114114                     
    115         credWallet = CredWallet(cfg=self.cfg.get('setUp', 'cfgFilePath')) 
     115        credWallet = CredentialWallet(cfg=self.cfg.get('setUp', 'cfgFilePath')) 
    116116        attCert = credWallet.getAttCert() 
    117117         
     
    123123    def test4GetAttCertWithUserX509Cert(self): 
    124124                     
    125         credWallet = CredWallet(cfg=self.cfg.get('setUp', 'cfgFilePath')) 
     125        credWallet = CredentialWallet(cfg=self.cfg.get('setUp', 'cfgFilePath')) 
    126126         
    127127        # Set a test individual user certificate to override the client  
     
    185185    def test5GetAttCertRefusedWithUserCert(self): 
    186186         
    187         credWallet = CredWallet(cfg=self.cfg.get('setUp', 'cfgFilePath'))     
     187        credWallet = CredentialWallet(cfg=self.cfg.get('setUp', 'cfgFilePath'))     
    188188        credWallet.userX509CertFilePath = self.cfg.get('setUp', 
    189189                                                       'userX509CertFilePath') 
     
    197197        try: 
    198198            attCert = credWallet.getAttCert() 
    199         except CredWalletAttributeRequestDenied, e: 
     199        except CredentialWalletAttributeRequestDenied, e: 
    200200            print "SUCCESS - obtained expected result: %s" % e 
    201201            return 
     
    207207         
    208208        # Call Site A Attribute Authority where user is registered 
    209         credWallet = CredWallet(cfg=self.cfg.get('setUp', 'cfgFilePath')) 
     209        credWallet = CredentialWallet(cfg=self.cfg.get('setUp', 'cfgFilePath')) 
    210210        attCert = credWallet.getAttCert() 
    211211 
Note: See TracChangeset for help on using the changeset viewer.