Changeset 6957
- Timestamp:
- 09/06/10 09:47:34 (11 years ago)
- Location:
- TI12-security/trunk/MyProxyWebService/myproxy/server
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/MyProxyWebService/myproxy/server/test/myproxy_ws.py
r6895 r6957 15 15 from myproxy.server.test import PasteDeployAppServer 16 16 17 THIS_DIR = path. dirname(__file__)17 THIS_DIR = path.abspath(path.dirname(__file__)) 18 18 INI_FILENAME = 'myproxywsgi.ini' 19 19 INI_FILEPATH = path.join(THIS_DIR, INI_FILENAME) -
TI12-security/trunk/MyProxyWebService/myproxy/server/test/myproxywsgi.ini
r6950 r6957 19 19 [app:main] 20 20 paste.app_factory = myproxy.server.wsgi.app:MyProxyApp.app_factory 21 prefix = myproxy.21 prefix = MyProxy. 22 22 23 23 # HTTP Basic Auth authentication realm used with MyProxy logon requests. 24 myproxy.httpbasicauth.realm = myproxy-realm24 MyProxy.httpbasicauth.realm = myproxy-realm 25 25 26 26 # The key name in the WSGI environ dictionary which holds the MyProxy logon 27 27 # function. This is used by the HTTP Basic Auth middleware 28 myproxy.logon.logonFuncEnvKeyName = MYPROXY_LOGON_FUNC28 MyProxy.logon.logonFuncEnvKeyName = MYPROXY_LOGON_FUNC 29 29 30 30 # Path for logon requests … … 34 34 # for the logon request. The format of this option is inherited from the more 35 35 # generic HTTP Basic Auth middleware which the MyProxyApp uses. 36 myproxy.logon.rePathMatchList = /logon36 MyProxy.logon.rePathMatchList = /logon 37 37 38 38 # Path for get trust roots call. This should be a single path. Regular 39 39 # expressions are not supported. 40 myproxy.getTrustRoots.path = /get-trustroots40 MyProxy.getTrustRoots.path = /get-trustroots 41 41 42 42 # MyProxy server which this MyProxy WSGI app is a client to. Set here to the 43 43 # fully qualified domain name or else set the MYPROXY_SERVER environment 44 44 # variable. See the documentation for the MyProxyClient egg for details 45 #myproxy.client.hostname = localhost 46 myproxy.client.caCertDir = /etc/grid-security/certificates 45 #MyProxy.client.hostname = localhost 46 47 # CA Certificate directory to enable this application to trust the MyProxy 48 # server that it fronts e.g. set to /etc/grid-security/certificates. For these 49 # tests set to local ca directory 50 MyProxy.client.caCertDir = %(here)s/ca -
TI12-security/trunk/MyProxyWebService/myproxy/server/test/test_myproxywsgi.py
r6943 r6957 59 59 """Base class for common Paste Deploy related set-up""" 60 60 INI_FILENAME = 'myproxywsgi.ini' 61 THIS_DIR = os.path. dirname(__file__)61 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) 62 62 CONFIG_FILENAME = 'test_myproxywsgi.cfg' 63 63 CONFIG_FILEPATH = os.path.join(THIS_DIR, CONFIG_FILENAME) -
TI12-security/trunk/MyProxyWebService/myproxy/server/test/test_myproxywsgi_with_paster.py
r6953 r6957 30 30 with bash shell script clients. For POSIX-like systems ONLY 31 31 """ 32 THIS_DIR = path. dirname(__file__)32 THIS_DIR = path.abspath(path.dirname(__file__)) 33 33 CA_DIRNAME = 'ca' 34 34 CA_DIR = path.join(THIS_DIR, CA_DIRNAME) … … 80 80 ) 81 81 82 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, 83 stderr=subprocess.PIPE, 84 env={self.__class__.CA_ENV_VARNAME: 85 self.__class__.CA_DIR}) 82 try: 83 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, 84 stderr=subprocess.PIPE, 85 env={self.__class__.CA_ENV_VARNAME: 86 self.__class__.CA_DIR}) 87 except OSError, e: 88 self.failIf(e.errno == 13, 'Check that the %r script is set with ' 89 'execute permissions' % 90 self.__class__.GET_TRUSTROOTS_SCRIPT_CMD) 91 raise 92 86 93 stdoutdata, stderrdata = proc.communicate() 87 94 self.failIf(len(stderrdata) > 0, "An error message was returned: %s" % … … 108 115 109 116 p1 = subprocess.Popen(["echo", password], stdout=subprocess.PIPE) 110 p2 = subprocess.Popen(cmd, stdin=p1.stdout, stdout=subprocess.PIPE, 111 stderr=subprocess.PIPE, 112 env={self.__class__.CA_ENV_VARNAME: 113 self.__class__.CA_DIR}) 117 try: 118 p2 = subprocess.Popen(cmd, stdin=p1.stdout, stdout=subprocess.PIPE, 119 stderr=subprocess.PIPE, 120 env={self.__class__.CA_ENV_VARNAME: 121 self.__class__.CA_DIR}) 122 except OSError, e: 123 self.failIf(e.errno == 13, 'Check that the %r script is set with ' 124 'execute permissions' % self.__class__.LOGON_SCRIPT_CMD) 125 raise 126 114 127 stdoutdata, stderrdata = p2.communicate() 115 128 self.failIf(len(stderrdata) > 0, "An error message was returned: %s" % -
TI12-security/trunk/MyProxyWebService/myproxy/server/wsgi/middleware.py
r6950 r6957 209 209 return app 210 210 211 def parseConfig(self, prefix=PARAM_PREFIX, myProxyClientPrefix='', 211 def parseConfig(self, 212 prefix=PARAM_PREFIX, 213 myProxyClientPrefix=MYPROXY_CLIENT_PARAM_PREFIX, 212 214 **app_conf): 213 215 """Parse dictionary of configuration items updating the relevant
Note: See TracChangeset
for help on using the changeset viewer.