Changeset 2949 for TI05-delivery


Ignore:
Timestamp:
12/10/07 17:25:09 (12 years ago)
Author:
pjkersha
Message:

Makefile: fixed install target

ows_server/ows_server/models/ndgSecurity.py:

  • include ows_server.lib.base import to enable refs to 'g' global.
  • fixed g.securityCfg.acCACertFilePathList and g.securityCfg.acIssuer var refs

ows_server/ows_server/lib/security_util.py:

Location:
TI05-delivery/ows_framework/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/Makefile

    r2941 r2949  
    4444 
    4545install_eggs: eggs 
    46         scp dist/*.egg ndg.*/dist/*.egg \ 
     46        scp ows_server/dist/*.egg ows_common/dist/*.egg \ 
    4747        ${NDG_EGG_DIST_USER}@${NDG_EGG_DIST_HOST}:${NDG_EGG_DIST_DIR} 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/security_util.py

    r2929 r2949  
    183183            raise SecurityConfigError, \ 
    184184                                'No "wssCACertFilePathList" security setting' 
     185 
     186        # Gatekeeper params 
    185187         
     188        # Attribute Certificate Issuer 
     189        self.acIssuer = cfg.get('NDG_SECURITY', 'acIssuer') 
     190         
     191        # verification of X.509 cert back to CA 
     192        self.acCACertFilePathList = cfg.get('NDG_SECURITY',  
     193                                            'acCACertFilePathList') 
     194 
     195              
    186196    def __repr__(self): 
    187197        return '\n'.join(["%s=%s" % (k,v) for k,v in self.__dict__.items() \ 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/ndgSecurity.py

    r2929 r2949  
    33import socket 
    44 
     5from ows_server.lib.base import * 
    56from pylons import request 
    67import logging 
     
    174175                             
    175176        # Check attribute certificate is valid 
    176         attCert.certFilePathList = self.acCACertFilePathList 
     177        attCert.certFilePathList = g.securityCfg.acCACertFilePathList 
    177178        attCert.isValid(raiseExcep=True) 
    178179             
    179180        # Check it's issuer is as expected 
    180         if attCert.issuer != self.acIssuer: 
     181        if attCert.issuer != g.securityCfg.acIssuer: 
    181182            log.info('Gatekeeper - access denied: Attribute Certificate ' + \ 
    182183                'issuer DN, "%s" ' % attCert.issuer + \ 
    183184                'must match this data provider\'s Attribute Authority ' + \ 
    184                 'DN: "%s"' % self.acIssuer) 
     185                'DN: "%s"' % g.securityCfg.acIssuer) 
    185186            return False, self.__class__.InvalidAttributeCertificate 
    186187         
    187         log.info('Gatekeeper: access granted for user "%s" to "%s" ' % \ 
    188                  (attCert.userId, self.securityElement) + \ 
     188        log.info(\ 
     189 'Gatekeeper: access granted for user "%s" to "%s" secured with role "%s"' % \ 
     190                 (attCert.userId, self.securityElement, self.reqRole) + \ 
    189191                 'with attribute certificate:\n\n%s' % attCert)   
    190192                      
Note: See TracChangeset for help on using the changeset viewer.