1 | # |
---|
2 | # NERC DataGrid Security |
---|
3 | # |
---|
4 | # Paste configuration for combined security web services deployment: |
---|
5 | # * Session Manager |
---|
6 | # * Attribute Authority |
---|
7 | # * OpenID Provider |
---|
8 | # |
---|
9 | # The %(here)s variable will be replaced with the parent directory of this file |
---|
10 | # |
---|
11 | # Author: P J Kershaw |
---|
12 | # date: 30/11/05 |
---|
13 | # Copyright: (C) 2008 STFC & NERC |
---|
14 | # license: This software may be distributed under the terms of the Q Public |
---|
15 | # License, version 1.0 or later. |
---|
16 | # Contact: Philip.Kershaw@stfc.ac.uk |
---|
17 | # Revision: $Id$ |
---|
18 | |
---|
19 | [DEFAULT] |
---|
20 | # WS-Security settings in THIS file |
---|
21 | wsseCfgFilePath = %(here)s/services.ini |
---|
22 | wsseCfgFileSection = WS-Security |
---|
23 | |
---|
24 | # Attribute Authority settings |
---|
25 | # 'name' setting MUST agree with map config file 'thisHost' name attribute |
---|
26 | attributeAuthority.name: Site A |
---|
27 | |
---|
28 | # Lifetime is measured in seconds |
---|
29 | attributeAuthority.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 |
---|
34 | attributeAuthority.attCertNotBeforeOff: 0 |
---|
35 | |
---|
36 | # All Attribute Certificates issued are recorded in this dir |
---|
37 | attributeAuthority.attCertDir: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority/attCertLog |
---|
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 |
---|
42 | attributeAuthority.attCertFileName: ac.xml |
---|
43 | attributeAuthority.attCertFileLogCnt: 16 |
---|
44 | attributeAuthority.dnSeparator:/ |
---|
45 | |
---|
46 | # Location of role mapping file |
---|
47 | attributeAuthority.mapConfigFile: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority/siteAMapConfig.xml |
---|
48 | |
---|
49 | # Settings for custom AAUserRoles derived class to get user roles for given |
---|
50 | # user ID |
---|
51 | attributeAuthority.userRolesModFilePath: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority |
---|
52 | attributeAuthority.userRolesModName: siteAUserRoles |
---|
53 | attributeAuthority.userRolesClassName: TestUserRoles |
---|
54 | |
---|
55 | # Config for XML signature of Attribute Certificate |
---|
56 | attributeAuthority.signingPriKeyFilePath: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority/siteA-aa.key |
---|
57 | attributeAuthority.signingCertFilePath: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority/siteA-aa.crt |
---|
58 | attributeAuthority.caCertFilePathList: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/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.sessionMgr.SessionMgr class for details |
---|
64 | |
---|
65 | # Credential Wallet Settings - global to all user sessions |
---|
66 | # |
---|
67 | # CA certificates for Attribute Certificate signature validation |
---|
68 | sessionManager.credentialWallet.caCertFilePathList=$NDGSEC_COMBINED_SRVS_UNITTEST_DIR/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 |
---|
72 | sessionManager.credentialWallet.sslCACertFilePathList=$NDGSEC_COMBINED_SRVS_UNITTEST_DIR/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 |
---|
76 | sessionManager.credentialWallet.mapFromTrustedHosts=True |
---|
77 | sessionManager.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 |
---|
81 | credentialWallet.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. |
---|
90 | sessionManager.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 |
---|
101 | sessionManager.credentialWallet.wssecurity.caCertFilePathList: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/ca/ndg-test-ca.crt |
---|
102 | # Signature of an outbound message |
---|
103 | # |
---|
104 | # Certificate associated with private key used to sign a message. The sign |
---|
105 | # method will add this to the BinarySecurityToken element of the WSSE header. |
---|
106 | # binSecTokValType attribute must be set to 'X509' or 'X509v3' ValueType. |
---|
107 | # As an alternative, use signingCertChain - see below... |
---|
108 | |
---|
109 | # PEM encoded cert |
---|
110 | sessionManager.credentialWallet.wssecurity.signingCertFilePath: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/sessionmanager/sm.crt |
---|
111 | |
---|
112 | # ... or provide file path to PEM encoded private key file |
---|
113 | sessionManager.credentialWallet.wssecurity.signingPriKeyFilePath: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/sessionmanager/sm.key |
---|
114 | |
---|
115 | # Set the ValueType for the BinarySecurityToken added to the WSSE header for a |
---|
116 | # signed message. See __setReqBinSecTokValType method and binSecTokValType |
---|
117 | # class variable for options - it may be one of X509, X509v3, X509PKIPathv1 or |
---|
118 | # give full namespace to alternative - see |
---|
119 | # ZSI.wstools.Namespaces.OASIS.X509TOKEN |
---|
120 | # |
---|
121 | # binSecTokValType determines whether signingCert or signingCertChain |
---|
122 | # attributes will be used. |
---|
123 | sessionManager.credentialWallet.wssecurity.reqBinSecTokValType: X509v3 |
---|
124 | |
---|
125 | # Add a timestamp element to an outbound message |
---|
126 | sessionManager.credentialWallet.wssecurity.addTimestamp: True |
---|
127 | |
---|
128 | # For WSSE 1.1 - service returns signature confirmation containing signature |
---|
129 | # value sent by client |
---|
130 | sessionManager.credentialWallet.wssecurity.applySignatureConfirmation: True |
---|
131 | |
---|
132 | # Authentication service properties |
---|
133 | sessionManager.authNService.moduleFilePath: |
---|
134 | sessionManager.authNService.moduleName: ndg.security.test.combinedservices.sessionmanager.usercertauthn |
---|
135 | sessionManager.authNService.className: UserCertAuthN |
---|
136 | |
---|
137 | # Specific settings for UserCertAuthN Session Manager authentication plugin |
---|
138 | # This sets up PKI credentials for a single test account |
---|
139 | sessionManager.authNService.userX509CertFilePath: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/sessionmanager/user.crt |
---|
140 | sessionManager.authNService.userPriKeyFilePath: $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/sessionmanager/user.key |
---|
141 | sessionManager.authNService.userPriKeyPwd: testpassword |
---|
142 | |
---|
143 | |
---|
144 | [server:main] |
---|
145 | use = egg:Paste#http |
---|
146 | host = 0.0.0.0 |
---|
147 | port = 5000 |
---|
148 | |
---|
149 | [app:mainApp] |
---|
150 | paste.app_factory = ndg.security.test.combinedservices.serverapp:app_factory |
---|
151 | |
---|
152 | # Chain of SOAP Middleware filters |
---|
153 | [pipeline:main] |
---|
154 | pipeline = wsseSignatureVerificationFilter AttributeAuthorityFilter SessionManagerFilter wsseSignatureFilter mainApp |
---|
155 | |
---|
156 | |
---|
157 | [filter:AttributeAuthorityFilter] |
---|
158 | paste.filter_app_factory = ndg.security.server.wsgi.soap:SOAPBindingMiddleware |
---|
159 | ServiceSOAPBindingClass = ndg.security.server.zsi.attributeauthority.AttributeAuthorityWS |
---|
160 | ServiceSOAPBindingPropPrefix = AttributeAuthority |
---|
161 | AttributeAuthority.propPrefix = attributeAuthority |
---|
162 | AttributeAuthority.propFilePath = $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/services.ini |
---|
163 | referencedFilters = wsseSignatureVerificationFilter01 |
---|
164 | path = /AttributeAuthority |
---|
165 | enableWSDLQuery = True |
---|
166 | charset = utf-8 |
---|
167 | filterID = attributeAuthorityFilter |
---|
168 | |
---|
169 | [filter:SessionManagerFilter] |
---|
170 | paste.filter_app_factory = ndg.security.server.wsgi.soap:SOAPBindingMiddleware |
---|
171 | ServiceSOAPBindingClass = ndg.security.server.zsi.sessionmanager.SessionManagerWS |
---|
172 | ServiceSOAPBindingPropPrefix = SessionManager |
---|
173 | SessionManager.propPrefix = sessionManager |
---|
174 | SessionManager.propFilePath = $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/services.ini |
---|
175 | SessionManager.attributeAuthorityFilterID = attributeAuthorityFilter |
---|
176 | referencedFilters = wsseSignatureVerificationFilter01 attributeAuthorityFilter |
---|
177 | path = /SessionManager |
---|
178 | enableWSDLQuery = True |
---|
179 | charset = utf-8 |
---|
180 | |
---|
181 | [filter:wsseSignatureVerificationFilter] |
---|
182 | paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:SignatureVerificationFilter |
---|
183 | filterID = wsseSignatureVerificationFilter01 |
---|
184 | |
---|
185 | [filter:wsseSignatureFilter] |
---|
186 | paste.filter_app_factory = ndg.security.server.wsgi.wssecurity:ApplySignatureFilter |
---|
187 | |
---|
188 | # Reference the verification filter in order to be able to apply signature |
---|
189 | # confirmation |
---|
190 | referencedFilters = wsseSignatureVerificationFilter01 |
---|
191 | |
---|
192 | # Last filter in chain SOAP handlers writes the response |
---|
193 | writeResponse = True |
---|
194 | |
---|
195 | |
---|
196 | [WS-Security] |
---|
197 | # |
---|
198 | # OUTBOUND MESSAGE CONFIG |
---|
199 | |
---|
200 | # Signature of an outbound message |
---|
201 | |
---|
202 | # Certificate associated with private key used to sign a message. The sign |
---|
203 | # method will add this to the BinarySecurityToken element of the WSSE header. |
---|
204 | signingCertFilePath=$NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority/siteA-aa.crt |
---|
205 | #signingCertFilePath=$NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority/java-ca-server.crt |
---|
206 | |
---|
207 | # PEM encoded private key file |
---|
208 | signingPriKeyFilePath=$NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority/siteA-aa.key |
---|
209 | #signingPriKeyFilePath=$NDGSEC_COMBINED_SRVS_UNITTEST_DIR/siteAAttributeAuthority/java-ca-server.key |
---|
210 | |
---|
211 | # Set the ValueType for the BinarySecurityToken added to the WSSE header for a |
---|
212 | # signed message. See __setReqBinSecTokValType method and binSecTokValType |
---|
213 | # class variable for options - it may be one of X509, X509v3, X509PKIPathv1 or |
---|
214 | # give full namespace to alternative - see |
---|
215 | # ZSI.wstools.Namespaces.OASIS.X509TOKEN |
---|
216 | # |
---|
217 | # binSecTokValType determines whether signingCert or signingCertChain |
---|
218 | # attributes will be used. |
---|
219 | reqBinSecTokValType=X509v3 |
---|
220 | |
---|
221 | # Add a timestamp element to an outbound message |
---|
222 | addTimestamp=True |
---|
223 | |
---|
224 | # For WSSE 1.1 - service returns signature confirmation containing signature |
---|
225 | # value sent by client |
---|
226 | applySignatureConfirmation=True |
---|
227 | |
---|
228 | # |
---|
229 | # INBOUND MESSAGE CONFIG |
---|
230 | |
---|
231 | # Provide a space separated list of file paths |
---|
232 | caCertFilePathList=$NDGSEC_COMBINED_SRVS_UNITTEST_DIR/ca/ndg-test-ca.crt |
---|
233 | #caCertFilePathList=$NDGSEC_COMBINED_SRVS_UNITTEST_DIR/ca/ndg-test-ca.crt $NDGSEC_COMBINED_SRVS_UNITTEST_DIR/ca/java-ca.crt |
---|
234 | |
---|
235 | |
---|
236 | # Logging configuration |
---|
237 | [loggers] |
---|
238 | keys = root, ndg |
---|
239 | |
---|
240 | [handlers] |
---|
241 | keys = console |
---|
242 | |
---|
243 | [formatters] |
---|
244 | keys = generic |
---|
245 | |
---|
246 | [logger_root] |
---|
247 | level = INFO |
---|
248 | handlers = console |
---|
249 | |
---|
250 | [logger_ndg] |
---|
251 | level = DEBUG |
---|
252 | handlers = |
---|
253 | qualname = ndg |
---|
254 | |
---|
255 | [handler_console] |
---|
256 | class = StreamHandler |
---|
257 | args = (sys.stderr,) |
---|
258 | level = NOTSET |
---|
259 | formatter = generic |
---|
260 | |
---|
261 | [formatter_generic] |
---|
262 | format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s |
---|
263 | datefmt = %H:%M:%S |
---|
264 | |
---|