Changeset 7781
- Timestamp:
- 15/12/10 16:40:02 (10 years ago)
- Location:
- TI12-security/trunk/NDGSecurity/python
- Files:
-
- 1 added
- 4 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/paster_templates/Makefile
r7777 r7781 166 166 167 167 attribute_service_tmpl_clean: 168 @-echo Clearing A uthorisationService template ...168 @-echo Clearing Attribute Service template ... 169 169 rm -rf ${ATTR_SERVICE_DEST_DIR} 170 170 -
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/paster_templates/template.py
r7777 r7781 34 34 """ 35 35 DEFAULT_PORT_NUM = 7443 36 DEFAULT_URI = url parse.urlunsplit(('https', _hostname, '/', None, None))36 DEFAULT_URI = urlunsplit(('https', _hostname, '/', None, None)) 37 37 38 38 ATTRIBUTE_SERVICE_DEFAULT_MOUNT_POINT = '/AttributeService' … … 119 119 120 120 var('beakerSessionSecret', 121 ('Cookie secret for keeping security session state'),121 'Cookie secret for keeping security session state', 122 122 default=base64.b64encode(os.urandom(32))[:32]) 123 123 ] … … 132 132 133 133 _template_dir = 'authorisationservice' 134 summary = ( 135 'Template to create an NDG Security Authorisation Service') 134 summary = 'Create an NDG Security Authorisation Service' 136 135 vars = [ 137 136 var('mountPoint', … … 153 152 class OpenIDProviderTemplate(Template): 154 153 """Paster template for OpenID Provider service""" 155 156 DEFAULT_MOUNT_POINT = '/AuthorisationService' 157 DEFAULT_ISSUER_NAME = 'O=NDG, OU=Security, CN=localhost' 158 DEFAULT_ISSUER_FORMAT = Issuer.X509_SUBJECT 159 160 _template_dir = 'authorisationservice' 154 _template_dir = 'openid-provider' 161 155 summary = ( 162 156 'Template to create an NDG Security Authorisation Service') 163 vars = [164 var('mountPoint',165 ('URI path to mount service i.e. https://myhost/<mountPoint>'),166 default=DEFAULT_MOUNT_POINT),167 157 168 var('issuerName',169 ('ID of this service used in SAML queries and responses'),170 default=DEFAULT_ISSUER_NAME),171 172 var('issuerFormat',173 ('Format of issuerName string; if using the default, ensure that '174 'the issuerName value is a correctly formatted X.509 Subject '175 'Name'),176 default=DEFAULT_ISSUER_FORMAT) -
TI12-security/trunk/NDGSecurity/python/ndg_security_server/setup.py
r7756 r7781 36 36 main=pylons.util:PylonsInstaller 37 37 [paste.paster_create_template] 38 ndgsecurity_services=ndg.security.server.paster_templates.template:ServicesTemplate 38 39 ndgsecurity_authorisation_service=ndg.security.server.paster_templates.template:AuthorisationServiceTemplate 39 40 """ -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/full_system/securityservices.ini
r7777 r7781 140 140 # Apply verification against a list of trusted CAs. To skip this step, comment 141 141 # out or remove this item. e.g. set CA verification in the Apache config file. 142 ssl.caCertFilePathList = %(testConfigDir)s/ ca/d573507a.0142 ssl.caCertFilePathList = %(testConfigDir)s/pki/ca/d573507a.0 143 143 144 144 # Apply whitelisting of client certificate DNs. This should never be needed in … … 580 580 authz.ctx_handler.pip.attributeQuery.sslCertFilePath = %(testConfigDir)s/pki/localhost.crt 581 581 authz.ctx_handler.pip.attributeQuery.sslPriKeyFilePath = %(testConfigDir)s/pki/localhost.key 582 authz.ctx_handler.pip.attributeQuery.sslCACertDir = %(testConfigDir)s/ ca582 authz.ctx_handler.pip.attributeQuery.sslCACertDir = %(testConfigDir)s/pki/ca 583 583 584 584 #______________________________________________________________________________ … … 588 588 589 589 [handlers] 590 keys = console 590 keys = console, logfile 591 591 592 592 [formatters] … … 612 612 datefmt = %Y-%m-%d %H:%M:%S 613 613 614 [handler_logfile] 615 class = handlers.RotatingFileHandler 616 level=NOTSET 617 formatter=generic 618 args=(os.path.join('%(here)s', 'log', 'service.log'), 'a', 50000, 2) -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/paster_templates/test_paster_templates.py
r7756 r7781 9 9 from paste.script.create_distro import CreateDistroCommand 10 10 11 from ndg.security.server.paster_templates.template import \ 12 AuthorisationServiceTemplate 11 from ndg.security.server.paster_templates.template import (ServicesTemplate, 12 AuthorisationServiceTemplate) 13 14 15 class ServicesTemplateTestCase(unittest.TestCase): 16 """Test create configuration for an application which bundles all the NDG 17 Security Services 18 """ 19 HERE_DIR = path.dirname(path.abspath(__file__)) 20 SERVICE_TMPL_NAME = 'ndgsecurity_services' 21 SERVICE_CONF_DIR = 'services' 22 SERVICE_CONF_DIRPATH = path.join(HERE_DIR, SERVICE_CONF_DIR) 23 SERVICE_CONF_DIR_FILES = ( 24 'pki', 'pip-mapping.txt', 'service.ini', 'policy.xml', 'user.db' 25 ) 13 26 27 def test01Run(self): 28 cmd = CreateDistroCommand(None) 29 cmd.default_interactive = False 30 cmd.run([self.__class__.SERVICE_CONF_DIR, 31 '-t', 32 self.__class__.SERVICE_TMPL_NAME]) 33 34 createdFiles = listdir(self.__class__.SERVICE_CONF_DIRPATH) 35 36 for _file in self.__class__.SERVICE_CONF_DIR_FILES: 37 self.assert_(_file in createdFiles, "Missing file %r" % _file) 38 39 def tearDown(self): 40 shutil.rmtree(self.__class__.SERVICE_CONF_DIRPATH, True) 41 14 42 15 43 class AuthorisationServiceTemplateTestCase(unittest.TestCase): 44 """Test creation of ini file and basic configuration settings for NDG 45 Security Authorisation Service 46 """ 16 47 HERE_DIR = path.dirname(path.abspath(__file__)) 17 48 TMPL_CONFIG_FILEPATH = path.join(HERE_DIR, 'template.cfg') … … 40 71 shutil.rmtree(self.__class__.AUTHORISATION_SERVICE_CONF_DIRPATH, True) 41 72 73 42 74 if __name__ == "__main__": 43 75 unittest.main()
Note: See TracChangeset
for help on using the changeset viewer.