source: TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/openidprovider/securityservices.ini @ 7077

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/integration/openidprovider/securityservices.ini@7077
Revision 7077, 18.4 KB checked in by pjkersha, 9 years ago (diff)
  • Property svn:keywords set to Id
Line 
1#
2# NERC DataGrid Security
3#
4# Paste configuration for combined Session Manager, Attribute Authority,
5# OpenID Relying Party 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: 26/02/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 = 9443
18hostname = localhost
19scheme = http
20baseURI = %(scheme)s://%(hostname)s:%(portNum)s
21testConfigDir = %(here)s/../../config
22
23#______________________________________________________________________________
24# Attribute Authority settings
25# 'name' setting MUST agree with map config file 'thisHost' name attribute
26attributeAuthority.name: Site A
27
28# Lifetime is measured in seconds
29attributeAuthority.attCertLifetime: 28800 
30
31# Allow an offset for clock skew between servers running
32# security services. NB, measured in seconds - use a minus sign for time in the
33# past
34attributeAuthority.attCertNotBeforeOff: 0
35
36# All Attribute Certificates issued are recorded in this dir
37attributeAuthority.attCertDir: %(testConfigDir)s/attributeauthority/sitea/attributeCertificateLog
38
39# Files in attCertDir are stored using a rotating file handler
40# attCertFileLogCnt sets the max number of files created before the first is
41# overwritten
42attributeAuthority.attCertFileName: ac.xml
43attributeAuthority.attCertFileLogCnt: 16
44attributeAuthority.dnSeparator:/
45
46# Location of role mapping file
47attributeAuthority.mapConfigFilePath: %(testConfigDir)s/attributeauthority/sitea/siteAMapConfig.xml
48
49# Settings for custom AttributeInterface derived class to get user roles for given
50# user ID
51attributeAuthority.attributeInterface.modFilePath: %(testConfigDir)s/attributeauthority/sitea
52attributeAuthority.attributeInterface.modName: siteAUserRoles
53attributeAuthority.attributeInterface.className: TestUserRoles
54
55# Config for XML signature of Attribute Certificate
56attributeAuthority.signingPriKeyFilePath: %(testConfigDir)s/attributeauthority/sitea/siteA-aa.key
57attributeAuthority.signingCertFilePath: %(testConfigDir)s/attributeauthority/sitea/siteA-aa.crt
58attributeAuthority.caCertFilePathList: %(testConfigDir)s/ca/ndg-test-ca.crt
59
60#______________________________________________________________________________
61# Session Manager specific settings - commented out settings will take their
62# default settings.  To override the defaults uncomment and set as required.
63# See ndg.security.server.sessionmanager module for details
64
65# Credential Wallet Settings - global to all user sessions
66#
67# CA certificates for Attribute Certificate signature validation
68sessionManager.credentialWallet.caCertFilePathList=%(testConfigDir)s/ca/ndg-test-ca.crt
69
70# CA certificates for SSL connection peer cert. validation - required if
71# connecting to an Attribute Authority over SSL
72sessionManager.credentialWallet.sslCACertFilePathList=%(testConfigDir)s/ca/ndg-test-ca.crt
73
74# Allow Get Attribute Certificate calls to try to get a mapped certificate
75# from another organisation trusted by the target Attribute Authority
76sessionManager.credentialWallet.mapFromTrustedHosts=True
77sessionManager.credentialWallet.rtnExtAttCertList=True
78
79# Refresh an Attribute Certificate, if an existing one in the wallet has only
80# this length of time left before it expires
81credentialWallet.attCertRefreshElapse=7200
82
83# Pointer to WS-Security settings.  These WS-Security settings are for use
84# by user credential wallets held in user sessions hosted by the Session
85# Manager.  They enable individual wallets to query Attribute Authorities for
86# user Attribute Certificates.  Nb. the difference between these settings and
87# the WS-Security section for handling requests to the Session Manager.
88#
89# Settings are identified by a prefix. 
90sessionManager.credentialWallet.wssCfgPrefix=sessionManager.credentialWallet.wssecurity
91
92# ...A section name could also be used.
93#sessionManager.credentialWallet.wssCfgSection=
94
95# SOAP Signature Handler settings for the Credential Wallet's Attribute
96# Authority interface
97#
98# CA Certificates used to verify X.509 certs used in Attribute Certificates.
99# The CA certificates of other NDG trusted sites should go here.  NB, multiple
100# values should be delimited by a space
101sessionManager.credentialWallet.wssecurity.caCertFilePathList: %(testConfigDir)s/ca/ndg-test-ca.crt
102
103# Signature of an outbound message
104#
105# Certificate associated with private key used to sign a message.  The sign
106# method will add this to the BinarySecurityToken element of the WSSE header. 
107# binSecTokValType attribute must be set to 'X509' or 'X509v3' ValueType. 
108# As an alternative, use signingCertChain - see below...
109
110# PEM encoded cert
111sessionManager.credentialWallet.wssecurity.signingCertFilePath: %(testConfigDir)s/sessionmanager/sm.crt
112
113# ... or provide file path to PEM encoded private key file
114sessionManager.credentialWallet.wssecurity.signingPriKeyFilePath: %(testConfigDir)s/sessionmanager/sm.key
115
116# Set the ValueType for the BinarySecurityToken added to the WSSE header for a
117# signed message.  See __setReqBinSecTokValType method and binSecTokValType
118# class variable for options - it may be one of X509, X509v3, X509PKIPathv1 or
119# give full namespace to alternative - see
120# ZSI.wstools.Namespaces.OASIS.X509TOKEN
121#
122# binSecTokValType determines whether signingCert or signingCertChain
123# attributes will be used.
124sessionManager.credentialWallet.wssecurity.reqBinSecTokValType: X509v3
125
126# Add a timestamp element to an outbound message
127sessionManager.credentialWallet.wssecurity.addTimestamp: True
128
129# For WSSE 1.1 - service returns signature confirmation containing signature
130# value sent by client
131sessionManager.credentialWallet.wssecurity.applySignatureConfirmation: True
132
133# Authentication service properties
134sessionManager.authNService.moduleFilePath: 
135sessionManager.authNService.moduleName: ndg.security.test.config.sessionmanager.userx509certauthn
136sessionManager.authNService.className: UserX509CertAuthN
137
138# Specific settings for UserCertAuthN Session Manager authentication plugin
139# This sets up PKI credentials for a single test account
140sessionManager.authNService.userX509CertFilePath: %(testConfigDir)s/pki/user.crt
141sessionManager.authNService.userPriKeyFilePath: %(testConfigDir)s/pki/user.key
142sessionManager.authNService.userPriKeyPwd: testpassword
143
144[server:main]
145use = egg:Paste#http
146host = 0.0.0.0
147port = %(portNum)s
148
149[filter-app:OpenIDProviderFilterApp]
150use = egg:Paste#httpexceptions
151next = cascade
152
153# Composite for OpenID Provider to enable settings for picking up static
154# content
155[composit:cascade]
156use = egg:Paste#cascade
157app1 = OpenIDProviderStaticContent
158app2 = OpenIDProviderApp
159catch = 404
160
161[app:OpenIDProviderStaticContent]
162use = egg:Paste#static
163document_root = %(here)s/openidprovider
164
165[pipeline:main]
166pipeline = wsseSignatureVerificationFilter
167                   AttributeAuthorityFilter
168           SessionManagerFilter
169           wsseSignatureFilter
170                   SessionMiddlewareFilter
171                   OpenIDProviderFilterApp
172
173#______________________________________________________________________________
174# Beaker Session Middleware (used by OpenID Provider Filter)
175[filter:SessionMiddlewareFilter]
176paste.filter_app_factory=beaker.middleware:SessionMiddleware
177#beaker.session.key = sso
178beaker.session.secret = somesecret
179
180# If you'd like to fine-tune the individual locations of the cache data dirs
181# for the Cache data, or the Session saves, un-comment the desired settings
182# here:
183beaker.cache.data_dir = %(here)s/beaker/cache
184beaker.session.data_dir = %(here)s/beaker/sessions
185
186#______________________________________________________________________________
187# OpenID Provider WSGI Settings
188[app:OpenIDProviderApp]
189paste.app_factory=ndg.security.server.wsgi.openid.provider:OpenIDProviderMiddleware.app_factory
190#openid.provider.path.openidserver=/openidserver
191#openid.provider.path.login=/openid/login
192#openid.provider.path.loginsubmit=/openid/loginsubmit
193#
194## Comment out next two lines and uncomment the third to disable URL based
195## discovery and allow only Yadis based instead
196##openid.provider.path.id=/openid/id
197##openid.provider.path.yadis=/openid/yadis
198#openid.provider.path.yadis=/openid/id/
199#
200#openid.provider.path.serveryadis=/openid/serveryadis
201#openid.provider.path.allow=/openid/allow
202#openid.provider.path.decide=/openid/decide
203#openid.provider.path.mainpage=/openid/
204
205openid.provider.path.openidserver=/OpenID/Provider/server
206openid.provider.path.login=/OpenID/Provider/login
207openid.provider.path.loginsubmit=/OpenID/Provider/loginsubmit
208
209# Yadis based discovery only - the id path is configured to return 404 not
210# found - see ndg.security.server.wsgi.openid.provider.renderinginterface.
211# buffet.BuffetRendering class
212openid.provider.path.id=/OpenID/Provider/id/${userIdentifier}
213openid.provider.path.yadis=/openid/${userIdentifier}
214
215openid.provider.path.serveryadis=/openid
216openid.provider.path.allow=/OpenID/Provider/allow
217openid.provider.path.decide=/OpenID/Provider/decide
218openid.provider.path.mainpage=/OpenID/Provider/main
219
220openid.provider.session_middleware=beaker.session
221openid.provider.base_url=%(baseURI)s
222openid.provider.trace=False
223openid.provider.consumer_store_dirpath=%(here)s/openidprovider
224openid.provider.renderingClass=ndg.security.server.wsgi.openid.provider.renderinginterface.buffet.BuffetRendering
225#openid.provider.renderingClass=ndg.security.server.wsgi.openid.provider.DemoRenderingInterface
226
227openid.provider.rendering.templateType = kid
228openid.provider.rendering.templateRoot = ndg.security.server.wsgi.openid.provider.renderinginterface.buffet.templates
229openid.provider.rendering.kid.assume_encoding= utf-8
230openid.provider.rendering.kid.encoding = utf-8
231
232# Layout
233openid.provider.rendering.baseURL = %(openid.provider.base_url)s
234openid.provider.rendering.leftLogo = %(openid.provider.rendering.baseURL)s/layout/NERC_Logo.gif
235openid.provider.rendering.leftAlt = Natural Environment Research Council
236openid.provider.rendering.ndgLink = http://ndg.nerc.ac.uk/
237openid.provider.rendering.ndgImage = %(openid.provider.rendering.baseURL)s/layout/ndg_logo_circle.gif
238openid.provider.rendering.disclaimer = This site is for test purposes only and is under active development.
239openid.provider.rendering.stfcLink = http://www.stfc.ac.uk/
240openid.provider.rendering.stfcImage = %(openid.provider.rendering.baseURL)s/layout/stfc-circle-sm.gif
241openid.provider.rendering.helpIcon = %(openid.provider.rendering.baseURL)s/layout/icons/help.png
242
243
244#openid.provider.sregResponse=ndg.security.server.pylons.container.lib.openid_provider_util:esgSregResponse
245#openid.provider.axResponseHandler=ndg.security.server.pylons.container.lib.openid_provider_util:esgAXResponseHandler
246
247# Basic Authentication interface to demonstrate capabilities
248#openid.provider.authNInterface=ndg.security.server.wsgi.openid.provider.authninterface.basic.BasicAuthNInterface
249#openid.provider.authN.userCreds=pjk:test
250#openid.provider.authN.username2UserIdentifiers=pjk:PhilipKershaw,P.J.Kershaw
251
252# Link Authentication to a Session Manager instance running in the same WSGI
253# stack or on a remote service
254openid.provider.authNInterface=ndg.security.server.wsgi.openid.provider.authninterface.sessionmanager.SessionManagerOpenIDAuthNInterface
255
256# Omit or leave as blank if the Session Manager is accessible locally in the
257# same WSGI stack.
258#openid.provider.authN.sessionManagerURI=
259
260# environ dictionary key to Session Manager WSGI instance held locally.  The
261# setting below is the default and can be omitted if it matches the filterID
262# set for the Session Manager
263openid.provider.authN.environKeyName=filter:SessionManagerFilter
264
265# Database connection to enable check between username and OpenID identifier
266openid.provider.authN.connectionString: postgres://postgres:testpassword@%(hostname)s/testUserDb
267openid.provider.authN.logonSQLQuery: select username from openid where username = '$username' and ident = '$userIdentifier'
268openid.provider.authN.userIdentifiersSQLQuery: select distinct ident from openid where username = '$username'
269
270# Basic authentication for testing/admin - comma delimited list of
271# <username>:<password> pairs
272#openid.provider.usercreds=pjk:test
273
274#______________________________________________________________________________
275# Attribute Authority WSGI settings
276#
277[filter:AttributeAuthorityFilter]
278# This filter is a container for a binding to a SOAP based interface to the
279# Attribute Authority
280paste.filter_app_factory = ndg.security.server.wsgi.zsi:SOAPBindingMiddleware
281
282# Use this ZSI generated SOAP service interface class to handle i/o for this
283# filter
284ServiceSOAPBindingClass = ndg.security.server.zsi.attributeauthority.AttributeAuthorityWS
285
286# SOAP Binding Class specific keywords are in this section identified by this
287# prefix:
288ServiceSOAPBindingPropPrefix = AttributeAuthority
289
290# The AttributeAuthority class has settings in the default section above
291# identified by this prefix:
292AttributeAuthority.propPrefix = attributeAuthority
293AttributeAuthority.propFilePath = %(here)s/securityservices.ini
294AttributeAuthority.wsseSignatureVerificationFilterID = filter:wsseSignatureVerificationFilter
295
296# Provide an identifier for this filter so that main WSGI app
297# CombinedServicesWSGI Session Manager filter can call this Attribute Authority
298# directly
299referencedFilters = filter:wsseSignatureVerificationFilter
300
301# Path from URL for Attribute Authority in this Paste deployment
302path = /AttributeAuthority
303
304# External endpoint for this Attribute Authority - must agree with setting used
305# to invoke this service set in:
306# * serverapp.py
307# * or port in [server:main] if calling with paster serve securityservices.ini
308# * or something else e.g. proxied through Apache?
309# This setting is used by Attribute Authority clients in this WSGI stack to see
310# if a request is being made to the local service or to another Attribute
311# Authority running elsewhere
312publishedURI = %(baseURI)s%(path)s
313
314# Enable ?wsdl query argument to list the WSDL content
315enableWSDLQuery = True
316charset = utf-8
317filterID = %(__name__)s
318
319#______________________________________________________________________________
320# Session Manager WSGI settings
321#
322[filter:SessionManagerFilter]
323# This filter is a container for a binding to a SOAP based interface to the
324# Session Manager
325paste.filter_app_factory = ndg.security.server.wsgi.zsi:SOAPBindingMiddleware
326
327# Use this ZSI generated SOAP service interface class to handle i/o for this
328# filter
329ServiceSOAPBindingClass = ndg.security.server.zsi.sessionmanager.SessionManagerWS
330
331# SOAP Binding Class specific keywords are in this section identified by this
332# prefix:
333ServiceSOAPBindingPropPrefix = SessionManager
334
335# The SessionManager class has settings in the default section above identified
336# by this prefix:
337SessionManager.propPrefix = sessionManager
338SessionManager.propFilePath = %(here)s/securityservices.ini
339
340# This filter references other filters - a local Attribute Authority (optional)
341# and a WS-Security signature verification filter (required if using signature
342# to authenticate user in requests
343SessionManager.attributeAuthorityFilterID = filter:AttributeAuthorityFilter
344SessionManager.wsseSignatureVerificationFilterID = filter:wsseSignatureVerificationFilter
345
346# The SessionManagerWS SOAP interface class needs to know about these other
347# filters
348referencedFilters = filter:wsseSignatureVerificationFilter
349                                        filter:AttributeAuthorityFilter
350
351# Path from URI for Session Manager in this Paste deployment
352path = /SessionManager
353
354# External endpoint for this Session Manager - must agree with setting used to
355# invoke this service set in:
356# * securityservicesapp.py
357# * or port in [server:main] if calling with paster serve securityservices.ini
358# * or something else e.g. proxied through Apache?
359# This setting is used by Session Manager clients in this WSGI stack to see if
360# a request is being made to the local service or to another session manager
361# running elsewhere
362publishedURI = %(baseURI)s%(path)s
363
364# Enable ?wsdl query argument to list the WSDL content
365enableWSDLQuery = True
366charset = utf-8
367
368# Provide an identifier for this filter so that main WSGI app
369# CombinedServicesWSGI can call this Session Manager directly
370filterID = %(__name__)s
371
372#______________________________________________________________________________
373# WS-Security Signature Verification
374[filter:wsseSignatureVerificationFilter]
375paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:SignatureVerificationFilter
376filterID = %(__name__)s
377
378# Settings for WS-Security SignatureHandler class used by this filter
379wsseCfgFilePrefix = wssecurity
380
381# Verify against known CAs - Provide a space separated list of file paths
382wssecurity.caCertFilePathList=%(testConfigDir)s/ca/ndg-test-ca.crt
383
384#______________________________________________________________________________
385# Apply WS-Security Signature
386[filter:wsseSignatureFilter]
387paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:ApplySignatureFilter
388
389# Reference the verification filter in order to be able to apply signature
390# confirmation
391referencedFilters = filter:wsseSignatureVerificationFilter
392wsseSignatureVerificationFilterID = filter:wsseSignatureVerificationFilter
393
394# Last filter in chain of SOAP handlers writes the response
395writeResponse = True
396
397# Settings for WS-Security SignatureHandler class used by this filter
398wsseCfgFilePrefix = wssecurity
399
400# Certificate associated with private key used to sign a message.  The sign
401# method will add this to the BinarySecurityToken element of the WSSE header. 
402wssecurity.signingCertFilePath=%(testConfigDir)s/pki/wsse-server.crt
403
404# PEM encoded private key file
405wssecurity.signingPriKeyFilePath=%(testConfigDir)s/pki/wsse-server.key
406
407# Set the ValueType for the BinarySecurityToken added to the WSSE header for a
408# signed message.  See __setReqBinSecTokValType method and binSecTokValType
409# class variable for options - it may be one of X509, X509v3, X509PKIPathv1 or
410# give full namespace to alternative - see
411# ZSI.wstools.Namespaces.OASIS.X509TOKEN
412#
413# binSecTokValType determines whether signingCert or signingCertChain
414# attributes will be used.
415wssecurity.reqBinSecTokValType=X509v3
416
417# Add a timestamp element to an outbound message
418wssecurity.addTimestamp=True
419
420# For WSSE 1.1 - service returns signature confirmation containing signature
421# value sent by client
422wssecurity.applySignatureConfirmation=True
423
424# Logging configuration
425[loggers]
426keys = root, ndg
427
428[handlers]
429keys = console
430
431[formatters]
432keys = generic
433
434[logger_root]
435level = INFO
436handlers = console
437
438[logger_ndg]
439level = DEBUG
440handlers =
441qualname = ndg
442
443[handler_console]
444class = StreamHandler
445args = (sys.stderr,)
446level = NOTSET
447formatter = generic
448
449[formatter_generic]
450format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
451datefmt = %H:%M:%S
452
Note: See TracBrowser for help on using the repository browser.