Ignore:
Timestamp:
26/01/07 16:45:46 (13 years ago)
Author:
pjkersha
Message:

python/ndg.security.server/ndg/security/server/AttAuthority/init.py:
Include additional checks for loadCredUserRolesInterface.

python/ndg.security.server/ndg/security/server/SessionMgr/server-config.tac:

  • updated soap_connect to wire up to SessionMgr?.connect
  • use of SSL is configurable from useSSL properties file element
  • likewise pick up port number from properties file

python/ndg.security.server/ndg/security/server/SessionMgr/init.py:

  • move lambda functions outside SessionMgr? class - easier to reference.
  • added extra elements to properties file - port num, use SSL flag, SSL cert/private key settings. Simple CA client settings
  • Include additional checks for loadCredReposInterface.
  • update connect method to return proxy cert, proxy private key, user cert and cookie as separate tuple elements.

python/www/html/sessionMgr.wsdl,
python/ndg.security.server/ndg/security/server/SessionMgr/SessionMgr_services_server.py,
python/ndg.security.common/ndg/security/common/SessionMgr/SessionMgr_services.py,
python/ndg.security.common/ndg/security/common/SessionMgr/SessionMgr_services_types.py:

  • connect response has separate elements for proxy cert, proxy private key and user cert.
  • disconnect proxyCert -> userCert. proxy is set in signature in SOAP header.

python/ndg.security.server/ndg/security/server/MyProxy.py: fixes to readProperties method.

python/conf/sessionMgrProperties.xml,
python/ndg.security.test/ndg/security/test/SessionMgr/sessionMgrProperties.xml:
added additional elements for SSL connection.

python/ndg.security.test/ndg/security/test/SessionMgr/SessionMgrClientTest.py:
updates to connect method.

python/ndg.security.test/ndg/security/test/SessionMgr/server.sh: update to header

python/ndg.security.test/ndg/security/test/SessionMgr/sessionMgrClientTest.cfg:
modified PKI config settings.

python/ndg.security.common/ndg/security/common/wsSecurity.py: catch exceptions explicitly
for cert and private key file reading errors.

python/ndg.security.common/ndg/security/common/SessionMgr/init.py: SM client ...

  • 'smCertFilePath' refs changed to 'srvCertFilePath'
  • fixes to connect method
  • renamed 'reqAuthorisation' -> 'getAttCert'

python/ndg.security.common/ndg/security/common/CredWallet.py: added NullCredRepos? class.
Its allows for the case where a deployment doesn't require a Credential Repository. It
implements a class with empty stubs.

Location:
TI12-security/trunk/python/ndg.security.test/ndg/security/test/SessionMgr
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/SessionMgr/SessionMgrClientTest.py

    r2058 r2063  
    4646        # Omit traceFile keyword to leave out SOAP debug info 
    4747        self.clnt = SessionMgrClient(uri=self.cfg['setUp']['smuri'], 
    48                 smCertFilePath=self.cfg['setUp']['smcertfilepath'], 
     48                srvCertFilePath=self.cfg['setUp']['srvcertfilepath'], 
    4949                clntCertFilePath=self.cfg['setUp']['clntcertfilepath'], 
    5050                clntPriKeyFilePath=self.cfg['setUp']['clntprikeyfilepath'], 
     
    5454        self.sessCookie = None 
    5555        self.proxyCert = None 
    56  
     56        self.proxyPriKey = None 
     57        self.userCert = None 
    5758 
    5859    def test1AddUser(self): 
     
    6364             
    6465        # Note the pass-phrase is read from the file tmp.  To pass 
    65         # explicitly as a string use the 'pPhrase' keyword instead 
     66        # explicitly as a string use the 'passphrase' keyword instead 
    6667        self.clnt.addUser(self.cfg['test1AddUser']['username'],  
    67                           pPhrase=passphrase) 
     68                          passphrase=passphrase) 
    6869        print "Added user '%s'" % self.cfg['test1AddUser']['username'] 
    6970         
     
    7677        getpass.getpass(prompt="\ntest2CookieConnect pass-phrase for user: ") 
    7778 
    78         sSessCookie = self.clnt.connect(\ 
    79                                     self.cfg['test2CookieConnect']['username'],  
    80                                     pPhrase=passphrase) 
    81  
    82         self.sessCookie = SessionCookie(sSessCookie) 
     79        import pdb;pdb.set_trace() 
     80        userID = self.clnt.connect(self.cfg['test2CookieConnect']['username'],  
     81                                   passphrase=passphrase, 
     82                                   getCookie=True) 
     83 
     84        self.sessCookie = SessionCookie(userID[-1]) 
    8385        print "User '%s' connected to Session Manager:\n%s" % \ 
    8486            (self.cfg['test2CookieConnect']['username'], sSessCookie) 
     
    9395                    prompt="\ntest3ProxyCertConnect pass-phrase for user: ") 
    9496 
    95         self.proxyCert = self.clnt.connect(\ 
     97        self.proxyCert, self.proxyPriKey, self.userCert = self.clnt.connect(\ 
    9698                               self.cfg['test3ProxyCertConnect']['username'],  
    97                                pPhrase=passphrase, 
     99                               passphrase=passphrase, 
    98100                               createServerSess=True, 
    99101                               getCookie=False) 
     
    119121        print "\n\t" + self.test5ProxyCertDisconnect.__doc__ 
    120122        self.test3ProxyCertConnect() 
    121             
     123         
     124        # Use proxy to sign outbound SOAP message 
     125        self.clnt.clntCert = self.proxyCert 
     126        self.clnt.clntKey = self.proxyPriKey 
     127        self.clnt.clntPriKeyPwd = None 
     128         
    122129        self.clnt.disconnect(proxyCert=self.proxyCert) 
    123130        print "User disconnected from Session Manager:\n%s" % self.proxyCert 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/SessionMgr/server.sh

    r2058 r2063  
    55# Session Manager client unit test - start server 
    66# 
    7 #@author P J Kershaw 25/01/06 
     7#@author P J Kershaw 25/01/07 
    88#                                                                                 
    99#@copyright (C) 2007 CCLRC & NERC 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/SessionMgr/sessionMgrClientTest.cfg

    r2058 r2063  
    1717#aacertfilepath =  
    1818 
    19 # X.509 certificate for session manager  
    20 # If no public key is set, it will be retrieved using the getX509Cert WS  
    21 # method 
    22 smcertfilepath = ./smCert.pem 
     19# X.509 certificate for session manager.  If not set, it will be retrieved  
     20# using the getX509Cert WS method 
     21srvcertfilepath = ./sm-cert.pem 
    2322 
    2423# Password protecting client private key - if omitted it will be prompted for 
    2524# from tty 
    26 clntprikeypwd = x 
     25#clntprikeypwd =  
    2726 
    28 clntcertfilepath = ./clntCert.pem 
    29 clntprikeyfilepath = ./clntKey.pem 
     27clntcertfilepath = ./clnt-cert.pem 
     28clntprikeyfilepath = ./clnt-key.pem 
    3029 
    3130[test1AddUser] 
Note: See TracChangeset for help on using the changeset viewer.