Changeset 6730 for TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/credentialwallet.py
- Timestamp:
- 16/03/10 08:37:55 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/NDGSecurity/python/ndg_security_common/ndg/security/common/credentialwallet.py
r6673 r6730 16 16 import os 17 17 import warnings 18 import traceback19 18 20 19 # Check Attribute Certificate validity times … … 26 25 from ndg.saml.saml2.core import Assertion 27 26 28 # Access Attribute Authority's web service using ZSI - allow pass if not29 # loaded since it's possible to make AttributeAuthority instance locally30 # without using the WS31 aaImportError = True32 try:33 # AttributeAuthority client package resides with CredentialWallet module in34 # ndg.security.common35 from ndg.security.common.attributeauthority import (36 AttributeAuthorityClient, AttributeAuthorityClientError,37 AttributeRequestDenied, NoMatchingRoleInTrustedHosts)38 aaImportError = False39 except ImportError:40 pass41 42 # Likewise - may not want to use WS and use AttributeAuthority locally in which43 # case no need to import it44 try:45 from ndg.security.server.attributeauthority import (AttributeAuthority,46 AttributeAuthorityError, AttributeAuthorityAccessDenied)47 aaImportError = False48 except ImportError:49 pass50 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 Certificate57 from ndg.security.common.X509 import X509Cert58 from M2Crypto import X509, BIO, RSA59 60 # Authorisation - attribute certificate61 from ndg.security.common.AttCert import AttCert, AttCertError62 from ndg.security.common.wssecurity.signaturehandler.dom import SignatureHandler63 64 # generic parser to read INI/XML properties file65 from ndg.security.common.utils.configfileparsers import \66 INIPropertyFileWithValidation67 68 from ndg.security.common.utils import TypedList69 27 from ndg.security.common.utils.configfileparsers import ( 70 28 CaseSensitiveConfigParser,) … … 178 136 __slots__ = tuple(["__%s" % n for n in __ATTRIBUTE_NAMES]) 179 137 180 def __init__(self, type=None):138 def __init__(self, _type=None): 181 139 self.__type = None 182 self.type = type140 self.type = _type 183 141 184 142 self.__id = -1 … … 700 658 701 659 def __init__(self, propFilePath=None, dbPPhrase=None, **prop): 702 pass660 """Null Credential Repository __init__ placeholder""" 703 661 704 662 def addUser(self, userId): 705 pass663 """Null Credential Repository addUser placeholder""" 706 664 707 665 def auditCredentials(self, **attCertValidKeys): 708 pass666 """Null Credential Repository addUser placeholder""" 709 667 710 668 def getCredentials(self, userId): 669 """Null Credential Repository getCredentials placeholder""" 711 670 return [] 712 671 713 672 def addCredentials(self, userId, attCertList): 714 pass673 """Null Credential Repository addCredentials placeholder"""
Note: See TracChangeset
for help on using the changeset viewer.