Ignore:
Timestamp:
16/03/10 08:37:55 (11 years ago)
Author:
pjkersha
Message:
  • Working Credential Wallet refactored for Python 2.6
  • Pruned out more old code: ZSI and Twisted SAOP/WSDL wrappers, Session Manager and WS-Security, Test 'Site B' Attribute Authority - for testing role mapping.
  • Started XACML package ElementTree based parser.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/credentialwallet.py

    r6673 r6730  
    1616import os 
    1717import warnings 
    18 import traceback 
    1918 
    2019# Check Attribute Certificate validity times 
     
    2625from ndg.saml.saml2.core import Assertion 
    2726 
    28 # Access Attribute Authority's web service using ZSI - allow pass if not  
    29 # loaded since it's possible to make AttributeAuthority instance locally 
    30 # without using the WS 
    31 aaImportError = True 
    32 try: 
    33     # AttributeAuthority client package resides with CredentialWallet module in  
    34     # ndg.security.common 
    35     from ndg.security.common.attributeauthority import ( 
    36         AttributeAuthorityClient, AttributeAuthorityClientError,  
    37         AttributeRequestDenied, NoMatchingRoleInTrustedHosts) 
    38     aaImportError = False 
    39 except ImportError: 
    40     pass 
    41  
    42 # Likewise - may not want to use WS and use AttributeAuthority locally in which 
    43 # case no need to import it 
    44 try: 
    45     from ndg.security.server.attributeauthority import (AttributeAuthority,  
    46         AttributeAuthorityError, AttributeAuthorityAccessDenied) 
    47     aaImportError = False 
    48 except ImportError: 
    49     pass 
    50  
    51 if aaImportError: 
    52     raise ImportError("Either AttributeAuthority or AttributeAuthorityClient " 
    53                       "classes must be present to allow interoperation with " 
    54                       "Attribute Authorities: %s" % traceback.format_exc()) 
    55  
    56 # Authentication X.509 Certificate 
    57 from ndg.security.common.X509 import X509Cert 
    58 from M2Crypto import X509, BIO, RSA 
    59  
    60 # Authorisation - attribute certificate  
    61 from ndg.security.common.AttCert import AttCert, AttCertError 
    62 from ndg.security.common.wssecurity.signaturehandler.dom import SignatureHandler 
    63  
    64 # generic parser to read INI/XML properties file 
    65 from ndg.security.common.utils.configfileparsers import \ 
    66                                                 INIPropertyFileWithValidation 
    67  
    68 from ndg.security.common.utils import TypedList 
    6927from ndg.security.common.utils.configfileparsers import (      
    7028                                                    CaseSensitiveConfigParser,) 
     
    178136    __slots__ = tuple(["__%s" % n for n in __ATTRIBUTE_NAMES]) 
    179137     
    180     def __init__(self, type=None): 
     138    def __init__(self, _type=None): 
    181139        self.__type = None 
    182         self.type = type 
     140        self.type = _type 
    183141         
    184142        self.__id = -1 
     
    700658     
    701659    def __init__(self, propFilePath=None, dbPPhrase=None, **prop): 
    702         pass 
     660        """Null Credential Repository __init__ placeholder""" 
    703661 
    704662    def addUser(self, userId): 
    705         pass 
     663        """Null Credential Repository addUser placeholder""" 
    706664                             
    707665    def auditCredentials(self, **attCertValidKeys): 
    708         pass 
     666        """Null Credential Repository addUser placeholder""" 
    709667 
    710668    def getCredentials(self, userId): 
     669        """Null Credential Repository getCredentials placeholder""" 
    711670        return [] 
    712671        
    713672    def addCredentials(self, userId, attCertList): 
    714         pass 
     673        """Null Credential Repository addCredentials placeholder""" 
Note: See TracChangeset for help on using the changeset viewer.