Ignore:
Timestamp:
23/02/10 16:40:24 (11 years ago)
Author:
pjkersha
Message:

AuthzService? unit test wiht ndg.security.server.wsgi.authzservice.AuthzServiceMiddleware? near complete. Fixes required to PIP callout to Attribute Authority.

Location:
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/config/attributeauthority/sitea/site-a.ini

    r6586 r6615  
    108108prefix = saml.soapbinding. 
    109109 
    110 saml.soapbinding.deserialise = saml.xml.etree:AttributeQueryElementTree.fromXML 
     110saml.soapbinding.deserialise = ndg.saml.xml.etree:AttributeQueryElementTree.fromXML 
    111111 
    112112# Specialisation to incorporate ESG Group/Role type 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/config/attributeauthority/sitea/siteAUserRoles.py

    r6578 r6615  
    1414from uuid import uuid4 
    1515 
    16 from saml.common.xml import SAMLConstants 
    17 from saml.saml2.core import (Assertion, Attribute, AttributeStatement, Issuer, 
     16from ndg.saml.common.xml import SAMLConstants 
     17from ndg.saml.saml2.core import (Assertion, Attribute, AttributeStatement, Issuer, 
    1818                             SAMLVersion, Subject, NameID, Conditions, 
    1919                             XSStringAttributeValue) 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/config/sessionmanager/userx509certauthn.py

    r5357 r6615  
    1818from ndg.security.server.sessionmanager import SessionManager, \ 
    1919    AbstractAuthNService, AuthNServiceInvalidCredentials, AuthNServiceError 
    20 from ndg.security.common.myproxy import MyProxyClient 
     20from myproxy.client import MyProxyClient 
     21 
    2122 
    2223class UserX509CertAuthN(AbstractAuthNService): 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/authz_lite/securityservices.ini

    r6605 r6615  
    414414prefix = saml.soapbinding. 
    415415 
    416 saml.soapbinding.deserialise = saml.xml.etree:AttributeQueryElementTree.fromXML 
     416saml.soapbinding.deserialise = ndg.saml.xml.etree:AttributeQueryElementTree.fromXML 
    417417 
    418418# Specialisation to incorporate ESG Group/Role type 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/attributeauthority/test_attributeauthority.py

    r6069 r6615  
    244244from uuid import uuid4 
    245245from datetime import datetime 
    246 from saml.saml2.core import (Response, Attribute, SAMLVersion, Subject, NameID, 
     246from ndg.saml.saml2.core import (Response, Attribute, SAMLVersion, Subject, NameID, 
    247247                             Issuer, AttributeQuery, XSStringAttributeValue,  
    248248                             Status, StatusMessage, StatusCode) 
    249 from saml.xml import XMLConstants 
     249from ndg.saml.xml import XMLConstants 
    250250from ndg.security.common.saml_utils.esg import EsgSamlNamespaces 
    251251 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/attributeauthorityclient/test_samlattributeauthorityclient.py

    r6575 r6615  
    1717from xml.etree import ElementTree 
    1818 
    19 from saml.common import SAMLVersion 
    20 from saml.common.xml import SAMLConstants 
    21 from saml.xml.etree import AttributeQueryElementTree, ResponseElementTree 
    22 from saml.saml2.core import (Subject, Issuer, Attribute, NameID, AttributeQuery, 
     19from ndg.saml.common import SAMLVersion 
     20from ndg.saml.common.xml import SAMLConstants 
     21from ndg.saml.xml.etree import AttributeQueryElementTree, ResponseElementTree 
     22from ndg.saml.saml2.core import (Subject, Issuer, Attribute, NameID, AttributeQuery, 
    2323                             StatusCode, XSStringAttributeValue, ) 
    2424 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/credentialwallet/test_credentialwallet.py

    r6512 r6615  
    2323from time import sleep 
    2424from datetime import datetime, timedelta 
    25 from saml.utils import SAMLDateTime 
    26 from saml.xml.etree import AssertionElementTree 
     25from ndg.saml.utils import SAMLDateTime 
     26from ndg.saml.xml.etree import AssertionElementTree 
    2727 
    2828from ndg.security.test.unit import BaseTestCase 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/saml/test_samlinterface.py

    r6069 r6615  
    2020from xml.etree import ElementTree 
    2121 
    22 from saml.saml2.core import (Response, Assertion, Attribute,  
     22from ndg.saml.saml2.core import (Response, Assertion, Attribute,  
    2323                             AttributeStatement, SAMLVersion, Subject, NameID, 
    2424                             Issuer, AttributeQuery, XSStringAttributeValue,  
    2525                             Conditions, Status, StatusCode) 
    26 from saml.xml import XMLConstants 
    27 from saml.xml.etree import AttributeQueryElementTree, ResponseElementTree 
     26from ndg.saml.xml import XMLConstants 
     27from ndg.saml.xml.etree import AttributeQueryElementTree, ResponseElementTree 
    2828 
    2929from ndg.security.common.soap.client import (UrlLib2SOAPClient,  
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/sessionmanager/userx509certauthn.py

    r4840 r6615  
    1616from ndg.security.server.sessionmanager import SessionManager, \ 
    1717    AbstractAuthNService, AuthNServiceInvalidCredentials, AuthNServiceError 
    18 from ndg.security.common.myproxy import MyProxyClient 
     18from myproxy.client import MyProxyClient 
     19 
    1920 
    2021class UserX509CertAuthN(AbstractAuthNService): 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/attribute-interface.ini

    r6578 r6615  
    2525saml.pathMatchList = /attributeauthority/saml 
    2626saml.queryInterfaceKeyName = attributeQueryInterface 
    27 saml.deserialise = saml.xml.etree:AttributeQueryElementTree.fromXML 
     27saml.deserialise = ndg.saml.xml.etree:AttributeQueryElementTree.fromXML 
    2828 
    2929# Specialisation to incorporate ESG Group/Role type 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/authz-decision-interface.ini

    r6605 r6615  
    2828saml.pathMatchList = /authorisationservice 
    2929saml.queryInterfaceKeyName = AUTHZ_DECISION_QUERY_FUNC 
    30 saml.deserialise = saml.xml.etree:AuthzDecisionQueryElementTree.fromXML 
    31 saml.serialise = saml.xml.etree:ResponseElementTree.toXML 
     30saml.deserialise = ndg.saml.xml.etree:AuthzDecisionQueryElementTree.fromXML 
     31saml.serialise = ndg.saml.xml.etree:ResponseElementTree.toXML 
    3232 
    3333#______________________________________________________________________________ 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/authz-service.ini

    r6605 r6615  
    88port = 5000 
    99baseURI = localhost:%(port)s 
    10  
     10queryInterfaceKeyName = AUTHZ_DECISION_QUERY_FUNC 
    1111[server:main] 
    1212use = egg:Paste#http 
     
    2424prefix = saml. 
    2525saml.pathMatchList = /authorisationservice 
    26 saml.queryInterfaceKeyName = AUTHZ_DECISION_QUERY_FUNC 
    27 saml.deserialise = saml.xml.etree:AuthzDecisionQueryElementTree.fromXML 
    28 saml.serialise = saml.xml.etree:ResponseElementTree.toXML 
     26saml.queryInterfaceKeyName = %(queryInterfaceKeyName)s 
     27saml.deserialise = ndg.saml.xml.etree:AuthzDecisionQueryElementTree.fromXML 
     28saml.serialise = ndg.saml.xml.etree:ResponseElementTree.toXML 
    2929 
    3030#______________________________________________________________________________ 
     
    3434# This filter is a container for a binding to a SOAP based interface to the 
    3535# Attribute Authority 
    36 paste.filter_app_factory = ndg.security.server.wsgi.saml.authzservice:AuthzServiceMiddleware 
    37 queryInterfaceKeyName = AUTHZ_DECISION_QUERY_FUNC 
     36paste.filter_app_factory = ndg.security.server.wsgi.authzservice:AuthzServiceMiddleware.filter_app_factory 
     37prefix = authz. 
     38authz.policy.filePath = %(here)s/policy-1.1.xml 
     39authz.queryInterfaceKeyName = %(queryInterfaceKeyName)s 
     40 
     41# AuthzDecisionQuery Response settings 
     42authz.issuerName = /O=NDG/OU=CEDA/CN=Authorisation Service 
     43authz.clockSkewTolerance = 1 
     44authz.assertionLifetime = 86400 
     45 
     46# Policy Information Point settings - makes an Attribute Queries to  
     47# Attribute Authorities 
     48authz.pip.attributeQuery.subjectIdFormat = urn:esg:openid 
     49authz.pip.attributeQuery.verifyTimeConditions = True 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/test_soapattributeinterface.py

    r6578 r6615  
    1515from cStringIO import StringIO 
    1616 
    17 from saml.saml2.core import (Attribute, SAMLVersion, Subject, NameID, Issuer,  
     17from ndg.saml.saml2.core import (Attribute, SAMLVersion, Subject, NameID, Issuer,  
    1818                             AttributeQuery, XSStringAttributeValue,  
    1919                             StatusCode) 
    20 from saml.xml import XMLConstants 
    21 from saml.xml.etree import AttributeQueryElementTree, ResponseElementTree 
     20from ndg.saml.xml import XMLConstants 
     21from ndg.saml.xml.etree import AttributeQueryElementTree, ResponseElementTree 
    2222 
    2323from ndg.security.common.soap.etree import SOAPEnvelope 
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/saml/test_soapauthzdecisioninterface.py

    r6605 r6615  
    1515from cStringIO import StringIO 
    1616 
    17 from saml.saml2.core import (SAMLVersion, Subject, NameID, Issuer, Response, 
     17from ndg.saml.saml2.core import (SAMLVersion, Subject, NameID, Issuer, Response, 
    1818                             AuthzDecisionQuery, AuthzDecisionStatement, Status, 
    1919                             StatusCode, StatusMessage, DecisionType, Action,  
    2020                             Conditions, Assertion) 
    21 from saml.xml.etree import AuthzDecisionQueryElementTree, ResponseElementTree 
     21from ndg.saml.xml.etree import AuthzDecisionQueryElementTree, ResponseElementTree 
    2222 
    2323from ndg.security.common.soap.etree import SOAPEnvelope 
     
    101101                                        SoapSamlInterfaceMiddlewareTestCase): 
    102102    CONFIG_FILENAME = 'authz-decision-interface.ini' 
    103  
     103    RESOURCE_URI = TestAuthorisationServiceMiddleware.RESOURCE_URI 
     104     
    104105    def _createAuthzDecisionQuery(self,  
    105                     issuer="/O=Site A/CN=PEP", 
    106                     subject="https://openid.localhost/philip.kershaw", 
    107                     resource=TestAuthorisationServiceMiddleware.RESOURCE_URI, 
    108                     action=Action.HTTP_GET_ACTION, 
    109                     actionNs=Action.GHPP_NS_URI): 
     106                            issuer="/O=Site A/CN=PEP", 
     107                            subject="https://openid.localhost/philip.kershaw", 
     108                            resource=RESOURCE_URI, 
     109                            action=Action.HTTP_GET_ACTION, 
     110                            actionNs=Action.GHPP_NS_URI): 
    110111        query = AuthzDecisionQuery() 
    111112        query.version = SAMLVersion(SAMLVersion.VERSION_20) 
     
    196197    """ 
    197198    CONFIG_FILENAME = 'authz-service.ini' 
     199    RESOURCE_URI = 'http://localhost/dap/data/my.nc.dods?time[0:1:0]' 
     200     
     201    def __init__(self, *arg, **kw): 
     202        """Extend base init to include SAML Attribute Authority required by 
     203        Authorisation Service""" 
     204        super(SOAPAuthzDecisionInterfaceMiddlewareTestCase, self).__init__( 
     205                                                                    *arg, **kw) 
     206        self.startSiteAAttributeAuthority(withSSL=True, port=5443) 
    198207     
    199208     
Note: See TracChangeset for help on using the changeset viewer.