1 | # |
---|
2 | # NDG Security pyDAP version 3.0 Test configuration |
---|
3 | # |
---|
4 | # NERC DataGrid |
---|
5 | # |
---|
6 | # Author: P J Kershaw |
---|
7 | # |
---|
8 | # Date: 15/05/09 |
---|
9 | # |
---|
10 | # Copyright: STFC 2009 |
---|
11 | # |
---|
12 | # Licence: BSD - see top level directory for details |
---|
13 | # |
---|
14 | # The %(here)s variable will be replaced with the parent directory of this |
---|
15 | # file |
---|
16 | # |
---|
17 | [DEFAULT] |
---|
18 | testConfigDir = %(here)s/../../config |
---|
19 | beakerSessionKeyName = beaker.session.ndg.security |
---|
20 | |
---|
21 | [server:main] |
---|
22 | use = egg:Paste#http |
---|
23 | # Change to 0.0.0.0 to make public |
---|
24 | host = 127.0.0.1 |
---|
25 | port = 8001 |
---|
26 | |
---|
27 | # Composite to enable templates to pick up static content |
---|
28 | [composit:cascade] |
---|
29 | use = egg:Paste#cascade |
---|
30 | app1 = staticLayout |
---|
31 | app2 = pydap |
---|
32 | catch = 404 |
---|
33 | |
---|
34 | # Layout folder contains stylesheet and graphics for templates |
---|
35 | [app:staticLayout] |
---|
36 | use = egg:Paste#static |
---|
37 | document_root = %(here)s/layout |
---|
38 | |
---|
39 | # pyDAP Application |
---|
40 | [app:pydap] |
---|
41 | use = egg:pydap#server |
---|
42 | root = %(here)s/data |
---|
43 | templates = %(here)s/template |
---|
44 | x-wsgiorg.throw_errors = 0 |
---|
45 | |
---|
46 | # Pipeline to with security filters to protect the pyDAP application |
---|
47 | [pipeline:main] |
---|
48 | pipeline = BeakerSessionFilter AuthenticationFilter AuthorizationFilter cascade |
---|
49 | |
---|
50 | |
---|
51 | [filter:BeakerSessionFilter] |
---|
52 | paste.filter_app_factory = beaker.middleware:SessionMiddleware |
---|
53 | |
---|
54 | # Cookie name |
---|
55 | beaker.session.key = ndg.security.session |
---|
56 | |
---|
57 | # WSGI environ key name |
---|
58 | environ_key = %(beakerSessionKeyName)s |
---|
59 | beaker.session.secret = rBIvKXLa+REYB8pM/8pdPoorVpKQuaOW |
---|
60 | beaker.cache.data_dir = %(here)s/authn/beaker/cache |
---|
61 | beaker.session.data_dir = %(here)s/authn/beaker/sessions |
---|
62 | |
---|
63 | #beaker.session.cookie_domain = .localhost |
---|
64 | |
---|
65 | [filter:AuthenticationFilter] |
---|
66 | paste.filter_app_factory = ndg.security.server.wsgi.authn:AuthenticationMiddleware |
---|
67 | prefix = authN. |
---|
68 | |
---|
69 | # Set redirect for OpenID Relying Party in the Security Services app instance |
---|
70 | #authN.redirectURI = https://localhost:7443/verify |
---|
71 | authN.redirectURI = https://localhost/verify |
---|
72 | |
---|
73 | # Default URI to return to if middleware wasn't able to set via HTTP_REFERER or |
---|
74 | # passed return to query argument |
---|
75 | authN.sessionHandler.defaultLogoutReturnToURI = https://localhost:7443/ |
---|
76 | |
---|
77 | # AuthKit Set-up |
---|
78 | authkit.setup.method=cookie |
---|
79 | |
---|
80 | # This cookie name and secret MUST agree with the name used by the security web |
---|
81 | # services app |
---|
82 | authkit.cookie.name=ndg.security.auth |
---|
83 | authkit.cookie.secret=9wvZObs9anUEhSIAnJNoY2iJq59FfYZr |
---|
84 | authkit.cookie.signoutpath = /logout |
---|
85 | |
---|
86 | # Disable inclusion of client IP address from cookie signature due to |
---|
87 | # suspected problem with AuthKit setting it when a HTTP Proxy is in place |
---|
88 | authkit.cookie.includeip = False |
---|
89 | |
---|
90 | #authkit.cookie.params.expires = 2 |
---|
91 | #authkit.cookie.params.domain = .localhost |
---|
92 | |
---|
93 | # environ key name for beaker session |
---|
94 | authkit.session.middleware = %(beakerSessionKeyName)s |
---|
95 | |
---|
96 | |
---|
97 | [filter:AuthorizationFilter] |
---|
98 | paste.filter_app_factory=ndg.security.server.wsgi.authz:SAMLAuthorizationMiddleware.filter_app_factory |
---|
99 | prefix = authz. |
---|
100 | authz.pepResultHandler = ndg.security.server.wsgi.authz.result_handler.genshi.GenshiPEPResultHandlerMiddleware |
---|
101 | authz.pepResultHandler.staticContentDir = %(here)s/pep_result_handler |
---|
102 | authz.pepResultHandler.baseURL = http://localhost:8001 |
---|
103 | authz.pepResultHandler.heading = Access Denied |
---|
104 | authz.pepResultHandler.messageTemplate = Access is forbidden for this resource:<div id="accessDeniedMessage">$pdpResponseMsg</div>Please check with your site administrator that you have the required access privileges. |
---|
105 | authz.pepResultHandler.footerText = This site is for test purposes only. |
---|
106 | authz.pepResultHandler.rightLink = http://ceda.ac.uk/ |
---|
107 | authz.pepResultHandler.rightImage = %(authz.pepResultHandler.baseURL)s/layout/CEDA_RightButton60.png |
---|
108 | authz.pepResultHandler.rightAlt = Centre for Environmental Data Archival |
---|
109 | authz.pepResultHandler.helpIcon = %(authz.pepResultHandler.baseURL)s/layout/icons/help.png |
---|
110 | |
---|
111 | policy.filePath = %(here)s/authz/policy.xml |
---|
112 | |
---|
113 | # Settings for Policy Information Point used by the Policy Decision Point to |
---|
114 | # retrieve subject attributes from the Attribute Authority associated with the |
---|
115 | # resource to be accessed |
---|
116 | |
---|
117 | # If omitted, DN of SSL Cert is used |
---|
118 | pip.attributeQuery.issuerName = |
---|
119 | pip.attributeQuery.subjectIdFormat = urn:esg:openid |
---|
120 | pip.attributeQuery.clockSkewTolerance = 0. |
---|
121 | pip.attributeQuery.queryAttributes.0 = urn:siteA:security:authz:1.0:attr, , http://www.w3.org/2001/XMLSchema#string |
---|
122 | pip.attributeQuery.sslCACertDir=%(testConfigDir)s/ca |
---|
123 | pip.attributeQuery.sslCertFilePath=%(testConfigDir)s/pki/test.crt |
---|
124 | pip.attributeQuery.sslPriKeyFilePath=%(testConfigDir)s/pki/test.key |
---|
125 | |
---|
126 | |
---|
127 | # Logging configuration |
---|
128 | [loggers] |
---|
129 | keys = root, ndg |
---|
130 | |
---|
131 | [handlers] |
---|
132 | keys = console,logfile |
---|
133 | |
---|
134 | [formatters] |
---|
135 | keys = generic |
---|
136 | |
---|
137 | [logger_root] |
---|
138 | level = INFO |
---|
139 | handlers = console |
---|
140 | |
---|
141 | [logger_ndg] |
---|
142 | level = DEBUG |
---|
143 | handlers = logfile |
---|
144 | qualname = ndg |
---|
145 | |
---|
146 | [handler_console] |
---|
147 | class = StreamHandler |
---|
148 | args = (sys.stderr,) |
---|
149 | level = NOTSET |
---|
150 | formatter = generic |
---|
151 | |
---|
152 | [handler_logfile] |
---|
153 | class = handlers.RotatingFileHandler |
---|
154 | level=NOTSET |
---|
155 | formatter=generic |
---|
156 | args=(os.path.join('./', 'log', 'server.log'), 'a', 100000, 10) |
---|
157 | |
---|
158 | [formatter_generic] |
---|
159 | format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
---|
160 | datefmt = %H:%M:%S |
---|