Ignore:
Timestamp:
Dec 14, 2010 6:58:28 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
c092b7f
Parents:
2627eb3
Message:

Move proofs around. Lots of changes, including fault handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/skeleton_access.py

    r2627eb3 re83f2f2  
    183183        aid = "%s" % auth_attr
    184184        # 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)
    187190        else:
    188191            # See if this is a replay of an earlier succeeded StartSegment -
     
    242245                'allocID': req['allocID'],
    243246                'allocationLog': "Allocatation complete",
    244                 'segmentdescription': { 'topdldescription': topo.to_dict() }
     247                'segmentdescription': { 'topdldescription': topo.to_dict() },
     248                'proof': proof.to_dict(),
    245249                }
    246250        retval = copy.deepcopy(self.state[aid]['started'])
     
    266270        self.log.debug("Terminate request for %s" %aid)
    267271        # 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)
    270277
    271278        # Authorized: remove the integer from the allocation.  A more complex
     
    281288        self.state_lock.release()
    282289   
    283         return { 'allocID': req['allocID'] }
     290        return { 'allocID': req['allocID'], 'proof': proof.to_dict() }
Note: See TracChangeset for help on using the changeset viewer.