Changeset 4384 for TI12-security


Ignore:
Timestamp:
29/10/08 11:21:26 (11 years ago)
Author:
pjkersha
Message:

SessionMgr? -> SessionManager?

Location:
TI12-security/trunk/python
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/Tests/SessionMgrTest.py

    r4279 r4384  
    55 
    66 
    7 class SessionMgrTestCase(unittest.TestCase): 
     7class SessionManagerTestCase(unittest.TestCase): 
    88     
    99    def setUp(self): 
    1010        """Nb. Credential Repository interface dynamic load is implict""" 
    1111        self.propFilePath = './sessionMgrProperties.xml' 
    12         self.sessMgr = SessionMgr(propFilePath=self.propFilePath) 
     12        self.sessMgr = SessionManager(propFilePath=self.propFilePath) 
    1313     
    1414    def tearDown(self): 
     
    1717    def testExplicitReadPropAndLoadCredentialRepositoryInt(self): 
    1818        '''Test for loading Credential Repository SEPARATE to __init__''' 
    19         sessMgr = SessionMgr() 
     19        sessMgr = SessionManager() 
    2020        sessMgr.readProperties(self.propFilePath) 
    2121        sessMgr.loadCredentialRepositoryInterface() 
     
    2525        self.sessMgr.auditCredentialRepository() 
    2626                                
    27 class SessionMgrTestSuite(unittest.TestSuite): 
     27class SessionManagerTestSuite(unittest.TestSuite): 
    2828    def __init__(self): 
    29         map = map(SessionMgrTestCase, 
     29        map = map(SessionManagerTestCase, 
    3030                  (testExplicitReadPropAndLoadCredentialRepositoryInt, 
    3131                   testCredentialRepositoryAudit) 
  • TI12-security/trunk/python/ndg.security.client/ndg/security/client/ndgSessionClient.py

    r2909 r4384  
    330330    # Initialise session client 
    331331    try: 
    332         sessClnt = SessionMgrClient(smWSDL=options.sessMgrURI, 
     332        sessClnt = SessionManagerClient(smWSDL=options.sessMgrURI, 
    333333                             smCertFilePath=options.smCertFilePath, 
    334334                             clntCertFilePath=options.clntCertFilePath, 
  • TI12-security/trunk/python/ndg.security.client/ndg/security/client/ssoclient/ssoclient/controllers/logout.py

    r3918 r4384  
    1010import base64 # decode the return to address 
    1111 
    12 from ndg.security.common.SessionMgr import SessionMgrClient 
     12from ndg.security.common.sessionmanager import SessionManagerClient 
    1313 
    1414 
     
    3030         
    3131        try: 
    32             smClnt = SessionMgrClient(uri=session['ndgSec']['h'], 
     32            smClnt = SessionManagerClient(uri=session['ndgSec']['h'], 
    3333                    tracefile=g.ndg.security.common.sso.cfg.tracefile, 
    3434                    **g.ndg.security.common.sso.cfg.wss)        
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/__init__.py

    r4381 r4384  
    1919__all__ = [ 
    2020    'authz', 
    21     'AttAuthority', 
     21    'attributeauthority', 
    2222    'AttCert', 
    23     'CredentialWallet', 
     23    'credentialwallet', 
    2424    'm2CryptoSSLUtility', 
    2525    'openssl', 
    26     'SessionMgr', 
     26    'sessionmanager', 
    2727    'utils', 
    2828    'wssecurity', 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/attributeauthority.py

    r4381 r4384  
    3232from ZSI.wstools.Utility import HTTPResponse 
    3333 
    34 from ndg.security.common.zsi.attributeauthority.AttAuthority_services import AttAuthorityServiceLocator 
     34from ndg.security.common.zsi.attributeauthority.AttAuthority_services import \ 
     35    AttAuthorityServiceLocator 
    3536from ndg.security.common.wssecurity.dom import SignatureHandler 
    3637from ndg.security.common.AttCert import AttCert, AttCertParse 
    37 from ndg.security.common.m2CryptoSSLUtility import HTTPSConnection, \ 
    38     HostCheck 
    39  
     38from ndg.security.common.m2CryptoSSLUtility import HTTPSConnection, HostCheck 
    4039from ndg.security.common.zsi.httpproxy import ProxyHTTPConnection 
    4140 
     
    293292     
    294293        if not self.__srv: 
    295             raise InvalidSessionMgrClientCtx(\ 
     294            raise InvalidSessionManagerClientCtx(\ 
    296295                                        "Client binding is not initialised") 
    297296 
     
    336335     
    337336        if not self.__srv: 
    338             raise InvalidSessionMgrClientCtx(\ 
     337            raise InvalidSessionManagerClientCtx(\ 
    339338                                        "Client binding is not initialised") 
    340339             
     
    381380     
    382381        if not self.__srv: 
    383             raise InvalidSessionMgrClientCtx(\ 
     382            raise InvalidSessionManagerClientCtx(\ 
    384383                                        "Client binding is not initialised") 
    385384 
     
    450449     
    451450        if not self.__srv: 
    452             raise InvalidSessionMgrClientCtx(\ 
     451            raise InvalidSessionManagerClientCtx(\ 
    453452                                        "Client binding is not initialised") 
    454453 
     
    485484     
    486485        if not self.__srv: 
    487             raise InvalidSessionMgrClientCtx(\ 
     486            raise InvalidSessionManagerClientCtx(\ 
    488487                                        "Client binding is not initialised") 
    489488         
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/authz/pdp/browse.py

    r4067 r4384  
    3131    PDPMissingUserHandleAttr 
    3232     
    33 from ndg.security.common.SessionMgr import SessionMgrClient, SessionNotFound,\ 
     33from ndg.security.common.sessionmanager import SessionManagerClient, SessionNotFound,\ 
    3434    SessionCertTimeError, SessionExpired, InvalidSession, \ 
    3535    AttributeRequestDenied                    
     
    393393            # are read from a separate config file section otherwise, from the 
    394394            # PDP config object 
    395             self.smClnt = SessionMgrClient(uri=self.smURI, 
     395            self.smClnt = SessionManagerClient(uri=self.smURI, 
    396396                            sslCACertFilePathList=self.sslCACertFilePathList, 
    397397                            tracefile=self.tracefile, 
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/authz/pdp/proftp.py

    r4285 r4384  
    2929    PDPUserInsufficientPrivileges 
    3030     
    31 from ndg.security.common.SessionMgr import SessionMgrClient, SessionNotFound,\ 
     31from ndg.security.common.sessionmanager import SessionManagerClient, SessionNotFound,\ 
    3232    SessionCertTimeError, SessionExpired, InvalidSession, \ 
    3333    AttributeRequestDenied 
     
    290290        try: 
    291291            # Create Session Manager client 
    292             self.smClnt = SessionMgrClient(uri=self.smURI, 
     292            self.smClnt = SessionManagerClient(uri=self.smURI, 
    293293                            sslCACertFilePathList=self.sslCACertFilePathList, 
    294294                            tracefile=self.tracefile,  
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/myproxy.py

    r4318 r4384  
    355355                     
    356356        except Exception, e: 
    357             raise SessionMgrError, \ 
     357            raise SessionManagerError, \ 
    358358                "Error parsing tag \"%s\" in properties file" % elem.tag 
    359359         
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/sessionmanager.py

    r4377 r4384  
    2929    HostCheck 
    3030from ndg.security.common.zsi.httpproxy import ProxyHTTPConnection 
    31 from SessionMgr_services import SessionMgrServiceLocator 
     31from ndg.security.common.zsi.sessionmanager.SessionMgr_services import \ 
     32                                                    SessionMgrServiceLocator 
    3233 
    3334import logging 
     
    3536 
    3637 
    37 #_____________________________________________________________________________ 
    38 class SessionMgrClientError(Exception): 
    39     """Exception handling for SessionMgrClient class""" 
    40  
    41 #_____________________________________________________________________________ 
    42 class SessionNotFound(SessionMgrClientError): 
     38 
     39class SessionManagerClientError(Exception): 
     40    """Exception handling for SessionManagerClient class""" 
     41 
     42class SessionNotFound(SessionManagerClientError): 
    4343    """Raise when a session ID input doesn't match with an active session on 
    4444    the Session Manager""" 
    4545 
    46 #_____________________________________________________________________________ 
    47 class SessionCertTimeError(SessionMgrClientError): 
     46class SessionCertTimeError(SessionManagerClientError): 
    4847    """Session's X.509 Cert. not before time is BEFORE the system time -  
    4948    usually caused by server's clocks being out of sync.  Fix by all servers 
    5049    running NTP""" 
    5150 
    52 #_____________________________________________________________________________ 
    53 class SessionExpired(SessionMgrClientError): 
     51class SessionExpired(SessionManagerClientError): 
    5452    """Session's X.509 Cert. has expired""" 
    5553 
    56 #_____________________________________________________________________________ 
    57 class InvalidSession(SessionMgrClientError): 
     54class InvalidSession(SessionManagerClientError): 
    5855    """Session is invalid""" 
    5956 
    60 #_____________________________________________________________________________ 
    61 class InvalidAttributeAuthorityClientCtx(SessionMgrClientError): 
     57class InvalidAttributeAuthorityClientCtx(SessionManagerClientError): 
    6258    """Attribute Authority ZSI Client is not initialised""" 
    6359  
    64 #_____________________________________________________________________________ 
    65 class AttributeRequestDenied(SessionMgrClientError): 
     60class AttributeRequestDenied(SessionManagerClientError): 
    6661    """Raise when a getAttCert call to the Attribute Authority is denied""" 
    6762     
     
    8378                    ac = AttCertParse(ac) 
    8479                elif not isinstance(ac, AttCert): 
    85                     raise SessionMgrClientError, \ 
     80                    raise SessionManagerClientError, \ 
    8681                        "Input external Attribute Cert. must be AttCert type" 
    8782                          
     
    105100                              "from the target Attribute Authority") 
    106101 
    107 #_____________________________________________________________________________        
    108 class SessionMgrClient(object): 
     102 
     103class SessionManagerClient(object): 
    109104    """Client interface to Session Manager Web Service 
    110105     
     
    161156        @param signatureHandlerKw: keywords to configure signature handler""" 
    162157 
    163         log.debug("SessionMgrClient.__init__ ...") 
     158        log.debug("SessionManagerClient.__init__ ...") 
    164159         
    165160        self.__srv = None 
     
    205200         
    206201        if not isinstance(uri, basestring): 
    207             raise SessionMgrClientError( 
     202            raise SessionManagerClientError( 
    208203                             "Session Manager URI must be a valid string") 
    209204         
     
    353348                                         transdict=self._transdict) 
    354349        except HTTPResponse, e: 
    355             raise SessionMgrClientError, \ 
     350            raise SessionManagerClientError, \ 
    356351                "Initialising Service for \"%s\": %s %s" % \ 
    357352                (self.__uri, e.status, e.reason) 
     
    377372                                  
    378373        @type createServerSess: bool 
    379         @param createServerSess: If set to True, the SessionMgr will create 
     374        @param createServerSess: If set to True, the SessionManager will create 
    380375        and manage a session for the user.  For non-browser client case, it's  
    381376        possible to choose to have a client or server side session using this  
     
    396391             
    397392            except Exception, e: 
    398                 raise SessionMgrClientError, "Pass-phrase not defined: " + \ 
     393                raise SessionManagerClientError, "Pass-phrase not defined: " + \ 
    399394                                             str(e) 
    400395 
     
    453448         
    454449        if sessID and userDN: 
    455             raise SessionMgrClientError( 
     450            raise SessionManagerClientError( 
    456451                            'Only "SessID" or "userDN" keywords may be set') 
    457452             
    458453        if not sessID and not userDN: 
    459             raise SessionMgrClientError( 
     454            raise SessionManagerClientError( 
    460455                            'A "SessID" or "userDN" keyword must be set')           
    461456             
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/authnservice/__init__.py

    r4157 r4384  
    11""" 
    22Include authentication service directory into distribution - contains  
    3 various implementations of the authentication service used by SessionMgr 
     3various implementations of the authentication service used by SessionManager 
    44 
    55NERC Data Grid Project 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/authnservice/basicauthn.py

    r4369 r4384  
    11""" 
    2 Basic Authentication interface - extending the SessionMgr AbstractAuthNService  
    3 interface - to allow use with SessionMgr 
     2Basic Authentication interface - extending the SessionManager AbstractAuthNService  
     3interface - to allow use with SessionManager 
    44 
    55NERC Data Grid Project 
     
    1717import hashlib 
    1818 
    19 from ndg.security.server.sessionmanager import SessionMgr, \ 
     19from ndg.security.server.sessionmanager import SessionManager, \ 
    2020    AbstractAuthNService, AuthNServiceInvalidCredentials, AuthNServiceError 
    2121from ndg.security.common.myproxy import MyProxyClient 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/authnservice/myproxyauthn.py

    r4369 r4384  
    11""" 
    2 MyProxy Client interface - extending the SessionMgr AbstractAuthNService  
    3 interface - to allow use with SessionMgr 
     2MyProxy Client interface - extending the SessionManager AbstractAuthNService  
     3interface - to allow use with SessionManager 
    44 
    55NERC Data Grid Project 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/initCredReposDb.py

    r4279 r4384  
    6767        dbURI = "mysql://%s:%s@%s/%s" % \ 
    6868                            (opt.username, password, opt.hostname, opt.dbName) 
    69         credentialRepository = SessionMgrCredentialRepository(dbURI=dbURI) 
     69        credentialRepository = SessionManagerCredentialRepository(dbURI=dbURI) 
    7070    except Exception, e: 
    7171        sys.stderr.write("%s\n" % str(e)) 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sessionmanager.py

    r4381 r4384  
    11"""NDG Security server side session management and security includes  
    2 UserSession and SessionMgr classes. 
     2UserSession and SessionManager classes. 
    33 
    44NERC Data Grid Project 
     
    3737 
    3838# Credential Wallet 
    39 from ndg.security.common.credentialwallet import CredentialWallet, CredentialRepository, \ 
    40     CredentialWalletError, CredentialWalletAttributeRequestDenied 
     39from ndg.security.common.credentialwallet import CredentialWallet, \ 
     40    CredentialRepository, CredentialWalletError, \ 
     41    CredentialWalletAttributeRequestDenied 
    4142     
    4243from ndg.security.common.wssecurity import WSSecurityConfig 
     
    4647# Use client package to allow redirection of authorisation requests and  
    4748# to retrieve Attribute Authority public key 
    48 from ndg.security.common.SessionMgr import SessionMgrClient 
     49from ndg.security.common.sessionmanager import SessionManagerClient 
    4950 
    5051# generic parser to read INI/XML properties file 
     
    190191             
    191192        except Exception, e: 
    192             raise SessionMgrError("Decoding text: %s" % e)           
     193            raise SessionManagerError("Decoding text: %s" % e)           
    193194        if encrKey is not None: 
    194195            try: 
     
    199200             
    200201            except Exception, e: 
    201                 raise SessionMgrError("Decrypting Session Manager URI: %s" % e)            
     202                raise SessionManagerError("Decrypting Session Manager URI: %s" % e)            
    202203        else: 
    203204            return b64DecodedEncrTxt 
    204205         
    205 class SessionMgrError(_SessionException):     
     206class SessionManagerError(_SessionException):     
    206207    """Exception handling for NDG Session Manager class.""" 
    207208 
    208 class SessionNotFound(SessionMgrError): 
    209     """Raise from SessionMgr._connect2UserSession when session ID is not  
     209class SessionNotFound(SessionManagerError): 
     210    """Raise from SessionManager._connect2UserSession when session ID is not  
    210211    found in the Session dictionary""" 
    211212 
    212213 
    213 class SessionMgr(dict): 
     214class SessionManager(dict): 
    214215    """NDG authentication and session handling 
    215216     
     
    552553        readPropertiesFile = INIPropertyFileWithValidation() 
    553554        fileProp = readPropertiesFile(self.propFilePath, 
    554                                       validKeys=SessionMgr.propertyDefaults, 
     555                                      validKeys=SessionManager.propertyDefaults, 
    555556                                      prefix=prefix, 
    556557                                      sections=(section,)) 
     
    577578        Check input keys are valid names""" 
    578579         
    579         log.debug("Calling SessionMgr.setProperties with kw = %s" % prop) 
     580        log.debug("Calling SessionManager.setProperties with kw = %s" % prop) 
    580581         
    581582        for key in prop.keys(): 
    582583            if key not in self.propertyDefaults: 
    583                 raise SessionMgrError("Property name \"%s\" is invalid" % key) 
     584                raise SessionManagerError("Property name \"%s\" is invalid" % key) 
    584585        for key, value in prop.items(): 
    585586                        
     
    598599                        self.__prop[key] = value               
    599600            else: 
    600                 raise SessionMgrError('Key "%s" is not a valid Session ' 
     601                raise SessionManagerError('Key "%s" is not a valid Session ' 
    601602                                      'Manager property' % key) 
    602603         
     
    612613        @return: True if session is active, False if no session found""" 
    613614 
    614         log.debug("Calling SessionMgr.getSessionStatus ...") 
     615        log.debug("Calling SessionManager.getSessionStatus ...") 
    615616         
    616617        # Look for a session corresponding to this ID 
    617618        if sessID and userDN: 
    618             raise SessionMgrError('Only "SessID" or "userDN" keywords may be ' 
     619            raise SessionManagerError('Only "SessID" or "userDN" keywords may be ' 
    619620                                  'set') 
    620621        elif sessID: 
     
    659660 
    660661        @type createUserSess: bool 
    661         @param createServerSess: If set to True, the SessionMgr will create 
     662        @param createServerSess: If set to True, the SessionManager will create 
    662663        and manage a session for the user.  For command line case, it's  
    663664        possible to choose to have a client or server side session using this  
     
    684685        """ 
    685686         
    686         log.debug("Calling SessionMgr.connect ...") 
     687        log.debug("Calling SessionManager.connect ...") 
    687688         
    688689        # Initialise proxy cert to be returned 
     
    758759        services where required""" 
    759760         
    760         log.debug("Calling SessionMgr._createUserSession ...") 
     761        log.debug("Calling SessionManager._createUserSession ...") 
    761762         
    762763        # Check for an existing session for the same user 
     
    814815        # Check for unique session ID 
    815816        if newSessID in self.__sessDict: 
    816             raise SessionMgrError("New Session ID is already in use:\n\n %s" %  
     817            raise SessionManagerError("New Session ID is already in use:\n\n %s" %  
    817818                                  newSessID) 
    818819 
     
    841842        an existing session.""" 
    842843         
    843         log.debug("Calling SessionMgr._connect2UserSession ...") 
     844        log.debug("Calling SessionManager._connect2UserSession ...") 
    844845             
    845846        # Look for a session corresponding to this ID 
     
    896897                                    userDN)) 
    897898        else: 
    898             raise SessionMgrError('"username", "sessID" or "userX509Cert" keywords ' 
     899            raise SessionManagerError('"username", "sessID" or "userX509Cert" keywords ' 
    899900                                  'must be set') 
    900901             
     
    937938        """ 
    938939         
    939         log.debug("Calling SessionMgr.deleteUserSession ...") 
     940        log.debug("Calling SessionManager.deleteUserSession ...") 
    940941         
    941942        # Look for a session corresponding to the session ID/proxy cert. 
     
    945946                 
    946947            except KeyError: 
    947                 raise SessionMgrError( 
     948                raise SessionManagerError( 
    948949                    "Deleting user session - no matching session ID exists") 
    949950 
     
    956957                 
    957958            except Exception, e: 
    958                 raise SessionMgrError( 
     959                raise SessionManagerError( 
    959960                "Parsing input proxy certificate DN for session connect: %s"%\ 
    960961                                                                        str(e)) 
     
    964965            except KeyError: 
    965966                # User session not found with given proxy cert 
    966                 raise SessionMgrError( 
     967                raise SessionManagerError( 
    967968                    "No user session found matching input proxy certificate") 
    968969         
     
    971972        else: 
    972973            # User session not found with given ID 
    973             raise SessionMgrError('"sessID", "userCert" or "userSess" ' 
     974            raise SessionManagerError('"sessID", "userCert" or "userSess" ' 
    974975                                  'keywords must be set') 
    975976  
     
    986987         
    987988        except Exception, e: 
    988             raise SessionMgrError("Deleting user session: %s" % e)   
     989            raise SessionManagerError("Deleting user session: %s" % e)   
    989990 
    990991        log.info("Deleted user session: user DN = %s, sessID = %s" % 
     
    10171018        """ 
    10181019         
    1019         log.debug("Calling SessionMgr.getAttCert ...") 
     1020        log.debug("Calling SessionManager.getAttCert ...") 
    10201021         
    10211022        # Retrieve session corresponding to user's session ID using relevant 
     
    10391040        """Remove expired Attribute Certificates from the Credential 
    10401041        Repository""" 
    1041         log.debug("Calling SessionMgr.auditCredentialRepository ...") 
     1042        log.debug("Calling SessionManager.auditCredentialRepository ...") 
    10421043        self._credentialRepository.auditCredentials() 
    10431044         
     
    10861087    """ 
    10871088    An abstract base class to define the authentication service interface for  
    1088     use with a SessionMgr service 
     1089    use with a SessionManager service 
    10891090    """ 
    10901091 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/controllers/login.py

    r4377 r4384  
    77    SecuritySession, SSOServiceQuery 
    88from ndg.security.common.attributeauthority import AttributeAuthorityClient 
    9 from ndg.security.common.SessionMgr import SessionMgrClient, SessionExpired, \ 
     9from ndg.security.common.sessionmanager import SessionManagerClient, SessionExpired, \ 
    1010    AttributeRequestDenied 
    1111from ndg.security.common.m2CryptoSSLUtility import HTTPSConnection, \ 
     
    4040        # Session is set in this domain - check it  
    4141        try:     
    42             smClnt = SessionMgrClient(uri=session['ndgSec']['h'], 
     42            smClnt = SessionManagerClient(uri=session['ndgSec']['h'], 
    4343                        tracefile=self.cfg.tracefile, 
    4444                        httpProxyHost=self.cfg.httpProxyHost, 
     
    5050            c.xml='Error establishing security context.  Please report ' + \ 
    5151                  'the error to your site administrator' 
    52             log.error("Initialising SessionMgrClient for " + \ 
     52            log.error("Initialising SessionManagerClient for " + \ 
    5353                      "getSessionStatus call: %s" % e) 
    5454            SecuritySession.delete() 
     
    9292         
    9393        try:     
    94             smClnt = SessionMgrClient(uri=self.cfg.smURI, 
     94            smClnt = SessionManagerClient(uri=self.cfg.smURI, 
    9595                         tracefile=self.cfg.tracefile, 
    9696                         httpProxyHost=self.cfg.httpProxyHost, 
     
    104104            c.xml='Error establishing security context.  Please report ' + \ 
    105105                  'the error to your site administrator' 
    106             log.error("Login: initialising SessionMgrClient: %s" % e) 
     106            log.error("Login: initialising SessionManagerClient: %s" % e) 
    107107            response.status_code = 400 
    108108            return render('ndg.security.kid', 'ndg.security.login') 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/controllers/logout.py

    r3918 r4384  
    88from urlparse import urlsplit, urlunsplit 
    99 
    10 from ndg.security.common.SessionMgr import SessionMgrClient 
     10from ndg.security.common.sessionmanager import SessionManagerClient 
    1111 
    1212 
     
    3131         
    3232        try: 
    33             smClnt = SessionMgrClient(uri=session['ndgSec']['h'], 
     33            smClnt = SessionManagerClient(uri=session['ndgSec']['h'], 
    3434                                      tracefile=cfg.tracefile, 
    3535                                      **cfg.wss)        
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/sessionmanager/__init__.py

    r4369 r4384  
    1919    import SessionMgrService as _SessionMgrService 
    2020 
    21 from ndg.security.server.sessionmanager import SessionMgr 
     21from ndg.security.server.sessionmanager import SessionManager 
    2222     
    2323from ndg.security.common.wssecurity.dom import SignatureHandler 
     
    3939        # Initialise Attribute Authority class - property file will be 
    4040        # picked up from default location under $NDG_DIR directory 
    41         self.sm = SessionMgr(**kw) 
     41        self.sm = SessionManager(**kw) 
    4242 
    4343 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/twisted/sessionmanager/SessionMgr_services_server.py

    r4363 r4384  
    55################################################## 
    66 
    7 from ndg.security.common.SessionMgr.SessionMgr_services import * 
     7from ndg.security.common.sessionmanager.SessionMgr_services import * 
    88from ZSI.ServiceContainer import ServiceSOAPBinding 
    99 
  • TI12-security/trunk/python/ndg.security.server/ndg/security/server/zsi/twisted/sessionmanager/sessionMgr.tac

    r4369 r4384  
    4141from ndg.security.server.zsi.twisted.sessionmanager.SessionMgr_services_server\ 
    4242        import SessionMgrService as _SessionMgrService 
    43 from ndg.security.server.sessionmanager import SessionMgr 
     43from ndg.security.server.sessionmanager import SessionManager 
    4444from ndg.security.common.wssecurity.dom import SignatureHandler 
    4545from ndg.security.server.zsi.twisted import WSSecurityHandler, \ 
     
    5050 
    5151 
    52 class SessionMgrService(_SessionMgrService, WSResource): 
     52class SessionManagerService(_SessionMgrService, WSResource): 
    5353 
    5454    # Add WS-Security handlers 
     
    7272 
    7373        WSResource.__init__(self)  
    74         self.sm = SessionMgr() 
     74        self.sm = SessionManager() 
    7575 
    7676 
     
    211211 
    212212# Create Service 
    213 srv = SessionMgrService() 
     213srv = SessionManagerService() 
    214214 
    215215if srv.sm.has_key('WS-Security'): 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/authnservice/__init__.py

    r4158 r4384  
    11""" 
    22Include authentication service directory into distribution - contains  
    3 various test implementations of the authentication service used by SessionMgr 
     3various test implementations of the authentication service used by SessionManager 
    44 
    55NERC Data Grid Project 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/authnservice/test_authnservice.py

    r4369 r4384  
    2222    """ 
    2323    A simple test proxy client with the methods stubbed out to allow 
    24     for use in testing SessionMgr 
     24    for use in testing SessionManager 
    2525    - NB, the stubbed out methods here are overkill in terms of the  
    2626    AbstractAuthNService interface - they are included to dummy out the MyProxy 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmanager/test_sessionmanager.py

    r4382 r4384  
    3333 
    3434 
    35 class SessionMgrTestCase(unittest.TestCase): 
    36     """Unit test case for ndg.security.server.sessionmanager.SessionMgr class. 
     35class SessionManagerTestCase(unittest.TestCase): 
     36    """Unit test case for ndg.security.server.sessionmanager.SessionManager class. 
    3737     
    3838    This class manages server side sessions""" 
     
    5959        # Omit traceFile keyword to leave out SOAP debug info 
    6060        self.propFilePath = xpdVars(self.cfg.get('setUp', 'propFilePath')) 
    61         self.sm = SessionMgr(propFilePath=self.propFilePath) 
     61        self.sm = SessionManager(propFilePath=self.propFilePath) 
    6262 
    6363    def _sessionMgrConnect(self): 
     
    6565        print "Connecting to session manager..." 
    6666        username = self.cfg.get('test1Connect', 'username') 
    67         if SessionMgrTestCase.test1Passphrase is None and \ 
     67        if SessionManagerTestCase.test1Passphrase is None and \ 
    6868           self.cfg.has_option('test1Connect', 'passphrase'): 
    69             SessionMgrTestCase.test1Passphrase = self.cfg.get('test1Connect',  
     69            SessionManagerTestCase.test1Passphrase = self.cfg.get('test1Connect',  
    7070                                                              'passphrase') 
    7171         
    72         if not SessionMgrTestCase.test1Passphrase: 
    73             SessionMgrTestCase.test1Passphrase = getpass.getpass(\ 
     72        if not SessionManagerTestCase.test1Passphrase: 
     73            SessionManagerTestCase.test1Passphrase = getpass.getpass(\ 
    7474                prompt="\ntest1Connect pass-phrase for user %s: " % username) 
    7575 
     
    7777        userCert, self.userPriKey, self.issuingCert, self.sessID = \ 
    7878            self.sm.connect(username=username,  
    79                             passphrase=SessionMgrTestCase.test1Passphrase) 
     79                            passphrase=SessionManagerTestCase.test1Passphrase) 
    8080        self.userCert = X509CertParse(userCert) 
    8181         
     
    9292         
    9393        username = self.cfg.get('test1Connect', 'username') 
    94         if SessionMgrTestCase.test1Passphrase is None and \ 
     94        if SessionManagerTestCase.test1Passphrase is None and \ 
    9595           self.cfg.has_option('test1Connect', 'passphrase'): 
    96             SessionMgrTestCase.test1Passphrase = self.cfg.get('test1Connect',  
     96            SessionManagerTestCase.test1Passphrase = self.cfg.get('test1Connect',  
    9797                                                              'passphrase') 
    9898         
    99         if not SessionMgrTestCase.test1Passphrase: 
    100             SessionMgrTestCase.test1Passphrase = getpass.getpass( 
     99        if not SessionManagerTestCase.test1Passphrase: 
     100            SessionManagerTestCase.test1Passphrase = getpass.getpass( 
    101101                prompt="\ntest1Connect pass-phrase for user %s: " % username) 
    102102 
     
    104104        userCert, userPriKey, issuingCert, sessID = self.sm.connect( 
    105105                            username=username,  
    106                             passphrase=SessionMgrTestCase.test1Passphrase) 
     106                            passphrase=SessionManagerTestCase.test1Passphrase) 
    107107        assert(userCert is None) 
    108108        assert(userPriKey is None) 
     
    115115         
    116116        username = self.cfg.get('test1Connect', 'username') 
    117         if SessionMgrTestCase.test1Passphrase is None and \ 
     117        if SessionManagerTestCase.test1Passphrase is None and \ 
    118118           self.cfg.has_option('test1Connect', 'passphrase'): 
    119             SessionMgrTestCase.test1Passphrase = self.cfg.get('test1Connect',  
     119            SessionManagerTestCase.test1Passphrase = self.cfg.get('test1Connect',  
    120120                                                              'passphrase') 
    121121         
    122         if not SessionMgrTestCase.test1Passphrase: 
    123             SessionMgrTestCase.test1Passphrase = getpass.getpass( 
     122        if not SessionManagerTestCase.test1Passphrase: 
     123            SessionManagerTestCase.test1Passphrase = getpass.getpass( 
    124124                prompt="\ntest1Connect pass-phrase for user %s: " % username) 
    125125 
     
    127127        userCert, self.userPriKey, self.issuingCert, self.sessID = \ 
    128128            self.sm.connect(username=username,  
    129                             passphrase=SessionMgrTestCase.test1Passphrase) 
     129                            passphrase=SessionManagerTestCase.test1Passphrase) 
    130130        self.userCert = X509CertParse(userCert) 
    131131         
     
    156156        username = self.cfg.get(section, 'username') 
    157157 
    158         if SessionMgrTestCase.test3Passphrase is None and \ 
     158        if SessionManagerTestCase.test3Passphrase is None and \ 
    159159           self.cfg.has_option(section, passphrase): 
    160             SessionMgrTestCase.test3Passphrase = self.cfg.get(section,  
     160            SessionManagerTestCase.test3Passphrase = self.cfg.get(section,  
    161161                                                              'passphrase') 
    162162         
    163         if not SessionMgrTestCase.test3Passphrase: 
    164             SessionMgrTestCase.test3Passphrase = getpass.getpass(prompt=\ 
     163        if not SessionManagerTestCase.test3Passphrase: 
     164            SessionManagerTestCase.test3Passphrase = getpass.getpass(prompt=\ 
    165165                                            "\ntest3ConnectNoCreateServerSess " 
    166166                                            "pass-phrase for user %s: " %  
     
    169169        self.userCert, self.userPriKey, self.issuingCert, sessID = \ 
    170170            self.sm.connect(username=username,  
    171                             passphrase=SessionMgrTestCase.test3Passphrase, 
     171                            passphrase=SessionManagerTestCase.test3Passphrase, 
    172172                            createServerSess=False) 
    173173         
     
    302302 
    303303#_____________________________________________________________________________        
    304 class SessionMgrTestSuite(unittest.TestSuite): 
     304class SessionManagerTestSuite(unittest.TestSuite): 
    305305     
    306306    def __init__(self): 
    307         print "SessionMgrTestSuite ..." 
    308         smTestCaseMap = map(SessionMgrTestCase, 
     307        print "SessionManagerTestSuite ..." 
     308        smTestCaseMap = map(SessionManagerTestCase, 
    309309                          ( 
    310310                            "test1Connect", 
     
    322322                                                     
    323323if __name__ == "__main__": 
    324 #    suite = SessionMgrTestSuite() 
     324#    suite = SessionManagerTestSuite() 
    325325#    unittest.TextTestRunner(verbosity=2).run(suite) 
    326326    unittest.main()         
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionmgrclient/SessionMgrClientTest.py

    r4129 r4384  
    1919from ConfigParser import SafeConfigParser 
    2020 
    21 from ndg.security.common.SessionMgr import SessionMgrClient, \ 
     21from ndg.security.common.sessionmanager import SessionManagerClient, \ 
    2222    AttributeRequestDenied 
    2323     
     
    3030 
    3131 
    32 class SessionMgrClientTestCase(unittest.TestCase): 
     32class SessionManagerClientTestCase(unittest.TestCase): 
    3333    pemPat = "-----BEGIN CERTIFICATE-----[^\-]*-----END CERTIFICATE-----" 
    3434         
     
    126126        # Initialise the Session Manager client connection 
    127127        # Omit traceFile keyword to leave out SOAP debug info 
    128         self.clnt = SessionMgrClient(uri=self.cfg['setUp']['smuri'], 
     128        self.clnt = SessionManagerClient(uri=self.cfg['setUp']['smuri'], 
    129129                        sslCACertList=sslCACertList, 
    130130                        sslPeerCertCN=self.cfg['setUp'].get('sslpeercertcn'), 
     
    365365             
    366366#_____________________________________________________________________________        
    367 class SessionMgrClientTestSuite(unittest.TestSuite): 
     367class SessionManagerClientTestSuite(unittest.TestSuite): 
    368368     
    369369    def __init__(self): 
    370         map = map(SessionMgrClientTestCase, 
     370        map = map(SessionManagerClientTestCase, 
    371371                  ( 
    372372                    "test1Connect", 
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/utils/testConfigFileParsers.py

    r4377 r4384  
    88from ndg.security.common.utils.ConfigFileParsers import readProperties, readAndValidateProperties 
    99from ndg.security.server.attributeauthority import AttributeAuthority 
    10 from ndg.security.server.sessionmanager import SessionMgr 
     10from ndg.security.server.sessionmanager import SessionManager 
    1111from ConfigParser import MissingSectionHeaderError 
    1212 
     
    110110         
    111111 
    112     def testSessionMgrINIInput(self): 
     112    def testSessionManagerINIInput(self): 
    113113         
    114         cfg = readProperties(self.SESSION_MGR_INI_FILE, validKeys=SessionMgr._SessionMgr__validElem) 
     114        cfg = readProperties(self.SESSION_MGR_INI_FILE, validKeys=SessionManager._SessionManager__validElem) 
    115115        # do some basic checks of what is returned 
    116116        self.assertNotEqual(cfg, None) 
     
    122122 
    123123 
    124     def testSessionMgrXMLInput(self): 
     124    def testSessionManagerXMLInput(self): 
    125125         
    126         cfg = readProperties(self.SESSION_MGR_XML_FILE, validKeys=SessionMgr._SessionMgr__validElem) 
     126        cfg = readProperties(self.SESSION_MGR_XML_FILE, validKeys=SessionManager._SessionManager__validElem) 
    127127        # do some basic checks of what is returned 
    128128        self.assertNotEqual(cfg, None) 
Note: See TracChangeset for help on using the changeset viewer.