[Freeipa-devel] kerberos auth issue

Kevin McCarthy kmccarth at redhat.com
Fri Aug 3 16:04:50 UTC 2007


Rob Crittenden wrote:
> Part of the problem I'm having is that rpcclient.py does a bit of data 
> massaging. We can move some of this to the server side, it probably belonds 
> there anyway (such as including extra attributes when adding a user). This 
> move will be done later.
>
> But with other stuff some data conversion happens and that has to be in the 
> client.


> As a test I copied rpcclient.py to webclient.py and updated my basic TG gui 
> to use webclient.py instead. All I did was replace the server. calls with 
> funcs. calls (effectively skipping the XML-RPC call). The one call I tested 
> worked with no changes to the GUI code except changing the API names.
>
> So. I think that if we expand on this idea we can still have a more-or-less 
> unified client API, but one goes through XML-RPC and one doesn't. The trick 
> will be telling which is which. This is where I'm getting hung up.
>
> So simply copying rpcclient.py to webclient.py is obviously wrong, code 
> duplication up the wazoo.

It sounds like you want two layers on the client


Client  ->  ipaclient.get_user()    ->  funcs.get_user()
            [does data massage]            - or -
                                        xmlrpc.get_user()

but you don't want to advertise that there's a local transport.  Since
we're open source, I don't think there will be too much confusion if we
comment properly.

Ideally I'd like an optional argument to the ipaclient constructor that
enables the local client (it defaults to xmlrpc)

class IPAClient:

  def __init__(local = false):
    if local:
      self.transport = funcs()
    else:
      self.transport = xmlrpc()

  def get_user(uid):
    result = self.transport.get_user(uid)
    [ data massage]
    return

  def add_user(user):
    [ data massage]
    result = self.transport.add_user(user)


Maybe this was exactly what you were saying in your email though.  :-)

-Kevin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20070803/ee4091ce/attachment.bin>


More information about the Freeipa-devel mailing list