Changeset e83f2f2 for fedd/federation/skeleton_access.py
- Timestamp:
- Dec 14, 2010 6:58:28 PM (13 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- c092b7f
- Parents:
- 2627eb3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/skeleton_access.py
r2627eb3 re83f2f2 183 183 aid = "%s" % auth_attr 184 184 # Authorization check 185 if not self.auth.check_attribute(fid, auth_attr): 186 raise service_error(service_error.access, "Access denied") 185 access_ok, proof = self.auth.check_attribute(fid, auth_attr, 186 with_proof=True) 187 if not access_ok: 188 raise service_error(service_error.access, "Access denied", 189 proof=proof) 187 190 else: 188 191 # See if this is a replay of an earlier succeeded StartSegment - … … 242 245 'allocID': req['allocID'], 243 246 'allocationLog': "Allocatation complete", 244 'segmentdescription': { 'topdldescription': topo.to_dict() } 247 'segmentdescription': { 'topdldescription': topo.to_dict() }, 248 'proof': proof.to_dict(), 245 249 } 246 250 retval = copy.deepcopy(self.state[aid]['started']) … … 266 270 self.log.debug("Terminate request for %s" %aid) 267 271 # Check authorization 268 if not self.auth.check_attribute(fid, auth_attr): 269 raise service_error(service_error.access, "Access denied") 272 access_ok, proof = self.auth.check_attribute(fid, auth_attr, 273 with_proof=True) 274 if not access_ok: 275 raise service_error(service_error.access, "Access denied", 276 proof=proof) 270 277 271 278 # Authorized: remove the integer from the allocation. A more complex … … 281 288 self.state_lock.release() 282 289 283 return { 'allocID': req['allocID'] }290 return { 'allocID': req['allocID'], 'proof': proof.to_dict() }
Note: See TracChangeset
for help on using the changeset viewer.