allowing other identities to connect
Thomas Uram
turam at mcs.anl.gov
Thu Jan 30 17:21:16 CST 2003
I made this trivial change in VenueServer.py and it works (tested with
Susanne). I committed the change, and started a server at
https://vv2:11006/VenueServer (if that looks like a non-standard port,
that's because it's supposed to).
I'll make this change on the NodeManagement services too.
Tom
Robert Olson wrote:
> The default authorization mode is
> GLOBUS_IO_SECURE_AUTHORIZATION_MODE_SELF, which means to only allow
> connections from processes with the same identity.
>
> You can create an authorization callback on either a Client or a
> Server to allow the application to decide. Returning 1 allows the
> connection to complete, returning 0 makes it fail.
>
> First the client:
>
> import Client
> import os
>
> def cb(server, g_handle, remote_user, context):
> print "got callback for user ", remote_user
> return 1
>
> h = Client.Handle('https://localhost:8000/100', authCallback = cb)
>
> ret = None
>
> try:
> ret = h.get_proxy().method(3)
> except Client.FaultType, f:
> print "call raised fault ", f, dir(f)
> print "faultcode='%s'" % (f.faultcode)
> print "string='%s'" % ( f.faultstring)
>
> else:
> print "Got '%s' '%s' from method" % (ret, map(lambda x: str(x),
> ret))
>
> And the server:
>
>
> [[Other code elided]]
>
> def cb(server, g_handle, remote_user, context):
> print "Server gets identity ", remote_user
> return 1
>
> if __name__ == "__main__":
>
> server = Server.Server(8000, auth_callback = cb)
>
> s = server.create_service(C)
>
> print "Have %s %s" % (s, s.get_handle())
>
>
More information about the ag-dev
mailing list