Changeset 6034 for TI12-security


Ignore:
Timestamp:
23/11/09 09:23:28 (10 years ago)
Author:
pjkersha
Message:
  • Move ndg.security.common.saml -> ndg.security.common.saml_utils to avoid namespace clash
  • fixes to SQLAlchemyAXInterface
Location:
TI12-security/trunk/python
Files:
12 edited
3 copied
1 moved

Legend:

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

    r6033 r6034  
    16681668    import ElementTree 
    16691669  
    1670 import saml    
    16711670from saml.utils import SAMLDateTime 
    16721671from saml.common.xml import SAMLConstants 
     
    16841683from saml.xml.etree import AssertionElementTree, ResponseElementTree 
    16851684    
    1686 from ndg.security.common.saml.bindings import SOAPBinding as SamlSoapBinding 
    1687 from ndg.security.common.saml.esg import EsgSamlNamespaces 
     1685from ndg.security.common.saml_utils.bindings import SOAPBinding as SamlSoapBinding 
     1686from ndg.security.common.saml_utils.esg import EsgSamlNamespaces 
    16881687from ndg.security.common.X509 import X500DN 
    16891688from ndg.security.common.utils.m2crypto import SSLContextProxy 
     
    16931692 
    16941693 
    1695 class SamlCredentialWallet(CredentialWalletBase, SSLContextProxy): 
     1694class SamlCredentialWallet(CredentialWalletBase): 
    16961695    """CredentialWallet for Earth System Grid supporting SAML based Attribute  
    16971696    Queries 
     
    17281727    ) 
    17291728    __slots__ = ( 
    1730        'attributeDescr' 
     1729       'sslCtx', 
     1730       'attributeDescr', 
    17311731    ) 
    17321732    __slots__ += CONFIG_FILE_OPTNAMES 
     
    17471747        # altered 
    17481748        self.attributeDescr = SamlCredentialWallet.DEFAULT_ATTR_DESCR 
     1749        self.__sslCtx = SSLContextProxy() 
    17491750 
    17501751    @classmethod 
  • TI12-security/trunk/python/ndg_security_common/ndg/security/common/saml_utils/bindings.py

    r6033 r6034  
    3535    
    3636 
    37 class SOAPBinding(SSLContextProxy): 
     37class SOAPBinding(object): 
    3838    '''Client SAML SOAP Binding for Attribute Query''' 
    3939     
  • TI12-security/trunk/python/ndg_security_common/ndg/security/common/saml_utils/esg/xml/etree.py

    r5982 r6034  
    1818from saml.xml.etree import AttributeValueElementTreeBase, QName 
    1919 
    20 from ndg.security.common.saml.esg import XSGroupRoleAttributeValue 
     20from ndg.security.common.saml_utils.esg import XSGroupRoleAttributeValue 
    2121 
    2222 
  • TI12-security/trunk/python/ndg_security_saml/saml/xml/etree.py

    r5984 r6034  
    5151from saml.utils import SAMLDateTime 
    5252 
    53 from ndg.security.common.saml.esg import XSGroupRoleAttributeValue 
     53from ndg.security.common.saml_utils.esg import XSGroupRoleAttributeValue 
    5454 
    5555 
  • TI12-security/trunk/python/ndg_security_server/ndg/security/server/attributeauthority.py

    r6018 r6034  
    3434                             Status, StatusCode, StatusMessage) 
    3535 
    36 from ndg.security.common.saml.esg import EsgSamlNamespaces 
     36from ndg.security.common.saml_utils.esg import EsgSamlNamespaces 
    3737from ndg.security.common.utils import TypedList 
    3838from ndg.security.common.utils.classfactory import instantiateClass 
  • TI12-security/trunk/python/ndg_security_server/ndg/security/server/myproxy/certificate_extapp/saml_attribute_assertion.py

    r6033 r6034  
    3939from saml.xml.etree import AssertionElementTree, ResponseElementTree 
    4040    
    41 from ndg.security.common.saml.bindings import SOAPBinding as SamlSoapBinding 
    42 from ndg.security.common.saml.esg import EsgSamlNamespaces 
     41from ndg.security.common.saml_utils.bindings import SOAPBinding as SamlSoapBinding 
     42from ndg.security.common.saml_utils.esg import EsgSamlNamespaces 
    4343from ndg.security.common.utils.etree import prettyPrint 
    4444from ndg.security.common.X509 import X500DN 
  • TI12-security/trunk/python/ndg_security_server/ndg/security/server/wsgi/openid/provider/axinterface/__init__.py

    r5929 r6034  
    2222    release""" 
    2323 
     24class AXInterfaceRetrieveError(AXInterfaceError): 
     25    """Error retrieving attributes from use repository""" 
     26     
    2427class AXInterfaceReloginRequired(AXInterfaceError): 
    2528    """Raise from AXInterface.__call__ if re-login is required""" 
  • TI12-security/trunk/python/ndg_security_server/ndg/security/server/wsgi/openid/provider/axinterface/sqlalchemy_ax.py

    r6018 r6034  
    1818 
    1919from ndg.security.server.wsgi.openid.provider.axinterface import (AXInterface,  
    20     AXInterfaceConfigError, MissingRequiredAttrs) 
     20    AXInterfaceConfigError, AXInterfaceRetrieveError, MissingRequiredAttrs) 
    2121from ndg.security.server.wsgi.openid.provider import OpenIDProviderMiddleware 
    2222 
     
    4040        SQLQUERY_OPTNAME, 
    4141        ATTRIBUTE_NAMES_OPTNAME, 
    42         IDENTITY_URI_TMPL_OPTNAME 
    4342    ) 
    4443    __slots__ += tuple(["_SQLAlchemyAXInterface__%s" % name  
     
    116115 
    117116    def setProperties(self, **properties): 
     117        """Set object attributes by keyword argument to this method.  Keywords 
     118        are restricted by the entries in __slots__ 
     119        """ 
    118120        for name, val in properties.items(): 
    119121            setattr(self, name, val) 
     
    222224 
    223225        except (exc.ProgrammingError, exc.OperationalError): 
    224             raise AuthNInterfaceRetrieveError("SQL error: %s" % 
    225                                               traceback.format_exc()) 
     226            raise AXInterfaceRetrieveError("SQL error: %s" % 
     227                                           traceback.format_exc()) 
    226228        finally: 
    227229            connection.close() 
     
    230232            attributeValues = result.fetchall()[0] 
    231233        except IndexError: 
    232             raise AuthNInterfaceRetrieveError("No attributes returned for " 
    233                                               "query=\"%s\"" % query) 
     234            raise AXInterfaceRetrieveError("No attributes returned for " 
     235                                           "query=\"%s\"" % query) 
    234236         
    235237        if len(self.attributeNames) != len(attributeValues): 
     
    247249    def __getstate__(self): 
    248250        '''Explicit pickling required with __slots__''' 
    249         return dict([(attrName, getattr(self, attrName)) \ 
     251        return dict([(attrName, getattr(self, attrName))  
    250252                     for attrName in SQLAlchemyAXInterface.__slots__]) 
    251253         
  • TI12-security/trunk/python/ndg_security_server/ndg/security/server/wsgi/saml/__init__.py

    r5984 r6034  
    2626                            ResponseElementTree, QName) 
    2727 
    28 from ndg.security.common.saml.esg import XSGroupRoleAttributeValue 
    29 from ndg.security.common.saml.esg.xml.etree import ( 
     28from ndg.security.common.saml_utils.esg import XSGroupRoleAttributeValue 
     29from ndg.security.common.saml_utils.esg.xml.etree import ( 
    3030                                        XSGroupRoleAttributeValueElementTree) 
    3131from ndg.security.common.soap.etree import SOAPEnvelope 
  • TI12-security/trunk/python/ndg_security_test/ndg/security/test/unit/attributeauthority/test_attributeauthority.py

    r6009 r6034  
    248248                             Status, StatusMessage, StatusCode) 
    249249from saml.xml import XMLConstants 
    250 from ndg.security.common.saml.esg import EsgSamlNamespaces 
     250from ndg.security.common.saml_utils.esg import EsgSamlNamespaces 
    251251 
    252252 
  • TI12-security/trunk/python/ndg_security_test/ndg/security/test/unit/attributeauthorityclient/test_attributeauthorityclient.py

    r6009 r6034  
    4040from saml.xml.etree import ResponseElementTree 
    4141 
    42 from ndg.security.common.saml.bindings import SOAPBinding as SamlSoapBinding 
    43 from ndg.security.common.saml.esg import (EsgSamlNamespaces,  
     42from ndg.security.common.saml_utils.bindings import SOAPBinding as SamlSoapBinding 
     43from ndg.security.common.saml_utils.esg import (EsgSamlNamespaces,  
    4444                                          XSGroupRoleAttributeValue) 
    4545 
  • TI12-security/trunk/python/ndg_security_test/ndg/security/test/unit/saml/test_samlinterface.py

    r6009 r6034  
    3131from ndg.security.common.soap.etree import SOAPEnvelope 
    3232from ndg.security.common.utils.etree import QName, prettyPrint 
    33 from ndg.security.common.saml.esg import (EsgSamlNamespaces,  
     33from ndg.security.common.saml_utils.esg import (EsgSamlNamespaces,  
    3434                                          XSGroupRoleAttributeValue) 
    35 from ndg.security.common.saml.esg.xml.etree import ( 
     35from ndg.security.common.saml_utils.esg.xml.etree import ( 
    3636                                        XSGroupRoleAttributeValueElementTree) 
    3737from ndg.security.test.unit import BaseTestCase 
  • TI12-security/trunk/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/test_soapattributeinterface.py

    r5982 r6034  
    2828from ndg.security.common.soap.etree import SOAPEnvelope 
    2929from ndg.security.common.utils.etree import prettyPrint 
    30 from ndg.security.common.saml.esg import EsgSamlNamespaces 
     30from ndg.security.common.saml_utils.esg import EsgSamlNamespaces 
    3131   
    3232     
Note: See TracChangeset for help on using the changeset viewer.