Changeset 2039


Ignore:
Timestamp:
24/01/07 14:37:48 (14 years ago)
Author:
pjkersha
Message:

python/ndg.security.server/ndg/security/server/AttAuthority/server-config.tac:
remove port number and set from config file instead.

python/ndg.security.test/ndg/security/test/AttAuthority/init.py:

  • get port number from config file
  • allow map config with no trusted hosts set

python/ndg.security.server/ndg/security/server/AttAuthority/start-container.sh:
Include --pidfile arg so that multiple twistd processes can run

python/conf/attAuthorityProperties.xml: added portNum element.

python/www/html/attAuthority.wsdl,
python/ndg.security.server/ndg/security/server/AttAuthority/AttAuthority_services_serv
er.py,
python/ndg.security.common/ndg/security/common/AttAuthority/AttAuthority_services_types.py,
python/ndg.security.common/ndg/security/common/AttAuthority/AttAuthority_services.py:
Fix to getTrustedHostInfoResponse - put HostInfo? inside sequence element

python/ndg.security.test/ndg/security/test/AttAuthority/init.py: make a package

python/ndg.security.test/ndg/security/test/AttAuthority/siteAMapConfig.xml,
python/ndg.security.test/ndg/security/test/AttAuthority/siteBMapConfig.xml,
python/ndg.security.test/ndg/security/test/AttAuthority/siteAUserRoles.py,
python/ndg.security.test/ndg/security/test/AttAuthority/siteBUserRoles.py,
python/ndg.security.test/ndg/security/test/AttAuthority/siteAAttAuthorityProperties.xml,
python/ndg.security.test/ndg/security/test/AttAuthority/siteBAttAuthorityProperties.xml:
separate test configurations to allow two separate Attribute Authorities to be run to
simulate role mapping.

Location:
TI12-security/trunk/python
Files:
7 added
9 edited
4 moved

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/conf/attAuthorityProperties.xml

    r2028 r2039  
    22<AAprop> 
    33    <name>BADC</name> 
     4    <portNum>5000</portNum> 
    45    <keyFile></keyFile> 
    56    <keyPwd></keyPwd> 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/AttAuthority/AttAuthority_services.py

    r2036 r2039  
    2929        # no ws-addressing 
    3030 
    31     # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cf396c> 
     31    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cf39ec> 
    3232    def getAttCert(self, userCert,userAttCert): 
    3333 
     
    4444        return attCert 
    4545 
    46     # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cf3cac> 
     46    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cf3d0c> 
    4747    def getHostInfo(self): 
    4848 
     
    5959        return hostname,aaURI,loginURI 
    6060 
    61     # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cfa6ac> 
     61    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cf97cc> 
    6262    def getTrustedHostInfo(self, role): 
    6363 
     
    7070        # no output wsaction 
    7171        response = self.binding.Receive(getTrustedHostInfoOutputMsg.typecode) 
    72         return  
     72        trustedHosts = response._trustedHosts 
     73        return trustedHosts 
    7374 
    74     # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cfa82c> 
     75    # op: <ZSI.wstools.WSDLTools.Message instance at 0xb6cf994c> 
    7576    def getX509Cert(self): 
    7677 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/AttAuthority/AttAuthority_services_types.py

    r2036 r2039  
    4444        def __init__(self, **kw): 
    4545            ns = ns0.HostInfo_Dec.schema 
    46             TClist = [ZSI.TC.String(pname="hostname", aname="_hostname", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="aaURI", aname="_aaURI", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="loginURI", aname="_loginURI", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("urn:ndg:security","RoleList",lazy=False)(pname="roleList", aname="_roleList", minOccurs=1, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
     46            TClist = [ZSI.TC.String(pname="hostname", aname="_hostname", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="aaURI", aname="_aaURI", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname="loginURI", aname="_loginURI", minOccurs=1, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), GTD("http://schemas.xmlsoap.org/wsdl/","RoleList",lazy=False)(pname="roleList", aname="_roleList", minOccurs=1, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    4747            kw["pname"] = ("urn:ndg:security","HostInfo") 
    4848            kw["aname"] = "_HostInfo" 
     
    169169        def __init__(self, **kw): 
    170170            ns = ns0.getTrustedHostInfoResponse_Dec.schema 
    171             TClist = [] 
     171            TClist = [GTD("http://schemas.xmlsoap.org/wsdl/","HostInfo",lazy=False)(pname="trustedHosts", aname="_trustedHosts", minOccurs=0, maxOccurs="unbounded", nillable=False, typed=False, encoded=kw.get("encoded"))] 
    172172            kw["pname"] = ("urn:ndg:security","getTrustedHostInfoResponse") 
    173173            kw["aname"] = "_getTrustedHostInfoResponse" 
     
    179179                def __init__(self): 
    180180                    # pyclass 
     181                    self._trustedHosts = [] 
    181182                    return 
    182183            Holder.__name__ = "getTrustedHostInfoResponse_Holder" 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/AttAuthority/AttAuthority_services_server.py

    r2036 r2039  
    55################################################## 
    66 
    7 from AttAuthority_services import * 
     7from ndg.security.common.AttAuthority.AttAuthority_services import * 
    88from ZSI.ServiceContainer import ServiceSOAPBinding 
    99 
     
    1212    root = {} 
    1313    _wsdl = """<?xml version=\"1.0\" ?> 
    14 <wsdl:definitions name=\"AttAuthority\" targetNamespace=\"urn:ndg:security\" xmlns=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:tns=\"urn:ndg:security\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:wsu=\"http://schemas.xmlsoap.org/ws/2002/07/utility\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> 
     14<wsdl:definitions name=\"AttAuthority\" targetNamespace=\"urn:ndg:security\" xmlns=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:tns=\"urn:ndg:security\" xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> 
    1515 
    1616  <wsdl:types> 
    17     <xsd:schema> 
     17    <xsd:schema targetNamespace=\"urn:ndg:security\"> 
    1818     
    1919      <xsd:element name=\"RoleList\"> 
     
    3232                <xsd:element maxOccurs=\"1\" minOccurs=\"1\" name=\"aaURI\" type=\"xsd:string\"/> 
    3333                <xsd:element maxOccurs=\"1\" minOccurs=\"1\" name=\"loginURI\" type=\"xsd:string\"/> 
    34                         <xsd:element maxOccurs=\"unbounded\" minOccurs=\"1\" name=\"roleList\" type=\"tns:RoleList\"/> 
     34                        <xsd:element maxOccurs=\"unbounded\" minOccurs=\"1\" name=\"roleList\" type=\"RoleList\"/> 
    3535              </xsd:sequence> 
    3636            </xsd:complexType> 
     
    7878      <xsd:element name=\"getTrustedHostInfoResponse\"> 
    7979        <xsd:complexType> 
    80           <xsd:element maxOccurs=\"unbounded\" minOccurs=\"0\" name=\"trustedHosts\" type=\"tns:HostInfo\"/> 
     80                  <xsd:sequence> 
     81            <xsd:element maxOccurs=\"unbounded\" minOccurs=\"0\" name=\"trustedHosts\" type=\"HostInfo\"/> 
     82                  </xsd:sequence> 
    8183        </xsd:complexType> 
    8284      </xsd:element> 
     
    8587        <xsd:complexType/> 
    8688      </xsd:element> 
     89       
    8790      <xsd:element name=\"getX509CertResponse\"> 
    8891        <xsd:complexType> 
     
    261264 
    262265        result = getTrustedHostInfoOutputMsg() 
     266        # If we have an implementation object, copy the result  
     267        if hasattr(self,'impl'): 
     268            result._trustedHosts = parameters 
    263269        return self.request, result 
    264270 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/AttAuthority/__init__.py

    r2035 r2039  
    7878     
    7979    # valid configuration property keywords 
    80     __validKeys = [ 'name', 
     80    __validKeys = ( 'name', 
     81                    'portNum', 
    8182                    'keyFile', 
    8283                    'keyPwd', 
     
    9394                    'usrRolesModName', 
    9495                    'usrRolesClassName', 
    95                     'usrRolesPropFile'] 
     96                    'usrRolesPropFile') 
    9697     
    9798    def __init__(self,  
     
    330331             
    331332        except Exception, e: 
    332             raise AttAuthorityError, "User Proxy Certificate: %s" % e 
     333            raise AttAuthorityError, "User certificate: %s" % e 
    333334 
    334335 
     
    583584                                    float(self.__prop['attCertNotBeforeOff']) 
    584585 
     586        # Likewise port number 
     587        self.__prop['portNum'] = int(self.__prop['portNum']) 
     588         
    585589         
    586590        # Check directory path 
     
    627631             
    628632        trustedElem = rootElem.findall('trusted') 
    629         if not trustedElem:    
    630             raise AttAuthorityError, \ 
    631             "\"trusted\" tag not found in Map Configuration file \"%s\"" % \ 
    632             self.__prop['mapConfigFile'] 
     633        if not trustedElem:  
     634            # Make an empty list so that for loop block below is skipped  
     635            # without an error   
     636            trustedElem = () 
    633637 
    634638        # Dictionaries: 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/AttAuthority/server-config.tac

    r2035 r2039  
    8686        return request, response 
    8787 
    88 portNum = 5000 
    8988hostname = socket.gethostname() 
    9089 
     
    106105siteFactory = Site(root) 
    107106application = service.Application("AttributeAuthorityContainer") 
    108 port = internet.TCPServer(portNum, siteFactory) 
     107port = internet.TCPServer(aaSrv.aa['portNum'], siteFactory) 
    109108port.setServiceParent(application) 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/AttAuthority/start-container.sh

    r1714 r2039  
    11#! /bin/sh 
    2 ############################################################################ 
    3 # Automatically generated by wsdl2web.py 
    4 # See LBNLCopyright for copyright notice! 
    5 ########################################################################### 
     2# 
     3#  
     4#  
     5# 
    66 
    77EXEC=twistd  
    8 OPTIONS=-noy 
     8OPTIONS="--pidfile=twistd-$$.pid -noy" 
    99CONFIG=server-config.tac 
    1010 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/MyProxy/myProxyClientTest.cfg

    r2028 r2039  
    1111 
    1212[test1Store] 
    13 username: sstljakTestUser 
     13#username: sstljakTestUser 
     14username: gabriel 
    1415passphrase: 
    1516certFile: ./userCert.pem 
     
    2021 
    2122[test2GetDelegation] 
    22 username: sstljakTestUser 
     23#username: sstljakTestUser 
     24username: gabriel 
    2325passphrase: 
    2426 
    2527[test3Info] 
    26 username: sstljakTestUser 
     28#username: sstljakTestUser 
     29username: gabriel 
    2730ownerCertFile: ./proxy-cert.pem 
    2831ownerKeyFile: ./proxy-key.pem 
     
    3033 
    3134[test4ChangePassphrase] 
    32 username: sstljakTestUser 
     35#username: sstljakTestUser 
     36username: gabriel 
    3337ownerCertFile: ./proxy-cert.pem 
    3438ownerKeyFile: ./proxy-key.pem 
     
    3842 
    3943[test5Destroy] 
    40 username: sstljakTestUser 
     44#username: sstljakTestUser 
     45username: gabriel 
    4146ownerCertFile: ./proxy-cert.pem 
    4247ownerKeyFile: ./proxy-key.pem 
  • TI12-security/trunk/python/www/html/attAuthority.wsdl

    r2036 r2039  
    88 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    99 xmlns:tns="urn:ndg:security" 
    10  xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" 
    1110 targetNamespace="urn:ndg:security"> 
    1211 
    1312  <wsdl:types> 
    14     <xsd:schema> 
     13    <xsd:schema targetNamespace="urn:ndg:security"> 
    1514     
    1615      <xsd:element name="RoleList"> 
     
    2928                <xsd:element name="aaURI" type="xsd:string" minOccurs="1" maxOccurs="1"/> 
    3029                <xsd:element name="loginURI" type="xsd:string" minOccurs="1" maxOccurs="1"/> 
    31                         <xsd:element name="roleList" type="tns:RoleList" minOccurs="1" maxOccurs="unbounded"/> 
     30                        <xsd:element name="roleList" type="RoleList" minOccurs="1" maxOccurs="unbounded"/> 
    3231              </xsd:sequence> 
    3332            </xsd:complexType> 
     
    7574      <xsd:element name="getTrustedHostInfoResponse"> 
    7675        <xsd:complexType> 
    77           <xsd:element name="trustedHosts" type="tns:HostInfo" minOccurs="0" maxOccurs="unbounded"/> 
     76                  <xsd:sequence> 
     77            <xsd:element name="trustedHosts" type="HostInfo" minOccurs="0" maxOccurs="unbounded"/> 
     78                  </xsd:sequence> 
    7879        </xsd:complexType> 
    7980      </xsd:element> 
     
    8283        <xsd:complexType/> 
    8384      </xsd:element> 
     85       
    8486      <xsd:element name="getX509CertResponse"> 
    8587        <xsd:complexType> 
Note: See TracChangeset for help on using the changeset viewer.