Index: fedd/federation/access.py
===================================================================
--- fedd/federation/access.py	(revision dceeef9dd47c50af31b092432f9e50ac9a17dfae)
+++ fedd/federation/access.py	(revision 1b376ca6697aa2e3185da5d7db76a157939572a5)
@@ -541,4 +541,8 @@
 	"""
 
+	def gateway_hardware(h):
+	    if h == 'GWTYPE': return self.attrs.get('connectorType', 'GWTYPE')
+	    else: return h
+
 	# The dance to get into the request body
 	if req.has_key('RequestAccessRequestBody'):
@@ -567,8 +571,9 @@
 	    if req.has_key('resources') and req['resources'].has_key('node'):
 		resources = req['resources']
-		restricted = [ t for n in resources['node'] \
+		restricted = [ gateway_hardware(t) for n in resources['node'] \
 				if n.has_key('hardware') \
 				    for t in n['hardware'] \
-					if t in self.restricted ]
+					if gateway_hardware(t) \
+					    in self.restricted ]
 		inaccessible = [ t for t in restricted \
 				    if t not in found[0].node_types]
@@ -611,6 +616,6 @@
 		    if restricted != None and len(restricted) > 0:
 			preq['AllocateProjectRequestBody']['resources'] = \
-			    [ {'node': { 'hardware' :  [ h ] } } \
-				    for h in restricted ]
+			     {'node': [ { 'hardware' :  [ h ] } \
+				    for h in restricted ] } 
 		    ap = self.allocate_project.dynamic_project(preq)
 		else:
@@ -636,6 +641,6 @@
 		    if restricted != None and len(restricted) > 0:
 			preq['StaticProjectRequestBody']['resources'] = \
-			    [ {'node': { 'hardware' :  [ h ] } } \
-				    for h in restricted ]
+			    {'node': [ { 'hardware' :  [ h ] } \
+				    for h in restricted ] } 
 		    ap = self.allocate_project.static_project(preq)
 	    else:
Index: fedd/federation/allocate_project.py
===================================================================
--- fedd/federation/allocate_project.py	(revision dceeef9dd47c50af31b092432f9e50ac9a17dfae)
+++ fedd/federation/allocate_project.py	(revision 1b376ca6697aa2e3185da5d7db76a157939572a5)
@@ -176,7 +176,10 @@
 		dir="/tmp")
 
-	if req.has_key('AllocateProjectRequestBody') and \
-		req['AllocateProjectRequestBody'].has_key('project'):
-	    proj = req['AllocateProjectRequestBody']['project']
+	if req.has_key('AllocateProjectRequestBody'):
+	    proj = req['AllocateProjectRequestBody'].get('project', None)
+	    if not proj:
+		raise service_error(service_error.req, 
+			"Badly formed allocation request")
+	    resources = req['AllocateProjectRequestBody'].get('resources', { })
 	else:
 	    raise service_error(service_error.req, 
@@ -279,9 +282,13 @@
 		]
 
-	# Add commands to grant access to any resources in the request.
-	for nt in [ h for r in req.get('resources', []) \
-		if r.has_key('node') and r['node'].has_key('hardware')\
-		    for h in r['node']['hardware'] ] :
-	    cmds.append((self.wap, self.grantnodetype, '-p', name, nt))
+	# Add commands to grant access to any resources in the request.  The
+	# list comprehension pulls out the hardware types in the node entries
+	# in the resources list.
+	if resources.has_key('node'):
+	    for nt in [ h for n in resources['node']\
+		    if n.has_key('hardware') for h in n['hardware'] ] :
+		if self.allocation_level >= self.confirm_keys:
+		    cmds.append((self.wap, self.grantnodetype, '-p', pname, nt))
+
 
 	# Create the projects
@@ -344,5 +351,5 @@
 	    pname = req['StaticProjectRequestBody']['project']\
 		    ['name']['localname']
-	    resources = req['StaticProjectRequestBody'].get('resources', [])
+	    resources = req['StaticProjectRequestBody'].get('resources', { })
 	except KeyError:
 	    raise service_error(service_error.req, "Badly formed request")
@@ -370,9 +377,9 @@
 	# list comprehension pulls out the hardware types in the node entries
 	# in the resources list.
-	for nt in [ h for r in resources \
-		if r.has_key('node') and r['node'].has_key('hardware')\
-		    for h in r['node']['hardware'] ] :
-	    if self.allocation_level >= self.confirm_keys:
-		cmds.append((self.wap, self.grantnodetype, '-p', pname, nt))
+	if resources.has_key('node'):
+	    for nt in [ h for n in resources['node']\
+		    if n.has_key('hardware') for h in n['hardware'] ] :
+		if self.allocation_level >= self.confirm_keys:
+		    cmds.append((self.wap, self.grantnodetype, '-p', pname, nt))
 
 	# Run the commands 
