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

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@5770
Revision 5770, 16.7 KB checked in by pjkersha, 10 years ago (diff)

Adding SSL Client authentication step into authz_lite integration test. Broken redirecting back from authn step to requested resource.

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