SOAPpy Mods

Ivan R. Judson judson at mcs.anl.gov
Thu Jan 8 16:20:14 CST 2004


Hi Greg,

Sorry this took so long. I've attached one final patch that passes
"method":nsmethod along with "_SOAPContext":c in the invocation. This makes
the authorization stuff I put in place complete (minor oversight, I thought
the method was in the context in a clearer way than it is).

The documentation I've written is below, feel free to edit, or delete parts
as you see fit. You can even ask for me to rewrite unclear portions :-)

--

Extensions have been added to the SOAPpy module to allow the use of the
Globus Toolkit v2 for secure transport of SOAP calls. These extensions are
possible by using the Globus Toolkit (http://www.globus.org) and the
pyGlobus software (http://www-itg.lbl.gov/gtg/projects/pyGlobus/), which
exposes the Globus Toolkit via a set of Python interfaces. This enables
bi-directional PKI authentication so that the server and client are both
guaranteed of the identity of the other. Using PKI this way also allows a
more robust authorization solution above the SOAP hosting layer, which
provides better application level authorization control. These tools are
used by the Access Grid Project (http://www.accessgrid.org) to build a
Grid-based, Web Services based, real-time collaboration environment.

In order to use the SOAPpy module with the Globus Toolkit, you must first
obtain and install the Globus Toolkit and pyGlobus software. Information on
how to do that is at the respective web sites listed below. In order to use
the Globus Toolkit it is necessary to have an x509 identity certificate.
Information on how to obtain one of those is available on the web as well. 

To use GSI with an authorization method, set the SOAPConfig.authMethod =
"methodname". You must have this method defined on any objects you register
with SOAPpy, and/or as a registered method. It should return 0 or 1 to
indicate if authorization is allowed or not.

Once the software is installed, you have obtained your certificate, and the
SOAPpy module is installed, the following code shows how to run a GSI
secured SOAP server (These snippets are directly from the echoServer.py and
echoClient.py in the test directory).

For a server:
==============

def _authorize(self, *args, **kw):
    return 1

Config.authMethod = "_authorize"

addr = ('localhost', 9900)
from SOAPpy.GSIServer import GSISOAPServer
server = GSISOAPServer(addr)

server.registerFunction(_authorize)
server.registerFunction(echo)

Then you use the server like the SSL server or the standard server.

For a client:
=============
import pyGlobus

Config.channel_mode = 1
Config.delegation_mode = 1

# The httpg distinguishes this as a GSI TCP connection, so after this you
can use the 
# SOAP proxy as you would any other SOAP Proxy.

server = SOAPProxy("httpg://localhost:9900/")
print server.echo("moo")

Globus Toolkit http://www.globus.org
------------------------------------
The Globus Toolkit is an open source software toolkit used for building
grids. It is being developed by the Globus Alliance and many others all over
the world. A growing number of projects and companies are using the Globus
Toolkit to unlock the potential of grids for their cause. 

PyGlobus http://www-itg.lbl.gov/gtg/projects/pyGlobus/
------------------------------------------------------
The goal of this project is to allow the use of the entire Globus toolkit
from Python, a high-level scripting language. SWIG is used to generate the
necessary interface code. Currently a substantial subset of the 2.2.4 and
2.4 versions of the Globus toolkit has been wrapped. 

The Access Grid http://www.accessgrid.org/
------------------------------------------
The Access GridT is an ensemble of resources including multimedia
large-format displays, presentation and interactive environments, and
interfaces to Grid middleware and to visualization environments. These
resources are used to support 
group-to-group interactions across the Grid. For example, the Access Grid
(AG) is used for large-scale distributed meetings, 
collaborative work sessions, seminars, lectures, tutorials, and training.
The Access Grid thus differs from desktop-to-desktop tools that focus on
individual communication.
 
--

To address your aside, this code enables the use of GT2 (via pyGlobus) which
is a pre-GT3 set of Grid Computing libraries. Since GT3 is still pretty far
off, in terms of unchanging, stable, development environment we're using GT2
to build upon, with mostly standard web services on top. I say mostly
because globus doesn't use stock SSL, it's a SSL derivative -- GSI. So it's
a minor bump, but all the same web services stuff is happening on top. When
GT3 becomes stable enough for us to use (those developers are at the other
end of my hall, btw) we'll make a transition to GT3. Until then we're
keeping the stable infrastructure so we don't driver users away any faster
than we are :-).

Thanks,

--Ivan 

> -----Original Message-----
> From: Warnes, Gregory R [mailto:gregory_r_warnes at groton.pfizer.com] 
> Sent: Friday, December 19, 2003 2:55 PM
> To: 'judson at mcs.anl.gov'
> Subject: RE: SOAPpy Mods
> 
> Ok. These changes are all in.   Can you provide some documentation
> describing briefly what Globus is, and how to use the Globus 
> support that you've added.  It doesn't need to be very long.
> 
> As an aside, how does this relate to GTK3 == Globus Toolkit 
> 3, which provides--I'm told--an implementation-agnostic API 
> for interacting with Grid computing tools.
> 
> -G
> 
> > -----Original Message-----
> > From: Ivan R. Judson [mailto:judson at mcs.anl.gov]
> > Sent: Friday, December 19, 2003 11:32 AM
> > To: 'Warnes, Gregory R'
> > Subject: RE: SOAPpy Mods
> > 
> > 
> > 
> > Here it is as a file too.
> > 
> > --Ivan
> > 
> > > -----Original Message-----
> > > From: Warnes, Gregory R 
> [mailto:gregory_r_warnes at groton.pfizer.com]
> > > Sent: Friday, December 19, 2003 10:04 AM
> > > To: 'judson at mcs.anl.gov'
> > > Subject: RE: SOAPpy Mods
> > > 
> > > 
> > > If you don't mind, please send a -u diff.  To make this 
> the default 
> > > format, add the line
> > > 
> > > 	diff -u
> > > 
> > > to ~/.cvsrc
> > > 
> > > -G
> > > 
> > > > -----Original Message-----
> > > > From: Ivan R. Judson [mailto:judson at mcs.anl.gov]
> > > > Sent: Friday, December 19, 2003 10:47 AM
> > > > To: 'Warnes, Gregory R'
> > > > Subject: RE: SOAPpy Mods
> > > > 
> > > > 
> > > > 
> > > > Yep;
> > > > 
> > > > C:\software\SOAPpy-latest>cvs diff ? build ? 
> SOAPpy/Client.pyc ? 
> > > > SOAPpy/Config.pyc ? SOAPpy/Errors.pyc ? SOAPpy/GSIServer.pyc ? 
> > > > SOAPpy/NS.pyc ? SOAPpy/Parser.pyc ? SOAPpy/SOAPBuilder.pyc ? 
> > > > SOAPpy/Server.pyc ? SOAPpy/Types.pyc ? SOAPpy/Utilities.pyc ? 
> > > > SOAPpy/WSDL.pyc ? SOAPpy/__init__.pyc ? SOAPpy/version.pyc cvs 
> > > > server: Diffing .
> > > > cvs server: Diffing SOAPpy
> > > > cvs server: Diffing SOAPpy/wstools cvs server: Diffing 
> > > > SOAPpy/wstools/test cvs server: Diffing bid cvs server: Diffing 
> > > > contrib cvs server: Diffing docs cvs server: Diffing tests
> > > > Index: tests/echoClient.py
> > > > 
> > ===================================================================
> > > > RCS file: /cvsroot/pywebsvcs/SOAPpy/tests/echoClient.py,v
> > > > retrieving revision 1.6
> > > > diff -r1.6 echoClient.py
> > > > 19a20,23
> > > > > # For GSI stuff
> > > > > Config.channel_mode = 1
> > > > > Config.delegation_mode = 1
> > > > >
> > > > 21a26
> > > > >     server = SOAPProxy("https://localhost:9900")
> > > > 25d29
> > > > <     server = SOAPProxy("https://localhost:9900")
> > > > Index: tests/echoServer.py
> > > > 
> > ===================================================================
> > > > RCS file: /cvsroot/pywebsvcs/SOAPpy/tests/echoServer.py,v
> > > > retrieving revision 1.6
> > > > diff -r1.6 echoServer.py
> > > > 115a116
> > > > >     from SOAPpy.GSIServer import GSISOAPServer
> > > > cvs server: Diffing tools
> > > > cvs server: Diffing validate
> > > > cvs server: Diffing zope
> > > > 
> > > > --Ivan
> > > > 
> > > > ...... . .  .   .    .     .      .       .      .     .    
> > > .   .  . .
> > > > ......
> > > > Ivan R. Judson	                             
> > > > http://www.mcs.anl.gov/~judson
> > > > The Futures Laboratory		                    
> > > > Argonne National
> > > > Laboratory
> > > > 
> > > > 
> > > > > -----Original Message-----
> > > > > From: Warnes, Gregory R
> > > [mailto:gregory_r_warnes at groton.pfizer.com]
> > > > > Sent: Friday, December 19, 2003 9:25 AM
> > > > > To: 'judson at mcs.anl.gov'
> > > > > Subject: RE: SOAPpy Mods
> > > > > 
> > > > > 
> > > > > Could you send a diff?
> > > > > 
> > > > > -G
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Ivan R. Judson [mailto:judson at mcs.anl.gov]
> > > > > > Sent: Friday, December 19, 2003 10:09 AM
> > > > > > To: 'Warnes, Gregory R'
> > > > > > Subject: RE: SOAPpy Mods
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > I've tested the cvs stuff and the only things I need to fix
> > > > > were the
> > > > > > following in the echo test files:
> > > > > > 
> > > > > > echoClient.py
> > > > > > 
> > > > > > 1. Added this at the top, without it the client
> > breaks with the
> > > > > > following error (when you run it with -g):
> > > > > > 
> > > > > > > # For GSI stuff
> > > > > > > Config.channel_mode = 1
> > > > > > > Config.delegation_mode = 1
> > > > > > 
> > > > > > Error if this isn't present:
> > > > > > C:\software\SOAPpy-latest\tests>echoClient.py -g
> > > Traceback (most
> > > > > > recent call last):
> > > > > >   File "C:\software\SOAPpy-latest\tests\echoClient.py",
> > > > > line 34, in ?
> > > > > >     print server.echo_ino("moo")
> > > > > >   File "SOAPpy\Client.py", line 392, in __call__
> > > > > >   File "SOAPpy\Client.py", line 414, in __r_call
> > > > > >   File "SOAPpy\Client.py", line 324, in __call
> > > > > >   File "SOAPpy\Client.py", line 157, in call
> > > > > > UnboundLocalError: local variable 'GSIHTTP' 
> referenced before 
> > > > > > assignment
> > > > > > 
> > > > > > 2. Moved the line server =
> > > > > > SOAPProxy("https://localhost:9900") from the -g 
> block to the 
> > > > > > -s block.
> > > > > > 
> > > > > > echoServer.py
> > > > > > 
> > > > > > 1. Added the following line to the if -g block:
> > > > > > >     from SOAPpy.GSIServer import GSISOAPServer
> > > > > > So there is a GSISOAPServer to instantiate :-).
> > > > > > 
> > > > > > Looks great! Thanks for putting this stuff in the repo.
> > > > > > 
> > > > > > --Ivan
> > > > > > > -----Original Message-----
> > > > > > > From: Warnes, Gregory R
> > > > > [mailto:gregory_r_warnes at groton.pfizer.com]
> > > > > > > Sent: Thursday, December 18, 2003 4:44 PM
> > > > > > > To: 'judson at mcs.anl.gov'
> > > > > > > Subject: RE: SOAPpy Mods
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > Everything should now be in CVS.  Take it for a spin
> > > and let me
> > > > > > > know what happens.
> > > > > > > 
> > > > > > > FWIW, I've moved the GSIServer stuff into a separate
> > > module. To
> > > > > > > load it you need to do:
> > > > > > > 
> > > > > > > 	from SOAPpy import GSIServer
> > > > > > > 
> > > > > > > I would like to move the GSI client stuff into a
> > > separate module
> > > > > > > as well, so that users who aren't interested in
> > > Globus support
> > > > > > > don't need to see the warning message.
> > > > > > > 
> > > > > > > -G
> > > > > > > 
> > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Ivan R. Judson [mailto:judson at mcs.anl.gov]
> > > > > > > > Sent: Thursday, December 18, 2003 11:50 AM
> > > > > > > > To: 'Warnes, Gregory R'
> > > > > > > > Subject: RE: SOAPpy Mods
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > No problem, thanks for working from home :-)
> > > > > > > > 
> > > > > > > > --Ivan
> > > > > > > > 
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Warnes, Gregory R
> > > > > > > [mailto:gregory_r_warnes at groton.pfizer.com]
> > > > > > > > > Sent: Thursday, December 18, 2003 10:46 AM
> > > > > > > > > To: 'judson at mcs.anl.gov'
> > > > > > > > > Subject: RE: SOAPpy Mods
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > Yes, I see that you are right.  I did a bunch of work
> > > > > last night
> > > > > > > > > at home, and apparently I forgot to checkin some
> > > > > changes that I
> > > > > > > > > made during the day, so my copies were out of sync.
> > > >  I'll be
> > > > > > > > > making an update shortly that includes
> > > > > > > your changes.
> > > > > > > > > 
> > > > > > > > > -G
> > > > > > > > > 
> > > > > > > > > > -----Original Message-----
> > > > > > > > > > From: Ivan R. Judson [mailto:judson at mcs.anl.gov]
> > > > > > > > > > Sent: Thursday, December 18, 2003 11:39 AM
> > > > > > > > > > To: 'Warnes, Gregory R'
> > > > > > > > > > Subject: RE: SOAPpy Mods
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > Hey Greg,
> > > > > > > > > > 
> > > > > > > > > > I grabbed the latest, but the GSI (httpg) stuff
> > > looks like
> > > > > > > > > it's not in
> > > > > > > > > > there. That and the authorization stuff is what I'm
> > > > > > > using. Let me
> > > > > > > > > > know what/if there's something I can do to help.
> > > > > > > > > > 
> > > > > > > > > > --Ivan
> > > > > > > > > > 
> > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > From: Warnes, Gregory R
> > > > > > > > > [mailto:gregory_r_warnes at groton.pfizer.com]
> > > > > > > > > > > Sent: Thursday, December 18, 2003 10:05 AM
> > > > > > > > > > > To: 'judson at mcs.anl.gov'
> > > > > > > > > > > Subject: RE: SOAPpy Mods
> > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > Hi Ivan,
> > > > > > > > > > > 
> > > > > > > > > > > Some of the checkins included your patches, but I
> > > > > > > forgot to note
> > > > > > > > > > > this in the
> > > > > > > > > > > CVS log messages.   Would you mind checking out 
> > > > > the latest
> > > > > > > > > > > version from CVS
> > > > > > > > > > > and testing whether this works for you?
> > > > > > > > > > > 
> > > > > > > > > > > -G
> > > > > > > > > > > 
> > > > > > > > > > > > -----Original Message-----
> > > > > > > > > > > > From: Ivan R. Judson [mailto:judson at mcs.anl.gov]
> > > > > > > > > > > > Sent: Thursday, December 18, 2003 7:15 AM
> > > > > > > > > > > > To: warnes at users.sourceforge.net
> > > > > > > > > > > > Subject: SOAPpy Mods
> > > > > > > > > > > > 
> > > > > > > > > > > > 
> > > > > > > > > > > > 
> > > > > > > > > > > > Hey Greg,
> > > > > > > > > > > > 
> > > > > > > > > > > > Instead of spamming the list I was wondering if
> > > > > you could
> > > > > > > > > > > give me your
> > > > > > > > > > > > impressions and thoughts on the mods I
> > submitted to
> > > > > > > > SOAPpy. I'm
> > > > > > > > > > > > guessing from the CVS checkins last night
> > > > you're on the
> > > > > > > > > brink of a
> > > > > > > > > > > > release. I'm just
> > > > > > > > > > > > wondering (for my software roadmap
> > > planning) if I need
> > > > > > > > > to plan on
> > > > > > > > > > > > maintaining a separate version of SOAPpy for
> > > > awhile (or
> > > > > > > > > > forever :-).
> > > > > > > > > > > > 
> > > > > > > > > > > > Thanks, keep up the good work.
> > > > > > > > > > > > 
> > > > > > > > > > > > --Ivan
> > > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > LEGAL NOTICE
> > > > > > > > > > > Unless expressly stated otherwise, this message is
> > > > > > > confidential
> > > > > > > > > > > and may be privileged. It is intended for the
> > > > > > > > > > > addressee(s) only. Access to this E-mail by
> > > > > anyone else is
> > > > > > > > > > > unauthorized. If you are not an addressee, any
> > > > > > disclosure or
> > > > > > > > > > > copying of the contents of this E-mail or any
> > > > action taken
> > > > > > > > > > > (or not taken) in reliance on it is unauthorized
> > > > > and may be
> > > > > > > > > > > unlawful. If you are not an addressee, please
> > > > inform the
> > > > > > > > > > > sender immediately.
> > > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SOAPpy-diff.out
Type: application/octet-stream
Size: 784 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/ag-dev/attachments/20040108/841ed3ef/attachment.obj>


More information about the ag-dev mailing list