source: TI12-security/trunk/python/ndg.security.server/ndg/security/server/SessionMgr/server-config.tac @ 1743

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.server/ndg/security/server/SessionMgr/server-config.tac@1743
Revision 1743, 2.1 KB checked in by pjkersha, 13 years ago (diff)

server/AttAuthority/AttAuthorityServer.py: Don't need ZSI.ServiceContainer? based code - using Twisted instead.
server/SessionMgr/server-config.tac, server/SessionMgr/start-container.sh, server/SessionMgr/README,
www/html/sessionMgr.wsdl: started port of Session Manager to doc/lit style WSDL, ZSI 2.0 and Twisted.
www/html/attAuthority.wsdl: fixed typo - ref to 'SimpleCA'.

Line 
1#!/usr/bin/env python
2"""NDG Security Attribute Authority .tac file
3
4This file enables the Attribute Authority web service to be
5called under the Twisted framework
6
7NERC Data Grid Project
8
9P J Kershaw 17/11/06
10
11Copyright (C) 2006 CCLRC & NERC
12
13This software may be distributed under the terms of the Q Public License,
14version 1.0 or later.
15"""
16import socket
17
18from ZSI.twisted.WSresource import WSResource
19from twisted.application import service, internet
20from twisted.web.server import Site
21from twisted.web.resource import Resource
22
23from AttAuthority_services_server import AttAuthorityService
24import AttAuthority
25
26class AttAuthorityServiceSub(AttAuthorityService, WSResource):
27     def __init__(self):
28         WSResource.__init__(self)
29         
30         # Initialize Attribute Authority class
31         self.__aa = AttAuthority()
32
33     def soap_getAttCert(self, ps, **kw):
34         #import pdb;pdb.set_trace()
35         request, response = AttAuthorityService.soap_getAttCert(self, ps)
36         response.set_element_attCert('ATTRIBUTE CERT')
37         return request, response
38
39     def soap_getHostInfo(self, ps, **kw):
40         import pdb;pdb.set_trace()
41         request, response = AttAuthorityService.soap_getHostInfo(self, ps)
42         response.set_element_hostInfo('HOST INFO')
43         return request, response
44
45     def soap_getTrustedHostInfo(self, ps, **kw):
46         #import pdb;pdb.set_trace()
47         request, response = \
48                AttAuthorityService.soap_getTrustedHostInfo(self, ps)
49         response.set_element_trustedHosts('TRUSTED HOST INFO')
50         return request, response
51
52     def soap_getPubKey(self, ps, **kw):
53         #import pdb;pdb.set_trace()
54         request, response = AttAuthorityService.soap_getPubKey(self, ps)
55         response.set_element_x509Cert('X.509 Cert.')
56         return request, response
57
58portNum = 5700
59hostname = socket.gethostname()
60
61root = Resource()
62root.putChild('AttributeAuthority', AttAuthorityServiceSub())
63siteFactory = Site(root)
64application = service.Application("WSRF-Container")
65port = internet.TCPServer(portNum, siteFactory)#, interface=hostname)
66port.setServiceParent(application)
Note: See TracBrowser for help on using the repository browser.