Changeset 6447
- Timestamp:
- 01/02/10 13:41:28 (11 years ago)
- Location:
- TI12-security/trunk/NDGSecurity/python
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/authn.py
r6440 r6447 325 325 ndg.security.server.wsgi.openid.relyingparty.OpenIDRelyingPartyMiddleware 326 326 which performs a similar function. 327 """ 327 """ 328 _sslAuthnSucceeded = lambda self: self.environ.get( 329 AuthKitSSLAuthnMiddleware.AUTHN_SUCCEEDED_ENVIRON_KEYNAME, 330 False) 331 332 sslAuthnSucceeded = property(fget=_sslAuthnSucceeded, 333 doc="Boolean indicating SSL authentication " 334 "has succeeded in " 335 "AuthKitSSLAuthnMiddleware upstream of " 336 "this middleware") 328 337 329 338 @NDGSecurityMiddlewareBase.initCall … … 369 378 "'REMOTE_USER' environment variable is set") 370 379 371 _sslAuthnSucceeded = lambda self: self.environ.get(372 AuthKitSSLAuthnMiddleware.AUTHN_SUCCEEDED_ENVIRON_KEYNAME,373 False)374 375 sslAuthnSucceeded = property(fget=_sslAuthnSucceeded,376 doc="Boolean indicating SSL authentication "377 "has succeeded in "378 "AuthKitSSLAuthnMiddleware upstream of "379 "this middleware")380 381 380 def __init__(self, app, app_conf, **local_conf): 382 381 super(AuthKitRedirectResponseMiddleware, self).__init__(app, app_conf, -
TI12-security/trunk/NDGSecurity/python/ndg_security_server/ndg/security/server/wsgi/myproxy/__init__.py
r6202 r6447 142 142 """Wrap MyProxy logon method as a WSGI app 143 143 """ 144 if environ ['HTTP_METHOD']== 'GET':144 if environ.get('REQUEST_METHOD') == 'GET': 145 145 # No certificate request passed with GET call 146 146 # TODO: retire this method? - keys are generated here instead of … … 148 148 certReq = None 149 149 150 elif environ ['HTTP_METHOD']== 'POST':150 elif environ.get('REQUEST_METHOD') == 'POST': 151 151 152 152 pemCertReq = environ[ … … 160 160 status = self.getStatusMessage(httplib.UNAUTHORIZED) 161 161 response = ("HTTP request method %r not recognised for this " 162 "request " % environ['HTTP_METHOD']) 162 "request " % environ.get('REQUEST_METHOD', 163 '<Not set>')) 163 164 164 165 try: -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/openid/relyingparty/validation/test_validation.py
r6276 r6447 63 63 x509CertFilePath = mkDataDirPath(os.path.join('pki', 'localhost.crt')) 64 64 65 def get _current_cert(self):66 return X509.load_cert(X509StoreCtxPlaceHolder.x509CertFilePath)65 def get1_chain(self): 66 return [X509.load_cert(X509StoreCtxPlaceHolder.x509CertFilePath)] 67 67 68 68 class IdPValidationTestCase(BaseTestCase): -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/myproxy/test.ini
r6107 r6447 6 6 [DEFAULT] 7 7 username = testuser 8 #password = 8 password = testpasswd 9 9 10 10 [server:main] … … 23 23 http.auth.basic.rePathMatchList = .* 24 24 myproxy.logonFuncEnvKeyName = myProxyLogon 25 #myproxy.client.hostname = localhost 26 myproxy.client.hostname = glue.badc.rl.ac.uk 27 myproxy.client.serverDN = /O=NDG/OU=BADC/CN=glue.badc.rl.ac.uk 25 myproxy.client.hostname = localhost 26 myproxy.client.serverDN = /O=NDG/OU=BADC/CN=localhost -
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/wsgi/myproxy/test_myproxy.py
r6202 r6447 20 20 from paste.deploy import loadapp 21 21 22 from M2Crypto import X509 22 from M2Crypto import X509, RSA, EVP, m2 23 23 24 24 from ndg.security.test.unit import BaseTestCase … … 210 210 211 211 # Create key pair 212 nBitsForKey = 2048 212 213 keys = RSA.gen_key(nBitsForKey, m2.RSA_F4) 213 214 certReq = X509.Request() … … 224 225 certReq.set_subject_name(x509Name) 225 226 226 certReq.sign(pubKey, messageDigest)227 certReq.sign(pubKey, "md5") 227 228 228 229 pemCertReq = certReq.as_pem()
Note: See TracChangeset
for help on using the changeset viewer.