- Timestamp:
- Nov 30, 2010 10:25:47 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 78f2668
- Parents:
- 725c55d
- Location:
- fedd/federation
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/access.py
r725c55d r027b87b 16 16 from util import * 17 17 from allocate_project import allocate_project_local, allocate_project_remote 18 from access_project import access_project19 18 from fedid import fedid, generate_fedid 20 19 from authorizer import authorizer -
fedd/federation/deter_internal_access.py
r725c55d r027b87b 14 14 from util import * 15 15 from allocate_project import allocate_project_local, allocate_project_remote 16 from access_project import access_project17 16 from fedid import fedid, generate_fedid 18 17 from authorizer import authorizer -
fedd/federation/dragon_access.py
r725c55d r027b87b 15 15 from util import * 16 16 from allocate_project import allocate_project_local, allocate_project_remote 17 from access_project import access_project18 17 from fedid import fedid, generate_fedid 19 18 from authorizer import authorizer -
fedd/federation/emulab_access.py
r725c55d r027b87b 19 19 from util import * 20 20 from allocate_project import allocate_project_local, allocate_project_remote 21 from access_project import access_project22 21 from fedid import fedid, generate_fedid 23 22 from authorizer import authorizer, abac_authorizer … … 208 207 def make_access_project(str): 209 208 """ 210 Convert a string of the form (id[:resources:resouces], id, id) into an 211 access_project. This is called by read_access to convert to local 212 attributes. It returns a tuple of the form (project, user, user) where 213 users may be names or fedids. 209 Convert a string of the form (id[:resources:resouces], id, id) into a 210 tuple of the form (project, user, user) where users may be names or 211 fedids. The resources strings are obsolete and ignored. 214 212 """ 215 213 def parse_name(n): … … 227 225 del first[0] 228 226 first[0] = fedid(hexstr=first[0]) 229 names[0] = access_project(first[0], first[1:])227 names[0] = first[0] 230 228 231 229 for i in range(1,2): … … 249 247 # The slice takes the parens off the string. 250 248 proj, user = str[1:-1].split(',') 251 return (access_project(proj.strip(), []), 252 user.strip(), user.strip()) 249 return (proj.strip(), user.strip(), user.strip()) 253 250 else: 254 251 raise self.parse_error( … … 270 267 """ 271 268 # Return values 272 rp = access_project(None, ())269 rp = None 273 270 ru = None 274 271 # This maps a valid user to the Emulab projects and users to use … … 285 282 dyn_service_user = False 286 283 287 if found[0] .name== "<same>":284 if found[0] == "<same>": 288 285 if project != None: 289 rp .name= project286 rp = project 290 287 else : 291 288 raise service_error(\ 292 289 service_error.server_config, 293 290 "Project matched <same> when no project given") 294 elif found[0] .name== "<dynamic>":295 rp .name= None291 elif found[0] == "<dynamic>": 292 rp = None 296 293 dyn_proj = True 297 294 else: 298 rp.name = found[0].name 299 rp.node_types = found[0].node_types; 295 rp = found[0] 300 296 301 297 if found[1] == "<same>": … … 503 499 ap = None 504 500 505 print "%s %s %s" % (found, dyn, owners)506 507 501 # if this includes a project export request and the exported 508 502 # project is not the access project, access denied. 509 503 if 'service' in req: 510 504 ep = get_export_project(req['service']) 511 if ep and ep != found[0] .name:505 if ep and ep != found[0]: 512 506 raise service_error(service_error.access, 513 507 "Cannot export %s" % ep) 514 508 515 509 if self.ssh_pubkey_file: 516 ap = self.do_project_allocation(dyn[1], found[0] .name, found[1])510 ap = self.do_project_allocation(dyn[1], found[0], found[1]) 517 511 else: 518 512 raise service_error(service_error.internal, -
fedd/federation/protogeni_access.py
r725c55d r027b87b 17 17 18 18 from util import * 19 from access_project import access_project20 19 from fedid import fedid, generate_fedid 21 20 from authorizer import authorizer
Note: See TracChangeset
for help on using the changeset viewer.