extras-buildsys/client buildclient.py,1.6,1.7

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Tue Jun 14 01:16:31 UTC 2005


Author: dcbw

Update of /cvs/fedora/extras-buildsys/client
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21732/client

Modified Files:
	buildclient.py 
Log Message:
2005-06-13  Dan Williams <dcbw at redhat.com>

    * client/buildclient.py
      common/FileDownloader.py
      common/HTTPSURLopener.py
      common/SSLCommon.py
      common/SSLXMLRPCServerProxy.py
      common/SimpleHTTPSServer.py
      common/SimpleSSLXMLRPCServer.py
      server/client_manager.py
        - Clean up cert handling by stuffing cert file paths into a dict

    * common/SSLCommon.py
        - QuietSSLServer: new class to quiet certain SSL errors we don't care about

    * common/SimpleSSLXMLRPCServer.py
        - Add an authorization framework.  The actual request gets authorized
            in SimpleSSLXMLRPCServer, but since we need to pass the authorization
            object back up to the Instance class, we need to override a bunch
            of functions in superclasses just to pass the object through.  Subclasses
            of SimpleSSLXMLRPCServer don't need to use authorization, they just don't
            set an auth callback.  If authorization is in use, the subclass is asked
            to authorize the connection, and passes back an arbitrary authorization
            object, which gets passed to each Handler method.

    * server/buildmaster.py
      server/buildserver.py
        - Change buildmaster_db -> jobdb

    * server/buildserver.py
        - XMLRPCBuildMaster -> UserInterface
        - Attach authorization to all public XMLRPC methods
        - VerifiableSSLXMLRPCServer: new class to handle request authorization
        - Add "guest" user support.  If the user's cert checks out but they are not
            in the user database, they have read-only permission to the server

    * server/User.py
        - New User object: encapsulates all permissions that a user might
            have.
        - New UserAuthentication object: looks up user authentication info in
            a user database and creates User objects

    * utils/user-manager.py
        - Local user administration tool

    * utils/package-builder.py
        - New CLI front-end to the build system that support XMLRPC over SSL

    * utils/certs/fedora-upload-ca.cert
        - Fedora CVS Upload CA certificate, required to validate users




Index: buildclient.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/client/buildclient.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- buildclient.py	12 Jun 2005 08:23:37 -0000	1.6
+++ buildclient.py	14 Jun 2005 01:16:29 -0000	1.7
@@ -43,9 +43,11 @@
     print stuff
 
 g_our_hostname = None
-client_cert = CONFIG.get('client_cert')
-client_key = CONFIG.get('client_key')
-ca_cert = CONFIG.get('ca_cert')
+certs = {}
+certs['cert'] = CONFIG.get('client_cert')
+certs['key'] = CONFIG.get('client_key')
+certs['ca_cert'] = CONFIG.get('ca_cert')
+certs['peer_ca_cert'] = CONFIG.get('ca_cert')
 
 
 def get_url_for_file(file_path):
@@ -94,7 +96,7 @@
         self._status = 'downloading'
         target_dir = os.path.dirname(self._srpm_path)
         dl_thread = FileDownloader.FileDownloader(self.dl_callback, self._srpm_url, self._srpm_url,
-                        target_dir, ['.src.rpm'], client_cert, client_key, ca_cert)
+                        target_dir, ['.src.rpm'], certs)
         dl_thread.start()
 
     def dl_callback(self, status, cb_data):
@@ -351,15 +353,14 @@
 
     print "Binding to address '%s' with arches: [%s]" % (g_our_hostname, string.join(localarches))
 
-    xmlserver = SimpleSSLXMLRPCServer.SimpleSSLXMLRPCServer(client_cert, client_key,
-            ca_cert, (g_our_hostname, 8888))
+    xmlserver = SimpleSSLXMLRPCServer.SimpleSSLXMLRPCServer(certs, (g_our_hostname, 8888))
     bcs = XMLRPCBuildClientServer(localarches)
     xmlserver.register_instance(bcs)
 
     # Start up the HTTP server thread which the build server
     # pulls completed RPMs from
-    http_server = SimpleHTTPSServer.SimpleHTTPSServer(client_cert, client_key, ca_cert,
-            (g_our_hostname, 8889), CONFIG.get('client_work_dir'))
+    work_dir = CONFIG.get('client_work_dir')
+    http_server = SimpleHTTPSServer.SimpleHTTPSServer(certs, (g_our_hostname, 8889), work_dir)
     http_server.start()
 
     last_time = time.time()




More information about the fedora-extras-commits mailing list