source: TI12-security/trunk/python/ndg_security_test/ndg/security/test/integration/authz_lite/securityservices.ini @ 5774

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg_security_test/ndg/security/test/integration/authz_lite/securityservices.ini@5774
Revision 5774, 16.8 KB checked in by pjkersha, 11 years ago (diff)

Added a wrapper class to Paste Deploy httpserver to enable automated setup and teardown of services for unit tests.

Line 
1#
2# NERC DataGrid Security
3#
4# Paste configuration for combined Attribute Authority, OpenID Relying Party
5# and Provider services
6#
7# The %(here)s variable will be replaced with the parent directory of this file
8#
9# Author: P J Kershaw
10# date: 01/07/09
11# Copyright: (C) 2009 Science and Technology Facilities Council
12# license: BSD - see LICENSE file in top-level directory
13# Contact: Philip.Kershaw@stfc.ac.uk
14# Revision: $Id:$
15
16[DEFAULT]
17portNum = 7443
18hostname = localhost
19scheme = http
20baseURI = %(scheme)s://%(hostname)s:%(portNum)s
21openIDProviderIDBase = /openid
22openIDProviderIDSelectURI = %(baseURI)s%(openIDProviderIDBase)s
23testConfigDir = %(here)s/../../config
24beakerSessionKeyName = beaker.session.ndg.security.services
25
26# Global Attribute Authority Settings
27attributeAuthorityEnvironKeyName = ndg.security.server.attributeauthority.AttributeAuthority
28attributeQueryInterfaceEnvironKeyName = ndg.security.server.attributeauthority.attributeQueryInterface
29
30
31[server:main]
32use = egg:Paste#http
33host = 0.0.0.0
34port = %(portNum)s
35
36[filter-app:OpenIDProviderFilterApp]
37use = egg:Paste#httpexceptions
38next = cascade
39
40# Composite for OpenID Provider to enable settings for picking up static
41# content
42[composit:cascade]
43use = egg:Paste#cascade
44app1 = OpenIDProviderStaticContent
45app2 = OpenIDProviderApp
46catch = 404
47
48[app:OpenIDProviderStaticContent]
49use = egg:Paste#static
50document_root = %(here)s/openidprovider
51
52# Ordering of filters and app is critical
53[pipeline:main]
54pipeline = wsseSignatureVerificationFilter
55                   AttributeAuthorityFilter
56                   AttributeAuthorityWsdlSoapBindingFilter
57           wsseSignatureFilter
58           AttributeAuthoritySamlSoapBindingFilter
59                   SessionMiddlewareFilter
60                   SSLCientAuthKitFilter
61                   SSLClientAuthenticationFilter
62                   SSLCientAuthenticationRedirectFilter
63                   OpenIDRelyingPartyFilter
64                   OpenIDProviderApp
65
66#______________________________________________________________________________
67# Beaker Session Middleware (used by OpenID Provider Filter)
68[filter:SessionMiddlewareFilter]
69paste.filter_app_factory=beaker.middleware:SessionMiddleware
70beaker.session.key = openid
71beaker.session.secret = qKEdQdCr33NE087dRUWX3qUv5r7AsuQU
72
73# If you'd like to fine-tune the individual locations of the cache data dirs
74# for the Cache data, or the Session saves, un-comment the desired settings
75# here:
76beaker.cache.data_dir = %(here)s/openidprovider/beaker/cache
77beaker.session.data_dir = %(here)s/openidprovider/beaker/sessions
78beaker.session.cookie_expires = True
79
80# Key name for keying into environ dictionary
81environ_key = %(beakerSessionKeyName)s
82
83[filter:SSLCientAuthKitFilter]
84paste.filter_app_factory = authkit.authenticate:middleware
85
86# AuthKit Set-up
87setup.method=cookie
88
89# This cookie name and secret MUST agree with the name used by the
90# Authentication Filter used to secure a given app
91cookie.name=ndg.security.auth
92
93cookie.secret=9wvZObs9anUEhSIAnJNoY2iJq59FfYZr
94cookie.signoutpath = /logout
95
96# Disable inclusion of client IP address from cookie signature due to
97# suspected problem with AuthKit setting it when a HTTP Proxy is in place
98cookie.includeip = False
99
100# SSL Client Certificate based authentication is invoked if the client passed
101# a certificate with request.  This bypasses OpenID based authn.
102[filter:SSLClientAuthenticationFilter]
103paste.filter_app_factory = ndg.security.server.wsgi.ssl:AuthKitSSLAuthnMiddleware
104prefix = ssl.
105ssl.caCertFilePathList = %(testConfigDir)s/ca/ndg-test-ca.crt
106#ssl.clientCertDNMatchList = /O=NDG/OU=BADC/CN=mytest /O=gabriel/OU=BADC/CN=test /O=NDG/OU=BADC/CN=test
107
108# 'HTTP_' prefix is set when passed through a proxy
109ssl.sslKeyName = HTTP_HTTPS
110ssl.sslClientCertKeyName = HTTP_SSL_CLIENT_CERT
111
112# Set the URI pattern match here to interrupt a redirect to the OpenID Relying
113# Party from the service running over HTTP and see if a client certificate has
114# been set
115ssl.rePathMatchList = ^/verify.*
116
117[filter:OpenIDRelyingPartyFilter]
118paste.filter_app_factory = 
119        ndg.security.server.wsgi.openid.relyingparty:OpenIDRelyingPartyMiddleware.filter_app_factory
120
121openid.relyingparty.baseURL = %(authkit.openid.baseurl)s
122openid.relyingparty.certFilePath = %(testConfigDir)s/pki/localhost.crt
123openid.relyingparty.priKeyFilePath = %(testConfigDir)s/pki/localhost.key
124openid.relyingparty.priKeyPwd = 
125openid.relyingparty.caCertDirPath = %(testConfigDir)s/ca
126openid.relyingparty.providerWhitelistFilePath =
127openid.relyingparty.signinInterfaceMiddlewareClass = ndg.security.server.wsgi.openid.relyingparty.signin_interface.buffet.BuffetSigninTemplate
128openid.relyingparty.signinInterface.templatePackage = ndg.security.server.wsgi.openid.relyingparty.signin_interface.buffet.templates
129openid.relyingparty.signinInterface.staticContentRootDir = %(here)s/openidrelyingparty/public
130openid.relyingparty.signinInterface.baseURL = %(openid.relyingparty.baseURL)s
131openid.relyingparty.signinInterface.initialOpenID = %(openIDProviderIDSelectURI)s
132openid.relyingparty.signinInterface.leftLogo = %(openid.relyingparty.signinInterface.baseURL)s/layout/NERC_Logo.gif
133openid.relyingparty.signinInterface.leftAlt = Natural Environment Research Council
134openid.relyingparty.signinInterface.ndgLink = http://ndg.nerc.ac.uk/
135openid.relyingparty.signinInterface.ndgImage = %(openid.relyingparty.signinInterface.baseURL)s/layout/ndg_logo_circle.gif
136openid.relyingparty.signinInterface.disclaimer = This site is for test purposes only and is under active development.
137openid.relyingparty.signinInterface.stfcLink = http://www.stfc.ac.uk/
138openid.relyingparty.signinInterface.stfcImage = %(openid.relyingparty.signinInterface.baseURL)s/layout/stfc-circle-sm.gif
139openid.relyingparty.signinInterface.helpIcon = %(openid.relyingparty.signinInterface.baseURL)s/layout/icons/help.png
140
141cache_dir = %(here)s/data
142
143# AuthKit Set-up
144authkit.setup.method=openid, cookie
145
146# This cookie name and secret MUST agree with the name used by the
147# Authentication Filter used to secure a given app
148authkit.cookie.name=ndg.security.auth
149
150authkit.cookie.secret=9wvZObs9anUEhSIAnJNoY2iJq59FfYZr
151authkit.cookie.signoutpath = /logout
152
153# Disable inclusion of client IP address from cookie signature due to
154# suspected problem with AuthKit setting it when a HTTP Proxy is in place
155authkit.cookie.includeip = False
156
157authkit.openid.path.signedin=/
158authkit.openid.store.type=file
159authkit.openid.store.config=%(here)s/openidrelyingparty/store
160authkit.openid.session.key = authkit_openid
161authkit.openid.session.secret = random string
162
163# Key name for dereferencing beaker.session object held in environ
164authkit.openid.session.middleware = %(beakerSessionKeyName)s
165
166authkit.openid.baseurl = %(baseURI)s
167
168# Template for signin
169#authkit.openid.template.obj =
170
171# Handler for parsing OpenID and creating a session from it
172#authkit.openid.urltouser =
173
174# Redirect to original requested URI following SSL Client Authentication.  This
175# filter must be placed AFTER the AuthKit cookie setting middleware.  In this
176# case its configured in the OpenIDRelyingPartyMiddleware filter.  If the
177# OpenID Relying Party filter is removed, a separate AuthKit middleware entry
178# would need to be made so that this redirect filter can still function
179[filter:SSLCientAuthenticationRedirectFilter]
180paste.filter_app_factory = ndg.security.server.wsgi.authn:AuthKitRedirectResponseMiddleware
181prefix = ssl.
182ssl.sessionKey = %(beakerSessionKeyName)s
183
184#______________________________________________________________________________
185# OpenID Provider WSGI Settings
186[app:OpenIDProviderApp]
187paste.app_factory=ndg.security.server.wsgi.openid.provider:OpenIDProviderMiddleware.app_factory
188
189openid.provider.path.openidserver=/OpenID/Provider/server
190openid.provider.path.login=/OpenID/Provider/login
191openid.provider.path.loginsubmit=/OpenID/Provider/loginsubmit
192
193# Yadis based discovery only - the 'id' path is configured to return 404 not
194# found - see ndg.security.server.wsgi.openid.provider.renderinginterface.
195# buffet.BuffetRendering class
196openid.provider.path.id=/OpenID/Provider/id/${userIdentifier}
197openid.provider.path.yadis=%(openIDProviderIDBase)s/${userIdentifier}
198
199# Yadis based discovery for idselect mode - this is where the user has entered
200# a URI at the Relying Party which identifies their Provider only and not their
201# full ID URI.  e.g. https://badc.nerc.ac.uk instead of
202# https://badc.nerc.ac.uk/John
203openid.provider.path.serveryadis=%(openIDProviderIDBase)s
204openid.provider.path.allow=/OpenID/Provider/allow
205openid.provider.path.decide=/OpenID/Provider/decide
206openid.provider.path.mainpage=/OpenID/Provider/home
207
208openid.provider.session_middleware=%(beakerSessionKeyName)s
209openid.provider.base_url=%(baseURI)s
210openid.provider.trace=False
211openid.provider.consumer_store_dirpath=%(here)s/openidprovider
212openid.provider.renderingClass=ndg.security.server.wsgi.openid.provider.renderinginterface.buffet.BuffetRendering
213#openid.provider.renderingClass=ndg.security.server.wsgi.openid.provider.DemoRenderingInterface
214
215openid.provider.rendering.templateType = kid
216openid.provider.rendering.templateRoot = ndg.security.server.wsgi.openid.provider.renderinginterface.buffet.templates
217openid.provider.rendering.kid.assume_encoding= utf-8
218openid.provider.rendering.kid.encoding = utf-8
219
220# Layout
221openid.provider.rendering.baseURL = %(openid.provider.base_url)s
222openid.provider.rendering.leftLogo = %(openid.provider.rendering.baseURL)s/layout/NERC_Logo.gif
223openid.provider.rendering.leftAlt = Natural Environment Research Council
224openid.provider.rendering.ndgLink = http://ndg.nerc.ac.uk/
225openid.provider.rendering.ndgImage = %(openid.provider.rendering.baseURL)s/layout/ndg_logo_circle.gif
226openid.provider.rendering.disclaimer = This site is for test purposes only and is under active development.
227openid.provider.rendering.stfcLink = http://www.stfc.ac.uk/
228openid.provider.rendering.stfcImage = %(openid.provider.rendering.baseURL)s/layout/stfc-circle-sm.gif
229openid.provider.rendering.helpIcon = %(openid.provider.rendering.baseURL)s/layout/icons/help.png
230
231# Basic Authentication interface to demonstrate capabilities
232openid.provider.authNInterface=ndg.security.server.wsgi.openid.provider.authninterface.basic.BasicAuthNInterface
233
234# user login details format is:
235# <username>:<password>:<OpenID name>, ... <OpenID name N> <username>:... etc
236# Each user entry is delimited by a space. username, password and OpenID name
237# list are delimited by a colon.  The list of OpenID names are delimited by
238# commas.  The OpenID name represents the unique part of the OpenID URL for the
239# individual user.  Each username may have more than one OpenID alias but only
240# alias at a time may be registered with a given Attribute Authority
241openid.provider.authN.userCreds=pjk:testpassword:PhilipKershaw,P.J.Kershaw another:testpassword:A.N.Other
242
243# Basic authentication for testing/admin - comma delimited list of
244# <username>:<password> pairs
245#openid.provider.usercreds=pjk:test
246
247#______________________________________________________________________________
248# Attribute Authority WSGI settings
249#
250[filter:AttributeAuthorityFilter]
251# This filter publishes an Attribute Authority instance as a key in environ
252# to enable other middleware to access it
253paste.filter_app_factory = ndg.security.server.wsgi.attributeauthority:AttributeAuthorityMiddleware.filter_app_factory
254prefix = attributeAuthority.
255
256# Key name by which the WSDL SOAP based interface may reference this
257# service
258attributeAuthority.environKeyName = %(attributeAuthorityEnvironKeyName)s
259
260# Key name for the SAML SOAP binding based interface to reference this
261# service's attribute query method
262attributeAuthority.environKeyNameAttributeQueryInterface: %(attributeQueryInterfaceEnvironKeyName)s
263
264# Attribute Authority settings
265# 'name' setting MUST agree with map config file 'thisHost' name attribute
266attributeAuthority.name: Site A
267
268# Lifetime is measured in seconds
269attributeAuthority.attCertLifetime: 28800 
270
271# Allow an offset for clock skew between servers running
272# security services. NB, measured in seconds - use a minus sign for time in the
273# past
274attributeAuthority.attCertNotBeforeOff: 0
275
276# All Attribute Certificates issued are recorded in this dir
277attributeAuthority.attCertDir: %(testConfigDir)s/attributeauthority/sitea/attributeCertificateLog
278
279# Files in attCertDir are stored using a rotating file handler
280# attCertFileLogCnt sets the max number of files created before the first is
281# overwritten
282attributeAuthority.attCertFileName: ac.xml
283attributeAuthority.attCertFileLogCnt: 16
284attributeAuthority.dnSeparator:/
285
286# Location of role mapping file
287attributeAuthority.mapConfigFilePath: %(testConfigDir)s/attributeauthority/sitea/siteAMapConfig.xml
288
289# Settings for custom AttributeInterface derived class to get user roles for given
290# user ID
291#attributeAuthority.attributeInterface.modFilePath: %(testConfigDir)s/attributeauthority/sitea
292attributeAuthority.attributeInterface.modName: ndg.security.test.integration.authz_lite.attributeinterface
293attributeAuthority.attributeInterface.className: TestUserRoles
294
295# Config for XML signature of Attribute Certificate
296attributeAuthority.signingPriKeyFilePath: %(testConfigDir)s/attributeauthority/sitea/siteA-aa.key
297attributeAuthority.signingCertFilePath: %(testConfigDir)s/attributeauthority/sitea/siteA-aa.crt
298attributeAuthority.caCertFilePathList: %(testConfigDir)s/ca/ndg-test-ca.crt
299
300
301# SOAP WSDL Based Binding to the Attribute Authority
302[filter:AttributeAuthorityWsdlSoapBindingFilter]
303paste.filter_app_factory = ndg.security.server.wsgi.attributeauthority:AttributeAuthoritySOAPBindingMiddleware.filter_app_factory
304prefix = service.soap.binding.
305attributeAuthoritySOAPBindingPrefix = attributeauthority.service.soap.binding.
306
307service.soap.binding.referencedFilters = filter:wsseSignatureVerificationFilter
308service.soap.binding.path = /AttributeAuthority
309service.soap.binding.enableWSDLQuery = True
310service.soap.binding.charset = utf-8
311service.soap.binding.serviceSOAPBindingEnvironKeyName = ndg.security.server.wsgi.attributeauthority.AttributeAuthoritySOAPBindingMiddleware
312
313attributeauthority.service.soap.binding.attributeAuthorityEnvironKeyName = %(attributeAuthorityEnvironKeyName)s
314attributeauthority.service.soap.binding.wsseSignatureVerificationFilterID = filter:wsseSignatureVerificationFilter
315
316
317# SAML SOAP Binding to the Attribute Authority
318[filter:AttributeAuthoritySamlSoapBindingFilter]
319paste.filter_app_factory = ndg.security.server.wsgi.saml:SOAPAttributeInterfaceMiddleware.filter_app_factory
320prefix = saml.soapbinding.
321
322saml.soapbinding.pathMatchList = /AttributeAuthority/saml
323saml.soapbinding.queryInterfaceKeyName = %(attributeQueryInterfaceEnvironKeyName)s
324
325
326#______________________________________________________________________________
327# WS-Security Signature Verification
328[filter:wsseSignatureVerificationFilter]
329paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:SignatureVerificationFilter.filter_app_factory
330filterID = %(__name__)s
331
332# Settings for WS-Security SignatureHandler class used by this filter
333wsseCfgFilePrefix = wssecurity
334
335# Verify against known CAs - Provide a space separated list of file paths
336wssecurity.caCertFilePathList=%(testConfigDir)s/ca/ndg-test-ca.crt
337
338
339#______________________________________________________________________________
340# Apply WS-Security Signature
341[filter:wsseSignatureFilter]
342paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:ApplySignatureFilter.filter_app_factory
343
344# Reference the verification filter in order to be able to apply signature
345# confirmation
346referencedFilters = filter:wsseSignatureVerificationFilter
347wsseSignatureVerificationFilterID = filter:wsseSignatureVerificationFilter
348
349# Last filter in chain of SOAP handlers writes the response
350writeResponse = True
351
352# Settings for WS-Security SignatureHandler class used by this filter
353wsseCfgFilePrefix = wssecurity
354
355# Certificate associated with private key used to sign a message.  The sign
356# method will add this to the BinarySecurityToken element of the WSSE header. 
357wssecurity.signingCertFilePath=%(testConfigDir)s/pki/wsse-server.crt
358
359# PEM encoded private key file
360wssecurity.signingPriKeyFilePath=%(testConfigDir)s/pki/wsse-server.key
361
362# Set the ValueType for the BinarySecurityToken added to the WSSE header for a
363# signed message.  See __setReqBinSecTokValType method and binSecTokValType
364# class variable for options - it may be one of X509, X509v3, X509PKIPathv1 or
365# give full namespace to alternative - see
366# ZSI.wstools.Namespaces.OASIS.X509TOKEN
367#
368# binSecTokValType determines whether signingCert or signingCertChain
369# attributes will be used.
370wssecurity.reqBinSecTokValType=X509v3
371
372# Add a timestamp element to an outbound message
373wssecurity.addTimestamp=True
374
375# For WSSE 1.1 - service returns signature confirmation containing signature
376# value sent by client
377wssecurity.applySignatureConfirmation=True
378
379# Logging configuration
380[loggers]
381keys = root, ndg
382
383[handlers]
384keys = console
385
386[formatters]
387keys = generic
388
389[logger_root]
390level = INFO
391handlers = console
392
393[logger_ndg]
394level = DEBUG
395handlers =
396qualname = ndg
397
398[handler_console]
399class = StreamHandler
400args = (sys.stderr,)
401level = NOTSET
402formatter = generic
403
404[formatter_generic]
405format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
406datefmt = %H:%M:%S
407
Note: See TracBrowser for help on using the repository browser.