Index: fedd/federation/experiment_control.py
===================================================================
--- fedd/federation/experiment_control.py	(revision a3ad8bda151c4074b1e9fa5731eea8514bf0c1c2)
+++ fedd/federation/experiment_control.py	(revision 7183b4857e2e1b0aef8a31982a96d8195a84083f)
@@ -219,4 +219,6 @@
 
 	self.repodir = config.get("experiment_control", "repodir")
+	self.repo_url = config.get("experiment_control", "repo_url", 
+		"https://users.isi.deterlab.net:23235");
 
         self.exp_stem = "fed-stem"
@@ -987,5 +989,5 @@
     
 
-    def allocate_resources(self, allocated, master, eid, expid, expcert, 
+    def allocate_resources(self, allocated, master, eid, expid, 
             tbparams, topo, tmpdir, alloc_log=None, log_collector=None, 
 	    attrs=None):
@@ -1843,6 +1845,6 @@
 	    # XXX
 	    softmap[pkg] = \
-		    "https://users.isi.deterlab.net:23235/%s/%s" %\
-		    ( path, dest)
+		    "%s/%s/%s" %\
+		    ( self.repo_url, path, dest)
 
 	    # Allow the individual segments to access the software.
@@ -1884,5 +1886,5 @@
             raise service_error(service_error.internal,
                     "Access map and authorizer out of sync in " + \
-                            "create_experiment for fedid %s"  % fid)
+                            "new_experiment for fedid %s"  % fid)
 
         pid = "dummy"
@@ -1937,6 +1939,27 @@
         to instantiate them and start it all up.
         """
-        if not self.auth.check_attribute(fid, 'create'):
-            raise service_error(service_error.access, "Create access denied")
+
+        req = req.get('CreateRequestBody', None)
+        if not req:
+            raise service_error(service_error.req,
+                    "Bad request format (no CreateRequestBody)")
+
+        # Get the experiment access
+        exp = req.get('experimentID', None)
+        if exp:
+            if exp.has_key('fedid'):
+                key = exp['fedid']
+		expid = key
+		eid = None
+            elif exp.has_key('localname'):
+                key = exp['localname']
+		eid = key
+		expid = None
+            else:
+                raise service_error(service_error.req, "Unknown lookup type")
+        else:
+            raise service_error(service_error.req, "No request?")
+
+        self.check_experiment_access(fid, key)
 
         try:
@@ -1962,8 +1985,4 @@
         gid = "dummy"
 
-        req = req.get('CreateRequestBody', None)
-        if not req:
-            raise service_error(service_error.req,
-                    "Bad request format (no CreateRequestBody)")
         # The tcl parser needs to read a file so put the content into that file
         descr=req.get('experimentdescription', None)
@@ -1984,10 +2003,17 @@
             raise service_error(service_error.req, "No experiment description")
 
-        # Generate an ID for the experiment (slice) and a certificate that the
-        # allocator can use to prove they own it.  We'll ship it back through
-        # the encrypted connection.
-        (expid, expcert) = generate_fedid("test", dir=tmpdir, log=self.log)
-
-	eid = self.create_experiment_state(fid, req, expid, expcert)
+	self.state_lock.acquire()
+	if self.state.has_key(key):
+	    for e in self.state[key].get('experimentID',[]):
+		if not expid and e.has_key('fedid'):
+		    expid = e['fedid']
+		elif not eid and e.has_key('localname'):
+		    eid = e['localname']
+	self.state_lock.release()
+
+	if not (eid and expid):
+	    raise service_error(service_error.internal, 
+		    "Cannot find local experiment info!?")
+
         try: 
             # This catches exceptions to clear the placeholder if necessary
@@ -2161,21 +2187,19 @@
         alloc_log.addHandler(h)
         
-	# XXX
-	url_base = 'https://users.isi.deterlab.net:23235'
 	attrs = [ 
 		{
 		    'attribute': 'ssh_pubkey', 
 		    'value': '%s/%s/config/%s' % \
-			    (url_base, expid, gw_pubkey_base)
+			    (self.repo_url, expid, gw_pubkey_base)
 		},
 		{
 		    'attribute': 'ssh_secretkey', 
 		    'value': '%s/%s/config/%s' % \
-			    (url_base, expid, gw_secretkey_base)
+			    (self.repo_url, expid, gw_secretkey_base)
 		},
 		{
 		    'attribute': 'hosts', 
 		    'value': '%s/%s/config/hosts' % \
-			    (url_base, expid)
+			    (self.repo_url, expid)
 		},
 		{
@@ -2187,5 +2211,5 @@
         # Start a thread to do the resource allocation
         t  = Thread(target=self.allocate_resources,
-                args=(allocated, master, eid, expid, expcert, tbparams, 
+                args=(allocated, master, eid, expid, tbparams, 
                     topo, tmpdir, alloc_log, alloc_collector, attrs),
                 name=eid)
@@ -2197,5 +2221,4 @@
                 ],
                 'experimentStatus': 'starting',
-                'experimentAccess': { 'X509' : expcert }
             }
 
@@ -2250,4 +2273,5 @@
 
     def get_handler(self, path, fid):
+	self.log.info("Get handler %s %s" % (path, fid))
 	if self.auth.check_attribute(fid, path):
 	    return ("%s/%s" % (self.repodir, path), "application/binary")
